Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

gh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default names#116495

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchakaserhiy-storchaka commentedMar 8, 2024
edited by bedevere-appbot
Loading

Change automatically generated tkinter.Checkbutton widget names to avoid collisions with automatically generated tkinter.ttk.Checkbutton widget names within the same parent widget.

…n default namesChange automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.
@serhiy-storchakaserhiy-storchaka added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsMar 8, 2024
@terryjreedyterryjreedy changed the titlegh-16484: Fix collisions between Checkbutton and ttk.Checkbutton default namesgh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default namesMar 12, 2024
@terryjreedy
Copy link
Member

I read the diff but want to look at more of the tk/ttk code before commenting. Will try to do so after mentor meeting tomorrow.

@BartolHrg
Copy link

The proposed solution is to add"_" in-between"!checkbutton" and the number (e.g."!checkbutton_2").
But there might be a problem if someone names some classCheckbutton_

You might want to consider using some character that cannot be used in a Python variable name like'-' ("!checkbutton-2")

serhiy-storchaka reacted with thumbs up emoji

@terryjreedy
Copy link
Member

While I think a user is more likely to defineCheckbutton_ thanCheckbutton, I think doing so without either inheriting from tk.Checkbutton or defining .setup could be considered buggy. Still, adding '-' instead of '' is fine with me unless there is a reason against that I cannot think of.

I otherwise approve of the patch.

@serhiy-storchaka
Copy link
MemberAuthor

You might want to consider using some character that cannot be used in a Python variable name like'-' ("!checkbutton-2")

Good point. Even if this is not very likely, it is better to be safe.

@serhiy-storchakaserhiy-storchaka merged commitc61cb50 intopython:mainMar 16, 2024
@miss-islington-app
Copy link

Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@serhiy-storchakaserhiy-storchaka deleted the tkinter-checkbutton-default-name branchMarch 16, 2024 11:31
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 16, 2024
…on default names (pythonGH-116495)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.(cherry picked from commitc61cb50)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-116901 is a backport of this pull request to the3.12 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.12only security fixes labelMar 16, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 16, 2024
…on default names (pythonGH-116495)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.(cherry picked from commitc61cb50)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

GH-116902 is a backport of this pull request to the3.11 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.11only security fixes labelMar 16, 2024
serhiy-storchaka added a commit that referenced this pull requestMar 16, 2024
…ton default names (GH-116495) (GH-116901)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.(cherry picked from commitc61cb50)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this pull requestMar 16, 2024
…ton default names (GH-116495) (GH-116902)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.(cherry picked from commitc61cb50)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
vstinner pushed a commit to vstinner/cpython that referenced this pull requestMar 20, 2024
…on default names (pythonGH-116495)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.
adorilson pushed a commit to adorilson/cpython that referenced this pull requestMar 25, 2024
…on default names (pythonGH-116495)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
…on default names (pythonGH-116495)Change automatically generated tkinter.Checkbutton widget names toavoid collisions with automatically generated tkinter.ttk.Checkbuttonwidget names within the same parent widget.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@terryjreedyterryjreedyAwaiting requested review from terryjreedy

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@serhiy-storchaka@terryjreedy@BartolHrg

[8]ページ先頭

©2009-2025 Movatter.jp