Commit Graph
600 Commits
Author SHA1 Message Date
Alex WaygoodandGitHub 478e7527aa mypy_test: Add two more config options (#7560)
`--enable-error-code ignore-without-code` means that mypy will ignore any type: ignore comments that don't have mypy error codes. It doesn't appear to have any effect on type: ignore comments that mypy_test doesn't use (e.g. because they're pyright- or stubtest-specific).

`--strict-equality` means that mypy will raise errors if we do something silly like `if sys.version_info == "linux"`. flake8-pyi should also check this for us, but I don't see any reason not to have mypy check this as well.
2022-03-28 16:06:13 +01:00
Stefan ZabkaandGitHub f40747f81d Add Server to asyncio.base_events' __all__ (#7554)
Add Server to asyncio.base_events' __all__

Closes #7552
2022-03-25 20:32:28 +00:00
5c44ae4f8c Improve various signatures that shouldn't be async def, but currently are (#7491)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-03-18 20:54:39 -07:00
Alex WaygoodandGitHub 3ab250eec8 Use PEP 604 syntax wherever possible (#7493) 2022-03-16 16:01:33 +01:00
15e21a8dc1 Use pyright 1.1.230 in CI, temporarily pin pyright-action to 1.0.4 (#7495)
* Upgrade pyright to 1.1.230
* Add `type: ignore`s for new pyright checks regarding multiple inheritance
* Temporarily pin pyright-action to 1.0.4, as changes made in 1.0.5 break typeshed's CI

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-16 14:24:55 +00:00
Sebastian RittauandGitHub fdc5863337 Use stubtest 0.941 (#7490) 2022-03-15 00:37:34 -07:00
Alex WaygoodandGitHub 2f338ce077 Further improve mypy_test.py (#7484)
* Run mypy on the 3.11 stdlib in CI, as a regression test for https://github.com/python/mypy/issues/12220
* Correct the docstring at the top of the file following the changes made in #7478
* Stop the test from crashing when run locally if there's an extra file/folder in the stubs directory.
2022-03-13 19:58:30 +00:00
fa332220b7 Fix mypy test (#7478)
* Fix `mypy_test.py` so that it actually tests the third-party stubs
* Upgrade to mypy 0.940
* Skip running mypy on `SQLAlchemy` stubs for now, to workaround a mypy crash.

Because we didn't set mypy's clean_exit parameter, it was exiting immediately after checking the stdlib, meaning `mypy_test.py` wasn't checking the third-party stubs at all.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-03-13 13:01:14 +00:00
Sebastian RittauandGitHub cdb573b398 Remove explicit inheritance from object (#7468) 2022-03-09 19:43:44 +01:00
c3907ab26b Remove Python 2 support from some third-party distributions (#7466)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-03-09 20:19:22 +02:00
Henry SchreinerGitHubpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Alex Waygood
967f83db09 rlcompleter: add attr_matches, global_matches (#7453)
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-03-08 00:07:58 +00:00
AkuliandGitHub 30a424c661 Finish renaming stubtest.yml to daily.yml (#7448) 2022-03-07 11:09:24 +02:00
Jelle ZijlstraandGitHub 675de720d6 Add some missing items to sys.pyi and types.pyi (#7447) 2022-03-07 08:22:08 +01:00
Jelle ZijlstraandGitHub 2fb9c35ff9 Put shutil.chown back on Windows (#7446)
See #7384 and https://github.com/python/typeshed/pull/7443#issuecomment-1060071944 (thanks @AlexWaygood for diagnosing).
2022-03-06 16:27:24 -08:00
Martin FischerandJelle Zijlstra 8034c1c48c stdlib: shutil.chown does not work on Windows (#7384) 2022-03-06 16:04:05 -08:00
Martin FischerandJelle Zijlstra 182ddd9daf stdlib: Add os.get_handle_inheritable & setter 2022-03-06 15:57:52 -08:00
Martin FischerandJelle Zijlstra aa383624cf stdlib: Add missing re-exports for UuidCreate, FCICreate, OpenDatabase & CreateRecord 2022-03-06 15:57:52 -08:00
Martin FischerandJelle Zijlstra 352f5c3237 stdlib: Add os.copy_file_range(src, dst, count) 2022-03-06 15:57:52 -08:00
Martin FischerandJelle Zijlstra 81a85f18b6 stdlib: Add os.pidfd_open(pid) 2022-03-06 15:57:52 -08:00
Martin FischerandJelle Zijlstra 9abf314a5b stdlib: Add time.pthread_getcpuclockid(thread_id) 2022-03-06 15:57:52 -08:00
Alex WaygoodandGitHub 1a2f718ceb Make several fields read-only for type, staticmethod and classmethod (#7423) 2022-03-06 15:50:26 -08:00
ShantanuandGitHub 77e5a2d468 Upgrade to stubtest with dunder pos only reverted (#7442) 2022-03-05 18:38:08 -08:00
Alex WaygoodandGitHub cda3d9cf72 Use latest stubtest in CI (#7438) 2022-03-04 15:19:29 +01:00
Jelle ZijlstraandGitHub 0a6b6b095c Add asyncio.windows_utils.Popen (#7396) 2022-03-02 12:37:54 +02:00
Alex WaygoodandGitHub fd750bf065 asyncio.unix_events: Make AbstractChildWatcher abstract, add PidfdChildWatcher (#7412) 2022-03-01 16:23:46 +01:00
ShantanuandGitHub ebcfe7bc4e random: use bound methods (#7408) 2022-03-01 09:27:44 +01:00
Alex WaygoodandGitHub 1ebedcc2b4 Mark fields as readonly in builtins.pyi and types.pyi (#7392)
Add FunctionType.__builtins__
2022-02-28 13:23:34 +01:00
Alex WaygoodandGitHub b8421eb5d4 Delete the contents of distutils.command.__init__ (#7370) 2022-02-27 16:43:11 -08:00
Alex WaygoodandGitHub a0b41959ec stdlib: fix many attributes which are read-only at runtime but read-write in the stub (#7395) 2022-02-27 16:23:09 -08:00
Alex WaygoodandGitHub d2ddda00cf Fix various __all__-related typos and omissions (#7378) 2022-02-25 15:10:00 +02:00
Alex WaygoodandGitHub 240628c4dd Add missing objects to plistlib, and improve __all__ in asyncio.tasks, http.server, & multiprocessing.__init__ (#7363) 2022-02-22 16:39:34 -08:00
Alex WaygoodandGitHub 070bbb4fb9 Add multiprocessing.reduction submodule (#7361) 2022-02-22 16:36:26 -08:00
Alex WaygoodandGitHub 22c3cc4d0b Add csv.__version__ (#7357) 2022-02-22 20:12:43 +02:00
Alex WaygoodandGitHub 6fc4c14181 Add missing objects in codecs, configparser, and multiprocessing.dummy (#7360) 2022-02-22 18:25:27 +01:00
Alex WaygoodandGitHub bdcaea4305 cgi: Add print_exception and print_arguments (#7359) 2022-02-22 08:38:02 -08:00
Sebastian RittauandGitHub 7a81bd41e9 Re-introduce the 'stubtest' key for third-party packages (#7351)
Some distributions can't be tested with stubtest for a variety of
reasons or because of bugs in stubtest. This key:

* let's us keep metadata about a distribution in one place,
* prevents us from modifying the scripts because of issues with a
  specific distribution, and
* will trigger tests if only the key is changed.
2022-02-22 15:59:27 +01:00
ShantanuGitHubhauntsaninja <>
c2fb0fb814 Downgrade stubtest a little (#7346)
Fixes #7344 for now.

As discussed in that issue, I think it might make sense to revert the
change to check positional-only arguments on dunders for now, since it
seems to be mostly busywork and has very little benefit for end users.

However, that'll happen on stubtest master, which typeshed isn't yet
ready for.

Co-authored-by: hauntsaninja <>
2022-02-21 17:05:46 -08:00
ShantanuGitHubhauntsaninja <>
075b8e02eb Update stubtest for async and dunder pos only checking (#7333)
Co-authored-by: hauntsaninja <>
2022-02-21 15:54:16 -08:00
Nikita SobolevandGitHub 4d169eaa83 Adds bdist_wininst definition (#7249) 2022-02-20 22:58:48 -08:00
Alex WaygoodandGitHub 07de01f29e Add __all__ to modules beginning with 'm' (#7330) 2022-02-20 14:08:07 -08:00
ShantanuGitHubhauntsaninja <>
823592e100 Update stubtest for final checking (#7312)
Co-authored-by: hauntsaninja <>
2022-02-19 18:53:15 -08:00
Alex WaygoodandGitHub b74acc7546 Add all the email __all__s (#7304) 2022-02-19 17:53:29 -08:00
ShantanuGitHubhauntsaninja <>
ebdbd564be sqlalchemy: skip stubtest for now (#7310)
Co-authored-by: hauntsaninja <>
2022-02-19 17:47:55 -08:00
ShantanuGitHubhauntsaninja <>
879b617366 Update stubtest for submodule versions, typeddict fix (#7306)
First step in #7305

Co-authored-by: hauntsaninja <>
2022-02-19 15:53:40 -08:00
35bddd289f Add asyncio.taskgroups and new Task methods (#7240)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-02-17 00:32:20 +02:00
Alex WaygoodandGitHub 5a8b9dafb3 Fix various py310 stubtest errors (#7239) 2022-02-16 11:47:49 -08:00
Alex WaygoodandGitHub 28a760cd2c Improve pyclbr.pyi (#7229) 2022-02-16 07:01:27 -08:00
Nikita SobolevandGitHub 09395dd747 Add --disallow-untyped-decorators to mypy_test (#7235) 2022-02-16 01:47:52 -08:00
Alex WaygoodandGitHub 5e8a2a9364 Fix various pos-only stubtest complaints previously allowlisted (#7228) 2022-02-15 17:51:34 +01:00
Alex WaygoodandGitHub 96b06adf2c Add missing descriptor methods in dataclasses and functools (#7203) 2022-02-15 06:45:49 -08:00