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

bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser #6578

Merged
merged 15 commits into from
Jan 21, 2021

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Apr 23, 2018

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Docstrings look excessive verbose.

Any chance of writing tests for the color chooser?

@csabella
Copy link
Contributor Author

Any chance of writing tests for the color chooser?

The color chooser invokes the show() method which automatically displays the dialog. I couldn't figure out how to automate the test to click 'ok' or 'cancel' since I wasn't defining those myself. What's the best way to interact with that kind of dialog window?

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@serhiy-storchaka
Copy link
Member

@csabella, do you mind to add a simple test as @terryjreedy required? I don't like tests that depend on implementation details, but here we don't have other way.

@csabella
Copy link
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

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

Running test_tk runs the two ChooserTests. They pass and look complete. Anything else is up to Serhiy.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@codecov

This comment has been minimized.

@terryjreedy
Copy link
Member

terryjreedy commented Dec 28, 2020

Pipelines Ubuntu:
======================================================================
FAIL: test_winfo_rgb (tkinter.test.test_tkinter.test_misc.MiscTest)
----------------------------------------------------------------------
Traceback (most recent call last):
18504
- (19018, 15420, 35980)
+ (18504, 15677, 35723)
======================================================================
FAIL: test_fixresult (tkinter.test.test_tkinter.test_colorchooser.ChooserTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vsts/work/1/s/Lib/tkinter/test/test_tkinter/test_colorchooser.py", line 38, in test_fixresult
    self.assertEqual(cc._fixresult(self.root, '#1e90ff'),
AssertionError: Tuples differ: ((33, 142, 255), '#1e90ff') != ((30, 144, 255), '#1e90ff')

First differing element 0:
(33, 142, 255)
(30, 144, 255)
- ((33, 142, 255), '#1e90ff')
?    ^    ^
+ ((30, 144, 255), '#1e90ff')
?    ^    ^

@terryjreedy
Copy link
Member

terryjreedy commented Jan 21, 2021

On tracker msg385400 (today, on the bpo issue) I give preliminary experimental results and speculations about the test failures. I necessary, I will add some temporary debug prints to the tests.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@serhiy-storchaka serhiy-storchaka merged commit 6713e86 into python:master Jan 21, 2021
@miss-islington
Copy link
Contributor

Thanks @csabella for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @csabella and @serhiy-storchaka, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 6713e869c4989c04318158b406c30a147ea52904 3.9

@miss-islington
Copy link
Contributor

Sorry @csabella and @serhiy-storchaka, I had trouble checking out the 3.8 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 6713e869c4989c04318158b406c30a147ea52904 3.8

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Jan 24, 2021
@bedevere-bot
Copy link

GH-24318 is a backport of this pull request to the 3.9 branch.

serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Jan 24, 2021
…inter.colorchooser (pythonGH-6578).

(cherry picked from commit 6713e86)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 25, 2021
…inter.colorchooser (pythonGH-6578). (pythonGH-24318)

(cherry picked from commit 6713e86)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit 3d5434d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull request Jan 25, 2021
…inter.colorchooser (GH-6578). (GH-24318)

(cherry picked from commit 6713e86)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
miss-islington added a commit that referenced this pull request Jan 25, 2021
…inter.colorchooser (GH-6578). (GH-24318)

(cherry picked from commit 6713e86)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
(cherry picked from commit 3d5434d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
@serhiy-storchaka serhiy-storchaka removed their assignment Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants