Skip to content

Commit 9b8d191

Browse files
authored
Merge branch 'main' into datetime-tzinfo
2 parents d7b69b1 + 06ecffc commit 9b8d191

File tree

459 files changed

+6454
-3638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

459 files changed

+6454
-3638
lines changed

MAINTAINERS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,12 @@ When rejecting a PR for a change for a future Python version, use a message
8888
like:
8989

9090
Thanks for contributing! Unfortunately, [as outlined in our CONTRIBUTING document](https://github.com/python/typeshed/blob/main/CONTRIBUTING.md#standard-library-stubs) we only accept pull requests to the standard library for future Python versions after the first beta version has been released. This is in part to prevent churn in the stubs, and in part because the testing infrastructure for the future version is not yet in place. Please feel free to open a new PR when the first beta version has been released. Alternatively, if this PR is still relevant, you can leave a comment here to reopen it.
91+
92+
### Closing requests for third-party stubs
93+
94+
We don't keep requests for third-party library stubs open. Close those
95+
requests as "not planned" with an explanation like this:
96+
97+
We gladly accept type stub contributions for third-party libraries that are published on PyPI in typeshed. To contribute a new library, please follow the steps outlined in [CONTRIBUTING.md](/python/typeshed/blob/main/CONTRIBUTING.md). The `create_baseline_stubs.py` script can be useful to create an initial version, suitable for inclusion in typeshed.
98+
99+
That said, we don't keep requests for third-party library stubs open, unless there are issues that need to be addressed before a PR can be opened. Therefore, I'm closing this issue.

pyrightconfig.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
// No effect in stubs
2929
"reportMissingSuperCall": "none",
3030
"reportUninitializedInstanceVariable": "none",
31-
// stdlib stubs trigger reportShadowedImports
32-
"reportShadowedImports": "none",
3331
// Stubs are allowed to use private variables
3432
"reportPrivateUsage": "none",
3533
// Stubs don't need the actual modules to be installed

pyrightconfig.scripts_and_tests.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"reportImplicitStringConcatenation": "none",
1515
// Extra strict settings
1616
"reportMissingModuleSource": "error",
17-
"reportShadowedImports": "error",
1817
"reportCallInDefaultInitializer": "error",
1918
"reportPropertyTypeMismatch": "error",
2019
"reportUninitializedInstanceVariable": "error",

pyrightconfig.stricter.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,14 @@
7272
"stubs/pika",
7373
"stubs/pony",
7474
"stubs/protobuf",
75-
"stubs/psutil",
75+
"stubs/psutil/psutil/__init__.pyi",
7676
"stubs/psycopg2",
7777
"stubs/pyasn1",
7878
"stubs/pycurl",
7979
"stubs/Pygments",
8080
"stubs/PyMySQL",
8181
"stubs/python-dateutil",
8282
"stubs/python-jose",
83-
"stubs/pytz/pytz/lazy.pyi",
8483
"stubs/pywin32",
8584
"stubs/PyYAML",
8685
"stubs/reportlab",
@@ -109,8 +108,6 @@
109108
// No effect in stubs
110109
"reportMissingSuperCall": "none",
111110
"reportUninitializedInstanceVariable": "none",
112-
// stdlib stubs trigger reportShadowedImports
113-
"reportShadowedImports": "none",
114111
// Stubs are allowed to use private variables
115112
"reportPrivateUsage": "none",
116113
// Stubs don't need the actual modules to be installed

pyrightconfig.testcases.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
],
77
"typeCheckingMode": "strict",
88
// Extra strict settings
9-
"reportShadowedImports": "error", // Don't accidentally name a file something that shadows stdlib
109
"reportImplicitStringConcatenation": "error",
1110
"reportUninitializedInstanceVariable": "error",
1211
"reportUnnecessaryTypeIgnoreComment": "error",

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

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
1-
# =======
2-
# <= 3.12
3-
# =======
4-
5-
# Added in Python 3.10.18 (parameter `escapable`)
6-
html.parser.HTMLParser.set_cdata_mode
7-
8-
9-
# =======
10-
# <= 3.11
11-
# =======
12-
13-
# Added in Python 3.10.15
14-
email._header_value_parser.NLSET
15-
email._header_value_parser.SPECIALSNL
16-
email.errors.HeaderWriteError
17-
email.utils.getaddresses
18-
email.utils.parseaddr
19-
20-
21-
# =======
22-
# <= 3.10
23-
# =======
1+
# =========
2+
# Temporary
3+
# =========
244

255
# Incompatible changes introduced in Python 3.10.12
266
# (Remove once 3.10.12 becomes available for GitHub Actions)
@@ -38,8 +18,8 @@ tarfile.data_filter
3818
tarfile.fully_trusted_filter
3919
tarfile.tar_filter
4020

41-
# Incompatible changes introduced in Python 3.9.14
42-
# (Remove once 3.9.14 becomes available for GitHub Actions)
21+
# Incompatible changes introduced in Python 3.10.14
22+
# (Remove once 3.10.14 becomes available for GitHub Actions)
4323
pyexpat.XMLParserType.GetReparseDeferralEnabled
4424
pyexpat.XMLParserType.SetReparseDeferralEnabled
4525
xml.etree.ElementTree.XMLParser.flush
@@ -51,6 +31,45 @@ xml.parsers.expat.XMLParserType.SetReparseDeferralEnabled
5131
xml.sax.expatreader.ExpatParser.flush
5232
zipfile.ZipInfo.__slots__
5333

34+
# Incompatible changes introduced in Python 3.10.15
35+
# (Remove once 3.10.15 becomes available for GitHub Actions)
36+
email._header_value_parser.NLSET
37+
email._header_value_parser.SPECIALSNL
38+
email.errors.HeaderWriteError
39+
email.utils.getaddresses
40+
email.utils.parseaddr
41+
42+
# Incompatible changes introduced in Python 3.10.17
43+
# (Remove once 3.10.17 becomes available for GitHub Actions)
44+
email._header_value_parser.get_encoded_word
45+
email._header_value_parser.make_quoted_pairs
46+
47+
# Incompatible changes introduced in Python 3.10.18
48+
# (Remove once 3.10.18 becomes available for GitHub Actions)
49+
html.parser.HTMLParser.set_cdata_mode # parameter `escapable`
50+
genericpath.__all__
51+
genericpath.ALLOW_MISSING
52+
(ntpath.__all__)?
53+
(ntpath.ALLOW_MISSING)?
54+
(ntpath.realpath)?
55+
(os.path.__all__)?
56+
(os.path.ALLOW_MISSING)?
57+
(os.path.realpath)?
58+
(posixpath.__all__)?
59+
(posixpath.ALLOW_MISSING)?
60+
(posixpath.realpath)?
61+
tarfile.LinkFallbackError
62+
tarfile.TarFile._extract_member
63+
tarfile.TarFile.makelink_with_filter
64+
65+
# Incompatible changes introduced in Python 3.10.20
66+
# (Remove once 3.10.20 becomes available for GitHub Actions)
67+
html.parser.HTMLParser.__init__ # parameter `scripting`
68+
pyexpat.XMLParserType.SetAllocTrackerActivationThreshold
69+
pyexpat.XMLParserType.SetAllocTrackerMaximumAmplification
70+
xml.parsers.expat.XMLParserType.SetAllocTrackerActivationThreshold
71+
xml.parsers.expat.XMLParserType.SetAllocTrackerMaximumAmplification
72+
5473

5574
# =============================================================
5675
# Allowlist entries that cannot or should not be fixed; <= 3.12

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

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
1+
# =========
2+
# Temporary
3+
# =========
4+
5+
# Incompatible changes introduced in Python 3.11.10
6+
# (Remove once 3.11.10 becomes available for GitHub Actions)
7+
email._header_value_parser.NLSET
8+
email._header_value_parser.SPECIALSNL
9+
email.errors.HeaderWriteError
10+
email.utils.getaddresses
11+
email.utils.parseaddr
12+
13+
# Incompatible changes introduced in Python 3.11.12
14+
# (Remove once 3.11.12 becomes available for GitHub Actions)
15+
email._header_value_parser.get_encoded_word
16+
email._header_value_parser.make_quoted_pairs
17+
18+
# Incompatible changes introduced in Python 3.11.13
19+
# (Remove once 3.11.13 becomes available for GitHub Actions)
20+
html.parser.HTMLParser.set_cdata_mode # parameter `escapable`
21+
genericpath.__all__
22+
genericpath.ALLOW_MISSING
23+
(ntpath.__all__)?
24+
(ntpath.ALLOW_MISSING)?
25+
(ntpath.realpath)?
26+
(os.path.__all__)?
27+
(os.path.ALLOW_MISSING)?
28+
(os.path.realpath)?
29+
(posixpath.__all__)?
30+
(posixpath.ALLOW_MISSING)?
31+
(posixpath.realpath)?
32+
tarfile.LinkFallbackError
33+
tarfile.TarFile._extract_member
34+
tarfile.TarFile.makelink_with_filter
35+
36+
# Incompatible changes introduced in Python 3.11.15
37+
# (Remove once 3.11.15 becomes available for GitHub Actions)
38+
html.parser.HTMLParser.__init__ # parameter `scripting`
39+
pyexpat.XMLParserType.SetAllocTrackerActivationThreshold
40+
pyexpat.XMLParserType.SetAllocTrackerMaximumAmplification
41+
xml.parsers.expat.XMLParserType.SetAllocTrackerActivationThreshold
42+
xml.parsers.expat.XMLParserType.SetAllocTrackerMaximumAmplification
43+
44+
145
# ============
246
# 3.11 to 3.12
347
# ============
@@ -8,26 +52,6 @@ fcntl.F_OFD_SETLK
852
fcntl.F_OFD_SETLKW
953

1054

11-
# =======
12-
# <= 3.12
13-
# =======
14-
15-
# Added in Python 3.11.13 (parameter `escapable`)
16-
html.parser.HTMLParser.set_cdata_mode
17-
18-
19-
# =======
20-
# <= 3.11
21-
# =======
22-
23-
# Added in Python 3.11.10
24-
email._header_value_parser.NLSET
25-
email._header_value_parser.SPECIALSNL
26-
email.errors.HeaderWriteError
27-
email.utils.getaddresses
28-
email.utils.parseaddr
29-
30-
3155
# =============================================================
3256
# Allowlist entries that cannot or should not be fixed; <= 3.12
3357
# =============================================================

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

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# =========
2+
# Temporary
3+
# =========
4+
5+
# Incompatible changes introduced in Python 3.12.11
6+
# (Remove once 3.12.11 becomes available for GitHub Actions)
7+
html.parser.HTMLParser.set_cdata_mode # parameter `escapable`
8+
genericpath.__all__
9+
genericpath.ALLOW_MISSING
10+
(ntpath.__all__)?
11+
(ntpath.ALLOW_MISSING)?
12+
(ntpath.realpath)?
13+
(os.path.__all__)?
14+
(os.path.ALLOW_MISSING)?
15+
(os.path.realpath)?
16+
(posixpath.__all__)?
17+
(posixpath.ALLOW_MISSING)?
18+
(posixpath.realpath)?
19+
tarfile.LinkFallbackError
20+
tarfile.TarFile._extract_member
21+
tarfile.TarFile.makelink_with_filter
22+
23+
# Incompatible changes introduced in Python 3.12.13
24+
# (Remove once 3.12.13 becomes available for GitHub Actions)
25+
html.parser.HTMLParser.__init__ # parameter `scripting`
26+
pyexpat.XMLParserType.SetAllocTrackerActivationThreshold
27+
pyexpat.XMLParserType.SetAllocTrackerMaximumAmplification
28+
xml.parsers.expat.XMLParserType.SetAllocTrackerActivationThreshold
29+
xml.parsers.expat.XMLParserType.SetAllocTrackerMaximumAmplification
30+
31+
132
# ============
233
# 3.11 to 3.12
334
# ============
@@ -8,14 +39,6 @@ fcntl.F_OFD_SETLK
839
fcntl.F_OFD_SETLKW
940

1041

11-
# =======
12-
# <= 3.12
13-
# =======
14-
15-
# Added in Python 3.12.11 (parameter `escapable`)
16-
html.parser.HTMLParser.set_cdata_mode
17-
18-
1942
# =============================================================
2043
# Allowlist entries that cannot or should not be fixed; <= 3.12
2144
# =============================================================

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,3 @@
33
# =======
44

55
(mmap.MAP_32BIT)? # Exists locally on MacOS but not on GitHub
6-
7-
# ================
8-
# Unclear problems
9-
# ================
10-
11-
# Added in 3.11.1, flagged by stubtest on Python < 3.14 for unknown reasons
12-
errno.ENOTCAPABLE

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# =========
2+
# 3.14 only
3+
# =========
4+
5+
# Starting with Python 3.14.1, these methods accept None for some of their
6+
# parameters, but would raise a TypeError with Python 3.14.0.
7+
mmap.mmap.madvise
8+
19
# =======
210
# >= 3.13
311
# =======

0 commit comments

Comments
 (0)