[Scons-users] Reading Python 3.8.0 .dblite file from Python 2.7
Bill Deegan
bill at baddogconsulting.com
Wed Dec 4 00:34:38 EST 2019
Don,
Even if you use the same pickle versions you will likely still see some
rebuilds as python 2 vs python 3 pickle some objects differently. Also the
signatures of python function actions will be different.
And this is explicitly specified in CHANGES.txt and the release notes for
3.0.0
You can specify the SConsign file name and add .2 and .3 on the end so at
least they won't conflict with each other.
-Bill
On Tue, Dec 3, 2019 at 4:48 PM Mats Wichmann <mats at wichmann.us> wrote:
> On 12/3/19 5:35 PM, Don Baldwin wrote:
> > Hi,
> >
>
> > ignoring invalid `dblite' file
> >
> > From what I've read, this seems to be due to the incompatibility
> > between the pickle library between Python 2 and 3.
>
> evolving protocols, yes. actually it's not just py 2/3, 3.8 added a new
> pickle protocol that earlier Py3's can't read.
>
> > I see the following code in lib/SCons/compat/__init__.py:
> >
> > # Was pickle.HIGHEST_PROTOCOL
> > # Changed to 2 so py3.5+'s pickle will be compatible with py2.7.
> > PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL
> >
> >
> > When I modify this to set PICKLE_PROTOCOL = 2, my tools are able to
> > successfully read the .dblite files, but I'd prefer not to have to
> > modify the native SCons code.
> >
> > Is there a way to set this value from my SConscript file, or some other
> > preferred way to handle this situation?
> No. SCons picks the highest available pickle version which is arguably
> a dubious choice for your situation (and mine, it turns out), but that's
> what it does. There's no official API-ish way to request a different
> one. that would be a feature request, I guess.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20191203/65a492ce/attachment.html>
More information about the Scons-users
mailing list