Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
serhiy-storchaka merged 15 commits into
python:masterpython/cpython:masterfrom
csabella:bpo33289csabella/cpython:bpo33289Copy head branch name to clipboard
Jan 21, 2021
Merged

bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser#6578
serhiy-storchaka merged 15 commits into
python:masterpython/cpython:masterfrom
csabella:bpo33289csabella/cpython:bpo33289Copy head branch name to clipboard

Conversation

@csabella

@csabella csabella commented Apr 23, 2018

Copy link
Copy Markdown
Contributor

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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?

Comment thread Lib/tkinter/__init__.py Outdated
Comment thread Lib/tkinter/__init__.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
@csabella

Copy link
Copy Markdown
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?

Comment thread Lib/tkinter/colorchooser.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py
@bedevere-bot

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

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

Comment thread Lib/tkinter/test/test_tkinter/test_colorchooser.py Outdated

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

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.

Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_colorchooser.py Outdated
@bedevere-bot

Copy link
Copy Markdown

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

terryjreedy commented Dec 28, 2020

Copy link
Copy Markdown
Member
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

terryjreedy commented Jan 21, 2021

Copy link
Copy Markdown
Member

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.

Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_colorchooser.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_colorchooser.py Outdated
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
Comment thread Lib/tkinter/__init__.py Outdated
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Comment thread Lib/tkinter/test/test_tkinter/test_misc.py Outdated
@serhiy-storchaka serhiy-storchaka merged commit 6713e86 into python:master Jan 21, 2021
@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.