Re: [Scons-dev] SCons option tests failing in Python3

2017-03-01 Thread Bill Deegan
No worries. All help is welcome!
I'm getting porting fatigue.. :D

On Wed, Mar 1, 2017 at 8:13 PM, William Blevins 
wrote:

> Ok. Ill see what I can do. Sunday is probably the soonest I can commit to
> any work.
>
> On Mar 1, 2017 11:48 AM, "Bill Deegan"  wrote:
>
>> William,
>>
>> If you want to tackle any test failing with something like:
>>
>> TypeError: a bytes-like object is required, not 'str'
>>
>> That should leave only two (or three) types of failures:
>>
>> 1) Having to do with diffferences between py2 & 3 for importing modules, 
>> specifically the code that loads tools
>>
>> 2) Having to do with the fact that py2 dictionaries seem to maintain the 
>> insertion order, and py3 do not
>>
>> (You'll see the diffs where the only thing changing is the order, if you 
>> want to take a whack at fixing these tests too that'd be great)
>>
>> 3) Something breaking all the interactive tests (actually running 
>> interactive seems to work normal)
>>
>> I punted on 1 and 2 for the moment, and am working on 3.
>>
>> -Bill
>>
>>
>>
>> On Tue, Feb 28, 2017 at 10:56 PM, William Blevins 
>> wrote:
>>
>>> Alright. I figured I would share some of the legwork. If I move the test
>>> file, it seems to be getting pstats rather than cProfile which is odd.
>>>
>>> On Wed, Mar 1, 2017 at 12:53 AM, Bill Deegan 
>>> wrote:
>>>
 There seems to be some mess around Python3 importing the wrong module
 with the same name.
 It's breaking a bunch of things.

 I think the "right" fix is to fix the way it's searching for the tools
 it's loading.

 I've punted on that for now, but will revisit tomorrow as it's looking
 kinda complicated,and I wanted to get some of the low hang fruit.

 most of the test/Interactive tests are all failing for the same reason
 and I'm persuing that now.
 But I'm turning into a pumpkin and it will have to wait for tomorrow..


 On Tue, Feb 28, 2017 at 9:15 PM, William Blevins  wrote:

> I suppose the quick fix would be to rename the test file... unless
> someone has a better way?
>
> On Wed, Mar 1, 2017 at 12:02 AM, William Blevins <
> wblevins...@gmail.com> wrote:
>
>> Krew,
>>
>> I figured out why test/options are failing under Python3, but I'm not
>> sure how to fix it right off so I'll post it here in case someone else 
>> has
>> worked with it lately. SCons.compat is renaming cProfile to profile which
>> in turn is causing test/option/profile.py to execute inside other tests. 
>> I
>> discovered that the "missing SConstruct error" was caused by duplicate
>> QMTest/TestCmd.tempdir calls making a second work directory after the 
>> files
>> were written.
>>
>> ./runtest.py test/option/debug-count.py
>>> 1/1 (100.00%) /usr/bin/python3 -tt test/option/debug-count.py
>>> None
>>>   File "test/option/debug-count.py", line 36, in 
>>>   File "/home/wblevins/SCons/scons/QMTest/TestSCons.py", line 264,
>>> in __init__
>>> TestCommon.__init__(self, **kw)
>>>   File "/home/wblevins/SCons/scons/QMTest/TestCommon.py", line 237,
>>> in __init__
>>> TestCmd.__init__(self, **kw)
>>>   File "/home/wblevins/SCons/scons/QMTest/TestCmd.py", line 925, in
>>> __init__
>>> self.workdir_set(workdir)
>>>   File "/home/wblevins/SCons/scons/QMTest/TestCmd.py", line 1610,
>>> in workdir_set
>>> path = self.tempdir(path)
>>>   File "/home/wblevins/SCons/scons/QMTest/TestCmd.py", line 1533,
>>> in tempdir
>>> traceback.print_stack()
>>> None
>>>   File "test/option/debug-count.py", line 36, in 
>>>   File "/home/wblevins/SCons/scons/QMTest/TestSCons.py", line 267,
>>> in __init__
>>> import SCons.Node.FS
>>>   File "", line 969, in _find_and_load
>>>   File "", line 944, in
>>> _find_and_load_unlocked
>>>   File "", line 222, in
>>> _call_with_frames_removed
>>>   File "", line 969, in _find_and_load
>>>   File "", line 944, in
>>> _find_and_load_unlocked
>>>   File "", line 222, in
>>> _call_with_frames_removed
>>>   File "", line 969, in _find_and_load
>>>   File "", line 958, in
>>> _find_and_load_unlocked
>>>   File "", line 673, in _load_unlocked
>>>   File "", line 673, in
>>> exec_module
>>>   File "", line 222, in
>>> _call_with_frames_removed
>>>   File "/home/wblevins/SCons/scons/src/engine/SCons/__init__.py",
>>> line 43, in 
>>> import SCons.compat
>>>   File "", line 969, in _find_and_load
>>>   File "", line 958, in
>>> _find_and_load_unlocked
>>>   File "", line 673, in _load_unlocked
>>>   File "", line 673, in
>>> exec_module
>>>   File "", line 222, in
>>> _call_with_frames_removed
>>>   File 

Re: [Scons-dev] SCons option tests failing in Python3

2017-03-01 Thread William Blevins
Ok. Ill see what I can do. Sunday is probably the soonest I can commit to
any work.

On Mar 1, 2017 11:48 AM, "Bill Deegan"  wrote:

> William,
>
> If you want to tackle any test failing with something like:
>
> TypeError: a bytes-like object is required, not 'str'
>
> That should leave only two (or three) types of failures:
>
> 1) Having to do with diffferences between py2 & 3 for importing modules, 
> specifically the code that loads tools
>
> 2) Having to do with the fact that py2 dictionaries seem to maintain the 
> insertion order, and py3 do not
>
> (You'll see the diffs where the only thing changing is the order, if you want 
> to take a whack at fixing these tests too that'd be great)
>
> 3) Something breaking all the interactive tests (actually running interactive 
> seems to work normal)
>
> I punted on 1 and 2 for the moment, and am working on 3.
>
> -Bill
>
>
>
> On Tue, Feb 28, 2017 at 10:56 PM, William Blevins 
> wrote:
>
>> Alright. I figured I would share some of the legwork. If I move the test
>> file, it seems to be getting pstats rather than cProfile which is odd.
>>
>> On Wed, Mar 1, 2017 at 12:53 AM, Bill Deegan 
>> wrote:
>>
>>> There seems to be some mess around Python3 importing the wrong module
>>> with the same name.
>>> It's breaking a bunch of things.
>>>
>>> I think the "right" fix is to fix the way it's searching for the tools
>>> it's loading.
>>>
>>> I've punted on that for now, but will revisit tomorrow as it's looking
>>> kinda complicated,and I wanted to get some of the low hang fruit.
>>>
>>> most of the test/Interactive tests are all failing for the same reason
>>> and I'm persuing that now.
>>> But I'm turning into a pumpkin and it will have to wait for tomorrow..
>>>
>>>
>>> On Tue, Feb 28, 2017 at 9:15 PM, William Blevins 
>>> wrote:
>>>
 I suppose the quick fix would be to rename the test file... unless
 someone has a better way?

 On Wed, Mar 1, 2017 at 12:02 AM, William Blevins  wrote:

> Krew,
>
> I figured out why test/options are failing under Python3, but I'm not
> sure how to fix it right off so I'll post it here in case someone else has
> worked with it lately. SCons.compat is renaming cProfile to profile which
> in turn is causing test/option/profile.py to execute inside other tests. I
> discovered that the "missing SConstruct error" was caused by duplicate
> QMTest/TestCmd.tempdir calls making a second work directory after the 
> files
> were written.
>
> ./runtest.py test/option/debug-count.py
>> 1/1 (100.00%) /usr/bin/python3 -tt test/option/debug-count.py
>> None
>>   File "test/option/debug-count.py", line 36, in 
>>   File "/home/wblevins/SCons/scons/QMTest/TestSCons.py", line 264,
>> in __init__
>> TestCommon.__init__(self, **kw)
>>   File "/home/wblevins/SCons/scons/QMTest/TestCommon.py", line 237,
>> in __init__
>> TestCmd.__init__(self, **kw)
>>   File "/home/wblevins/SCons/scons/QMTest/TestCmd.py", line 925, in
>> __init__
>> self.workdir_set(workdir)
>>   File "/home/wblevins/SCons/scons/QMTest/TestCmd.py", line 1610, in
>> workdir_set
>> path = self.tempdir(path)
>>   File "/home/wblevins/SCons/scons/QMTest/TestCmd.py", line 1533, in
>> tempdir
>> traceback.print_stack()
>> None
>>   File "test/option/debug-count.py", line 36, in 
>>   File "/home/wblevins/SCons/scons/QMTest/TestSCons.py", line 267,
>> in __init__
>> import SCons.Node.FS
>>   File "", line 969, in _find_and_load
>>   File "", line 944, in
>> _find_and_load_unlocked
>>   File "", line 222, in
>> _call_with_frames_removed
>>   File "", line 969, in _find_and_load
>>   File "", line 944, in
>> _find_and_load_unlocked
>>   File "", line 222, in
>> _call_with_frames_removed
>>   File "", line 969, in _find_and_load
>>   File "", line 958, in
>> _find_and_load_unlocked
>>   File "", line 673, in _load_unlocked
>>   File "", line 673, in
>> exec_module
>>   File "", line 222, in
>> _call_with_frames_removed
>>   File "/home/wblevins/SCons/scons/src/engine/SCons/__init__.py",
>> line 43, in 
>> import SCons.compat
>>   File "", line 969, in _find_and_load
>>   File "", line 958, in
>> _find_and_load_unlocked
>>   File "", line 673, in _load_unlocked
>>   File "", line 673, in
>> exec_module
>>   File "", line 222, in
>> _call_with_frames_removed
>>   File "/home/wblevins/SCons/scons/src/engine/SCons/compat/__init__.py",
>> line 103, in 
>> rename_module('profile', 'cProfile')
>>   File "/home/wblevins/SCons/scons/src/engine/SCons/compat/__init__.py",
>> line 84, in rename_module
>> sys.modules[new] = imp.load_module(old,