Skip to content

Commit 47b4240

Browse files
authored
Merge branch 'main' into patch-4
2 parents 376e10c + 25f3f74 commit 47b4240

File tree

99 files changed

+1253
-510
lines changed

Some content is hidden

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

99 files changed

+1253
-510
lines changed

.github/workflows/daily.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ jobs:
5050
check-latest: true
5151
- name: Install dependencies
5252
run: pip install -r requirements-tests.txt
53-
# Temporary to get @disjoint_base support; can remove once mypy 1.18 is released
54-
- name: Install mypy from git
55-
run: pip install git+https://github.com/python/mypy.git@116b92bae7b5dbf5e6bd36fd9b0c6804973e5554
5653
- name: Run stubtest
5754
run: python tests/stubtest_stdlib.py
5855

.github/workflows/stubtest_stdlib.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,5 @@ jobs:
4646
check-latest: true
4747
- name: Install dependencies
4848
run: pip install -r requirements-tests.txt
49-
# Temporary to get @disjoint_base support; can remove once mypy 1.18 is released
50-
- name: Install mypy from git
51-
run: pip install git+https://github.com/python/mypy.git@116b92bae7b5dbf5e6bd36fd9b0c6804973e5554
5249
- name: Run stubtest
5350
run: python tests/stubtest_stdlib.py

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
args: [--fix=lf]
1212
- id: check-case-conflict
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.13.2 # must match requirements-tests.txt
14+
rev: v0.13.3 # must match requirements-tests.txt
1515
hooks:
1616
- id: ruff
1717
name: Run ruff on stubs, tests and scripts

CONTRIBUTING.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -436,28 +436,24 @@ following criteria is met:
436436
* the upstream package was declared or appears to be unmaintained, and
437437
retaining the stubs causes maintenance issues in typeshed.
438438

439-
If a package ships its own `py.typed` file, please follow these steps:
439+
Case 1: If a package ships its own `py.typed` file, please follow these steps:
440440

441-
1. Open an issue with the earliest month of removal in the subject.
442-
2. A maintainer will add the
443-
["stubs: removal" label](https://github.com/python/typeshed/labels/%22stubs%3A%20removal%22).
444-
3. Open a PR that sets the `obsolete_since` field in the `METADATA.toml`
445-
file to the first version of the package that shipped `py.typed`.
446-
4. After at least six months, open a PR to remove the stubs.
441+
1. Make sure **stubsabot** open a PR that sets the `obsolete_since` field in the
442+
`METADATA.toml` file to the first version of the package that shipped `py.typed`.
443+
2. After at least six months, make sure **stubsabot** open a PR to remove the stubs.
447444

448-
If third-party stubs should be removed for other reasons, please follow these
449-
steps:
445+
Case 2: If third-party stubs should be removed for other reasons, please follow
446+
these steps:
450447

451448
1. Open an issue explaining why the stubs should be removed.
452449
2. A maintainer will add the
453450
["stubs: removal" label](https://github.com/python/typeshed/labels/%22stubs%3A%20removal%22).
454451
3. Open a PR that sets the `no_longer_updated` field in the `METADATA.toml`
455452
file to `true`.
456-
4. When a new version of the package was automatically uploaded to PyPI
457-
(which can take up to a day), open a PR to remove the stubs.
453+
4. When a new version of the package was automatically uploaded to PyPI (which
454+
can take up to a day), make sure **stubsabot** open a PR to remove the stubs.
458455

459-
Don't forget to make sure the library is not in the [`pyrightconfig.stricter.json`](./pyrightconfig.stricter.json)
460-
exclusion list. If feeling kindly, please update [mypy](https://github.com/python/mypy/blob/master/mypy/stubinfo.py)
456+
If feeling kindly, please update [mypy](https://github.com/python/mypy/blob/master/mypy/stubinfo.py)
461457
for any stub obsoletions or removals.
462458

463459
### Marking PRs as "deferred"

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ ignore = [
175175
"TD003", # Missing issue link for this TODO
176176
# Mostly from scripts and tests, it's ok to have messages passed directly to exceptions
177177
"TRY003", # Avoid specifying long messages outside the exception class
178-
# Slower and more verbose https://github.com/astral-sh/ruff/issues/7871
179-
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
180178
"PLC0205", # Sometimes __slots__ really is a string at runtime
181179
###
182180
# False-positives, but already checked by type-checkers

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/xmldiff",
9596
],
9697
"typeCheckingMode": "strict",
9798
// TODO: Complete incomplete stubs

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# =======
2+
# <= 3.12
3+
# =======
4+
5+
# Added in Python 3.10.18 (parameter `escapable`)
6+
html.parser.HTMLParser.set_cdata_mode
7+
8+
19
# =======
210
# <= 3.11
311
# =======

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ fcntl.F_OFD_SETLK
88
fcntl.F_OFD_SETLKW
99

1010

11+
# =======
12+
# <= 3.12
13+
# =======
14+
15+
# Added in Python 3.11.13 (parameter `escapable`)
16+
html.parser.HTMLParser.set_cdata_mode
17+
18+
1119
# =======
1220
# <= 3.11
1321
# =======

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ fcntl.F_OFD_SETLK
88
fcntl.F_OFD_SETLKW
99

1010

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

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

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

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

0 commit comments

Comments
 (0)