[Piglit] Convert from python2 to python3

Dylan Baker baker.dylan.c at gmail.com
Tue Feb 25 12:36:10 PST 2014


On Tuesday, February 25, 2014 02:01:56 PM Ken Phillis Jr wrote:
> On Mon, Feb 24, 2014 at 9:10 PM, Matt Turner <mattst88 at gmail.com> wrote:
> > On Mon, Feb 24, 2014 at 11:47 AM, Ilia Mirkin <imirkin at alum.mit.edu> 
wrote:
> >> On Mon, Feb 24, 2014 at 2:42 PM, Dylan Baker <baker.dylan.c at gmail.com> 
wrote:
> >>> This series makes the transition from python2 to python3. In general
> >> 
> >> Out of curiousity, what's the motivation for this? I've been able to
> >> avoid python3 quite nicely thus far, all it seems to do is break
> >> compatibility with existing setups... Admittedly piglit is targeted at
> >> developers, who probably have the latest and greatest stuff, so
> >> perhaps not a huge issue.
> > 
> > Python 2.7 support sucks. Piglit with concurrency was simply broken
> > with Python 2.7.4 and 2.7.5 because of some regression related to
> > threading. Then piglit was broken again after the timeouts code was
> > committed in November, until it was reverted, as far as we can tell
> > because of a Python bug. And Python 3.3 just has the necessary support
> > for doing this without rolling it ourselves.
> > 
> > Basically, we're tired of relying on old and dead versions of python
> > which are ill maintained and break often.
> 
> I agree with the forced update to Python 3, but I would suggest making
> some tweaks to keep this working on a lot of the long-term desktop
> environments because it is better to have a stable software base when
> writing tests and improving the actual driver.
> 
> Debian: https://packages.debian.org/wheezy/python3 - The minimum
> supported version of the releases is Python3 version 3.1.3
> Ubuntu: http://packages.ubuntu.com/lucid/python3 - Minimum Python3
> version of 3.1.2 ( on Ubuntu 10.04 LTS ), but the current long term
> release ( 12.04 LTS ) features python 3.2.3.
> Gentoo: This always tends to carry the latest python release so this
> probably is not going to be an issue.
> FreeBSD: FreeBSD 9 includes python version 3.2.3 ( or similar ) in a
> package so this should work out well.
> Red Hat based distributions: These appear to only have Python 2.7
> based on the package searches I can find. I may be wrong, but it would
> be a good idea to at least verify this.

on python3<3.2: Python as a project doesn't support python older than 3.2, and 
3.1 lacks features we're already using (ie: argparse). It would be a step 
backwards to go to python 3.1.

on python 3<3.3: Python 3.2 has 99% feature parity with 2.7, so while it would 
be a step toward the future, many of the reasons for going to python3 are new 
features that will be useful or allow us to replace our own hand rolled code 
with code from the standard library. Thread timeouts is the most obvious 
example. If we need to postpone 3.3 support and move to 3.2 that is an option, 
although IMHO it would be better to just go all the way.

on LTS/stable releases: Piglit is a testing framework for *upstream 
development* of graphics drivers. You need up-to-date libdrm, linux, llvm, etc 
to even build mesa. I don't know of any developers trying to do upstream 
development on EL, Debian<testing (jessie has 3.3.4), or Ubuntu<latest (saucy 
has 3.3.x); though I might be wrong, and they can yell at me for making stupid 
assumptions!, because the point of LTS/Stable releases is that *nothing ever 
changes*. I think the right solution for LTS/stable releases is to just tag 
the last 2.6+argparse compatible release, and point people who don't have 3.3 
support to that tag.

BSD: At the moment I don't know of anyone running piglit on *BSD, and I found 
python33 in my ports tree on my FreeBSD 9.x machine, so I'm not convinced it's 
a problem

-Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20140225/805848c7/attachment.pgp>


More information about the Piglit mailing list