[Scons-dev] SCons option tests failing in Python3

Bill Deegan bill at baddogconsulting.com
Thu Mar 2 00:20:50 EST 2017


No worries. All help is welcome!
I'm getting porting fatigue.. :D

On Wed, Mar 1, 2017 at 8:13 PM, William Blevins <wblevins001 at gmail.com>
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" <bill at baddogconsulting.com> 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 <wblevins001 at gmail.com>
>> 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 <bill at baddogconsulting.com>
>>> 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 <wblevins001 at gmail.com
>>>> > 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 <
>>>>> wblevins001 at 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 <module>
>>>>>>>   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 <module>
>>>>>>>   File "/home/wblevins/SCons/scons/QMTest/TestSCons.py", line 267,
>>>>>>> in __init__
>>>>>>>     import SCons.Node.FS
>>>>>>>   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
>>>>>>>   File "<frozen importlib._bootstrap>", line 944, in
>>>>>>> _find_and_load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap>", line 222, in
>>>>>>> _call_with_frames_removed
>>>>>>>   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
>>>>>>>   File "<frozen importlib._bootstrap>", line 944, in
>>>>>>> _find_and_load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap>", line 222, in
>>>>>>> _call_with_frames_removed
>>>>>>>   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
>>>>>>>   File "<frozen importlib._bootstrap>", line 958, in
>>>>>>> _find_and_load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap_external>", line 673, in
>>>>>>> exec_module
>>>>>>>   File "<frozen importlib._bootstrap>", line 222, in
>>>>>>> _call_with_frames_removed
>>>>>>>   File "/home/wblevins/SCons/scons/src/engine/SCons/__init__.py",
>>>>>>> line 43, in <module>
>>>>>>>     import SCons.compat
>>>>>>>   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
>>>>>>>   File "<frozen importlib._bootstrap>", line 958, in
>>>>>>> _find_and_load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap_external>", line 673, in
>>>>>>> exec_module
>>>>>>>   File "<frozen importlib._bootstrap>", line 222, in
>>>>>>> _call_with_frames_removed
>>>>>>>   File "/home/wblevins/SCons/scons/src/engine/SCons/compat/__init__.py",
>>>>>>> line 103, in <module>
>>>>>>>     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, *imp.find_module(old))
>>>>>>>   File "/usr/lib/python3.5/imp.py", line 234, in load_module
>>>>>>>     return load_source(name, filename, file)
>>>>>>>   File "/usr/lib/python3.5/imp.py", line 172, in load_source
>>>>>>>     module = _load(spec)
>>>>>>>   File "<frozen importlib._bootstrap>", line 693, in _load
>>>>>>>   File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap_external>", line 673, in
>>>>>>> exec_module
>>>>>>>   File "<frozen importlib._bootstrap>", line 222, in
>>>>>>> _call_with_frames_removed
>>>>>>>   File "/usr/lib/python3.5/cProfile.py", line 10, in <module>
>>>>>>>     import profile as _pyprofile
>>>>>>>   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
>>>>>>>   File "<frozen importlib._bootstrap>", line 958, in
>>>>>>> _find_and_load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
>>>>>>>   File "<frozen importlib._bootstrap_external>", line 673, in
>>>>>>> exec_module
>>>>>>>   File "<frozen importlib._bootstrap>", line 222, in
>>>>>>> _call_with_frames_removed
>>>>>>>   File "/home/wblevins/SCons/scons/test/option/profile.py", line
>>>>>>> 39, in <module>
>>>>>>>     test = TestSCons.TestSCons()
>>>>>>>   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()
>>>>>>> Preserved directory /tmp/testcmd.10458.tezdkydu
>>>>>>>
>>>>>>> Preserved directory /tmp/testcmd.10458.qh69ifi9
>>>>>>>
>>>>>>> Preserved directory /tmp/testcmd.10458.tezdkydu
>>>>>>>
>>>>>>> Preserved directory /tmp/testcmd.10458.qh69ifi9
>>>>>>>
>>>>>>
>>>>>> Thoughts?
>>>>>> William
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Scons-dev mailing list
>>>>> Scons-dev at scons.org
>>>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Scons-dev mailing list
>>>> Scons-dev at scons.org
>>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Scons-dev mailing list
>>> Scons-dev at scons.org
>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>
>>>
>>
>> _______________________________________________
>> Scons-dev mailing list
>> Scons-dev at scons.org
>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>
>>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170301/94fa70c6/attachment-0001.html>


More information about the Scons-dev mailing list