[anaconda][master][PATCH 0/9] More Python 3 compatibility
Martin Kolman
mkolman at redhat.com
Wed Jan 28 17:43:14 UTC 2015
Most of the easy to change, non-invasive Python 3 compatibility
changes have been done a while ago. This patch set contains more
complicated and invasive changes, but still without breaking Python 2
support.
Also while working on the patch set I've made a preliminary list of
the *invasive* changes that *do* break Python 2 compatibility,
but are needed to make Anaconda Python 3 compatible:
- switch to Python 3 versions of dependencies in spec file
- switch to use python3 in the main anaconda script:
- #!/usr/bin/python3
- replace types.StringType with str or bytes (depending on data being processed)
- replace types.UnicodeType with str
- replace all unicode() calls with str()
- import Queue -> import queue
- import ConfigParser -> import configparser
- remove from __future__ import print_function
- adapt metaclass usage
- 2to3 -f metaclass .
- replace xrange with range
- replace next() with __next__() for custom iterators
- replace raw_input() with input()
These two together + dropping of the few remaining Python 2-only dependencies
(pyblock, something else ?) should more or less give us a Python 3 Anaconda.
Martin Kolman (9):
Make the iter*() dictionary methods Python 3 compatible (#1014220)
Replace StandardError with Exception (#1014220)
Make filter() usage Python 3 compatible (#1014220)
Replace urllib with python-requests for network access (#1014220)
Make map() usage Python 3 compatible (#1014220)
Do not use sys.exc_type (#1014220)
Replace long usage with int (#1014220)
Replace callable with collections.Callable (#1014220)
Make range usage Python 3 compatible (#1014220)
pyanaconda/addons.py | 6 +--
pyanaconda/anaconda.py | 2 +-
pyanaconda/anaconda_argparse.py | 6 +--
pyanaconda/bootloader.py | 4 +-
pyanaconda/geoloc.py | 66 +++++++++++++++---------------
pyanaconda/installclass.py | 4 +-
pyanaconda/iutil.py | 4 +-
pyanaconda/keyboard.py | 6 ++-
pyanaconda/kickstart.py | 6 +--
pyanaconda/localization.py | 2 +-
pyanaconda/network.py | 3 +-
pyanaconda/packaging/dnfpayload.py | 4 +-
pyanaconda/packaging/livepayload.py | 11 +++--
pyanaconda/rescue.py | 2 +-
pyanaconda/threads.py | 2 +-
pyanaconda/ui/__init__.py | 4 +-
pyanaconda/ui/gui/__init__.py | 2 +-
pyanaconda/ui/gui/hubs/__init__.py | 2 +-
pyanaconda/ui/gui/spokes/custom.py | 6 +--
pyanaconda/ui/gui/spokes/datetime_spoke.py | 2 +-
pyanaconda/ui/gui/spokes/filter.py | 4 +-
pyanaconda/ui/gui/spokes/lib/resize.py | 2 +-
pyanaconda/ui/gui/spokes/source.py | 2 +-
pyanaconda/ui/gui/spokes/storage.py | 7 ++--
pyanaconda/ui/gui/xkl_wrapper.py | 4 +-
pyanaconda/ui/tui/hubs/__init__.py | 4 +-
pyanaconda/ui/tui/spokes/__init__.py | 5 ++-
pyanaconda/ui/tui/spokes/time_spoke.py | 3 +-
pyanaconda/users.py | 5 +--
scripts/makeupdates | 2 +-
tests/pyanaconda_tests/ks_version_test.py | 4 +-
tests/pyanaconda_tests/timezone_test.py | 4 +-
32 files changed, 96 insertions(+), 94 deletions(-)
--
2.1.0
More information about the anaconda-patches
mailing list