[Piglit] [ANNOUNCE] python 3 is here... and python 2 is staying

Brian Paul brianp at vmware.com
Thu Feb 11 00:10:29 UTC 2016


On 02/09/2016 01:44 PM, Brian Paul wrote:
> On 02/09/2016 01:33 PM, Dylan Baker wrote:
>> Quoting Brian Paul (2016-02-09 11:10:06)
>>> On 02/09/2016 11:03 AM, Matt Turner wrote:
>>>> On Tue, Feb 9, 2016 at 10:02 AM, Ilia Mirkin <imirkin at alum.mit.edu>
>>>> wrote:
>>>>> On Tue, Feb 9, 2016 at 12:55 PM, Dylan Baker
>>>>> <baker.dylan.c at gmail.com> wrote:
>>>>>> Quoting Matt Turner (2016-02-08 21:06:58)
>>>>>>> On Mon, Feb 8, 2016 at 3:12 PM, Dylan Baker
>>>>>>> <baker.dylan.c at gmail.com> wrote:
>>>>>>>> I just pushed patches to hybridize the framework to use either
>>>>>>>> python
>>>>>>>> 3.3+ or 2.7.
>>>>>>>>
>>>>>>>> Everything should keep working as normal. Unless you have python
>>>>>>>> 3.x,
>>>>>>>> then you'll need to rerun CMake to pick up the changes.
>>>>>>>
>>>>>>> There's still a handful of *.py files with #!/usr/bin/env python2:
>>>>>>>
>>>>>>> generated_tests/random_ubo-arb_uniform_buffer_object.py:#!/usr/bin/env
>>>>>>> python2
>>>>>>> generated_tests/random_ubo.py:#!/usr/bin/env python2
>>>>>>> generated_tests/random_ubo_trim.py:#!/usr/bin/env python2
>>>>>>> piglit-print-commands.py:#!/usr/bin/env python2
>>>>>>> piglit-resume.py:#!/usr/bin/env python2
>>>>>>> piglit-run.py:#!/usr/bin/env python2
>>>>>>> piglit-summary-html.py:#!/usr/bin/env python2
>>>>>>> piglit-summary.py:#!/usr/bin/env python2
>>>>>>> self-tests/test-installed-piglit-script-imports-correct-framework-module:#!/usr/bin/env
>>>>>>>
>>>>>>> python2
>>>>>>
>>>>>>
>>>>>> I thought I'd mentioned that in the commit, but apparently I did
>>>>>> only in
>>>>>> the cover letter.
>>>>>>
>>>>>> The random_ubo_stuff is not plugged into anything at the moment,
>>>>>> and I
>>>>>> have a WIP branch for those, but getting the same output from
>>>>>> python 2
>>>>>> and python 3 for generators without numpy is tricky.
>>>>>>
>>>>>> The piglit-* command were left intentionally. They're legacy
>>>>>> interfaces
>>>>>> and we don't add new ones when adding new functions to the 'piglit'
>>>>>> command (piglit summary aggregate, for example). Personally, I'd
>>>>>> rather
>>>>>> get rid of them (other than print-commands, which I should probably
>>>>>> update).
>>>>>
>>>>> Really? I think it's a lot more straightforward to use them than the
>>>>> "piglit" megarunner thing... not sure why that was added tbh. But
>>>>> since the regular commands stayed, I didn't object at the time. Should
>>>>> I have?
>>>>
>>>> Yeah, I've continued using the piglit-run.py/piglit-summary.py
>>>> scripts. I don't know what I would gain by switching, but I would lose
>>>> the ability to tab complete their names. :)
>>>
>>> I never use the 'piglit' command either.  But I just tried it now and it
>>> crashed:
>>>
>>> $ ./piglit
>>> Traceback (most recent call last):
>>>     File "./piglit", line 107, in <module>
>>>       import framework.programs.run as run
>>>     File "/home/brian/projects/piglit/framework/programs/run.py", line
>>> 34, in <module>
>>>       from framework import core, backends, exceptions, options
>>>     File "/home/brian/projects/piglit/framework/core.py", line 35, in
>>> <module>
>>>       from framework import exceptions
>>>     File "/home/brian/projects/piglit/framework/exceptions.py", line 57,
>>> in <module>
>>>       @six.python_2_unicode_compatible
>>> AttributeError: 'module' object has no attribute
>>> 'python_2_unicode_compatible'
>>>
>>> Dylan?
>>>
>>> -Brian
>>>
>>> _______________________________________________
>>> Piglit mailing list
>>> Piglit at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/piglit
>>
>> Interesting. That looks like a six version issue. What version of six do
>> you have? If it's a problem we can replace or open-code the decorator
>> ourselves, it's not very complex.
>
> $ dpkg -l python-six
> Desired=Unknown/Install/Remove/Purge/Hold
> |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
>
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name           Version      Architecture Description
> +++-==============-============-============-=================================
>
> ii  python-six     1.5.2-1      all          Python 2 and 3
> compatibility libr

Any ideas on how to fix this, Dylan?

I can't run piglit as-is.

-Brian




More information about the Piglit mailing list