Skip to content

Commit 32a7df9

Browse files
authored
Merge branch 'main' into docutils.statemachine
2 parents e99408a + 3ddcbd0 commit 32a7df9

File tree

10 files changed

+41
-37
lines changed

10 files changed

+41
-37
lines changed

.github/workflows/meta_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
file: "pyproject.toml"
6565
field: "tool.typeshed.pyright_version"
6666
- name: Run pyright on typeshed
67-
uses: jakebailey/pyright-action@v2.0.2
67+
uses: jakebailey/pyright-action@v2
6868
with:
6969
version: ${{ steps.pyright_version.outputs.value }}
7070
python-platform: ${{ matrix.python-platform }}

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,22 +158,22 @@ jobs:
158158
file: "pyproject.toml"
159159
field: "tool.typeshed.pyright_version"
160160
- name: Run pyright with basic settings on all the stubs
161-
uses: jakebailey/pyright-action@v2.0.2
161+
uses: jakebailey/pyright-action@v2
162162
with:
163163
version: ${{ steps.pyright_version.outputs.value }}
164164
python-platform: ${{ matrix.python-platform }}
165165
python-version: ${{ matrix.python-version }}
166166
no-comments: ${{ matrix.python-version != '3.11' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
167167
- name: Run pyright with stricter settings on some of the stubs
168-
uses: jakebailey/pyright-action@v2.0.2
168+
uses: jakebailey/pyright-action@v2
169169
with:
170170
version: ${{ steps.pyright_version.outputs.value }}
171171
python-platform: ${{ matrix.python-platform }}
172172
python-version: ${{ matrix.python-version }}
173173
no-comments: ${{ matrix.python-version != '3.11' || matrix.python-platform != 'Linux' }} # Having each job create the same comment is too noisy.
174174
project: ./pyrightconfig.stricter.json
175175
- name: Run pyright on the test cases
176-
uses: jakebailey/pyright-action@v2.0.2
176+
uses: jakebailey/pyright-action@v2
177177
with:
178178
version: ${{ steps.pyright_version.outputs.value }}
179179
python-platform: ${{ matrix.python-platform }}

requirements-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ flake8-noqa==1.4.0 # must match .pre-commit-config.yaml
88
flake8-pyi==24.1.0 # must match .pre-commit-config.yaml
99
mypy==1.8.0
1010
pre-commit-hooks==4.5.0 # must match .pre-commit-config.yaml
11-
pytype==2024.2.13; platform_system != "Windows" and python_version < "3.12"
11+
pytype==2024.2.27; platform_system != "Windows" and python_version < "3.12"
1212
ruff==0.2.1 # must match .pre-commit-config.yaml and tests.yml
1313

1414
# Libraries used by our various scripts.

stdlib/tarfile.pyi

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from collections.abc import Callable, Iterable, Iterator, Mapping
77
from gzip import _ReadableFileobj as _GzipReadableFileobj, _WritableFileobj as _GzipWritableFileobj
88
from types import TracebackType
99
from typing import IO, ClassVar, Literal, Protocol, overload
10-
from typing_extensions import Self, TypeAlias, deprecated
10+
from typing_extensions import Self, TypeAlias
1111

1212
__all__ = [
1313
"TarFile",
@@ -292,49 +292,25 @@ class TarFile:
292292
def getnames(self) -> _list[str]: ...
293293
def list(self, verbose: bool = True, *, members: _list[TarInfo] | None = None) -> None: ...
294294
def next(self) -> TarInfo | None: ...
295-
@overload
296-
@deprecated(
297-
"Extracting tar archives without specifying `filter` is deprecated until Python 3.14, when 'data' filter will become the default."
298-
)
299-
def extractall(
300-
self,
301-
path: StrOrBytesPath = ".",
302-
members: Iterable[TarInfo] | None = None,
303-
*,
304-
numeric_owner: bool = False,
305-
filter: None = ...,
306-
) -> None: ...
307-
@overload
295+
# Calling this method without `filter` is deprecated, but it may be set either on the class or in an
296+
# individual call, so we can't mark it as @deprecated here.
308297
def extractall(
309298
self,
310299
path: StrOrBytesPath = ".",
311300
members: Iterable[TarInfo] | None = None,
312301
*,
313302
numeric_owner: bool = False,
314-
filter: _TarfileFilter,
303+
filter: _TarfileFilter | None = ...,
315304
) -> None: ...
316-
@overload
317-
@deprecated(
318-
"Extracting tar archives without specifying `filter` is deprecated until Python 3.14, when 'data' filter will become the default."
319-
)
320-
def extract(
321-
self,
322-
member: str | TarInfo,
323-
path: StrOrBytesPath = "",
324-
set_attrs: bool = True,
325-
*,
326-
numeric_owner: bool = False,
327-
filter: None = ...,
328-
) -> None: ...
329-
@overload
305+
# Same situation as for `extractall`.
330306
def extract(
331307
self,
332308
member: str | TarInfo,
333309
path: StrOrBytesPath = "",
334310
set_attrs: bool = True,
335311
*,
336312
numeric_owner: bool = False,
337-
filter: _TarfileFilter,
313+
filter: _TarfileFilter | None = ...,
338314
) -> None: ...
339315
def _extract_member(
340316
self, tarinfo: TarInfo, targetpath: str, set_attrs: bool = True, numeric_owner: bool = False

stubs/beautifulsoup4/bs4/element.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class Tag(PageElement):
234234
sourceline: int | None
235235
sourcepos: int | None
236236
known_xml: bool | None
237-
attrs: dict[str, str]
237+
attrs: dict[str, str | Any]
238238
contents: list[PageElement]
239239
hidden: bool
240240
can_be_empty_element: bool | None

stubs/html5lib/html5lib/_inputstream.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class _Encoding(Protocol):
1111

1212
_UnicodeInputStream: TypeAlias = str | SupportsRead[str]
1313
_BinaryInputStream: TypeAlias = bytes | SupportsRead[bytes]
14-
_InputStream: TypeAlias = _UnicodeInputStream # noqa: Y047 # used in other files
14+
_InputStream: TypeAlias = _UnicodeInputStream | _BinaryInputStream # noqa: Y047 # used in other files
1515

1616
spaceCharactersBytes: Any
1717
asciiLettersBytes: Any
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Internal implementation details that are intentionally missing from stub
2+
lzstring.keyStrBase64
3+
lzstring.keyStrUriSafe
4+
lzstring.baseReverseDic
5+
lzstring.Object
6+
lzstring.getBaseValue

stubs/lzstring/METADATA.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version = "1.0.*"
2+
upstream_repository = "https://github.com/gkovacs/lz-string-python"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class LZString:
2+
@staticmethod
3+
def compress(uncompressed: str | None) -> str: ...
4+
@staticmethod
5+
def compressToUTF16(uncompressed: str | None) -> str: ...
6+
@staticmethod
7+
def compressToBase64(uncompressed: str | None) -> str: ...
8+
@staticmethod
9+
def compressToEncodedURIComponent(uncompressed: str | None) -> str: ...
10+
@staticmethod
11+
def decompress(compressed: str | None) -> str | None: ...
12+
@staticmethod
13+
def decompressFromUTF16(compressed: str | None) -> str | None: ...
14+
@staticmethod
15+
def decompressFromBase64(compressed: str | None) -> str | None: ...
16+
@staticmethod
17+
def decompressFromEncodedURIComponent(compressed: str | None) -> str | None: ...

stubs/pyOpenSSL/OpenSSL/SSL.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ TLSv1_2_METHOD: int
2424
TLS_METHOD: int
2525
TLS_SERVER_METHOD: int
2626
TLS_CLIENT_METHOD: int
27+
DTLS_METHOD: int
28+
DTLS_SERVER_METHOD: int
29+
DTLS_CLIENT_METHOD: int
2730

2831
SSL3_VERSION: int
2932
TLS1_VERSION: int

0 commit comments

Comments
 (0)