[Merge] lp:~mathieu-tl/software-properties/port-to-python3 into lp:software-properties
Martin Pitt
martin.pitt at ubuntu.com
Thu Jun 28 15:28:17 UTC 2012
Looks good mostly, thanks for doing this! I just have a couple of nitpicks:
+from __future__ import print_function
This is only necessary if you want to support print() with multiple arguments when running with Python 2. (A single argument works fine in Python 2 as well).
+Breaks: python-software-properties (<< 0.84)
Why that? The python 2 and 3 versions ought to be installable in parallel.
+ from queue import Empty, Queue
This changed from "import Queue". Importing module contents into the global namespace is something I personally dislike; it's a matter of style mostly, but I find it greatly decreasing robustness and also makes it impossible to use pyflakes. Note that you can do something like
try:
import queue
except ImportError:
import Queue as queue
845 - for option in softwareproperties.CONF_MAP.keys():
846 + for option in list(softwareproperties.CONF_MAP.keys()):
The list() is not necessary here. keys() returns an iterator, which is exactly what "for" expects. (Same problem in the subsequent hunks)
1023 +from gi.repository import GLib as glib
Can we rather change "glib.*" to "GLib.*"? Otherwise the code looks like it would use the static modules.
Need to run now, will review the rest tomorrow. Thanks!
--
https://code.launchpad.net/~mathieu-tl/software-properties/port-to-python3/+merge/111668
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~mathieu-tl/software-properties/port-to-python3 into lp:software-properties.
More information about the Ubuntu-reviews
mailing list