Hi,
To serve as a portal to related issues. As such, any pull requests stemming from discussion below should address specific, concrete issues.
Background
Python 3.9, scheduled for October 2020 release, plans to drop old remains of Python 2.x, given that Python 2.7 is now part of history. To help developers with this endeavor, older Python 3 releases (including 3.7) emits deprecation warnings when encountering items marked for deprecation in 3.9 such as no more collections.mapping import (seen in configobj).
Is your feature request related to a problem? Please describe.
As Python development advances, NVDA and its dependencies will need to keep deprecations in mind, especially when it concerns backwards incompatible changes. As noted above, Python 3.7 logs deprecation warnings for things to be removed in Python 3.9 and later, which will affect NVDA, dependencies, and add-on code.
Describe the solution you'd like
Catalog code paths where deprecation warnings are raised so developers can be notified:
- NVDA: NV Access via GitHub issues
- Dependencies: module authors
- Add-ons: add-on authors
Describe alternatives you've considered
Keep the code as is.
Additional context
To see deprecation warnings, one must either:
- Run NVDA from source: py -3.7 -Werror path/to/source/nvda.pyw
- From Python console: import wanrings; warnings.filterwarnings("error"); warnings.filterwarnings("always")
The first option will prevent NVDA from running if errors are found, and the second option is useful for add-on authors as errors will be printed to the log. As this issue and related ones may bring up compatibility changes, I suggest concrete implementations should target 2021.1 unless early integration can be justified (such as dependency update).
Thanks.
Hi,
To serve as a portal to related issues. As such, any pull requests stemming from discussion below should address specific, concrete issues.
Background
Python 3.9, scheduled for October 2020 release, plans to drop old remains of Python 2.x, given that Python 2.7 is now part of history. To help developers with this endeavor, older Python 3 releases (including 3.7) emits deprecation warnings when encountering items marked for deprecation in 3.9 such as no more collections.mapping import (seen in configobj).
Is your feature request related to a problem? Please describe.
As Python development advances, NVDA and its dependencies will need to keep deprecations in mind, especially when it concerns backwards incompatible changes. As noted above, Python 3.7 logs deprecation warnings for things to be removed in Python 3.9 and later, which will affect NVDA, dependencies, and add-on code.
Describe the solution you'd like
Catalog code paths where deprecation warnings are raised so developers can be notified:
Describe alternatives you've considered
Keep the code as is.
Additional context
To see deprecation warnings, one must either:
The first option will prevent NVDA from running if errors are found, and the second option is useful for add-on authors as errors will be printed to the log. As this issue and related ones may bring up compatibility changes, I suggest concrete implementations should target 2021.1 unless early integration can be justified (such as dependency update).
Thanks.