[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

python-apt: Now uses a single code base for Python 2 and 3



Hi everyone,

I just pushed two commits that switch python-apt to a single
codebase that runs under both Python 2 and 3 without the need
for 2to3.

The first commit automatically converted only print statements
to print functions using 2to3, and I manually added from __future__
import print_function to it.

The second commit was created by running 2to3 on the code and then
fixing it up manually. It is relatively small, because I dropped some
of the 2to3 changes that are not needed, like calling list() on the
keys() or replacing u"" literals with "" ones (Python 3.3 luckily
supports them again).

The advantage is that we know know precisely what code runs on
Python 3 and we have more control over it.

We now also only support Python 2.7 or newer. We did not test
with Python 2.6 anymore anyway.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Please do not top-post if possible.


Reply to: