[Scons-dev] Why we need to release separate SCons3 for Python 3

Kenny, Jason L jason.l.kenny at intel.com
Fri Feb 22 14:56:32 EST 2013


So as I recall, the issue is that Scons still does not use subprocess, it used other stuff to do the spawn, and these apis did not like Unicode strings. There subprocess has also had a number of bugs that needed to be fixed. I don't think this is a major issue. I have this all working for me in Parts, as I provide a custom spawner for Scons. Given that the registry functions, environment, etc on windows return Unicode strings I feel that this should not be a major issue. I believe I was arguing that at the time we should try to use a api in SCons for all output, to better supporting logging and warning , error messages as well as cross-platform coloring like I have in parts. This allow for dealing with the console encoding issues ( if any exist for the system) very easily and in a targeted way .

Going forward I really think we need to make a branch that targets 2.7 and 3.x and start fixing it to work.

Jason

From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of Gary Oberbrunner
Sent: Friday, February 22, 2013 1:35 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 2:20 PM, Kenny, Jason L <jason.l.kenny at intel.com<mailto:jason.l.kenny at intel.com>> wrote:
On the Unicode side, I am not sure what the issue is. We have Unicode issue with python on windows today already, and these seem to be working fine. Given that I deal with the Unicode for our product here, I happy to look at this more, or help out. However there should be a major issue I believe with scons and Unicode.

I assume you mean there should NOT be a major issue.

We have in fact had issues with Unicode before, especially in SConf. What encoding should we assume for stdout of a subprocess? Sometimes processes check the locale and encode strings specifically for the locale, assuming they are writing to a console (terminal) which will display them (and sometimes they even check for a tty and do something different). If we guess wrong for the locale of any given string from a subprocess, we may get a decoding error which will throw an exception, or at least we will mangle the text. This happened quite a bit a few years ago in SCons, so I and others added some hacky code to work around it. But it never seemed right. For one example, search the dev archives for " Is SCons really this broken" (http://thread.gmane.org/gmane.comp.programming.tools.scons.devel/9873). Jason, you were part of that discussion at the time.

--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20130222/ce96fadf/attachment.html>


More information about the Scons-dev mailing list