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

Split IAccessibleHandler and Add tests for OrderedWinEventLimiter #10934

Merged
merged 5 commits into from Apr 16, 2020

Conversation

feerrenrut
Copy link
Member

@feerrenrut feerrenrut commented Apr 2, 2020

I'd like to merge this before #10556, due to the amount of code moved preserving the history would be beneficial so I won't squash merge this.

Summary of the issue:

Much of the code for receiving and processing windows events is mixed into IAccessibleHandler. This makes it hard to test or try different approaches. Having tests that verify the behavior is important before merging #10556

Description of how this pull request fixes the issue:

In order to test this code, and implement #10556 it needed to be separated from the rest of IAccessibleHandler.

Note: Reviewing this "commit-wise" will make the changes easier to follow.

This PR makes IAccessibleHandler into a package, with the majority of the code in the __init__.py file.
Code for receiving windows events is moved to internalWinEventHandler.py
The orderedWinEventLimiter class has been moved to its own file and tests have been added (test_orderedWinEventLimiter)

Testing performed:

  • Ran locally with chrome, firefox and several other applications.
  • Unit tests.

Known issues with pull request:

Currently the biggest concern is whether this maintains backwards compatibility. Some adjustments may need to made. This has been mitigated by using tooling to check for errors in the moved files, and by careful manual inspection. If something has been missed, it will likely be very easy to fix, quite likely just re-exposing the name.

Change log entry:

Changes for developers:
- IAccessibleHandler has been converted into a package, OrderedWinEventLimiter has been extracted to a module and unit tests added (#10934)

@feerrenrut feerrenrut requested a review from michaelDCurran Apr 2, 2020
@feerrenrut feerrenrut force-pushed the addTestsForEventHandler branch from 3db6eb5 to 74cc544 Compare Apr 7, 2020
@AppVeyorBot

This comment has been minimized.

feerrenrut added 2 commits Apr 9, 2020
Fix accPropServices error
IAccessibleHandler/__init__.py
IAccessibleHandler/internalWinEventHandler.py
@feerrenrut feerrenrut force-pushed the addTestsForEventHandler branch from 1fd8e80 to 7dedd1b Compare Apr 9, 2020
@feerrenrut
Copy link
Member Author

feerrenrut commented Apr 16, 2020

In order to make these changes easy to track, I won't squash merge this PR.

@feerrenrut feerrenrut changed the title Add tests for event handler Split IAccessible handler and Add tests for OrderedWinEventLimiter Apr 16, 2020
@feerrenrut feerrenrut merged commit 2cbbb02 into master Apr 16, 2020
1 check passed
@feerrenrut feerrenrut deleted the addTestsForEventHandler branch Apr 16, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.1 milestone Apr 16, 2020
@feerrenrut feerrenrut modified the milestones: 2020.1, 2020.2 Apr 16, 2020
@feerrenrut feerrenrut changed the title Split IAccessible handler and Add tests for OrderedWinEventLimiter Split IAccessible andler and Add tests for OrderedWinEventLimiter Apr 16, 2020
@feerrenrut feerrenrut changed the title Split IAccessible andler and Add tests for OrderedWinEventLimiter Split IAccessibleHandler and Add tests for OrderedWinEventLimiter Apr 16, 2020
feerrenrut added a commit that referenced this pull request Apr 17, 2020
@lukaszgo1 lukaszgo1 mentioned this pull request Mar 14, 2021
18 tasks
seanbudd pushed a commit that referenced this pull request Mar 26, 2021
removes code marked as deprecated in #10934

PR #10934 refactored IAccessibleHandler into a package. This necessitated keeping some unused imports but marking them as deprecated. Also various parts of NVDA relied on the fact that IAccessibleHandler star imported all variables from IAccessible and IAccessible2 COM interfaces.

Unused imports are removed from IAccessibleHandler
NVDA's source has been modified to use IAccessible2 names from the COM interface rather than from IAccessibleHandler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants