Python 3: fix several remaining division errors - #9774
Merged
michaelDCurran merged 9 commits intoJun 21, 2019
Conversation
josephsl
approved these changes
Jun 19, 2019
josephsl
left a comment
Contributor
There was a problem hiding this comment.
Hi,
Got it, thanks for catching them.
Type hints: yes, it will work with Python 3. I think we should create an issue about use of type hints throughout NVDA after Python 3 transition is done.
Thanks.
michaelDCurran
approved these changes
Jun 21, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Hopefully fixes #9641
Follow up to #9692, #9737 and #9748
Summary of the issue:
After the pull requests mentioned above, there were still some major issues with the behavioural changes to the Python 3 default division operator.
Description of how this pull request fixes the issue:
On the source code, executed python modernize with the libmodernize.fixes.fix_classic_division operator. Recorded the diff and changed only the division operators for necessary cases. In the case where the mouse was positioned at the center of an object, switched to using locationHelper instead in order to be less error prone in the future.
Testing performed:
t.b.d.
Known issues with pull request:
I'm a human being. Therefore, I could have discarded some changes by modernize of which I thought they weren't necessary. Note that modernize is way too aggressive, though (i.e. it does not explore the context of division operators).
Change log entry:
None