Commit Graph

1106 Commits

Author SHA1 Message Date
Alex Waygood 405494891c Setup renovate for updating dependencies (#11565) 2024-03-13 10:27:03 +00:00
Sebastian Rittau 417bdb9ac9 Refactor and merge requirements parsing (#11581) 2024-03-12 16:34:47 +01:00
Shantanu 4d8ae17776 Bump mypy to 1.9, add to json.encoder, small fixups (#11549)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-09 14:25:00 -08:00
Alex Waygood 35b74bc431 Rework our linting setup (#11522)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2024-03-03 23:11:54 +00:00
Alex Waygood 2c5712b7f4 Use uv for installing dynamic dependencies in mypy_test.py and regr_test.py (#11517) 2024-03-02 08:38:34 +00:00
Avasam 5cb2fe97a6 Replace flake8-bugbear with Ruff (#11500)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-29 18:20:31 +00:00
Nikita Sobolev 675ab38ab7 Update pyright version to 1.1.350 (#11501)
If you're reading about this commit in an auto-generated changelog: this is an internal change that should have no impact on how these stubs are understood by static-analysis tools such as type checkers or IDEs
2024-02-29 10:14:39 +00:00
Avasam da69247514 Code improvements from new Ruff checks (#11498) 2024-02-28 22:30:18 -08:00
Amin Alaee 9916efae63 Update os. EX_NOTFOUND not available in Linux (#11461) 2024-02-26 09:36:33 +01:00
Jelle Zijlstra bba8cbd6f8 stdlib: more deprecations (#11009)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-18 06:50:29 -08:00
Jelle Zijlstra 705744af4c Update for typing_extensions 4.10 (#11438) 2024-02-18 00:59:48 -08:00
Jelle Zijlstra e5d25a7605 importlib.metadata: Improve and test SimplePath protocol (#11436)
Co-authored-by: layday <layday@protonmail.com>
2024-02-18 00:36:01 -08:00
Sebastian Rittau 65c154f5ff Document ignore_missing_stub in CONTRIBUTING.md (#11426)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-17 12:48:28 +00:00
Alex Waygood 15cdc20744 Fix stdlib stubtest for Python 3.11.8 and 3.12.2 (#11384)
Fix stubtest for Python 3.11.8 and 3.12.2
2024-02-09 02:28:03 -08:00
Ran Benita a4f81a67a0 sys: add last_exc on Python>=3.12 (#11378)
https://docs.python.org/3/library/sys.html#sys.last_exc
2024-02-07 20:37:48 +00:00
Alex Waygood c50a641fc8 regr_test.py: Run mypy with --no-incremental (#11346) 2024-01-30 08:59:20 -08:00
Sebastian Rittau 1b471a9a0a Update typing_extensions imports in infrastructure and tests (#11243) 2024-01-05 13:30:45 +00:00
Shantanu 2cafcc90a7 socket: rework to match docs more closely, improve accuracy on linux (#11219)
Match the documentation more closely

Fixes some of #8101
2024-01-04 14:36:31 -08:00
Sebastian Rittau 4e5f7a7142 Drop support for Python 3.7 (#11234) 2024-01-04 14:48:44 +01:00
Alex Waygood 16933b838e Bump mypy (and a few other test dependencies) (#11196) 2023-12-21 22:57:58 +00:00
Stephen Morton 33df486ba2 Allow the use of local-only stubtest allowlists (#11173)
This makes it nicer to work on a local system with known
divergences from the CI environment
2023-12-16 18:43:33 -08:00
Stephen Morton fd558f8acf importlib.abc.Loader moved to importlib._abc.Loader in 3.10 (#11142) 2023-12-11 14:48:58 +01:00
Stephen Morton 695d67cd7b Add deprecation classes in importlib.metadata (#11118) 2023-12-10 21:06:22 +01:00
Alex Waygood bb1f70ad08 Fix stubtest now that Python 3.12.1 is out (#11121) 2023-12-08 10:59:44 +00:00
Alex Waygood 9eb099ed6b Stubtest fixes for the latest patch release of py311 (#11107) 2023-12-06 00:55:46 +00:00
tungol fd7ff19577 Use StrEnum as base class, when available (#11100) 2023-12-05 13:27:10 +01:00
Alex Waygood ef346aba0d Fixes to typing and typing_extensions stubs (#11086) 2023-11-29 19:00:58 +00:00
Nikita Sobolev 06d0151b25 Enable redundant-self mypy error code (#11056) 2023-11-22 10:13:17 +00:00
Nikita Sobolev d232def6b2 Use consistent mypy output spacing (#11055) 2023-11-22 09:58:13 +00:00
Alex Waygood 83964a4dc5 stdlib: add many missing __del__ methods (#11042) 2023-11-18 11:32:12 -08:00
Akuli cad0c04ec0 tkinter: Require passing in a callback function to .after() (#11013) 2023-11-10 20:18:25 +02:00
Jelle Zijlstra b36f3c5229 asyncio: remove overly specific protocols (#10984)
The _warn parameter to these methods is just there to work around
some finalization issues and should never be used by users. In
addition, these protocols are out of date (the "stacklevel" argument
is not used by current CPython main). I don't think we gain anything
by trying to maintain these protocol definitions.
2023-11-07 19:26:25 -08:00
Sebastian Rittau f7aa7b709a Improve regression test documentation (#10935)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-29 10:07:17 +00:00
Benedikt Radtke 1196915b39 fix nullability of scrypt params (#10942) 2023-10-29 01:35:39 +02:00
Alex Waygood 56288ad2d0 Add stubs for importlib.(resources.)simple (#10931) 2023-10-28 07:29:57 -07:00
Avasam 49ba409da8 Replace isort with Ruff (#10912) 2023-10-27 20:14:38 -07:00
Sebastian Rittau 1c184fea33 Simplify Traversable signature (#10934)
Simplify Traversable.open() signature. This is necessary so that implentors can
reasonanbly implement this method. For example `zipfile.Path.open()` (which
is considered a `Traversable`) only supports this subset.

Make `Traversable.__truediv__` and `joinpath` arguments pos-only. The
arguments are named differently in both `pathlib.Path` and `zipfile.Path`.
2023-10-27 00:50:11 +02:00
Alex Waygood 908993a807 Add stubs for importlib.(resources.)readers (#10928)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-10-26 14:18:55 +01:00
Alex Waygood b9640005eb Add stubs for nt (#10917) 2023-10-19 10:16:06 -07:00
Avasam 21fcd8960f Use Ruff for from __future__ import annotations checks (#10910) 2023-10-19 11:40:41 +02:00
Avasam 35873ec3d8 Doc: Use proper name capitalization of tooling (Ruff, Black, Flake8) (#10913) 2023-10-18 23:46:53 +01:00
Alex Waygood 2f8d01e9ec Bump mypy to 1.6.1 (#10862) 2023-10-18 07:18:05 +01:00
Rebecca Chen 1ecaab1641 Run pytype_test in Python 3.11. (#10903)
As of version 2023.10.17, pytype now supports 3.11.
2023-10-18 00:44:14 +01:00
Pavel Karateev 838dd3a5ba Add sys.monitoring from Python 3.12 (#10890)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-16 13:50:06 +01:00
Sebastian Rittau 7e2a3413fa Fix mypy_test if mypy returns negative exit code (#10866) 2023-10-11 14:53:16 +02:00
Sebastian Rittau 3632fc225c Extend and fix zipfile (#10861)
* Add `CompleteDirs` and `FastLookup` (Python 3.8+).
* Add `Path.root` (Python 3.8+).
* Use concrete signature for `Path.open()` (Python 3.8).
* Fix signature of `Path.open()` for Python 3.9+:
   + Add overloads for text and binary modes with fixed return types.
   + Disallow extra arguments for binary modes.
   + Replace `*args` and `**kwargs` with accepted arguments for
     text modes.

Closes: #10847
2023-10-08 06:30:51 -07:00
Nikita Sobolev 5531e9d470 Add _locale module (#10859)
More accurately reflect the platform availability of several constants and functions in `locale`.
2023-10-08 12:55:19 +02:00
Alex Waygood e4edcf23e0 Fix platform availability of some Unix constants (#10857) 2023-10-07 15:05:20 -07:00
Nikita Sobolev 8acf1944f3 Remove allowlist entries for _ctypes on win (#10855) 2023-10-07 21:43:33 +02:00
Nikita Sobolev fb994e344b Fix ssl.SSLSocket methods on windows (#10849) 2023-10-07 07:50:52 +01:00