Skip to content

Commit 17787e4

Browse files
authored
Merge branch 'main' into xmltodict
2 parents 7f54a8f + 14c0873 commit 17787e4

File tree

91 files changed

+585
-395
lines changed

Some content is hidden

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

91 files changed

+585
-395
lines changed

.github/workflows/daily.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ env:
3030
jobs:
3131
stubtest-stdlib:
3232
name: "stubtest: stdlib"
33-
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
33+
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
3434
runs-on: ${{ matrix.os }}
3535
strategy:
3636
matrix:
@@ -58,7 +58,7 @@ jobs:
5858

5959
stubtest-third-party:
6060
name: "stubtest: third party"
61-
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
61+
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
6262
runs-on: ${{ matrix.os }}
6363
strategy:
6464
matrix:
@@ -110,7 +110,7 @@ jobs:
110110
111111
stub-uploader:
112112
name: stub_uploader tests
113-
if: ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch' }}
113+
if: ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule' }}
114114
runs-on: ubuntu-latest
115115
steps:
116116
- name: Checkout typeshed

pyrightconfig.stricter.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"stubs/tqdm",
9393
"stubs/vobject",
9494
"stubs/workalendar",
95+
"stubs/xmltodict",
9596
],
9697
"typeCheckingMode": "strict",
9798
// TODO: Complete incomplete stubs

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Type checkers that we test our stubs against. These should always
22
# be pinned to a specific version to make failure reproducible.
3-
mypy==1.17.1
3+
mypy==1.18.1
44
pyright==1.1.405
55

66
# Libraries used by our various scripts.

scripts/stubsabot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ async def with_extracted_archive(
204204
with zipfile.ZipFile(body) as zf:
205205
return handler(zf)
206206
elif packagetype == "sdist":
207-
# sdist defaults to `.tar.gz` on Lunix and to `.zip` on Windows:
207+
# sdist defaults to `.tar.gz` on Linux and to `.zip` on Windows:
208208
# https://docs.python.org/3.11/distutils/sourcedist.html
209209
if release_to_download.filename.endswith(".tar.gz"):
210210
with tarfile.open(fileobj=body, mode="r:gz") as zf:

stdlib/@tests/stubtest_allowlists/common.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ _collections_abc.AsyncGenerator.__anext__
181181
_collections_abc.AsyncGenerator.aclose
182182
_collections_abc.AsyncIterator.__anext__
183183

184+
# Pretend typing.ByteString is a Union, to better match its documented semantics.
185+
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
186+
# because it's not an ABC that makes any sense and was deprecated in 3.12
187+
_collections_abc\.ByteString
188+
typing\.ByteString
189+
184190
_collections_abc.Callable # Typing-related weirdness
185191
_collections_abc.Mapping.get # Adding None to the Union messed up mypy
186192
_collections_abc.Sequence.index # Supporting None in end is not mandatory

stdlib/@tests/stubtest_allowlists/py310.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,12 @@ tkinter.tix.TkVersion
155155
# <= 3.13
156156
# =======
157157

158-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
159-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
160-
# because it's not an ABC that makes any sense and was deprecated in 3.12
161-
_collections_abc.ByteString
162-
163158
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
164159

165160
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
166161

167162
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
168163

169-
typing\.ByteString
170-
171164
# Will always raise. Not included to avoid type checkers inferring that
172165
# TypeAliasType instances are callable.
173166
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py311.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,12 @@ tkinter.tix.TkVersion
121121
# <= 3.13
122122
# =======
123123

124-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
125-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
126-
# because it's not an ABC that makes any sense and was deprecated in 3.12
127-
_collections_abc.ByteString
128-
129124
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
130125

131126
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
132127

133128
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
134129

135-
typing\.ByteString
136-
137130
# Will always raise. Not included to avoid type checkers inferring that
138131
# TypeAliasType instances are callable.
139132
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py312.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,12 @@ tkinter.tix.TkVersion
120120
# <= 3.13
121121
# =======
122122

123-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
124-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
125-
# because it's not an ABC that makes any sense and was deprecated in 3.12
126-
_collections_abc.ByteString
127-
128123
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
129124

130125
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
131126

132127
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
133128

134-
typing\.ByteString
135-
136129
# Will always raise. Not included to avoid type checkers inferring that
137130
# TypeAliasType instances are callable.
138131
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py313.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,12 @@ typing(_extensions)?\.IO\.writelines
8181
# <= 3.13
8282
# =======
8383

84-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
85-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
86-
# because it's not an ABC that makes any sense and was deprecated in 3.12
87-
_collections_abc.ByteString
88-
8984
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
9085

9186
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
9287

9388
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
9489

95-
typing\.ByteString
96-
9790
# Will always raise. Not included to avoid type checkers inferring that
9891
# TypeAliasType instances are callable.
9992
typing_extensions.TypeAliasType.__call__

stdlib/@tests/stubtest_allowlists/py39.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ collections.AsyncGenerator.__anext__ # async at runtime, deliberately not in th
1818
collections.AsyncGenerator.aclose # async at runtime, deliberately not in the stub, see #7491
1919
collections.AsyncGenerator.asend # async at runtime, deliberately not in the stub, see #7491. Pos-only differences also.
2020
collections.AsyncIterator.__anext__ # async at runtime, deliberately not in the stub, see #7491
21-
collections.ByteString # see comments in py3_common.txt
21+
collections.ByteString # see comments in common.txt
2222
collections.Callable
2323
collections.Mapping.get # Adding None to the Union messed up mypy
2424
collections.Sequence.index # Supporting None in end is not mandatory
@@ -104,19 +104,12 @@ tkinter.tix.TkVersion
104104
# <= 3.13
105105
# =======
106106

107-
# Pretend typing.ByteString is a Union, to better match its documented semantics.
108-
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
109-
# because it's not an ABC that makes any sense and was deprecated in 3.12
110-
_collections_abc.ByteString
111-
112107
ast.Ellipsis.__new__ # Implementation has *args, but shouldn't allow any
113108

114109
_?hashlib.scrypt # Raises TypeError if salt, n, r or p are None
115110

116111
importlib.abc.Traversable.open # Problematic protocol signature at runtime, see source code comments.
117112

118-
typing\.ByteString
119-
120113
# Will always raise. Not included to avoid type checkers inferring that
121114
# TypeAliasType instances are callable.
122115
typing_extensions.TypeAliasType.__call__

0 commit comments

Comments
 (0)