mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-06 08:01:58 +02:00
Dont import ctypes unless type checking
ctypes in Python 3.14 is broken on Intel macs. It uses libffi which is broken on Intel macs without extra security entitlements. At least com.apple.security.cs.allow-unsigned-executable-memory and possibly com.apple.security.cs.disable-executable-page-protection Rather than add these entitlements, we simply do not import ctypes as it is not actually used on macs anyway. Fixes #9643
This commit is contained in:
@@ -174,6 +174,8 @@ Detailed list of changes
|
||||
|
||||
- Fix a regression that broke accept anyway shortcut in the paste confirmation dialog (:pull:`9640`)
|
||||
|
||||
- Fix kitty hanging on startup on Intel macs (:iss:`9643`)
|
||||
|
||||
0.46.0 [2026-03-11]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
import ctypes
|
||||
import os
|
||||
import sys
|
||||
from collections.abc import Callable, Generator
|
||||
@@ -218,6 +217,7 @@ def set_font_family(opts: Options | None = None, override_font_size: float | Non
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import ctypes
|
||||
CBufType = ctypes.Array[ctypes.c_ubyte]
|
||||
else:
|
||||
CBufType = None
|
||||
|
||||
Reference in New Issue
Block a user