Skip to content

[3.8] gh-115436: Avoid falling back to deprecated Apple-supplied Tcl/Tk 8.5 on macOS. #115439

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Avoid falling back to the deprecated Apple-supplied system Tcl/Tk 8.5 on
macOS builds as this version is known to have many critical problems and
causes Python test suite failures. This last-ditch fallback behavior was
removed in Python 3.11 but is still causing problems for users and Python
release testing for older security-fix-only branches like this one. With
this change, building of `_tkinter` on macOS will be skipped if no other
versions of Tcl/Tk can be found.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,9 +1744,13 @@ def detect_tkinter_darwin(self):
# The _tkinter module, using frameworks. Since frameworks are quite
# different the UNIX search logic is not sharable.
from os.path import join, exists

# gh-115436: We no longer fall back to searching for the
# Apple-supplied Tcl and Tk 8.5 in /System/Library/Frameworks
# as their use causes too many problems for users. It seems
# better to just skip building _tkinter at all in that case.
framework_dirs = [
'/Library/Frameworks',
'/System/Library/Frameworks/',
join(os.getenv('HOME'), '/Library/Frameworks')
]

Expand Down