Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3: new.instancemethod is no more #8658

Closed
josephsl opened this issue Aug 22, 2018 · 3 comments
Closed

Python 3: new.instancemethod is no more #8658

josephsl opened this issue Aug 22, 2018 · 3 comments

Comments

@josephsl
Copy link
Collaborator

@josephsl josephsl commented Aug 22, 2018

Hi,

Discovered while trying to figure out why speech synthesizers were not loading in python 3 port: new.instancemethod is gone.

Steps to reproduce:

  1. Run Python 2.7 and 3.7 interpreters.
  2. Type "import new".

Actual behavior:

Python 3 raises "ModuleNotFoundError".

Expected behavior:"New" module or its closest replqcement (currently types) should be loaded in Python 3.

System configuration:

NVDA Installed/portable/running from source:

Not applicable

NVDA version:

N/A

Windows version:

Windows 10 Version 1803

Name and version of other software in use when reproducing the issue:

Python 2.7, 3.7

Other information about your system:

N/A

Other questions:

Does the issue still occur after restarting your PC?

Not applicable

Have you tried any other versions of NVDA?

N/A

Impact:

This may impact object creation and related facilities, a fundamental blocking bug for Python 3 transition. Google searches says use types.instancemethod, or in Python 3, new.instancemethod is not needed.

Thanks.

@larry801
Copy link
Contributor

@larry801 larry801 commented Aug 22, 2018

Is types.MethodType proper for this?

Loading

@leonardder
Copy link
Collaborator

@leonardder leonardder commented Aug 22, 2018

a simple grep of instancemethod in the git repository turns out that instancemethod is only imported in the NVDAObjects module (init.py), but it is unused.

Loading

@josephsl
Copy link
Collaborator Author

@josephsl josephsl commented Aug 22, 2018

Loading

@leonardder leonardder added this to To do in Update NVDA to Python 3 via automation Dec 11, 2018
Update NVDA to Python 3 automation moved this from To do to Done Dec 13, 2018
@nvaccessAuto nvaccessAuto added this to the 2018.4 milestone Dec 13, 2018
feerrenrut added a commit that referenced this issue Dec 13, 2018
Closes #8294
Fixes #8652
Closes #8658

Properties and methods within classes can now be marked as abstract in NVDA. These classes will raise an error if instantiated.
See PR #8393 for full description.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants