Shantanu and hauntsaninja
4a45b1d1b4
enum: update for py310 ( #5314 )
...
I remember there are some subtleties around Enum.__new__, that might be
relevant to StrEnum, but I'm forgetting the details.
I wasn't sure how best to handle the new enum.property. I could also
re-export, or take a more literal interpretation.
Co-authored-by: hauntsaninja <>
2021-05-04 15:12:19 +03:00
Shantanu
1826072dd1
asyncio.subprocess: remove loop in py310 ( #5315 )
2021-05-02 18:56:45 -07:00
Shantanu
3950543bce
traceback: update for py310 ( #5316 )
...
I think technically you need to pass both of value and tb or neither, so
let me know if you think it's worth all the overloads
2021-05-02 18:54:47 -07:00
Shantanu and hauntsaninja
63c4f0b9e5
lzma: mark positional-only args ( #5320 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 18:51:48 -07:00
Shantanu
2d10d2779f
multiprocessing.pool: fix ApplyResult.__init__ ( #5318 )
2021-05-02 18:50:45 -07:00
Shantanu
acef37018c
readline: fix stubtest errors ( #5326 )
2021-05-02 17:01:19 -07:00
Shantanu
c80a2debe2
site: main is documented and exists in py3 ( #5324 )
2021-05-02 17:00:59 -07:00
Shantanu
2dd0871c0c
inspect: add missing definitions ( #5321 )
2021-05-02 17:00:46 -07:00
Shantanu and hauntsaninja
11f012a2b6
html.parser: complete stub ( #5323 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 16:24:34 -07:00
Shantanu and hauntsaninja
9c50d38506
calendar: add firstweekday property ( #5325 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 16:17:54 -07:00
Shantanu and hauntsaninja
0578e47ffc
mypy_primer: reduce polling frequency ( #5322 )
...
This should cut down the API rate limiting we see when large numbers of
PRs are submitted.
Note when we used mypyc-compiled mypy in mypy_primer, this took <10m.
This is currently not the case, but hopefully will once again be.
Co-authored-by: hauntsaninja <>
2021-05-02 16:07:43 -07:00
Shantanu
11c673b681
contextlib: add aclosing in py310 ( #5317 )
...
* contextlib: add aclosing in py310
* use protocols for closing, aclosing
2021-05-02 14:53:06 -07:00
Shantanu
06709912ad
termios: mark positional-only args ( #5312 )
2021-05-02 13:13:43 -07:00
Shantanu
a744c3746f
ast: update for py310 ( #5293 )
2021-05-02 13:02:14 -07:00
Shantanu and hauntsaninja
59bf496479
typing: ParamSpec uses kw-only args ( #5310 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 12:52:13 -07:00
Shantanu and hauntsaninja
00039ee354
array: update for py310 ( #5294 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 12:32:29 -07:00
Shantanu and hauntsaninja
ae60825818
sqlite3: fix argument names, positional only ( #5300 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 12:32:19 -07:00
Shantanu and hauntsaninja
851c187287
xml.dom.minidom: add missing definitions ( #5280 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 12:04:41 -07:00
Shantanu
3c49b1def4
xxlimited: yes, even you get updated for py310 ( #5301 )
2021-05-02 06:33:29 -07:00
Shantanu and hauntsaninja
cc55c923ac
pprint: add underscore_numbers everywhere for py310 ( #5299 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 06:29:18 -07:00
Shantanu and hauntsaninja
75e196e18a
formatter, parser, _bootlocale: remove for py310 ( #5298 )
...
Co-authored-by: hauntsaninja <>
2021-05-02 06:24:30 -07:00
Shantanu
9dcdb6f99c
os.path: add strict to realpath in py310 ( #5297 )
2021-05-02 06:23:37 -07:00
Shantanu
21e174a192
inspect: update for py310 ( #5296 )
2021-05-02 06:21:03 -07:00
Shantanu
0db864f6b5
base64: update for py310 ( #5295 )
2021-05-02 06:19:48 -07:00
Shantanu and hauntsaninja
056e493691
glob: update for py310 ( #5292 )
...
Co-authored-by: hauntsaninja <>
2021-05-01 22:16:41 -07:00
Shantanu
1517438aba
builtins: more updates for py310 ( #5290 )
2021-05-01 21:58:39 -07:00
Shantanu
537aec0466
xml.dom.minicompat: complete stub ( #5281 )
2021-05-01 21:39:54 -07:00
Shantanu and hauntsaninja
0ea437f02a
builtins: use SupportsLessThan over SupportsLessThanT if possible ( #5288 )
...
Co-authored-by: hauntsaninja <>
2021-05-01 21:39:25 -07:00
Shantanu
445a86f4c9
builtins: add aiter, anext ( #5289 )
2021-05-01 21:10:30 -07:00
Shantanu
3aa1f2d42f
typing: update and fix for py310 ( #5287 )
2021-05-01 21:09:26 -07:00
Shantanu
2d69d1a695
bisect: update for py310 ( #5282 )
2021-05-01 20:58:30 -07:00
Shantanu
26f3748741
asyncio.tasks: update for py310 ( #5283 )
...
Just removing the loop argument from various places
2021-05-01 20:29:58 -07:00
Shantanu
1416e63ce2
itertools: add pairwise ( #5285 )
2021-05-01 20:25:45 -07:00
Shantanu
fa3bdfa612
symbol: removed in py310 ( #5284 )
2021-05-01 20:23:48 -07:00
Shantanu
d36420146e
_curses: fix positional-only args ( #5279 )
2021-05-02 00:34:20 +02:00
Shantanu
31b6d415dc
mypy_primer: check conclusion field as well ( #5272 )
...
Fixes #5270
The comment workflow waits for the mypy primer to run. I think with
Github's changes to workflow running, these runs get marked as
completed, but have the conclusion "action_required".
E.g., see https://github.com/python/typeshed/pull/5269/checks
2021-04-30 18:07:28 -07:00
Shantanu and hauntsaninja
fc660d6d41
Move typing_extensions to stdlib ( #5233 )
...
I'm not sure what the best way to do this is. This effectively orphans
types-typing-extensions, but maybe that's not really a problem. (We can
yank the package too)
See https://github.com/python/typeshed/pull/5229#issuecomment-822234125
for some details
Co-authored-by: hauntsaninja <>
2021-04-20 21:55:48 -07:00
Shantanu
3d8bffae80
pkgutil: returns a List[str] usually ( #5222 )
...
Yes, technically it returns whatever its first argument is if it isn't
a list.
Doing this because https://github.com/python/mypy/pull/9454#issuecomment-820661189
2021-04-15 12:43:53 -07:00
Shantanu
fa9d5a5e9f
future first: switch the order of some if statements ( #5206 )
...
Since we're adding this to our contribution guidelines in
https://github.com/python/typeshed/pull/5205
2021-04-11 06:44:18 -07:00
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
e380432825
comment on memoryview.cast ( #5118 )
...
Co-authored-by: hauntsaninja <>
2021-03-15 17:26:47 -07:00
Shantanu and hauntsaninja
38a1c344c9
Small fixes for Python 3.10 ( #5044 )
...
This is enough to get stubtest working (note that it's a little annoying
to install mypy currently since typed-ast seems to have broken again on
Python 3.10)
Co-authored-by: hauntsaninja <>
2021-02-20 18:44:36 -08:00
Shantanu and hauntsaninja
1959669aa4
mypy_primer: don't fail silently on comment failure ( #5002 )
...
Co-authored-by: hauntsaninja <>
2021-02-03 08:35:38 +01:00
Shantanu
c39f8b942b
Run mypy_primer with a newer mypy ( #4980 )
2021-01-28 20:03:16 -08:00
Shantanu
d7bbc9ea67
Re-enable stubtest ( #4979 )
2021-01-28 05:22:55 -08:00
Shantanu and hauntsaninja
bcba4f4fce
runpy: return globals dict ( #4965 )
...
Fixes #4964
Co-authored-by: hauntsaninja <>
2021-01-23 13:06:26 +01:00
Shantanu and hauntsaninja
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
Shantanu
053e0df0a5
Stub for ossaudiodev ( #4944 )
2021-01-19 20:25:02 +01:00
Shantanu
b4e447d70a
builtins: complex doesn't define __complex__ ( #4945 )
2021-01-18 12:01:37 +01:00
Shantanu and hauntsaninja
8a46859e0b
multiprocessing.pool: fix constants ( #4938 )
...
Co-authored-by: hauntsaninja <>
2021-01-17 17:07:59 -08:00
Shantanu
c4f3207437
functools: fix singledispatch ( #4942 )
...
This is tricky, but should match the runtime logic better.
Fixes #4408
2021-01-17 17:01:17 -08:00
Shantanu
5df4c3d275
dataclasses: various fixes ( #4937 )
2021-01-17 16:54:08 -08:00
Shantanu
8de9b856e4
itertools: fix postional-only args, stubtest whitelist ( #4936 )
2021-01-16 13:31:11 +01:00
Shantanu and hauntsaninja
c3854d26f6
migrate_script: prefix @ to python2 ( #4931 )
...
As suggested by Jukka in https://github.com/python/typeshed/issues/2491
Co-authored-by: hauntsaninja <>
2021-01-15 09:27:30 -08:00
Shantanu
c893857f46
itertools: fix signature of accumulate ( #4933 )
...
Resolves #4888
2021-01-14 21:07:14 +01:00
Shantanu and hauntsaninja
6a53e992fe
itertools.tee: use positional-only args ( #4934 )
...
Co-authored-by: hauntsaninja <>
2021-01-14 08:41:39 +01:00
Shantanu and hauntsaninja
484c014665
Suffix T to type variable names ( #4898 )
...
* _MessageType to _MessageT
* _default to _T
* _TConnection to _ConnectionT, _TListener to _ListenerT
* _Number to _NumberT
* _MessageVar to _MessageT
* _Type to _TypeT
* _ArgType to _T
* _Ch to _CharT
Co-authored-by: hauntsaninja <>
2021-01-04 09:03:32 +01:00
Shantanu and hauntsaninja
781430fdf1
multiprocessing: improve Server ( #4886 )
...
Co-authored-by: hauntsaninja <>
2021-01-02 00:54:28 +01:00
Shantanu and hauntsaninja
0a8fd098ca
ast: remove docstring attribute ( #4868 )
...
As mentioned in #4760
Co-authored-by: hauntsaninja <>
2020-12-29 08:43:15 +01:00
Shantanu and hauntsaninja
12f0be025f
mypy_primer: shard across two CI jobs ( #4865 )
...
Co-authored-by: hauntsaninja <>
2020-12-28 11:17:39 +01:00
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
e035760d62
Return mypy_primer to CI ( #4806 )
...
Much of the comment script is based off of https://github.com/dawidd6/action-download-artifact
Co-authored-by: hauntsaninja <>
2020-12-14 18:31:30 +01:00
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
74147313cd
Remove mypy_primer ( #4795 )
...
Co-authored-by: hauntsaninja <>
2020-11-29 23:03:42 -08:00
Shantanu and hauntsaninja
20446030c5
Fix stubtest unused cron job ( #4782 )
...
Co-authored-by: hauntsaninja <>
2020-11-21 19:36:27 +01:00
Shantanu and hauntsaninja
c3e04054cf
README.md: update for the times ( #4757 )
...
Fixes #4754
Co-authored-by: hauntsaninja <>
2020-11-10 20:52:57 +01:00
Shantanu and hauntsaninja
27c16169f3
typing: remove __class_getitem__ from Protocols ( #4741 )
...
Co-authored-by: hauntsaninja <>
2020-11-03 08:13:43 +01:00
Shantanu
65603f829f
xxlimited: add stubs ( #4736 )
2020-11-01 12:54:17 -08:00
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
d379d4ce48
posix: fix WIF* definitions ( #4737 )
...
Co-authored-by: hauntsaninja <>
2020-10-31 18:36:34 -07:00
Shantanu and hauntsaninja
2702f8c32e
ctypes: fix argument names ( #4735 )
...
Co-authored-by: hauntsaninja <>
2020-10-31 18:34:25 -07:00
Shantanu and hauntsaninja
c58a93b928
mypy_primer: speed up, clean up ( #4730 )
...
We use tee and no longer try to delete the file based on exit code,
since we use data.trim now.
mypy_primer started failing silently because of changes in aiohttp, so
now we'll fail if the exit codes are not 0 or 1.
Note mypy_primer has --project-date to get around the problem of
breaking changes in projects, but I want to try and keep mypy_primer up
to date / get a feel for how bad this problem actually is.
Co-authored-by: hauntsaninja <>
2020-10-30 09:16:11 +01:00
Shantanu and hauntsaninja
3f35c92e7f
concurrent.futures: use DoneAndNotDoneFutures ( #4729 )
...
Fixes #1976
Co-authored-by: hauntsaninja <>
2020-10-29 22:56:30 +01:00
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
25b3004ad8
mypy_primer: post a more informative message ( #4719 )
...
Co-authored-by: hauntsaninja <>
2020-10-27 07:47:59 +01:00
Shantanu and hauntsaninja
fc171339ce
mypy_primer: attempt to fix workflow ( #4718 )
...
This will take some merge and debug...
Co-authored-by: hauntsaninja <>
2020-10-26 13:03:08 -07:00
Shantanu and hauntsaninja
1bd808a458
mypy_primer: post failures as comments ( #4672 )
...
Co-authored-by: hauntsaninja <>
2020-10-26 10:58:49 +01:00
Shantanu and hauntsaninja
8581da07fe
builtins: remove unused imports ( #4715 )
...
Co-authored-by: hauntsaninja <>
2020-10-26 08:06:34 +01:00
Shantanu and hauntsaninja
1dd1b701c9
_typeshed: add SupportsLessThan, SupportsLessThanT ( #4711 )
...
And use it everywhere. Note there seemed to be a discrepancy between
heapq in Python 2 and 3, so I changed that. It should probably be more
widely used within heapq, but leaving that out of scope for this PR.
Co-authored-by: hauntsaninja <>
2020-10-25 15:04:43 -07:00
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
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
Shantanu and hauntsaninja
6ff5b88ca7
typeshed: remove crufty comments ( #4699 )
...
Co-authored-by: hauntsaninja <>
2020-10-23 09:40:06 +02:00
Shantanu and hauntsaninja
b0f4900c9f
fractions: make Fraction satisfy SupportsRound ( #4697 )
...
Helps with https://github.com/python/mypy/issues/9628
Co-authored-by: hauntsaninja <>
2020-10-22 12:12:27 -07:00
Shantanu and hauntsaninja
74bb849789
update stubtest ( #4696 )
...
Co-authored-by: hauntsaninja <>
2020-10-22 11:09:39 -07:00
Shantanu and hauntsaninja
faf827bc36
mark some positional-only arguments ( #4693 )
...
https://github.com/python/mypy/pull/9626 will make stubtest a little bit
stricter about positional-only arguments for dunders like __init__
Co-authored-by: hauntsaninja <>
2020-10-22 13:31:23 +02:00
Shantanu and hauntsaninja
10d3c6c325
Remove bad namedtuple to fix CI ( #4684 )
...
Co-authored-by: hauntsaninja <>
2020-10-18 00:25:09 -07:00
Shantanu and hauntsaninja
7603acd8b8
Upgrade flake8-pyi to fix CI ( #4683 )
...
This fixes things on Python 3.9, which we've started using since #4656
Co-authored-by: hauntsaninja <>
2020-10-17 23:43:00 -07:00
Shantanu and hauntsaninja
7e378a7554
PEP 584: add or operators to dict ( #4671 )
...
Co-authored-by: hauntsaninja <>
2020-10-15 13:42:01 +02:00
Shantanu and hauntsaninja
3a16ebb463
builtins: int can accept __trunc__-able ( #4665 )
...
Refer to https://docs.python.org/3/reference/datamodel.html#object.__trunc__
Fixes https://github.com/python/mypy/issues/9588
Co-authored-by: hauntsaninja <>
2020-10-14 09:47:47 +02:00
Shantanu and hauntsaninja
86ca46fa0a
mypy_primer: add to CI ( #4629 )
...
Co-authored-by: hauntsaninja <>
2020-10-12 14:41:51 -07:00
Shantanu and hauntsaninja
228f74d76a
io: loosen writelines type to iterable ( #4642 )
...
This came up in https://github.com/python/mypy/pull/9275
Co-authored-by: hauntsaninja <>
2020-10-09 21:25:33 -07:00
Shantanu and hauntsaninja
e428f2d479
pep 484: last reexports ( #4609 )
...
Co-authored-by: hauntsaninja <>
2020-10-04 23:51:04 +02:00
Shantanu and hauntsaninja
723a23abfc
contextlib: get rid of a TODO ( #4610 )
...
This dates back three years to https://github.com/python/typeshed/pull/1249
It seems pretty unused in practice, so I think this is fine:
https://grep.app/search?q=from%20contextlib%20import%20ContextManager&case=true
https://grep.app/search?q=contextlib.ContextManager&case=true
Co-authored-by: hauntsaninja <>
2020-10-04 23:49:49 +02:00
Shantanu and hauntsaninja
cca6e53d86
crypto: delete stubs ( #4606 )
...
Crypto is a package that comes from pycrypto, which was last updated in
2013. It proudly supports Python 2.1 through 3.3.
There's a near drop-in replacement from pycryptodome, which seems well
maintained. pycryptodome has provided stubs for the last two years.
I propose we get rid of the whole thing. pycrypto seems about as dead as
software can get. These stubs have received two fixes since 2016.
https://github.com/python/typeshed/issues/2952
https://pycryptodome.readthedocs.io/en/latest/src/vs_pycrypto.html
https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst#371-25-november-2018
Co-authored-by: hauntsaninja <>
2020-10-04 13:05:47 -07:00
Shantanu and hauntsaninja
52974e0a2b
asyncio.Semaphore: type some internals ( #4605 )
...
Co-authored-by: hauntsaninja <>
2020-10-04 12:53:02 +02:00
Shantanu and hauntsaninja
7afc733054
pep 484: more reexports ( #4607 )
...
There are still a couple more, but hopefully this fixes CI. It's a
little bit of a chore to track down some of these; it looks like master
differs from latest release for a number of them.
Co-authored-by: hauntsaninja <>
2020-10-03 20:22:31 -07:00
Shantanu and hauntsaninja
e0a3644850
py39.txt: remove no longer needed comment ( #4603 )
...
See #4598
Co-authored-by: hauntsaninja <>
2020-10-03 13:56:56 -07:00
Shantanu and hauntsaninja
76cd654987
stubtest whitelist: fix ( #4599 )
...
This should take care of #4598
Co-authored-by: hauntsaninja <>
2020-10-02 21:38:59 -07:00