Re: SCons 3.0, sconsign files and Py2 vs Py3.. how to handle sconsign imcompatabilities

Russel Winder <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.devel
Message-ID <[email protected]>
How many projects will switch back and forth between Python 2 and
Python 3. I cannot imagine many. People with either stick or move. I
would argue making work to cater for a very small number of people is
not cost effective.

I would therefore stick with what I think is the status quo. A build is
either Python 2 or Python 3 but you cannot actually tell per se, and
the highest available version of pickling is used.

This seems to be working well: I have moved all my SCons builds to
Python 3 and have no intention of going back to Python 2.

On Sat, 2017-09-09 at 22:13 -0400, Bill Deegan wrote:
> Greetings,
> 
> This is (I hope) the last issue gating 3.0 release.
> 
> *If we set the default pickle version to 2. (Currently set to
> HIGHEST_AVAILABLE, which means 4 for py3.5+ and 2 for py2.7)*
> 
> If you run scons with py2.7 and then run again with py3.x, you'll get
> the
> following:
> ...
> scons: *** [$DISTDIR/scons-local-3.0.0.alpha.20170821.tar.gz]
> UnicodeDecodeError : 'ascii' codec can't decode byte 0x80 in position
> 0:
> ordinal not in range(128)
> 
> If you run scons with py3 and then rerun with py2.7, you'll get the
> following:
>  * It will rebuild everything you just built with py3
> 
> *If we set the default pickle version  to HIGHEST_AVAILABLE, which
> means 4
> for py3.5+ and 2 for py2.7*
> 
> 
> Here's the options I see to deal with this:
> 1. Always append .py3 to PY3 scons runs' sconsign files
> 2. Always append .py# to sconsign files based on what version of
> python was
> used, ignore pre-existing .sconsigns from older versions
> 3. Do something complicated:
>    a. Leave pickle version as HIGHEST_AVAILABLE, detect version of
> pickle
> by reading first two bytes. If incompatible version detected, change
> file
> name to .py# and try reading that one.  Always write to .sconsign? Or
> write
> to file read.
>    b. ?
> 
> Thoughts?
> 
> -Bill
> _______________________________________________
> Scons-dev mailing list
> [email protected]
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEETwDs1X+Beyaiaer41L3V0s7Np7gFAlm05TkACgkQ1L3V0s7N
p7itBQ//VYjTEmvuNuNIUhdRjaDEYW2vSU8BpOCSgTBNmsSOCUk5RauQvaY5dIzY
D12z7rK6WpjxplQrbAAUD47TS+PnVR8KTZqeytwge0an4/PtqLh79BzNEDi1wJLd
Z1WQAT6+WIkWs7h80XHcUbLXX+UxPfHoBkWF47bbBS+EeM1Tin9VdquA/o3q69Fk
MeDHPVQW6YKG4EzpA305f3HqvvErUy4yTSHAItQdrdNJcpCV9HE02FqRHgI+C/p1
KYFq/HHsyXKkbpYaItu6xIAMWUWxZlkDTf4abfEwOTFGxmTa+0309tIgyqpOl2tG
+KFqAkiIVpFs3fVfBqLRsMZkcNKmuMIsLBZCIDvGGGB3mPuj0rFUiG/qXJYRndzX
9s0nnCuA4zSTNyv4SWjpAN7jBtXs2iGy2ylctqxFvfCPB7uexh3B/Qigt0Do8VvZ
yj13Hlap9Dt0nqdAWtS9bD9h2a4tm/MXw9P5TI4aXaa+sPDB9zlhAjQHk8bLNhej
oss0BFFEImnhVqPFxhhyhOLl1aWrJQps5hsCYoOG+fIsDKx7hHqkRPLIQ9zychY0
9vymCnnygRw5bd6BsbFXiRvuQLWXAlJVWnqgRZ1lCrccUzt8U8jnIYetKwYFUVot
gWVF/dlF0zbmbOVJ4/gc7WAT52Xg8hZGT+D1a34PNhEr9TzW3GA=
=/+Yc
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.