[3.8] bpo-41306: Allow scale value to not be rounded (GH-21715) #22596
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
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.
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the
from
,to
andtickinterval
arguments. This PR usesnoconv
if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed).Going into more detail for those who want it, the Tk change was made in commit 591f68c and means that the arguments listed above are rounded relative to the value of
from
. However, when rounding thefrom
argument (line 623), it is rounded relative to itself (i.e. rounding0
) and therefore the assigned value forfrom
is always what is given (no matter what values offrom
andresolution
).Automerge-Triggered-By: @pablogsal
(cherry picked from commit aecf036)
Co-authored-by: E-Paine 63801254+E-Paine@users.noreply.github.com
https://bugs.python.org/issue41306