[Scons-dev] SCons 3.0, sconsign files and Py2 vs Py3.. how to handle sconsign imcompatabilities

Tim Jenness tjenness at lsst.org
Sun Sep 10 11:52:55 EDT 2017



> On Sep 10, 2017, at 08:32, RW via Scons-dev <scons-dev at scons.org> wrote:
> 
> Okay so changing
> pickle.loads(p)
> to
> pickle.loads(p, encoding='bytes')
> 
> seems like a partial fix

Ok. That would be desirable.

> if there's a .sconsign.dblite file saved in python 2 with pickle protocol 2
> python 3 won't crash now, instead it'll just rebuild the sources / ignore the current state
> 

I think that’s a reasonable short term fix. 


> going the opposite way from python 3 to python 2 gives me the error
> scons: *** [mkdocs.yml] ValueError : unsupported pickle protocol: 4
> 
> I suppose you could force it to always use pickle protocol 2 (not sure how to do that)
> the end result would be that it would always rebuild when going from py2 -> py3 or py3 -> py2
> so it wouldn't crash but ignore the build state (perhaps the file hashes are calculated differently?)
> 

How about protocol 2 is used for SCons 3.0 to allow a workable transition, but then say that in the release in 6 months or a year’s time py3 will start using 4?

It might be worth having a quick look at the hashing to work out why the rebuilds happen.


> pickle protocol 4 might be a lot quicker than pickle protocol 2 btw I'm not sure

Can this be benchmarked?

— 
Tim Jenness


More information about the Scons-dev mailing list