Commit Graph

4448 Commits

Author SHA1 Message Date
Sebastian Rittau
de0c62ffeb zipfile: Replace an instance of IO with a protocol (#5471) 2021-05-18 18:42:59 -07:00
Jelle Zijlstra
bce19fc206 make GeneratorType inherit from Generator (#5474)
Fixes #5496
2021-05-18 13:31:14 -07:00
Akuli
90e8629ed8 Add comment hider back (#5495) 2021-05-18 21:51:24 +02:00
Rich Li
901dd52ec5 Add more redis stubs for sets (#5490) 2021-05-18 08:39:03 +02:00
Mahmoud Harmouch
7d4ecf7f0a Append some missing gdbm flags (#5489) 2021-05-17 19:33:29 -07:00
Sebastian Rittau
f0bf6eebbd AnyStr cleanup (#5487)
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs.
* Add StrOrBytesPath as preferred alias for AnyPath.
* Replace all remaining AnyPath instances with StrOrBytesPath.
* Mark AnyPath as obsolete.

Part of #5470
2021-05-17 20:45:48 +02:00
Sebastian Rittau
51b7248154 Try to fix mypy_primer comment permissions (#5478)
Split the workflows again so the comment workflow has write
access to the repository.

Based on https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

Co-authored-by: Akuli <akuviljanen17@gmail.com>
2021-05-17 20:32:14 +02:00
Joseph Bylund
00fcc50d13 cachetools.Cache sizes are numerics (#5440)
replace int with float for cachesize
2021-05-17 19:14:26 +03:00
Jade
56ebf92463 Make _TemporaryFileWrapper generic on AnyStr, use it (#5456)
* Make _TemporaryFileWrapper generic on AnyStr, use it

Previously it was not used on NamedTemoraryFile and thus the file
field was missing from the types for the return value of
NamedTemoraryFile.
2021-05-17 19:04:40 +03:00
Frédéric Perrin
a0abacdeaf Fix decorator in retry module (#5482) 2021-05-17 12:31:48 +02:00
Sebastian Rittau
7a9a107a63 Move IdentityFunction to _typeshed (#5483)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-05-17 12:04:35 +02:00
Jelle Zijlstra
02be4b5da2 Add section on supported type-system features (#5479) 2021-05-17 09:30:45 +02:00
Jake Bailey
61320cb191 Clean up pyrightconfig.json (#5481) 2021-05-17 09:28:01 +02:00
Jake Bailey
0351168b40 Bump pyright to 1.1.140 (#5480) 2021-05-16 19:20:18 -07:00
Sebastian Rittau
453963b536 Describe METADATA.toml files (#5436) 2021-05-16 22:26:49 +02:00
Sebastian Rittau
a7302dc6cb Add aliases for 'function classes' to multiprocessing (#5346)
Part of #4313
2021-05-16 12:46:17 -07:00
Jon Dufresne
4166a416f6 Correct return type of click.testing.CliRunner.isolation() (#5103)
The method returns a tuple of io.BytesIO objects that hold the temporary
stdin and stdout. By correcting the type, it allows usages of
io.BytesIO.getvalue() to pass type checking.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-05-16 21:45:00 +02:00
Sebastian Rittau
e5abd08f93 Replace PathLike unions with aliases from _typeshed (#5467)
Standardize on 'from os import PathLike'
2021-05-16 21:38:00 +02:00
Sebastian Rittau
d72b1e8149 Give primer comment task all write permissions (#5475)
Cf. #5459
2021-05-16 12:26:31 -07:00
Sebastian Rittau
35acd2ad6f check_consistent: allow dots in module names (#5472) 2021-05-16 11:01:00 -07:00
Sebastian Rittau
6a9c89e928 Replace 'Text' with 'str' in py3 stdlib (#5466) 2021-05-16 07:10:48 -07:00
Sebastian Rittau
dbe77b6ae9 importlib.resources was added in 3.7 (#5468)
Describe sub-module versioning
2021-05-16 07:04:28 -07:00
Sebastian Rittau
4a3b6eb8d8 Update explanation for importing builtins.str (#5465) 2021-05-16 13:55:08 +02:00
Sebastian Rittau
841a365284 Remove compatibility aliases (#5464)
* Remove compatibility aliases

Remove a few instances of Text

Use aliases from _typeshed

* Remove unused imports
2021-05-15 20:49:20 +03:00
Sebastian Rittau
056981b957 Try to fix mypy_primer permissions (#5462)
Cf.  #5459
2021-05-15 14:37:27 +02:00
Akuli
17dcea4a68 Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)
* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2021-05-15 15:33:39 +03:00
Akuli
b0ef85288d flake8: do not exclude @python2 dirs (#5457) 2021-05-15 12:05:26 +02:00
Christopher Dignam
3aa4c67839 simplify vector type for Annoy (#5455)
Sequence was unnecessarily specific and prevents numpy type stubs from working with this package. Numpy ndarray isn't compatible with Sequence since it doesn't have __reversed__ method.
2021-05-15 02:29:31 +02:00
Akuli
15b0959cf8 stdlib/@python2: clean imports (#5453) 2021-05-15 01:08:37 +02:00
Akuli
5ec4f06263 clean python 3 specific stuff from stdlib/@python2 stubs (#5451) 2021-05-15 00:19:05 +02:00
Sebastian Rittau
f94d838814 Fix primer comment permissions (#5452) 2021-05-15 00:15:55 +02:00
Jelle Zijlstra
a47ee3245a fix renamed Python 2 modules (#5450) 2021-05-14 14:36:00 -07:00
Akuli
5afd250792 mypy_primer: use 'needs: mypy_primer' for comment job (#5428) 2021-05-14 22:28:34 +03:00
Sebastian Rittau
5b739e0ccb Split stdlib into Python 2 and 3 versions (#5442)
All new files in stdlib/@python2 are straight copies of the
corresponding files in stdlib.
2021-05-14 12:04:12 -07:00
Sebastian Rittau
8971c242cb Remove migration script; migration has happened (#5446)
* Remove migration script; migration has happened
2021-05-14 19:33:57 +03:00
Jukka Lehtosalo
17bc1d83ea Don't import enum in Python 2 stubs (#5445)
Python 2.7 doesn't have enum in the stdlib, in particular, so we
shouldn't import it.
2021-05-14 15:29:54 +02:00
Sebastian Rittau
322396bb32 configparser available since Python 3.0 (#5443)
It was called ConfigParser in Python 2.

Split out from #5442.
2021-05-14 05:24:50 -07:00
Kaleb Barrett
2be836bf6d Add yaml.UnsafeLoader (#5441) 2021-05-13 18:24:23 -07:00
hatal175
b8e5f637b9 Stubtest fixes (#5391) 2021-05-13 18:20:55 -07:00
Viktor Roytman
bbe7e5ef11 Add should_strip_auth to requests SessionRedirectMixin (#5439) 2021-05-13 20:58:43 +02:00
Sebastian Rittau
3ba35f3552 Split the tests section, extend ToC (#5433)
Move and consolidate venv setup and running isort/black/flake8 into
separate sections and link those sections from the ToC. Also extend
those sections slightly.

Move the tests section into a separate file.

Make venv name in pre-commit match name in CONTRIBUTING.
2021-05-13 15:41:04 +02:00
Sebastian Rittau
d98fdd934c Move VERSIONS description to file itself (#5434) 2021-05-13 06:14:44 -07:00
Sebastian Rittau
a34e5a36a8 Describe third-party removal process (#5435) 2021-05-13 06:08:55 -07:00
Sebastian Rittau
1b188921fd Move code of conduct to separate file (#5432)
The file CODE_OF_CONDUCT.md is the standard location for it and
is treated specially by GitHub, for example by linking to it directly
when opening issues and PRs.
2021-05-13 06:04:31 -07:00
n0ob404
7a9b4f93ba Add stubs for redis Redis and Pipeline methods (#5415) 2021-05-13 09:53:26 +02:00
github-actions[bot]
15e31fe54b Remove unused stubtest whitelist entries (#5431) 2021-05-12 22:22:32 -07:00
Jelle Zijlstra
33bdde6ec4 Update maintainers list (#5430)
I removed a few people who have not been active in the typing area for a long time, and added @rchen152 who is active on the repo and has commit rights. There are a few other people who have access to the repo but are not active. Listing them here does not seem useful.
2021-05-12 17:16:09 -07:00
Sebastian Rittau
b1577ad1cb Rework README and CONTRIBUTING (#5429)
This shuffles sections around between README.md and CONTRIBUTING.md. CONTRIBUTING now contains information pertaining to opening PRs, README all other information. I have also moved the list of maintainers to a separate file.

I have kept most information intact for now, with two main exceptions:

I removed duplicated information.
For brevity's sake, I trimmed some explanations from the section about version checks.
I have restructured the CONTRIBUTING file to follow the order of the introductory "contribution process at a glance" section. This now serves as a bit of a table of contents.

Closes: #5422
2021-05-12 16:25:47 -07:00
Sebastian Rittau
2f30adad19 Remove two files from pytype's exclude list (#5427) 2021-05-12 11:58:48 -07:00
Sebastian Rittau
3db20f09ca pyjwt includes annotations since version 2.0.0 (#5426)
Relates to #4856
2021-05-12 19:57:48 +03:00