Commit Graph
315 Commits
Author SHA1 Message Date
Jake BaileyandGitHub f626da6553 Bump pyright to 1.1.126, enable 3.10 testing (#5153) 2021-03-30 11:57:55 -07:00
ShantanuGitHubhauntsaninja <>
54392b1e12 allowlist new "not a function" errors (#5155)
stubtest now checks this for overloads as well (previously it didn't,
due to some combination of laziness, that this used to short circuit and
prevent signature checking, and the fact that these are all not super
helpful)

Co-authored-by: hauntsaninja <>
2021-03-29 22:44:18 -07:00
hatal175andGitHub 20a6de8fdd Stubtest exceptions for sys, symtable, sysconfig and tarfile (#5138) 2021-03-26 21:33:19 -07:00
hatal175andGitHub 5b730d4ded Fix Shlex stubtest errors (#5135) 2021-03-23 20:56:47 -07:00
hatal175andGitHub 88a8d0ccbc Explaining/Fixing asyncio allowlist exceptions (#5132) 2021-03-23 17:14:30 -07:00
ShantanuGitHubhauntsaninja <>
e380432825 comment on memoryview.cast (#5118)
Co-authored-by: hauntsaninja <>
2021-03-15 17:26:47 -07:00
hatal175andGitHub 3de5d893de Add Curses ACS Codes (#5116)
Closes: #5115
2021-03-15 15:24:32 +01:00
c92e3cb228 Update pyright CI test to use the latest version of pyright (1.1.118). (#5092)
Update pyright CI test to use the latest version of pyright (1.1.118). Enable all but one of pyright's strictest checks. Add a "# type: ignore" to `__new__` method in `weakref.KeyRef` because it uses a non-standard name for the `cls` parameter, which is flagged as an error by pyright.

Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-03-05 12:12:18 -08:00
Sebastian RittauandGitHub 2b19c761ec Fix build (#5086)
Run the mypy test suite using Ubuntu 18.04. Ubuntu 20.04 doesn't have a package for virtualenv on Python 2.

Also, curses.color_pair() now has a named argument.
2021-03-04 17:11:37 +01:00
Jake BaileyandGitHub 0fa7e73027 Run pyright on matrix of platforms and python versions (#5072)
* Run pyright on matrix of platforms and python versions

* Drop 3.10 from matrix, as it fails
2021-02-25 16:24:32 -08:00
Sebastian RittauandGitHub c152e050f5 Fix stubtest errors (#5063)
A security fix added a "separator" argument to several URL parsing
functions and method in point releases:

* 3.6.13
* 3.7.10
* 3.8.8
* 3.9.2

Until all these versions are available on the GitHub Actions runners,
we need to whitelist the functions in the stubtests.
2021-02-24 14:37:38 +01:00
c00c7258ea Add pyright to test suite, pyrightconfig.json (#5059)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-02-23 23:07:42 +01:00
ffcd592aef Added support for | operator for combining two TypedDict instances (#5054)
Co-authored-by: Eric Traut <erictr@microsoft.com>
2021-02-23 10:04:31 +01:00
AkuliandGitHub 903f74a68e tkinter.Tk.eval self fix (#5023)
Fixes #5019
2021-02-15 07:52:06 -08:00
55549ea01f More consistency checks for dependencies (#4990)
Closes #4988

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-02-01 15:16:53 +00:00
e2fd852952 Add more consistency tests (#4983)
Follow up fo #4971

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-29 17:23:35 +00:00
Rebecca ChenandGitHub ce24720a1a Fix and re-enable pytype_test (#4975)
For now, the test requires changes that have been merged into the pytype master branch but not yet released. I'll update requirements-tests-py3.txt again once I've cut a new release (hopefully later this week).

* Fix pytype_test.
* Re-enable pytype_test.
* Remove continue-on-error from pytype_test.
* Temporarily install pytype from its master branch, as the code to
  support the new directory structure hasn't been released yet.
* Set TYPESHED_HOME before using pytype.pytd.Typeshed().
2021-01-27 22:00:27 +00:00
16ae4c6120 Re-organize directory structure (#4971)
See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
2021-01-27 12:00:39 +00:00
Rune TynanandGitHub 6870caf79c Add _TemporaryFileWrapper (#4559) 2021-01-23 16:54:31 +01:00
6aa5cc691c Add _collections_abc module (#4000)
* Add _collections_abc module
* Rearrange collections.abc and collections to re-export from _collections_abc

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-01-23 16:17:57 +01:00
88aa777568 Remove unused stubtest whitelist entries (#4966)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-01-22 21:03:02 -08:00
ShantanuGitHubhauntsaninja <>
eb9d995362 allowlist ctypes.wintypes (#4961)
The unused cronjob removed this for unclear reasons in #4935

Co-authored-by: hauntsaninja <>
2021-01-21 18:46:10 -08:00
Rebecca ChenandGitHub a7c4663e39 Speed up pytype_test by reusing the pyi loader. (#4960)
I noticed that the pytype parse test was getting quite slow again. This
is a somewhat hacky change that caches pytype's internal pyi loader to
avoid parsing files multiple times. On my machine, the test goes from
taking ~6m to complete to ~30s.
2021-01-21 18:44:06 -08:00
ShantanuandGitHub 053e0df0a5 Stub for ossaudiodev (#4944) 2021-01-19 20:25:02 +01:00
ShantanuandGitHub 5df4c3d275 dataclasses: various fixes (#4937) 2021-01-17 16:54:08 -08:00
ShantanuandGitHub 8de9b856e4 itertools: fix postional-only args, stubtest whitelist (#4936) 2021-01-16 13:31:11 +01:00
a7a037b7ae Remove unused stubtest whitelist entries (#4935)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-01-15 21:39:33 -08:00
AkuliandGitHub 41ba271160 tkinter: add type hints to Wm methods (#4925) 2021-01-09 19:26:30 +01:00
AkuliandGitHub 7710191cf4 tkinter.font.Font: make __getitem__ and cget behave the same (#4899) 2021-01-04 15:58:44 +01:00
074de8a24e Remove unused stubtest whitelist entries (#4887)
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com>
2021-01-01 20:41:40 -08:00
ShantanuGitHubhauntsaninja <>
bc3ed283df ctypes.wintypes can be imported on linux in 3.9.1 (#4858)
See https://bugs.python.org/issue16396

Co-authored-by: hauntsaninja <>
2020-12-26 16:01:23 +01:00
ShantanuGitHubhauntsaninja <>
32420769cd Revert "Remove unused stubtest whitelist entries (#4839)" (#4842)
This reverts commit fcc2416d43.

Co-authored-by: hauntsaninja <>
2020-12-19 23:24:35 -05:00
github-actions[bot]andGitHub fcc2416d43 Remove unused stubtest whitelist entries (#4839) 2020-12-19 14:30:14 +01:00
ShantanuGitHubhauntsaninja <>
a93fa6120e mypy_test: fix for stub deletions (#4816)
I think this should helps prevent issues like #4815

Co-authored-by: hauntsaninja <>
2020-12-13 23:41:20 -08:00
cb43535541 Add importlib.resources.files for Python 3.9 (#4807)
Co-authored-by: hauntsaninja <>
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2020-12-09 13:47:45 +01:00
Philipp HahnandGitHub 2b3aa94fb5 paramiko - A Python implementation of SSHv2 (#4770)
* paramiko - A Python implementation of SSHv2

Code: <https://github.com/paramiko/paramiko>
Doc: <http://docs.paramiko.org/en/stable/index.html>
2020-11-30 11:15:21 +01:00
Nipunn KoorapatiandGitHub 9af49c0b69 Protobuf stubs update using mypy-protobuf (#4785)
* Add script to generate protoc stubs using mypy-protobuf generated stubs

* Use generate_proto_stubs to generate stubs for protobuf 3.14.0

* Skip _pb2.pyi from flake8,black,isort,pytype
2020-11-25 10:48:26 -08:00
Philipp HahnandGitHub d4bd95fd86 Fix hard-coded pytype version (#4771)
[tests/pytype_test.py](./tests/pytype_test.py#L176) is still using
Python `3.6`:
> python_version="2.7" if version == 2 else "3.6",

The test fails to run if `python3.6` is unavailable (for example on
Debian 10 Buster, which has 3.7).

According to (https://devguide.python.org/#status-of-python-branches
`3.6` is still maintained until end of 2021.

`pytype` itself [claims](https://github.com/google/pytype#requirements)
to run on `2.7`, `3.5`-`3.8`.

Change the script to use the version of Python from the invoking
interpreter.
2020-11-16 11:08:42 -08:00
Ran BenitaandGitHub 27a45df479 threading: fix ExceptHookArgs being a function instead of a type (#4768)
The previous typing meant `threading.ExceptHookArgs` could not be used
to type a value.

The new typing follows what cpython does in the happy path (`_thread`
exists rather than the pure-python fallback being used).

Fixes #4767.
2020-11-14 14:50:34 +01:00
github-actions[bot]GitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ee945af14d Remove unused stubtest whitelist entries (#4748)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-11-06 22:05:08 -08:00
Sebastian RittauandGitHub d2a7889fe0 Drop support for Python 3.5 (#4675)
Python 3.5 EOL was on 2020-09-30.
2020-11-02 16:18:20 +01:00
ShantanuandGitHub 65603f829f xxlimited: add stubs (#4736) 2020-11-01 12:54:17 -08:00
ShantanuGitHubhauntsaninja <>
620989bac5 typeshed: update stubtest version (#4739)
* typeshed: update stubtest version

Includes changes from https://github.com/python/mypy/pull/9680
I've already fixed all the true positives on typeshed.

* attempt to fix windows' _WarnFunction

Co-authored-by: hauntsaninja <>
2020-11-01 12:35:21 +01:00
Jason FriedandGitHub f5a536b505 ContextVar.get() default has wrong type, it should mirror Mapping.get (#4726) 2020-10-29 13:40:55 -07:00
ShantanuGitHubhauntsaninja <>
96d7d77a04 mypy_test_suite: run a subset of tests (#4723)
Only a subset of mypy's test suite should be relevant to typeshed:
https://github.com/python/mypy/pull/9638
This should make things faster.
(Also the -n12 argument to pytest is weird; note mypy's pytest.ini
automatically specificies -nauto which is what we should want)

Resolves https://github.com/python/typeshed/issues/4333

Co-authored-by: hauntsaninja <>
2020-10-28 08:44:19 +01:00
ShantanuGitHubhauntsaninja <>
8d4a4f9e74 mypy_selftest: rename to mypy_self_check (#4712)
This better disambiguates it from mypy_test_suite and is more inline
with how mypy refers to it internally.

Co-authored-by: hauntsaninja <>
2020-10-25 21:31:43 +01:00
ShantanuGitHubhauntsaninja <>
48970d31de tests / scripts: blacken and isort (#4704)
I often run black and isort in typeshed root and then have to undo these
changes.

Co-authored-by: hauntsaninja <>
2020-10-25 11:21:03 +01:00
ShantanuGitHubhauntsaninja <>
2f1367332b stubtest unused: match stubtest version, add fix (#4705)
In #4696 I bumped stubtest to a commit that hasn't been released. We
should have these stubtest versions match. In
https://github.com/python/mypy/pull/9426 I changed the output of
stubtest here; it's good to get this change in before I forget and this
action silently stops working.

Co-authored-by: hauntsaninja <>
2020-10-25 11:19:15 +01:00
0583738a41 Add a mypy self test (#4337)
Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
Co-authored-by: hauntsaninja <>
2020-10-24 17:58:04 -07:00
github-actions[bot]GitHubgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
3df3f6a1bc Remove unused stubtest whitelist entries (#4701)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2020-10-23 23:00:48 -07:00