Skip to content

Follow up on Python 3 conversion #618

@Infernio

Description

@Infernio

Some easy things to do now that we're on py3 (well, technically not quite yet, give it a couple hours/days :P):

  • Run the noop_u fixer from our 2to3 fork - replaces u'' r'*' -> r'*'
  • Slowly uproot OrderedDicts ( 74827fa...4f418ed f628c21)
  • Run the object_super fixer from our 2to3 fork - removes all (object) superclasses which are superfluous on py3 (e.g. class Foo(object): -> class Foo:)
  • (more tricky) Use super().meth() instead of super(SelfClass, self).meth() - this will make the uses that use parents higher on the mro stand out
  • Progressively revisit regexes -> re.U is not needed -> https://docs.python.org/3/library/re.html#re.A - usually the code around needs dusting (or the regx to go altogether see 0f10a43 for reOblivion for instance) so don't just search/replace en masse

Things we may also want to consider:

  • Run the unicode_literals fixer from our 2to3 fork - gets rid of all u'' prefixes (e.g. u'this is a string -> 'this is a string')

Metadata

Metadata

Labels

A-pythonArea: Python (everything related to the Python interpreter we're using)C-todoCategory: TODO, specific item that needs to be accomplished in working towards a goal

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions