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-32839: Add after_info to tkinter #5664

Merged
merged 11 commits into from
Apr 26, 2024
Merged

Conversation

csabella
Copy link
Contributor

@csabella csabella commented Feb 13, 2018

Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/test/test_tkinter/test_misc.py Outdated Show resolved Hide resolved
Lib/tkinter/test/test_tkinter/test_misc.py Outdated Show resolved Hide resolved
Lib/tkinter/test/test_tkinter/test_misc.py Outdated Show resolved Hide resolved
Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/test/test_tkinter/test_misc.py Outdated Show resolved Hide resolved
@@ -763,15 +763,31 @@ def after_cancel(self, id):

Identifier returned by after or after_idle must be
given as first parameter."""
if id is None:
return
Copy link
Member

Choose a reason for hiding this comment

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

This makes no sense to me. id is required and AFAKI should not be passed as None. Do after or after_idle ever return None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please see my following comment with the Tcl code. I added this because I'm not sure if the original comments about the tuple changing were accurate. I think it was a result of id being None vs it having a value.

Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/__init__.py Show resolved Hide resolved
@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.

@csabella
Copy link
Contributor Author

csabella commented Mar 4, 2018

I pushed a rebase and got the Appveyor error. I'm working on the other concerns about the after_info functionality, so I'll push a fix once those are worked out. Although, this issue on Appveyor does answer the previous question about the after_info() event list containing other events than the ones added in this test. It seems that the other new after* tests are leaving something behind.

Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
Lib/tkinter/__init__.py Outdated Show resolved Hide resolved
@csabella csabella closed this Dec 31, 2019
@terryjreedy
Copy link
Member

Cheryl, can you explain the closing? I still think adding after_info would be good.

@terryjreedy
Copy link
Member

terryjreedy commented Dec 31, 2019

The only reported error, only on Travis, on line 191 is an extra item, 'after#8' (the 'timer' of line 180, I presume), in the tuple returned from .after_info. (The Travis job page somehow disables copying with current Firefox.) On this system, with the tcl/tk used, the preceding root.update() did not remove the 'timer' callback from the list.

I restarted the failing job to see if the failure is repeatable on Travis.

Answer: yes.

@ZackerySpytz
Copy link
Contributor

FWIW, I also think adding after_info() would be good.

@csabella
Copy link
Contributor Author

Sorry about closing this prematurely. I had thought there hadn't been much interest in adding the functionality when I originally proposed it, so I was just doing some housekeeping. Good to know there is interest. Having said that, the tests pass locally, so it may be tricky to get them to pass. I have a root.update() to clear the timer event from a previous test, so it seems to work locally but not on Travis. I'll look into it more.

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.

Please expand the NEWS entry, add a What's New entry apply and test the code suggestion.

The PR looks mostly good to me and I want to land it in 3.9.

Lib/tkinter/__init__.py Show resolved Hide resolved
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Aug 15, 2022
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.

I expanded the NEWS entry and added the What's New entry. My last code suggestions turned out to be wrong.

LGTM.

@terryjreedy
Copy link
Member

I am presuming that my old comments are obsolete.

@serhiy-storchaka serhiy-storchaka merged commit 194fd17 into python:main Apr 26, 2024
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants