Skip to content

Commit e56b4c0

Browse files
committed
gh-115436: Avoid falling back to deprecated Apple-supplied Tcl/Tk 8.5 on macOS
1 parent a21c0c7 commit e56b4c0

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Avoid falling back to the deprecated Apple-supplied system Tcl/Tk 8.5 on
2+
macOS builds as this version is known to have many critical problems and
3+
causes Python test suite failures. This last-ditch fallback behavior was
4+
removed in Python 3.11 but is still causing problems for users and Python
5+
release testing for older security-fix-only branches like this one. With
6+
this change, building of `_tkinter` on macOS will be skipped if no other
7+
versions of Tcl/Tk can be found.

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,9 +1744,13 @@ def detect_tkinter_darwin(self):
17441744
# The _tkinter module, using frameworks. Since frameworks are quite
17451745
# different the UNIX search logic is not sharable.
17461746
from os.path import join, exists
1747+
1748+
# gh-115436: We no longer fall back to searching for the
1749+
# Apple-supplied Tcl and Tk 8.5 in /System/Library/Frameworks
1750+
# as their use causes too many problems for users. It seems
1751+
# better to just skip building _tkinter at all in that case.
17471752
framework_dirs = [
17481753
'/Library/Frameworks',
1749-
'/System/Library/Frameworks/',
17501754
join(os.getenv('HOME'), '/Library/Frameworks')
17511755
]
17521756

0 commit comments

Comments
 (0)