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

gh-140001: Remove obsolete TCL_WIN_SOCKET macro (from Tcl 7.x) from _tkinter.c by mdehoon · Pull Request #139998 · python/cpython · GitHub

Repository navigation

gh-140001: Remove obsolete TCL_WIN_SOCKET macro (from Tcl 7.x) from _tkinter.c - #139998

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
mdehoon:remove_tcl_win_socket
Oct 13, 2025
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
mdehoon:remove_tcl_win_socket

Conversation

mdehoon commented Oct 12, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

The macro TCL_WIN_SOCKET used in Modules/_tkinter.c is a Tcl 7.x legacy macro that is no longer defined in Tcl ≥ 8.0.
As Python now requires Tcl 8.5.12, the code path is now unreachable, and can safely be removed.

The macro FHANDLETYPE defined in Modules/_tkinter.c then always evaluates to TCL_UNIX_FD, and can also be removed.

This comment was marked as resolved.

picnixz commented Oct 12, 2025

Copy link
Copy Markdown
Member

Please open an issue and link the Tcl documentation as well; TiA.

mdehoon commented Oct 12, 2025

Copy link
Copy Markdown
Contributor Author

See https://www.tcl-lang.org/man/tcl7.6/TclLib/GetFile.3.html for a description of these macros in Tcl 7.6.
The macros TCL_WIN_SOCKET and TCL_UNIX_FD were used in Tcl_GetFile, which was removed in Tcl 8.0.

See generic/tcl.h in the Tcl 7.6 source code for the definition of these two macros:

#define TCL_UNIX_FD	1
#define TCL_WIN_SOCKET	6

These macros are not defined in generic/tcl.h of Tcl 8.0, or mentioned anywhere else in the Tcl 8.0 source code.

picnixz changed the title Remove obsolete TCL_WIN_SOCKET macro (from Tcl 7.x) from _tkinter.c gh-140001: Remove obsolete TCL_WIN_SOCKET macro (from Tcl 7.x) from _tkinter.c Oct 12, 2025

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

Should not WAIT_FOR_STDIN be removed too?

mdehoon commented Oct 12, 2025

Copy link
Copy Markdown
Contributor Author

WAIT_FOR_STDIN is not always defined: it remains undefined if __CYGWIN__ is defined.

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

LGTM. 👍

serhiy-storchaka merged commit a00655b into python:main Oct 13, 2025
51 checks passed
mdehoon deleted the remove_tcl_win_socket branch October 13, 2025 11:27

mdehoon commented Oct 28, 2025

Copy link
Copy Markdown
Contributor Author

@serhiy-storchaka

Should not WAIT_FOR_STDIN be removed too?

Pull request #140147 removes WAIT_FOR_STDIN as well as much of the Windows-specific code in Modules/_tkinter.c. Would you be willing to have a look at that PR?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL