FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after_idle` by Xiaokang2022 · Pull Request #126900 · python/cpython · GitHub

Repository navigation

gh-126899: Add **kw to tkinter.Misc.after and tkinter.Misc.after_idle - #126900

Merged
terryjreedy merged 11 commits into
python:mainfrom
Xiaokang2022:improve-tkinter-after
Dec 1, 2024
Merged

terryjreedy merged 11 commits into
python:mainfrom
Xiaokang2022:improve-tkinter-after

Conversation

Xiaokang2022 commented Nov 16, 2024 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

For this to work you need to make func and ms positional only, which is backwards incompatible

Copy link
Copy Markdown
Contributor Author

For this to work you need to make func and ms positional only, which is backwards incompatible

Is making func and ms positional only a must? If not, it will not lead to incompatibilities.

I've found something similar elsewhere in tkinter, but it doesn't enforce that the preceding argument to positional only:

def element_create(self, elementname, etype, *args, **kw):

and

def instate(self, statespec, callback=None, *args, **kw):

Copy link
Copy Markdown
Member

It is not necessary to make other parameters positional only, but this can be considered in future, together with other methods that have var-keyword parameter.

In general, I do not see objections against this change. It does not also look that other Tkinter methods need similar change. But please add tests and a What's New entry.

Comment thread Doc/whatsnew/3.14.rst Outdated

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka PTAL, thanks!

Comment thread Doc/whatsnew/3.14.rst Outdated
Xiaokang2022 and others added 2 commits November 18, 2024 19:20
…FnfBt.rst

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

Copy link
Copy Markdown
Contributor Author

In any case this needs a review by a native English speaker.

@terryjreedy , As mentioned above, I guess you may be able to help us review this PR, it's easy, thanks!

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I leave code changes to Serhiy.

Comment thread Doc/whatsnew/3.14.rst Outdated

bedevere-app Bot commented Dec 1, 2024

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 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The code LGTM.

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again.

bedevere-app Bot commented Dec 1, 2024

Copy link
Copy Markdown

Thanks for making the requested changes!

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

bedevere-app Bot requested a review from terryjreedy December 1, 2024 12:00

Copy link
Copy Markdown
Contributor Author

I don't know why the test failed. Compared to the last commit, I only modified the parts that belonged to the documentation.

terryjreedy commented Dec 1, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

There was a (rare) timeout error in building Python for the test. Nothing to do with us. Re-running the failed test only.
EDIT: Build phase already finished in rerun.

terryjreedy enabled auto-merge (squash) December 1, 2024 19:17
terryjreedy merged commit 7ea523f into python:main Dec 1, 2024
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 2, 2024
….after_idle` (python#126900)


---------
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Xiaokang2022 deleted the improve-tkinter-after branch January 6, 2025 04:39
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
….after_idle` (python#126900)


---------
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
….after_idle` (python#126900)


---------
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
JelleZijlstra added a commit to python/typeshed that referenced this pull request May 8, 2026
In Python 3.14, python/cpython#126900 added kwargs support to `tkinter.Misc.after`.
stubtest missed this because we allowlist the function for a different reason.

Found by Codex along with #15717 (I didn't include it in that PR because I incorrectly convinced myself
this one was more complicated). It also found missing **kwargs support for some asyncio create_task functions,
but we already have issues/PRs about that (e.g. #13687).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL