Nikita Sobolev
09511fd72f
print cannot raise subprocess.CalledProcessError (#8933 )
2022-10-19 19:16:05 +01:00
Samuel T
573ee94f35
All scripts/tests: always specify file encoding in calls to open() ( #8882 )
2022-10-11 22:29:36 +01:00
Hassan Abouelela
70e48ff799
Mention how to run stubtest directly on third party stubs ( #8868 )
...
Signed-off-by: Hassan Abouelela <hassan@hassanamr.com >
2022-10-08 17:15:35 -07:00
Alex Waygood
6a2232a30b
Improve docs on running stubtest locally ( #8822 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2022-10-08 16:29:48 -07:00
Alex Waygood
e73fcf220e
mypy_test.py: Remove unused seen variable/parameters (#8846 )
2022-10-04 14:38:31 -07:00
Alex Waygood
55cddc7ac7
mypy_test.py: restore previous behaviour where all third-party stubs are tested by default (#8842 )
2022-10-04 11:01:51 -07:00
Alex Waygood
5da171ba45
mypy_test.py: Always add dependencies of stubs to the files to test (#8800 )
2022-10-04 08:05:13 -07:00
Samuel T
e5d52a39d4
Script to run all checks locally ( #8798 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-10-04 07:21:10 -07:00
Alex Waygood
ab2fba9c83
check_consistent.py: ignore .gitignored files (#8804 )
2022-09-28 17:02:27 +01:00
Alex Waygood
d84fda1f12
Upgrade pyright to 1.1.273 ( #8802 )
2022-09-28 14:01:08 +01:00
Alex Waygood
48e76e8a56
Bump mypy to 0.981 ( #8796 )
2022-09-26 17:14:33 -07:00
Alex Waygood
008fe2e764
mypy_test.py: rework filter, exclude and --dir arguments (#8711 )
2022-09-22 08:31:24 +01:00
Samuel T
6ca80d340e
pyright_test.py: Support for npx 8 and pyright PyPI package (#8769 )
2022-09-21 15:57:14 +01:00
Shantanu
67c858408d
Upgrade to termcolor>=2 ( #8766 )
2022-09-19 08:17:30 +02:00
Alex Waygood
20bc8fa4e3
Fix stubtest errors on macOS / Python 3.11 ( #8743 )
2022-09-15 15:27:42 -07:00
Alex Waygood
a6c174cc7b
Add new sys functions introduced to combat CVE-2020-10735 ( #8733 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-09-13 16:01:26 +01:00
Alex Waygood
ed29fc5557
stubtest_third_party.py: Make it work on Windows (#8720 )
2022-09-11 01:06:46 +03:00
Akuli
ab022557e2
Run third-party stubtest under xvfb-run ( #8719 )
2022-09-10 18:34:11 +03:00
Alex Waygood
b53843ab46
Add infrastructure allowing for test cases for third-party stubs ( #8700 )
...
- Move the logic for running mypy on the test cases from `tests/mypy_test.py` to a separate script, `tests/regr_test.py`.
- Add the necessary logic in order to be able to have test cases for third-party stubs.
- Move logic common to `tests/mypy_test.py` and `tests/regr_test.py` into `tests/colors.py`, and rename `tests/colors.py` to `tests/utils.py`.
- Add a new check to `tests/check_consistent.py`, to enforce the use of `# pyright: reportUnnecessaryTypeIgnoreComment=true` comments in third-party test cases. These are essential if we want to have our tests against false-negatives work with pyright.
- Update the relevant documentation to account for the new test file.
- Add a new job to the `tests.yml` GitHub workflow, to run the new test in CI.
- Add a simple proof-of-concept test case for `requests`, as a regression test for #7998 .
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2022-09-08 16:51:33 +01:00
Alex Waygood
51e8325c10
Rename the files in the test_cases directory; add further clarifications to the README ( #8688 )
2022-09-06 07:50:24 +02:00
Alex Waygood
b6d28acb23
mypy_test.py: Use pathlib more (#8680 )
2022-09-05 14:24:14 +01:00
Alex Waygood
86a34c5bd6
typecheck_typeshed.py: Make dir command-line argument positional-only (#8646 )
2022-08-31 09:14:53 +01:00
junkmd
1c6eb33c23
add and migrate constants from ctypes/__init__.pyi to _ctypes.pyi ( #8643 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-08-29 15:33:47 +01:00
Alex Waygood
d91e5f0eff
Further enhance check_consistent.py ( #8604 )
2022-08-26 07:50:26 -07:00
Nipunn Koorapati
7beaebff40
Bump to mypy-protobuf 3.3.0 ( #8612 )
...
* Bump to mypy-protobuf 3.3.0
* Remove some ignores for formatting
2022-08-26 07:24:11 +01:00
junkmd
179228370a
Add win32-specific constants to _ctypes ( #8614 )
2022-08-25 16:22:06 +01:00
Alex Waygood
1c56148ce9
mypy_test.py: Remove --dry-run option (#8611 )
...
Cf #8139 .
2022-08-25 14:23:00 +02:00
Nipunn Koorapati
c697a51378
Support tests/mypy_test.py [package] ( #8610 )
...
Currently, the testsuite early exits if it's filtering on a single
package. With this change, it will correctly complete.
For example `tests/mypy_test.py protobuf`
2022-08-25 12:25:26 +01:00
Alex Waygood
15f74295d2
Add aiohttp and tomlkit to requirements-tests.txt ( #8605 )
2022-08-24 23:08:54 +01:00
Shantanu
49062f53c3
Improve check_consistent ( #8581 )
...
- Use pathlib for convenience
- Share more logic between check_stubs and check_stdlib
- Better recursive checking, e.g. if a README.md is in the wrong place
- Fixes bug in checking directories in stubs/
- Test distribution names are valid
- Errors now contain full paths
- I believe pathlib normalises separators, but someone with Windows
might want to double check this continues to work
2022-08-23 23:18:07 -07:00
Aron Bierbaum
ef6bacab92
Update ForwardRef._evaluate for Python 3.11 ( #8600 )
...
recursive_guard argument was added in https://github.com/python/cpython/pull/21553
2022-08-23 18:05:55 -07:00
Nikita Sobolev
fed419b8f1
Add CTYPES_MAX_ARGCOUNT to _ctypes ( #8601 )
2022-08-23 14:52:16 -07:00
junkmd
2066b9533c
_ctypes: add stubs ( #8582 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com >
2022-08-23 12:22:12 -07:00
Alex Waygood
875f0ca7fc
mypy_test.py: Move type-checking of our tests and scripts into a different test (#8587 )
2022-08-22 17:16:03 +01:00
Shantanu
19beaba9e7
Disallow adding stubs for types- packages ( #8579 )
...
This would lead to confusion. The types prefix is special cased in
various ways in stub_uploader
2022-08-20 15:44:17 -07:00
Alex Waygood
38bc0ec0e6
mypy_test.py: simplify argument parsing (#8577 )
2022-08-20 21:32:17 +01:00
Kevin Kirsche
8c51fab4e2
Support extras in stubtest_third_party.py ( #8467 )
2022-08-18 14:12:36 -07:00
Rebecca Chen
1e1a586893
Update pytype_test to be compatible with the latest pytype version. ( #8551 )
...
We moved some files around =)
2022-08-17 19:18:33 -07:00
Jelle Zijlstra
5477097c6d
Upgrade pyright ( #8541 )
2022-08-12 20:24:51 -07:00
Alex Waygood
1ec57121e3
Unpin stubtest from 3.10.5 ( #8523 )
2022-08-12 10:01:26 +02:00
Kevin Kirsche
bd7a02fad4
refactor: prefer f-strings to other format/concatentation styles ( #8474 )
2022-08-03 14:04:27 +02:00
Nikita Sobolev
1bd1625c36
importlib: SimplePath: __div__ -> __truediv__ on 3.10 ( #8451 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-08-02 07:15:46 +01:00
Alex Waygood
4414246a15
Clean up a few Python 2 remnants ( #8452 )
2022-07-31 19:19:18 +01:00
Alex Waygood
87fc724cef
ctypes: pointer is a function, not a class (#8446 )
2022-07-31 15:29:13 +02:00
Kevin Kirsche
f550c24886
Add multiprocessing.popen_spawn_win32 submodule ( #8428 )
2022-07-29 16:02:15 +01:00
Kevin Kirsche
17e3cf99a4
Add multiprocessing.popen_spawn_posix submodule ( #8427 )
2022-07-29 15:52:49 +01:00
Kevin Kirsche
1f0e641521
Add multiprocessing.popen_forkserver submodule ( #8425 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-07-28 17:26:06 +01:00
Kevin Kirsche
087fb6b96d
Add multiprocessing.popen_fork submodule ( #8420 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-07-28 16:19:43 +01:00
Kevin Kirsche
177bbf7864
Add curses.has_key submodule ( #8421 )
2022-07-28 14:39:44 +01:00
Alex Waygood
78e0b3cfca
Stubtest: allowlist all of distutils on 3.11 ( #8411 )
...
Fixes #8410
2022-07-27 20:27:38 +01:00