#7715 Remove Python 2 specific elements
Opened 5 years ago by cheimes. Modified 3 years ago

FreeIPA master is now Python 3 only. Let's remove workarounds, hacks, and other code that was necessary for Python 2 support.


master:

  • b431e9b Py3: Remove subclassing from object

master:

  • 964a9bd Py3: Replace six.string_types with str
  • ea39652 Py3: Replace six.integer_types with int
  • 61156b0 Py3: Replace six.text_type with str
  • ed967ec Py3: Replace six.bytes_type with bytes

master:

  • 15d5e44 Py3: Replace six.moves imports

I suppose this can be closed?

I suppose this can be closed?

Ignore this comment. There are still six.PY3 things around.

Is there any reason why some six usage remained? If not I would try and give it a go to remove them.

Some places (like upgrade code or DCERPC handling) should be lest with six for longer -- we want to keep possibility to backport to 4.6 branch which is Python 2 for some of the complex code we have.

No, please don't close the ticket yet. There is still a lot of Python 2 code besides six in master, for example u"" string and imports of Python 2 package names with try: import oldname except ImportError: import newname.

Login to comment on this ticket.

Metadata