Skip to content

gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 #103846

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

Merged
merged 21 commits into from
May 31, 2024

Conversation

chrstphrchvz
Copy link
Contributor

@chrstphrchvz chrstphrchvz commented Apr 25, 2023

chrstphrchvz and others added 6 commits April 25, 2023 11:58
Continue using Tcl_GetObjType() to retrieve obsolete "int" type
on 8.7 for platforms with 32-bit long.

9.0 only has 64-bit "int"; no unregistered "wideInt" type to retrieve.
@chrstphrchvz
Copy link
Contributor Author

I meant to add a test to exercise the boolean value case in FromObj(), so marking as draft.

@chrstphrchvz chrstphrchvz marked this pull request as draft April 26, 2023 03:09
@arhadthedev arhadthedev added stdlib Python modules in the Lib dir topic-tkinter awaiting review labels May 2, 2023
@chrstphrchvz
Copy link
Contributor Author

I meant to add a test to exercise the boolean value case in FromObj(), so marking as draft.

Never mind, test.test_tcl.TclTest.test_booleans already has what I was looking for.

@chrstphrchvz chrstphrchvz marked this pull request as ready for review May 2, 2023 16:54
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.

LGTM.

Thank you for your contribution. All these changes look correct.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels May 31, 2024
@serhiy-storchaka serhiy-storchaka merged commit 94e9585 into python:main May 31, 2024
40 checks passed
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 31, 2024
pythonGH-103846)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585)

Co-authored-by: Christopher Chavez <[email protected]>
@miss-islington-app
Copy link

Sorry, @chrstphrchvz and @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 94e9585e99abc2d060cedc77b3c03e06b4a0a9c4 3.12

@bedevere-app
Copy link

bedevere-app bot commented May 31, 2024

GH-119830 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 31, 2024
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request May 31, 2024
… 8.7/9.0 (pythonGH-103846)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585)

Co-authored-by: Christopher Chavez <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 31, 2024

GH-119831 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label May 31, 2024
serhiy-storchaka added a commit that referenced this pull request May 31, 2024
….0 (GH-103846) (GH-119831)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585)

Co-authored-by: Christopher Chavez <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request May 31, 2024
….0 (GH-103846) (GH-119830)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
(cherry picked from commit 94e9585)

Co-authored-by: Christopher Chavez <[email protected]>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
pythonGH-103846)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
pythonGH-103846)

Some of standard Tcl types were renamed, removed, or no longer
registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl
values to Python values to avoid returning a Tcl_Obj where the primary
Python types (int, bool, str, bytes) were returned in older Tcl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-tkinter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants