Skip to content

Commit 10bb878

Browse files
committed
Fix remaining Python 3.15 stubtest failures
1 parent 6ec21e1 commit 10bb878

5 files changed

Lines changed: 5 additions & 62 deletions

File tree

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ ctypes.c_double_complex._type_
1111
ctypes.c_float_complex._type_
1212
ctypes.c_longdouble_complex._type_
1313
(errno.ENOTCAPABLE)?
14-
mmap.MS_ASYNC
15-
mmap.MS_INVALIDATE
16-
mmap.MS_SYNC
1714
os.NODEV
1815
os.__all__
1916
posix.NODEV

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

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,18 @@ _decimal
22
_pyrepl.fancy_termios
33
_pyrepl.unix_console
44
_pyrepl.unix_eventqueue
5-
_socket.CAN_ISOTP_CHK_PAD_DATA
6-
_socket.CAN_ISOTP_CHK_PAD_LEN
7-
_socket.CAN_ISOTP_DEFAULT_EXT_ADDRESS
8-
_socket.CAN_ISOTP_DEFAULT_FLAGS
9-
_socket.CAN_ISOTP_DEFAULT_FRAME_TXTIME
10-
_socket.CAN_ISOTP_DEFAULT_LL_MTU
11-
_socket.CAN_ISOTP_DEFAULT_LL_TX_DL
12-
_socket.CAN_ISOTP_DEFAULT_LL_TX_FLAGS
13-
_socket.CAN_ISOTP_DEFAULT_PAD_CONTENT
14-
_socket.CAN_ISOTP_DEFAULT_RECV_BS
15-
_socket.CAN_ISOTP_DEFAULT_RECV_STMIN
16-
_socket.CAN_ISOTP_DEFAULT_RECV_WFTMAX
17-
_socket.CAN_ISOTP_EXTEND_ADDR
18-
_socket.CAN_ISOTP_FORCE_RXSTMIN
19-
_socket.CAN_ISOTP_FORCE_TXSTMIN
20-
_socket.CAN_ISOTP_HALF_DUPLEX
21-
_socket.CAN_ISOTP_LISTEN_MODE
225
(_socket.CAN_ISOTP_LL_OPTS)?
236
(_socket.CAN_ISOTP_OPTS)?
247
(_socket.CAN_ISOTP_RECV_FC)?
25-
_socket.CAN_ISOTP_RX_EXT_ADDR
26-
_socket.CAN_ISOTP_RX_PADDING
278
(_socket.CAN_ISOTP_RX_STMIN)?
28-
_socket.CAN_ISOTP_SF_BROADCAST
29-
_socket.CAN_ISOTP_TX_PADDING
309
(_socket.CAN_ISOTP_TX_STMIN)?
31-
_socket.CAN_ISOTP_WAIT_TX_DONE
32-
_socket.IPV6_HDRINCL
3310
(_socket.SOL_CAN_ISOTP)?
3411
ctypes.c_double_complex._type_
3512
ctypes.c_float_complex._type_
3613
ctypes.c_longdouble_complex._type_
3714
# GitHub Actions' Python 3.15 Linux build currently lacks _decimal, so
3815
# decimal falls back to _pydecimal with different runtime signatures.
3916
decimal\..*
40-
mmap.MS_ASYNC
41-
mmap.MS_INVALIDATE
42-
mmap.MS_SYNC
4317
(mmap.mmap.madvise)?
4418
os.AT_NO_AUTOMOUNT
4519
os.AT_STATX_DONT_SYNC
@@ -97,33 +71,10 @@ profiling.sampling.live_collector.widgets
9771
readline.get_pre_input_hook
9872
(resource.RLIM_SAVED_CUR)?
9973
(resource.RLIM_SAVED_MAX)?
100-
socket.CAN_ISOTP_CHK_PAD_DATA
101-
socket.CAN_ISOTP_CHK_PAD_LEN
102-
socket.CAN_ISOTP_DEFAULT_EXT_ADDRESS
103-
socket.CAN_ISOTP_DEFAULT_FLAGS
104-
socket.CAN_ISOTP_DEFAULT_FRAME_TXTIME
105-
socket.CAN_ISOTP_DEFAULT_LL_MTU
106-
socket.CAN_ISOTP_DEFAULT_LL_TX_DL
107-
socket.CAN_ISOTP_DEFAULT_LL_TX_FLAGS
108-
socket.CAN_ISOTP_DEFAULT_PAD_CONTENT
109-
socket.CAN_ISOTP_DEFAULT_RECV_BS
110-
socket.CAN_ISOTP_DEFAULT_RECV_STMIN
111-
socket.CAN_ISOTP_DEFAULT_RECV_WFTMAX
112-
socket.CAN_ISOTP_EXTEND_ADDR
113-
socket.CAN_ISOTP_FORCE_RXSTMIN
114-
socket.CAN_ISOTP_FORCE_TXSTMIN
115-
socket.CAN_ISOTP_HALF_DUPLEX
116-
socket.CAN_ISOTP_LISTEN_MODE
11774
(socket.CAN_ISOTP_LL_OPTS)?
11875
(socket.CAN_ISOTP_OPTS)?
11976
(socket.CAN_ISOTP_RECV_FC)?
120-
socket.CAN_ISOTP_RX_EXT_ADDR
121-
socket.CAN_ISOTP_RX_PADDING
12277
(socket.CAN_ISOTP_RX_STMIN)?
123-
socket.CAN_ISOTP_SF_BROADCAST
124-
socket.CAN_ISOTP_TX_PADDING
12578
(socket.CAN_ISOTP_TX_STMIN)?
126-
socket.CAN_ISOTP_WAIT_TX_DONE
127-
socket.IPV6_HDRINCL
12879
(socket.SOL_CAN_ISOTP)?
12980
(socket.__all__)?

stdlib/@tests/stubtest_allowlists/py315.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
# New errors in Python 3.15
33
# =========================
44

5-
(mmap.MS_ASYNC)?
6-
(mmap.MS_INVALIDATE)?
7-
(mmap.MS_SYNC)?
85
(os.NODEV)?
96
(posix.NODEV)?
107
(resource.RLIMIT_NTHR)?
118
(resource.RLIMIT_THREADS)?
129
(resource.RLIMIT_UMTXP)?
13-
(socket.__all__)?
1410

1511
# Importlib exposes deprecated or implementation-detail runtime APIs that the stubs deliberately omit or tighten.
1612
_frozen_importlib.BuiltinImporter.load_module
@@ -36,7 +32,6 @@ _pyrepl\..+
3632
_struct.Struct.pack_into
3733
_struct.pack
3834
_struct.pack_into
39-
builtins.compile
4035
ctypes.SetPointerType
4136
marshal.dump
4237
marshal.dumps
@@ -61,7 +56,6 @@ annotationlib.ForwardRef.__slots__
6156
annotationlib.ForwardRef.__stringifier_dict__
6257

6358
# Static constructor behavior remains intentionally stricter for runtime AST helpers.
64-
ast.parse
6559
ast.type_param.__init__
6660

6761
# Runtime incorrectly has `self`; same policy as py314.
@@ -85,7 +79,6 @@ dataclasses._MISSING_TYPE
8579
dataclasses.field
8680

8781
# Runtime defaults/sentinels are not expressible without losing useful static signatures.
88-
difflib.unified_diff
8982
doctest.DocTestRunner.report_skip
9083
functools.partialmethod.__new__
9184
gzip.compress

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
(_decimal.SPEC_VERSION)?
2-
_socket.IPV6_HDRINCL
32
_winapi.DeregisterEventSource
43
_winapi.EVENTLOG_AUDIT_FAILURE
54
_winapi.EVENTLOG_AUDIT_SUCCESS
@@ -12,6 +11,4 @@ _winapi.RegisterEventSource
1211
_winapi.ReportEvent
1312
asyncio.windows_events.IocpProactor.finish_socket_func
1413
(decimal.SPEC_VERSION)?
15-
socket.IPV6_HDRINCL
16-
socket.__all__
1714
winreg.DeleteTree

stdlib/collections/__init__.pyi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,18 @@ class Counter(dict[_T, int], Generic[_T]):
315315
def __sub__(self, other: Counter[_T]) -> Counter[_T]: ...
316316
def __and__(self, other: Counter[_T]) -> Counter[_T]: ...
317317
def __or__(self, other: Counter[_S]) -> Counter[_T | _S]: ... # type: ignore[override]
318+
if sys.version_info >= (3, 15):
319+
def __xor__(self, other: Counter[_S]) -> Counter[_T | _S]: ... # type: ignore[override]
320+
318321
def __pos__(self) -> Counter[_T]: ...
319322
def __neg__(self) -> Counter[_T]: ...
320323
# several type: ignores because __iadd__ is supposedly incompatible with __add__, etc.
321324
def __iadd__(self, other: SupportsItems[_T, int]) -> Self: ... # type: ignore[misc]
322325
def __isub__(self, other: SupportsItems[_T, int]) -> Self: ...
323326
def __iand__(self, other: SupportsItems[_T, int]) -> Self: ...
324327
def __ior__(self, other: SupportsItems[_T, int]) -> Self: ... # type: ignore[override,misc]
328+
if sys.version_info >= (3, 15):
329+
def __ixor__(self, other: Counter[_T]) -> Self: ... # type: ignore[misc]
325330

326331
# The pure-Python implementations of the "views" classes
327332
# These are exposed at runtime in `collections/__init__.py`

0 commit comments

Comments
 (0)