Commit Graph

1073 Commits

Author SHA1 Message Date
Jelle Zijlstra
38569b6bb4 stubtest: fix path (#11884) 2024-05-10 10:44:42 +02:00
Sebastian Rittau
392ae934fc Move test_cases to stdlib/@tests/test_cases (#11865) 2024-05-09 19:27:09 -07:00
Sebastian Rittau
e436dfe219 Unify test directory handling (#11864)
Previously, handling of test directories (`@tests` and `test_cases`) was
distributed over multiple files and redundant. This unifies the handling
in the `utils` module. This also fixes some instances where "package"
was used instead of "distribution". And in a few instances paths were
joined by using a `/` in a string, which is incompatible with Windows.

Also move `runtests.py` from `scripts` to `tests`. This is required so that
we can import `utils`, but it's also arguably the better fit. The only
mention of the script is actually in the `tests/README.md` file.

Helps with #11762.
2024-05-05 16:28:37 +02:00
Shantanu
29db988c0a Disable uwsgi, pyaudio, jack-client stubtest on macOS (#11821) 2024-04-24 08:10:33 +02:00
David Salvisberg
f274c78fe5 Make ExitStack, AbstractContextManager and AsyncAbstractContextManager generic in return type of __exit__ (#11048) 2024-04-22 16:43:08 +02:00
Alex Waygood
1a86b3b3fe stubtest_third_party.py, mypy_test.py: just print everything to stdout (#11809) 2024-04-22 11:50:47 +01:00
Alex Waygood
4872c30a98 Fix divider lines in stubtest_third_party.py (#11799) 2024-04-20 17:10:28 -07:00
Alex Waygood
57f3dcac8d Bump flake8-pyi to 24.4.1 (#11791) 2024-04-19 10:07:56 -07:00
Alex Waygood
7c8e82fe48 Improve the output of tests/stubtest_third_party.py when it fails (#11763) 2024-04-14 23:23:25 +01:00
Sebastian Rittau
f4b89f5f86 Rename check_consistent.py to check_typeshed_structure.py (#11761) 2024-04-14 13:34:10 -07:00
Sebastian Rittau
d3aa08188f Ensure that distutils and setuptools._distutils stay consistent (#11758) 2024-04-14 15:41:59 +02:00
Sebastian Rittau
451e0efbcb Improve documentation of the check_consistent script (#11757) 2024-04-14 14:59:05 +02:00
peace-maker
d78ce5906b Run gdb stubtests (#11644)
The gdb package is only available inside gdb and cannot be installed externally through e.g. pip.
Run the stubtest inside gdb.
2024-03-26 10:57:35 +01:00
Shantanu
13265a9347 xml: update for security fix (#11648)
Fixes #11643
2024-03-22 13:07:05 -07:00
Sebastian Rittau
a8997209fb Install pyright from PyPI (#11575) 2024-03-16 14:14:31 +01:00
Alex Waygood
0f4a2dfec4 pin uv to 0.1.18 (#11598)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2024-03-14 11:46:03 +00:00
renovate[bot]
48106feed7 chore(deps): update pytype and pyright (#11595) 2024-03-14 09:28:09 +01:00
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