Skip to content

Commit 74be917

Browse files
Fix stdlib stubtest for latest Python patch releases (#14220)
1 parent 5a619a5 commit 74be917

17 files changed

+211
-44
lines changed

stdlib/@tests/stubtest_allowlists/py310.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,19 @@ _pickle.Pickler.persistent_id
331331
_pickle.Unpickler.persistent_load
332332
pickle.Pickler.persistent_id
333333
pickle.Unpickler.persistent_load
334+
335+
# Incompatible changes introduced in Python 3.10.18
336+
# (Remove once 3.10.18 becomes available for all platforms)
337+
(genericpath.__all__)?
338+
(genericpath.ALLOW_MISSING)?
339+
(ntpath.__all__)?
340+
(ntpath.ALLOW_MISSING)?
341+
(os.path.__all__)?
342+
(os.path.ALLOW_MISSING)?
343+
(os.path.realpath)?
344+
(posixpath.__all__)?
345+
(posixpath.ALLOW_MISSING)?
346+
(posixpath.realpath)?
347+
(tarfile.LinkFallbackError)?
348+
(tarfile.TarFile._extract_member)?
349+
(tarfile.TarFile.makelink_with_filter)?

stdlib/@tests/stubtest_allowlists/py311.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,19 @@ _pickle.Pickler.persistent_id
291291
_pickle.Unpickler.persistent_load
292292
pickle.Pickler.persistent_id
293293
pickle.Unpickler.persistent_load
294+
295+
# Incompatible changes introduced in Python 3.11.13
296+
# (Remove once 3.11.13 becomes available for all platforms)
297+
(genericpath.__all__)?
298+
(genericpath.ALLOW_MISSING)?
299+
(ntpath.__all__)?
300+
(ntpath.ALLOW_MISSING)?
301+
(os.path.__all__)?
302+
(os.path.ALLOW_MISSING)?
303+
(os.path.realpath)?
304+
(posixpath.__all__)?
305+
(posixpath.ALLOW_MISSING)?
306+
(posixpath.realpath)?
307+
(tarfile.LinkFallbackError)?
308+
(tarfile.TarFile._extract_member)?
309+
(tarfile.TarFile.makelink_with_filter)?

stdlib/@tests/stubtest_allowlists/py312.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,3 +264,19 @@ _pickle.Pickler.persistent_id
264264
_pickle.Unpickler.persistent_load
265265
pickle.Pickler.persistent_id
266266
pickle.Unpickler.persistent_load
267+
268+
# Incompatible changes introduced in Python 3.12.11
269+
# (Remove once 3.12.11 becomes available for all platforms)
270+
(genericpath.__all__)?
271+
(genericpath.ALLOW_MISSING)?
272+
(ntpath.__all__)?
273+
(ntpath.ALLOW_MISSING)?
274+
(os.path.__all__)?
275+
(os.path.ALLOW_MISSING)?
276+
(os.path.realpath)?
277+
(posixpath.__all__)?
278+
(posixpath.ALLOW_MISSING)?
279+
(posixpath.realpath)?
280+
(tarfile.LinkFallbackError)?
281+
(tarfile.TarFile._extract_member)?
282+
(tarfile.TarFile.makelink_with_filter)?

stdlib/@tests/stubtest_allowlists/py314.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,32 @@ builtins.property.__set_name__ # Doesn't actually exist
215215
collections\.UserList\.index # ignoring pos-or-keyword parameter
216216
dataclasses.KW_ONLY # white lies around defaults
217217
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
218+
219+
# Changes from patch releases to be introduced in Python 3.14.0b3
220+
# (Remove once 3.14.0b3 becomes available for all platforms)
221+
(genericpath.__all__)?
222+
(genericpath.ALLOW_MISSING)?
223+
(ntpath.__all__)?
224+
(ntpath.ALLOW_MISSING)?
225+
(os.path.__all__)?
226+
(os.path.ALLOW_MISSING)?
227+
(os.path.realpath)?
228+
(posixpath.__all__)?
229+
(posixpath.ALLOW_MISSING)?
230+
(tarfile.__all__)?
231+
(tarfile.LinkFallbackError)?
232+
(tarfile.TarFile._extract_member)?
233+
(tarfile.TarFile.makelink_with_filter)?
234+
(_?hashlib.new)?
235+
(_?hashlib.(openssl_)?md5)?
236+
(_?hashlib.(openssl_)?sha1)?
237+
(_?hashlib.(openssl_)?sha224)?
238+
(_?hashlib.(openssl_)?sha256)?
239+
(_?hashlib.(openssl_)?sha384)?
240+
(_?hashlib.(openssl_)?sha3_224)?
241+
(_?hashlib.(openssl_)?sha3_256)?
242+
(_?hashlib.(openssl_)?sha3_384)?
243+
(_?hashlib.(openssl_)?sha3_512)?
244+
(_?hashlib.(openssl_)?sha512)?
245+
(_?hashlib.(openssl_)?shake_128)?
246+
(_?hashlib.(openssl_)?shake_256)?

stdlib/@tests/stubtest_allowlists/py39.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,20 @@ _pickle.Pickler.persistent_id
281281
_pickle.Unpickler.persistent_load
282282
pickle.Pickler.persistent_id
283283
pickle.Unpickler.persistent_load
284+
285+
# Incompatible changes introduced in Python 3.9.23
286+
# (Remove once 3.9.23 becomes available for all platforms)
287+
(email._header_value_parser.make_quoted_pairs)?
288+
(genericpath.__all__)?
289+
(genericpath.ALLOW_MISSING)?
290+
(ntpath.__all__)?
291+
(ntpath.ALLOW_MISSING)?
292+
(os.path.__all__)?
293+
(os.path.ALLOW_MISSING)?
294+
(os.path.realpath)?
295+
(posixpath.__all__)?
296+
(posixpath.ALLOW_MISSING)?
297+
(posixpath.realpath)?
298+
(tarfile.LinkFallbackError)?
299+
(tarfile.TarFile._extract_member)?
300+
(tarfile.TarFile.makelink_with_filter)?

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,7 @@ crypt
5353
nis
5454
ossaudiodev
5555
spwd
56+
57+
# Incompatible changes introduced in Python 3.10.18
58+
# (Remove once 3.10.18 becomes available for Windows)
59+
(ntpath.realpath)?

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ crypt
2020
nis
2121
ossaudiodev
2222
spwd
23+
24+
# Incompatible changes introduced in Python 3.11.13
25+
# (Remove once 3.11.18 becomes available for Windows)
26+
(ntpath.realpath)?

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ crypt
2525
nis
2626
ossaudiodev
2727
spwd
28+
29+
# Incompatible changes introduced in Python 3.12.11
30+
# (Remove once 3.12.11 becomes available for Windows)
31+
(ntpath.realpath)?

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ crypt
6262
nis
6363
ossaudiodev
6464
spwd
65+
66+
# Incompatible changes introduced in Python 3.9.23
67+
# (Remove once 3.9.23 becomes available for Windows)
68+
(ntpath.realpath)?

stdlib/_hashlib.pyi

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,63 @@ def compare_digest(a: ReadableBuffer, b: ReadableBuffer, /) -> bool: ...
6060
def compare_digest(a: AnyStr, b: AnyStr, /) -> bool: ...
6161
def get_fips_mode() -> int: ...
6262
def hmac_new(key: bytes | bytearray, msg: ReadableBuffer = b"", digestmod: _DigestMod = None) -> HMAC: ...
63-
def new(name: str, string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
64-
def openssl_md5(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
65-
def openssl_sha1(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
66-
def openssl_sha224(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
67-
def openssl_sha256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
68-
def openssl_sha384(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
69-
def openssl_sha512(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
70-
def openssl_sha3_224(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
71-
def openssl_sha3_256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
72-
def openssl_sha3_384(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
73-
def openssl_sha3_512(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
74-
def openssl_shake_128(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASHXOF: ...
75-
def openssl_shake_256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASHXOF: ...
63+
64+
if sys.version_info >= (3, 13):
65+
def new(
66+
name: str, data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
67+
) -> HASH: ...
68+
def openssl_md5(
69+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
70+
) -> HASH: ...
71+
def openssl_sha1(
72+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
73+
) -> HASH: ...
74+
def openssl_sha224(
75+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
76+
) -> HASH: ...
77+
def openssl_sha256(
78+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
79+
) -> HASH: ...
80+
def openssl_sha384(
81+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
82+
) -> HASH: ...
83+
def openssl_sha512(
84+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
85+
) -> HASH: ...
86+
def openssl_sha3_224(
87+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
88+
) -> HASH: ...
89+
def openssl_sha3_256(
90+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
91+
) -> HASH: ...
92+
def openssl_sha3_384(
93+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
94+
) -> HASH: ...
95+
def openssl_sha3_512(
96+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
97+
) -> HASH: ...
98+
def openssl_shake_128(
99+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
100+
) -> HASHXOF: ...
101+
def openssl_shake_256(
102+
data: ReadableBuffer = b"", *, usedforsecurity: bool = True, string: ReadableBuffer | None = None
103+
) -> HASHXOF: ...
104+
105+
else:
106+
def new(name: str, string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
107+
def openssl_md5(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
108+
def openssl_sha1(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
109+
def openssl_sha224(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
110+
def openssl_sha256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
111+
def openssl_sha384(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
112+
def openssl_sha512(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
113+
def openssl_sha3_224(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
114+
def openssl_sha3_256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
115+
def openssl_sha3_384(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
116+
def openssl_sha3_512(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASH: ...
117+
def openssl_shake_128(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASHXOF: ...
118+
def openssl_shake_256(string: ReadableBuffer = b"", *, usedforsecurity: bool = True) -> HASHXOF: ...
119+
76120
def hmac_digest(key: bytes | bytearray, msg: ReadableBuffer, digest: str) -> bytes: ...
77121
def pbkdf2_hmac(
78122
hash_name: str, password: ReadableBuffer, salt: ReadableBuffer, iterations: int, dklen: int | None = None

0 commit comments

Comments
 (0)