Skip to content

Python 3: use native metaclass definition syntax - #9753

Merged
michaelDCurran merged 9 commits into
nvaccess:threshold_py3_stagingfrom
josephsl:py3metaclass
Jun 16, 2019
Merged

Python 3: use native metaclass definition syntax#9753
michaelDCurran merged 9 commits into
nvaccess:threshold_py3_stagingfrom
josephsl:py3metaclass

Conversation

@josephsl

Copy link
Copy Markdown
Contributor

Link to issue number:

None

Summary of the issue:

Changes metaclass definition syntax to follow Python 3 format.

Description of how this pull request fixes the issue:

Change the metaclass definition of the form "metaclass = metaclass" to "class class(bases, metaclass=metaclass)".

Steps:

  1. Grep -lr "with_metaclass" source.
  2. Locate where metaclasses are defined.
  3. Change the syntax and test.

Also, as part of this, six.with_metaclass import has been removed from modules that uses it.

Testing performed:

Tested with Python 2 and 3 versions of NVDA, testing each time a module has been modified to make sure no regressions are introduced.

Known issues with pull request:

None

Change log entry:

None

@michaelDCurran
michaelDCurran merged commit c3d8e4a into nvaccess:threshold_py3_staging Jun 16, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Jun 16, 2019
@josephsl
josephsl deleted the py3metaclass branch November 2, 2019 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants