Skip to content

Commit 3bd8325

Browse files
committed
Tighten Python 3.15 allowlist entries
1 parent e5d6c98 commit 3bd8325

4 files changed

Lines changed: 7 additions & 19 deletions

File tree

stdlib/@tests/stubtest_allowlists/darwin-py315.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
(_socket.SO_BINDTODEVICE)?
1414
(errno.ENOTCAPABLE)?
1515

16-
# Runtime metadata for new ctypes complex types is not useful for static checking.
17-
ctypes.c_double_complex._type_
18-
ctypes.c_float_complex._type_
19-
ctypes.c_longdouble_complex._type_
20-
2116
# Depends on how readline was built.
2217
readline.get_pre_input_hook
2318

stdlib/@tests/stubtest_allowlists/darwin.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ tkinter.Tk.deletefilehandler # Methods that come from __getattr__() at runtime
4545

4646
# These entries looks like a `setup-python` bug:
4747
(dbm.gnu)?
48-
(mmap.mmap.resize)?
4948
(_?locale.bind_textdomain_codeset)?
5049
(_?locale.bindtextdomain)?
5150
(_?locale.dcgettext)?

stdlib/@tests/stubtest_allowlists/linux-py315.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# TODO: Allowlist entries that should be fixed
33
# ============================================
44

5+
# GitHub Actions' Python 3.15 Linux build currently lacks _decimal, so
6+
# decimal falls back to _pydecimal with different runtime signatures.
7+
decimal\..*
8+
_decimal
59
os.AT_NO_AUTOMOUNT
610
os.AT_STATX_DONT_SYNC
711
os.AT_STATX_FORCE_SYNC
@@ -53,16 +57,6 @@ posix.statx
5357
# Allowlist entries that cannot or should not be fixed; >= 3.15
5458
# =============================================================
5559

56-
# GitHub Actions' Python 3.15 Linux build currently lacks _decimal, so
57-
# decimal falls back to _pydecimal with different runtime signatures.
58-
decimal\..*
59-
_decimal
60-
61-
# Runtime metadata for new ctypes complex types is not useful for static checking.
62-
ctypes.c_double_complex._type_
63-
ctypes.c_float_complex._type_
64-
ctypes.c_longdouble_complex._type_
65-
6660
# Depends on how readline was built.
6761
readline.get_pre_input_hook
6862

stdlib/ctypes/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,17 +333,17 @@ if sys.version_info >= (3, 14) and sys.platform != "win32":
333333
# https://github.com/python/cpython/issues/148464
334334

335335
class c_double_complex(_SimpleCData[complex]):
336-
_type_: ClassVar[Literal["D"]]
336+
_type_: ClassVar[Literal["Zd"]]
337337
__ctype_be__: ClassVar[type[Self]]
338338
__ctype_le__: ClassVar[type[Self]]
339339

340340
class c_float_complex(_SimpleCData[complex]):
341-
_type_: ClassVar[Literal["F"]]
341+
_type_: ClassVar[Literal["Zf"]]
342342
__ctype_be__: ClassVar[type[Self]]
343343
__ctype_le__: ClassVar[type[Self]]
344344

345345
class c_longdouble_complex(_SimpleCData[complex]):
346-
_type_: ClassVar[Literal["G"]]
346+
_type_: ClassVar[Literal["Zg"]]
347347

348348
class c_char(_SimpleCData[bytes]):
349349
_type_: ClassVar[Literal["c"]]

0 commit comments

Comments
 (0)