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

gh-143754: Add Tkinter methods pack_content(), place_content() and grid_content() by serhiy-storchaka · Pull Request #143845 · python/cpython · GitHub

Repository navigation

gh-143754: Add Tkinter methods pack_content(), place_content() and grid_content() - #143845

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-pack_content
Jan 20, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-pack_content

Conversation

serhiy-storchaka commented Jan 14, 2026 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Member

They use Tk commands with new name like "pack content instead of old "pack slaves".

Based on top of #143841.


📚 Documentation preview 📚: https://cpython-previews--143845.org.readthedocs.build/

Copy link
Copy Markdown
Member

The new stuff (on top of what is already in #143841) looks okay without closely examining every detail.

hugovk commented Jan 19, 2026

Copy link
Copy Markdown
Member

I suggest we also:

  • Have the *slaves() synonyms call the *content() functions instead of having separate functions. There's not much duplicate code, but there's some, and it means we won't need to make future fixes in two places. Also we're no longer testing the *slaves() paths so may introduce untested bugs.

  • Deprecates our *slaves() synonyms. TIP 581 didn't deprecate them in Tcl/Tk, but that doesn't mean we need to keep them in our interface. We do not need to set a removal date (we currently support 8.5.12 and upstream added synonyms in 8.6).

Copy link
Copy Markdown
Member Author

To be nice, we should deprecate the old methods only when the new methods are available in all maintained Python versions, so the user can simply unconditionally switch to using the new methods.

Since this change is just cosmetic, there is no need to even deprecate them in code. The code written 20 years ago will continue to work.

We still test the *slaves() methods. This is why we need a separate implementation -- to notice when it stopped working on the Tk side.

…and grid_content()

They use Tk commands with new name like "pack content instead of old
"pack slaves".

hugovk 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

Perhaps we could soft deprecate until then?

Anyway, thanks for the PR.

Copy link
Copy Markdown
Member Author

There is no module documentation where the soft deprecation could be written.

The docstrins now say "Synonym for ...". This is an equivalent of soft deprecation. You should not use these methods in new code if you do not support Python 3.14, but you are not forced to make mass renaming. I expect that nobody will use the new methods in the next 3 years.

serhiy-storchaka merged commit 71cbffd into python:main Jan 20, 2026
51 checks passed
serhiy-storchaka deleted the tkinter-pack_content branch January 20, 2026 07:16
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…and grid_content() (pythonGH-143845)

They use Tk commands with new name like "pack content instead of old
"pack slaves".
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.

3 participants


Back | FazBrowse Home | New Git URL