Commit Graph

10145 Commits

Author SHA1 Message Date
Brian Schubert c27e41c33b Make various email.Policy use sites generic over the message type (#13274) 2025-02-23 20:28:43 +01:00
Lennart Behme 9135645c30 Add type annotations for hnswlib (#13529) 2025-02-23 19:51:47 +01:00
Danny Yang c230773d2c [ez] Update link to style guide (#13530)
Update link to style guide

The style guide was merged with https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#style-guide in https://github.com/python/typeshed/pull/13332 so the anchor no longer exists.
2025-02-23 07:54:28 -08:00
sobolevn d86ad844f5 Bump python-jose to 3.4.* (#13522) 2025-02-23 14:25:36 +01:00
github-actions[bot] fe64ce1141 [stubsabot] Bump zstd to 1.5.6.4 (#13527)
Release: https://pypi.org/pypi/zstd/1.5.6.4
Homepage: https://github.com/sergey-dryabzhinsky/python-zstd
Repository: https://github.com/sergey-dryabzhinsky/python-zstd
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/zstd
Diff: https://github.com/sergey-dryabzhinsky/python-zstd/compare/v1.5.6.3...v1.5.6.4

Stubsabot analysis of the diff between the two releases:
 - Total lines of Python code added: 26.
 - Total lines of Python code deleted: 5.

If stubtest fails for this PR:
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
- Fix stubtest failures in another PR, then close this PR

Note that you will need to close and re-open the PR in order to trigger CI

Co-authored-by: stubsabot <>
2025-02-23 15:33:02 +03:00
github-actions[bot] 45eb87bea9 [stubsabot] Bump decorator to 5.2.* (#13526)
Release: https://pypi.org/pypi/decorator/5.2.0
Repository: https://github.com/micheles/decorator
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/decorator
Diff: https://github.com/micheles/decorator/compare/5.1.1...5.2.0

Stubsabot analysis of the diff between the two releases:
 - Total lines of Python code added: 36.
 - Total lines of Python code deleted: 50.

If stubtest fails for this PR:
- Leave this PR open (as a reminder, and to prevent stubsabot from opening another PR)
- Fix stubtest failures in another PR, then close this PR

Note that you will need to close and re-open the PR in order to trigger CI

Co-authored-by: stubsabot <>
2025-02-23 15:31:16 +03:00
Sabfo a61270c38c Fix typo in PyInstaller type alias (#13525) 2025-02-23 00:46:07 +01:00
Sam Bull fd4fc6091d Return BufferedIncrementalReader for some encodings (#13523) 2025-02-22 21:25:01 +01:00
sobolevn adba4359d0 Bump zxcvbn to 4.5.* (#13521) 2025-02-22 15:18:33 -05:00
Avasam 844e4f7ee3 Updates to boltons types (#13517) 2025-02-22 21:06:56 +01:00
Jelle Zijlstra ac8f2632ec pygments: Fix return type of pygments.lexers.guess_lexer_for_filename (#13515) 2025-02-19 02:54:32 +01:00
Danny Yang 132456af62 Bump reportlab to 4.3.1 (#13510) 2025-02-18 20:04:19 +01:00
Danny Yang d547f025b5 Bump braintree to 4.33.* (#13511) 2025-02-18 16:38:37 +01:00
Richard Si 4050dd42ef Update importlib cache,source return types to StrPath (#13509)
This has been true since Python 3.6.
2025-02-17 16:05:15 -08:00
github-actions[bot] 0149a15551 [stubsabot] Bump django-import-export to 4.3.* (#13460)
Co-authored-by: stubsabot <>
2025-02-17 12:17:07 +00:00
github-actions[bot] 7e3bb86581 [stubsabot] Bump simplejson to 3.20.* (#13505)
Co-authored-by: stubsabot <>
2025-02-17 12:09:02 +00:00
Xiddoc a447ad0f1a Add pyperclip stubs (#13502) 2025-02-17 11:31:50 +01:00
sobolevn 1568194559 Bump zstd to 1.5.6.3 (#13506) 2025-02-17 11:25:48 +01:00
sobolevn a640e08986 Update psutil to 7.0.* (#13507) 2025-02-17 11:23:20 +01:00
Richard Si 654d8c2457 Update compileall.compile_{dir, file, path} to return bool (#13504) 2025-02-15 15:33:01 -08:00
Michael H cc8ca939c0 Fix type for run_coroutine_threadsafe (#13498) 2025-02-14 13:23:11 +00:00
Alyssa Coghlan 3f41b30535 Revert "Improve [Async]ContextDecorator type hinting (#13416)" (#13436)
This reverts commit 57d7c4334b.

The attempted fix loses all type overload information during type
inferencing, so postpone fixing the issue until we have a solution
which doesn't impose such a dramatic loss in functionality.

Reopens #13403
2025-02-13 20:49:51 -08:00
Shamil a410f251ee Remove pyOpenSSL stubs (#13493) 2025-02-12 10:42:43 +01:00
David Peter 15f98a8ab8 chr: Accept SupportsIndex argument (#13494)
The `chr` function does accept objects that implement the
`SupportsIndex` protocol. The [implementation] of the builtin method
calls `PyLong_AsLongAndOverflow` on the argument, which in turn calls
`__index__()`, if present. The parameter of the `chr` function can
therefore be annotated with `int | SupportsIndex`.

It seems to me like `SupportsIndex` alone would be enough, since `int`
implements `SupportIndex`, but I chose `int | SupportIndex` to make it
consistent with the annotations on `hex`, `oct` and `bin`.

[implementation]: https://github.com/python/cpython/blob/b05fa90b21dd01bb836285cdd41920320b09e681/Python/bltinmodule.c#L725
[PyLong_AsLongAndOverflow]: https://docs.python.org/3.13/c-api/long.html#c.PyLong_AsLongAndOverflow
2025-02-12 07:50:42 +00:00
Avasam 24c78b9e0d http.server.SimpleHTTPRequestHandler's directory param can be PathLike (#13477) 2025-02-09 21:42:41 +00:00
M Bussonnier 8bd178e0c6 Fix: incorrect type for Bdb.format_stack_entry (#13485)
```python
    def format_stack_entry(self, frame_lineno, lprefix=': '):
         ...
        frame, lineno = frame_lineno
```

The type of `frame_lineno` is `tuple[FrameType, int]` not `int`,
understandably, since the type of `frame_lineno` can be interprted as
the line number of the frame. But looking at the implementation of
`Bdb.format_stack_entry`, it is clear that `frame_lineno` is a tuple.

It is also necessary to somehow pass a frame to `format_stack_entry` if
we want it to be formatted...
2025-02-09 21:32:56 +00:00
Avasam c99e54da3e Cross-platform third-party stubs requirements install script (#13482) 2025-02-09 21:21:22 +00:00
Avasam 46ac2e24a4 Update pathname param of setuptools._distutils.util.convert_path (#13483) 2025-02-09 19:20:20 +00:00
github-actions[bot] 232b8f3288 [stubsabot] Bump pyinstaller to 6.12.* (#13479)
Co-authored-by: stubsabot <>
2025-02-09 19:16:32 +00:00
sobolevn d65e8ac20c Bump peewee to 3.17.9 (#13475) 2025-02-09 12:21:12 +00:00
sobolevn 6480b2bf4a Bump boltons to 25.0.* (#13481)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-09 12:19:48 +00:00
Avasam dee4ef3171 Still allow passing None to shutil.rmtree's onerror parameter on Python 3.12+ (#13478)
Resolves https://github.com/python/mypy/issues/18239
2025-02-08 17:46:09 -08:00
sobolevn 1d1086018b Add --strict-bytes and --local-partial-types to self check (#13476)
* Add `--strict-bytes` and `--local-patial-types` to self check

These two options will be on by default in `--strict` in `mypy@2.0`

* Annotate `_LOADERS` in `pytype_test`
2025-02-08 10:00:49 +00:00
Alex Waygood 73ebb9dfd7 Bump mypy to 1.15.0 (#13473) 2025-02-07 11:21:40 -08:00
Alex Waygood 94ac7c44d2 Fix stubtest for dateparser (#13474) 2025-02-07 11:20:51 -08:00
Alex Waygood 5caaf2e1fb Fix stdlib stubtest for latest Python patch releases (#13464) 2025-02-05 23:33:27 +00:00
/ˈɛvən/ aac4394eb2 tkinter: allow index to be "end" in Treeview.move (#13454) 2025-02-03 14:43:28 +02:00
github-actions[bot] 8db4dc186f Bump pytz to 2025.1 (#13449) 2025-02-03 09:08:20 +01:00
Ali Hamdan a0db1ba8dc Mark optparse constants as final (#13451) 2025-02-03 09:05:41 +01:00
Ali Hamdan 30a4d10b71 Mark top-level re flags as final (#13452) 2025-02-03 09:04:52 +01:00
Ali Hamdan fd92105daa Mark constants in sre_constants as final (#13453)
Replace one use of Any
2025-02-03 09:04:03 +01:00
Victorien e26219d41f Bump django-import-export to 4.3.4 (#13414) 2025-02-03 09:02:58 +01:00
github-actions[bot] 983fc03a9f [stubsabot] Mark beautifulsoup4 as obsolete since 4.13.0 (#13455)
Release: https://pypi.org/pypi/beautifulsoup4/4.13.0
Homepage: https://www.crummy.com/software/BeautifulSoup/bs4/
Repository: https://git.launchpad.net/beautifulsoup/tree
Typeshed stubs: https://github.com/python/typeshed/tree/main/stubs/beautifulsoup4
2025-02-02 22:01:02 -08:00
Ali Hamdan 89b5afab15 Clean up argparse hacks (#13450) 2025-02-01 13:11:40 -08:00
Ali Hamdan d704a7d8f7 shapely: Fix tuple length of CoordinateSequence items (#13435)
Closes #13422
2025-02-01 13:40:34 -05:00
Alex Waygood c193cd2a36 Upgrade Black and Ruff (#13443) 2025-01-29 22:47:58 +00:00
Avasam 89b49d207b Have win32gui.SystemParametersInfo return Any (#13438) 2025-01-27 05:33:52 +01:00
sobolevn 5944a6837b Bump zstd to 1.5.6.2 (#13434) 2025-01-25 03:40:39 -08:00
Avasam aa992b9cc6 pywin32: type Get* functions in win32api (#13430) 2025-01-23 21:21:59 +01:00
x11x 3580566c5b pyserial: make serial.threaded.ReaderThread generic in the type of Protocol (#13425) 2025-01-23 11:23:52 +01:00