Conversation
Since macOS 14 seems to no longer be supported, Homebrew has been dropping pre-built packages for it as they are updated. Based on statistics from Pillow (which is one of our dependencies), 10.14 and below just barely summed to 0.1% of usage, so we should be safe to stop testing on it. Fixes matplotlib#32339
|
Hmm, it looks like Qt is crashing on macOS 26 for some reason. |
|
Attaching crash log. Working on a solution. |
|
I'm still investigating. It would appear that using When AppKit creates a window, it calls As far as I can tell, our usage of I need to call it for the night, but I'll investigate a workaround/fix tomorrow. |
|
Our usage of Consider the following example: example.pyimport ctypes
from ctypes import c_void_p, c_double
LOAD_APPKIT_FIRST = False
appkit = None
if LOAD_APPKIT_FIRST:
appkit = ctypes.CDLL("/System/Library/Frameworks/AppKit.framework/AppKit")
objc = ctypes.CDLL("/usr/lib/libobjc.A.dylib")
coretext = ctypes.CDLL("/System/Library/Frameworks/CoreText.framework/CoreText")
CTFontCollectionCreateFromAvailableFonts = (
coretext.CTFontCollectionCreateFromAvailableFonts
)
CTFontCollectionCreateFromAvailableFonts.argtypes = [c_void_p]
CTFontCollectionCreateFromAvailableFonts.restype = c_void_p
collection = CTFontCollectionCreateFromAvailableFonts(None)
objc_getClass = objc.objc_getClass
objc_getClass.argtypes = [ctypes.c_char_p]
objc_getClass.restype = c_void_p
sel_registerName = objc.sel_registerName
sel_registerName.argtypes = [ctypes.c_char_p]
sel_registerName.restype = c_void_p
objc_msgSend = ctypes.cast(
objc.objc_msgSend,
ctypes.CFUNCTYPE(c_void_p, c_void_p, c_void_p, c_double, c_double)
)
if not appkit:
appkit = ctypes.CDLL("/System/Library/Frameworks/AppKit.framework/AppKit")
NSFont = objc_getClass(b"NSFont")
selector = sel_registerName(b"monospacedSystemFontOfSize:weight:")
font = objc_msgSend(NSFont, selector, 0, 400.0)If If I can make the above example reproduce on all versions of macOS; however, the bug in matplotlib only reproduces in macOS 26+. On 15-, I assume that something else is loading AppKit into memory before we use CoreText. There are two possible solutions:
1 is the simpler choice for now. 2 could be used in the future if we encounter more "run this in a separate process to work around an OS bug" situations. |
To be clear: macOS 10.14 and macOS 14 are not the same version. We haven't tested on 10.14 in a very long time. macOS 10.14 Mojave was released in 2018 and last updated in 2021. Yes, macOS version numbers are confusing, especially with the jump from macOS 15 to macOS 26. |
PR summary
Since macOS 14 seems to no longer be supported, Homebrew has been dropping pre-built packages for it as they are updated. Based on statistics from Pillow (which is one of our dependencies), 10.14 and below just barely summed to 0.1% of usage in December 2024, so we should be safe to stop testing on it.
Fixes #32339
AI Disclosure
None
PR quality check