[Scons-dev] Why we need to release separate SCons3 for Python 3
Kenny, Jason L
jason.l.kenny at intel.com
Fri Feb 22 18:23:15 EST 2013
>>You misused the context. It is not about using print("") in Python 2 - it is about using print "" in Python 3, which is just what happen when users will try to use old SConstruct files with Python 3.
I think this is an important point about python 2 to 3.
We have to think of Scons as a API not as python code at times. It hard to separate at some points.. but the random usage of import pythonpackage can make it so sconstructs that exist will not port.
In Parts at least I have this covered with a API for printing message ie …
SConsEnvironment.PrintError
SConsEnvironment.PrintWarning
SConsEnvironment.PrintMessage
SConsEnvironment.VerboseMessage
However there are probably other items I missed in my add-on. I don’t see how we can support python 3 without some instability. On the other hand the instability will allow us to find the weak points in the API we need to fill in. The example here of printing can be solved with a API addition, and or telling people to use print() if they want to be portable between python 2 and 3
Jason
From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of anatoly techtonik
Sent: Friday, February 22, 2013 4:53 PM
To: SCons developer list
Subject: Re: [Scons-dev] Why we need to release separate SCons3 for Python 3
On Fri, Feb 22, 2013 at 9:42 PM, Russel Winder <russel at winder.org.uk<mailto:russel at winder.org.uk>> wrote:
On Fri, 2013-02-22 at 18:10 +0300, anatoly techtonik wrote:
[…]
> Every construct of Python 2.x that is not compatible with Python 3 will
> give errors - print statements is the most obvious.
Not entirely true. print statements/function calls call be written to
be Python 2 and Python 3 compliant, or:
from __future__ import print_function
You misused the context. It is not about using print("") in Python 2 - it is about using print "" in Python 3, which is just what happen when users will try to use old SConstruct files with Python 3.
--
anatoly t.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20130222/064e3692/attachment.html>
More information about the Scons-dev
mailing list