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

[3.8] bpo-41306: Allow scale value to not be rounded (GH-21715) #22596

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 8, 2020

This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the from, to and tickinterval arguments. This PR uses noconv 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 the from argument (line 623), it is rounded relative to itself (i.e. rounding 0) and therefore the assigned value for from is always what is given (no matter what values of from and resolution).

Automerge-Triggered-By: @pablogsal
(cherry picked from commit aecf036)

Co-authored-by: E-Paine [email protected]

https://bugs.python.org/issue41306

This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` 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](tcltk/tk@591f68c) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](https://github.com/tcltk/tk/blob/591f68cb382525b72664c6fecaab87742b6cc87a/generic/tkScale.cGH-L623)), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`).

Automerge-Triggered-By: @pablogsal
(cherry picked from commit aecf036)

Co-authored-by: E-Paine <[email protected]>
@miss-islington
Copy link
Contributor Author

@E-Paine: Status check is done, and it's a success ✅ .

@bedevere-bot bedevere-bot added tests Tests in the Lib/test dir awaiting review labels Oct 8, 2020
@miss-islington
Copy link
Contributor Author

@E-Paine: Status check is done, and it's a success ✅ .

2 similar comments
@miss-islington
Copy link
Contributor Author

@E-Paine: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor Author

@E-Paine: Status check is done, and it's a success ✅ .

Copy link
Contributor

@E-Paine E-Paine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is required but it doesn't seem to be merging by itself

@miss-islington miss-islington merged commit 3d103e0 into python:3.8 Oct 8, 2020
@miss-islington miss-islington deleted the backport-aecf036-3.8 branch October 8, 2020 16:15
@miss-islington
Copy link
Contributor Author

@E-Paine: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants