Skip to content

Commit 23237ca

Browse files
committed
[stdlib] Allow None for params since Python 3.14.1
1 parent 9a0198f commit 23237ca

5 files changed

Lines changed: 27 additions & 16 deletions

File tree

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ threading.Condition.locked
2626

2727
# Starting with Python 3.14.1, these methods accept None for some of their
2828
# parameters, but would raise a TypeError with Python 3.14.0.
29-
mmap.mmap.find
3029
mmap.mmap.flush
31-
mmap.mmap.rfind
32-
multiprocessing.process.BaseProcess.__init__
3330

3431
# ====================================
3532
# Pre-existing errors from Python 3.13

stdlib/@tests/stubtest_allowlists/py315.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ importlib._abc.Loader.load_module
2323
importlib._bootstrap_external.NamespacePath
2424
importlib.resources._common.package_to_anchor
2525
mailbox._ProxyFile.__class_getitem__
26-
multiprocessing.process.BaseProcess.__init__
2726
threading.Condition.locked
2827

2928
# =============================================================

stdlib/mmap.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ class mmap:
9595
else:
9696
def madvise(self, option: int, start: int = 0, length: int = ..., /) -> None: ...
9797

98-
if sys.version_info >= (3, 15):
98+
if sys.version_info >= (3, 14):
99+
# default values changed in Python 3.14.1
99100
def find(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ...
100101
def rfind(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ...
101102

stdlib/multiprocessing/dummy/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class DummyProcess(threading.Thread):
4646
@property
4747
def exitcode(self) -> Literal[0] | None: ...
4848
if sys.version_info >= (3, 14):
49-
# Default changed in Python 3.14.1
49+
# kwargs default changed in Python 3.14.1
5050
def __init__(
5151
self,
5252
group: Any = None,

stdlib/multiprocessing/process.pyi

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,30 @@ class BaseProcess:
99
daemon: bool
1010
authkey: bytes
1111
_identity: tuple[int, ...] # undocumented
12-
def __init__(
13-
self,
14-
group: None = None,
15-
target: Callable[..., object] | None = None,
16-
name: str | None = None,
17-
args: Iterable[Any] = (),
18-
kwargs: Mapping[str, Any] = {},
19-
*,
20-
daemon: bool | None = None,
21-
) -> None: ...
12+
if sys.version_info >= (3, 14):
13+
# kwargs default changed in Python 3.14.1
14+
def __init__(
15+
self,
16+
group: None = None,
17+
target: Callable[..., object] | None = None,
18+
name: str | None = None,
19+
args: Iterable[Any] = (),
20+
kwargs: Mapping[str, Any] | None = None,
21+
*,
22+
daemon: bool | None = None,
23+
) -> None: ...
24+
else:
25+
def __init__(
26+
self,
27+
group: None = None,
28+
target: Callable[..., object] | None = None,
29+
name: str | None = None,
30+
args: Iterable[Any] = (),
31+
kwargs: Mapping[str, Any] = {},
32+
*,
33+
daemon: bool | None = None,
34+
) -> None: ...
35+
2236
def run(self) -> None: ...
2337
def start(self) -> None: ...
2438
if sys.version_info >= (3, 14):

0 commit comments

Comments
 (0)