-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
Extend the life of deprecated aliases #13791
Conversation
See test results for failed build of commit 70f38a5108 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, assuming you've tested that these new warning show in the log correctly.
Please also update the description to note that warnings will be logged for usage of deprecations.
I can confirm the testing of warning logs. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@seanbudd, I know that this PR has already been merged. |
I believe this was investigated when the constants were first deprecated in #12510. |
Link to issue number:
None
Summary of the issue:
For deprecated aliases, there is no need to remove them, as they have a minimum maintenance burden.
Add-on authors and contributors have requested we keep aliases where possible.
However, without marking code for removal, it can be hard to find deprecations.
Core contributors and add-on authors may want to avoid deprecated APIs.
As such, a way to test the deprecated API being removed is needed.
Description of how this pull request fixes the issue:
Extends the life of all currently deprecated aliases.
Warnings will be logged when attempting to use deprecated aliases (except for controlTypes, due to the noise of this).
Adds a global variable to mark code as deprecated, which allows developers to test NVDA with deprecated APIs removed.
As a result, there is currently no API breakages staged for 2023.1
Testing strategy:
Manual testing:
Test Steps 1:
import appModules.calculatorapp
from gui import quit; quit()
(calling quit should trigger the log warning)from appModuleHandler import NVDAProcessID
from easeOfAccess import ROOT_KEY
Test Steps 2:
globalVars._allowDeprecatedAPI = False
ModuleNotFoundError
/ImportError
:import appModules.calculatorapp
from gui import quit
from appModuleHandler import NVDAProcessID
from easeOfAccess import ROOT_KEY
Known issues with pull request:
None
Change log entries:
Included in PR
Code Review Checklist: