Commit Graph

1087 Commits

Author SHA1 Message Date
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
Alex Waygood
23c4b124a6 Stubtest allowlists: put all the fake __iter__ methods together (#8368) 2022-07-22 18:08:13 +01:00
Alex Waygood
d1e80a724a Add some missing Windows constants (#8346) 2022-07-20 17:45:36 +01:00
Shantanu
85077b273d Show all packages in environment (#8341) 2022-07-19 19:42:52 -07:00
Sebastian Rittau
ef443b6359 Re-enable SQLAlchemy mypy tests (#8282)
These used to crash if run twice in succession locally, but the crash has been fixed on mypy 0.971
2022-07-19 16:46:39 +01:00
Alex Waygood
fceccd217c Upgrade mypy to 0.971 (#8332) 2022-07-19 16:27:05 +01:00
Shantanu
5ef20e8021 Use packaging to parse versions (#8314)
packaging is the standard tool for dealing with versions and
requirements. This allows us to easily support all PEP 508 specs.
packaging also has good error messages, so I don't create our own here.
This lets us get rid of our handrolled half parser and sanity checks.
I kept the whitespace consistency check, since that's just a formatting
lint and isn't testing the correctness of parsing (which we now
definitely do correctly).
2022-07-17 12:35:32 -07:00
Sebastian Rittau
91fd79c158 Updates for Python 3.11.0b4 (#8288) 2022-07-13 13:10:20 +02:00
Jelle Zijlstra
0306754f5f os: pos-only params for various functions (#8284) 2022-07-12 12:30:19 -07:00
Jelle Zijlstra
2a1b33df9f os: Params for posix_fallocate and posix_fadvise are pos-only (#8283)
90a6e56e56/Modules/posixmodule.c (L10845)
2022-07-12 12:19:41 -07:00
Alex Waygood
78d96cd17e Drop support for Python 2 (#8272) 2022-07-12 09:08:56 +02:00
Spencer Brown
29c17ffb47 Improve tkinter.simpledialog (#8243) 2022-07-10 19:52:16 +03:00
Sebastian Rittau
9a5c865034 Drop support for Python 3.6, part 1 (#8250)
* Document that typeshed support 3.7+.
* Don't run tests on Python 3.6.
* Remove Python 3.6 allow lists.
* Merge common allowlist items.

Part of #6189
2022-07-07 14:42:02 +02:00
Alex Waygood
73974e974d Improve warnings.catch_warnings (#8229) 2022-07-04 17:05:21 +02:00
Alex Waygood
f69f711d5a subprocess.Popen: __new__ -> __init__ (#8203) 2022-06-28 20:11:03 +02:00
Alex Waygood
f812d71ffa Improve errno stubs on Windows and MacOS (#8142) 2022-06-26 08:29:02 +05:30
Alex Waygood
64d91ef414 mypy_test.py: Add command-line argument to enable selecting which parts of the test to run (#8143) 2022-06-23 10:21:32 -07:00
Alex Waygood
610d2908bd mypy_test.py: Allow passing in multiple platforms from the command line (#8138) 2022-06-22 20:13:01 +01:00
Alex Waygood
15a17d1301 mypy_test.py: Add argument validation, improve type hints (#8135) 2022-06-22 18:03:29 +01:00
Alex Waygood
09141ec3dc mypy_test.py: Fix argument-parsing for --python-version (#8134)
* mypy_test.py: Fix argument-parsing for `--python-version`

* Bump min version required in the README
2022-06-22 15:08:56 +01:00