Re: Python 3 issue

RW via Scons-dev <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.devel
Message-ID <CAMMCZ5MeugZ=Y1pBoRUfra1ruHPxfC-VOUY+X+EtEz1XHWgzCQ@mail.gmail.com>
Forgot to hit reply to all

---------- Forwarded message ----------
From: RW <garlicbready-gM/[email protected]>
Date: 29 June 2017 at 14:22
Subject: Re: [Scons-dev] Python 3 issue
To: Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org>


Okay it's my fault on this one
one of the main sources of problems is that I was running the tests as the
root user
once I started to run the tests as a local non-root user almost all the
errors disapeared
When running as a non-root user the use of a virtual environment or without
makes no difference as you've said

with unpatched sources

  * python2 / linux now has no errors

  * python3 / linux now just has a couple of docbook related errors
(included in the logs)
        test/Docbook/basic/xinclude/xinclude.py
        test/Docbook/dependencies/xinclude/xinclude.py

the change I made for relative imports just causes an error for actiontests
as before
but other than that it's the same as unpatched

On 29 June 2017 at 03:34, Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org> wrote:

> You can ignore actiontest failures for now. I found an issue with py3 and
> the python action signiture.
>
> Why would you need to use virtualenv to test?
>
> I'm just running macports pythons, or on linux vanilla builds from source,
> or on windows " py -3.6  or py -3.5"
>
>
> On Wed, Jun 28, 2017 at 6:11 PM, RW <garlicbready-gM/[email protected]> wrote:
>
>> Okay it looks like the change I've made is impacting a couple of tests
>>
>> the first one is
>> src/engine/SCons/ActionTests.py
>>
>> after calling the following line
>> ```
>> c = SCons.Action._object_contents(o)
>> ```
>>
>> the result is compared against a hard coded string
>> ```
>> AssertionError: Got
>> b'ccopy_reg\n_reconstructor\nq\x00(c__main__\nTestClass\nq\x
>> 01c__builtin__\nobject\nq\x02Ntq\x03Rq\x04}q\x05(X\x01\x00\x
>> 00\x00aq\x06h\x06X\x01\x00\x00\x00bq\x07h\x07ub.'
>> Expected one of
>> b'ccopy_reg\n_reconstructor\nq\x00(c__main__\nTestClass\nq\x
>> 01c__builtin__\nobject\nq\x02Ntq\x03Rq\x04}q\x05(X\x01\x00\x
>> 00\x00bq\x06h\x06X\x01\x00\x00\x00aq\x07h\x07ub.'
>> ```
>> perhaps this hard coded string needs to be changed to match
>>
>> Next is
>> test/Parallel/failed-build.py
>> not sure if this is a thread related fault, since when I run the test
>> individually it works fine
>>
>> There's also 4 others I need to look at, which seem to be failing before
>> any changes on this setup
>>   src/engine/SCons/Node/FSTests.py
>>   test/Errors/permission-denied.py
>>   test/Install/Install.py
>>   test/VariantDir/errors.py
>>
>>
>> On 29 June 2017 at 01:38, RW <garlicbready-gM/[email protected]> wrote:
>>
>>> It looks like part of the problem was that I wasn't using a virtual
>>> environment
>>> there are however still some errors (about 4 this time)
>>>
>>> I've captured the stdout / stderr this time around with a command like
>>> python runtest.py -a -o test_py3_linux_unpatched.log
>>> >>test_py3_linux_unpatched.out 2>&1
>>>
>>> I've attached some updated logs with the stdout / stderr
>>> I should mention I'm using a VM via VMWare which has the latest Ubutunu
>>> Mate installed
>>> I don't think my patch has had an impact on the tests, these seem to be
>>> failing regardless of the python version or the changes I've made (logs
>>> seem to be the same)
>>>
>>> Many Thanks
>>> Richard
>>>
>>>
>>> On 28 June 2017 at 20:50, Bill Deegan <bill-cJFiu+DHMVC5azolltMz9laTQe2KTcn/@public.gmane.org> wrote:
>>>
>>>> The logs don't include stderr, so can't see failures.
>>>> Here's the py3 patched linux log failures:
>>>>
>>>> Failed the following 7 tests:
>>>>         src/engine/SCons/ActionTests.py
>>>>         src/engine/SCons/Node/FSTests.py
>>>>         test/Docbook/basic/xinclude/xinclude.py
>>>>         test/Docbook/dependencies/xinclude/xinclude.py
>>>>         test/Errors/permission-denied.py
>>>>         test/Install/Install.py
>>>>         test/VariantDir/errors.py
>>>>
>>>>
>>>> They're all passing on linux in buildbot..
>>>> http://buildbot.scons.org/#/builders/10/builds/21
>>>>
>>>> Can you take a look at those failures?
>>>>
>>>> Thanks,
>>>> Bill
>>>>
>>>> On Wed, Jun 28, 2017 at 11:37 AM, RW via Scons-dev <[email protected]
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>> I've attached the test logs from before and after the pull request
>>>>>
>>>>> Many Thanks
>>>>> Richard
>>>>>
>>>>> On 27 June 2017 at 23:55, RW <garlicbready-gM/[email protected]> wrote:
>>>>>
>>>>>> Hi,
>>>>>> I've just submitted a pull request to allow for relative imports
>>>>>> under python 3 for tools.
>>>>>> There's also a test included as well.
>>>>>>
>>>>>> https://bitbucket.org/scons/scons/pull-requests/486/added-su
>>>>>> pport-for-relative-imports-within/diff
>>>>>>
>>>>>>
>>>>>> On 26 June 2017 at 09:31, Russel Winder <[email protected]> wrote:
>>>>>>
>>>>>>> On Fri, 2017-06-23 at 10:53 -0700, Bill Deegan wrote:
>>>>>>> > This change:
>>>>>>> > https://bitbucket.org/bdbaddog/scons-russel-example/commits/
>>>>>>> 48899a710
>>>>>>> > f9afbec891307addd6ae5b9c08d53c9?at=master
>>>>>>> >
>>>>>>> > Will make it work in py2 and py3.
>>>>>>> >
>>>>>>> > Any reason we can't live with that?
>>>>>>>
>>>>>>> On reflection that probably seems like what I should have written in
>>>>>>> the first place!
>>>>>>>
>>>>>>> Python 3 uses absolute imports with the . and .. exceptions. The
>>>>>>> absolute_import __future__ makes Python 2 behave the same to give
>>>>>>> consistency. Of course this only works if the parent package is
>>>>>>> imported. In this context that will always be the case, so it should
>>>>>>> be
>>>>>>> fine.
>>>>>>>
>>>>>>> I can definitely live with this as an idiom.
>>>>>>>
>>>>>>> I am now just embarrassed to have found this problem. :-)
>>>>>>>
>>>>>>> --
>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Scons-dev mailing list
>>>>> [email protected]
>>>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>>>
>>>>>
>>>>
>>>
>>
>

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev
py3_test_logs3.zip (application/zip, 136.5 KB) - not displayed
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.