Rich Li
415da3ddd4
Redis client and others ( #4178 )
...
Co-authored-by: Richard Lindsley <rich.lindsley@gmail.com >
2020-06-06 08:07:45 -07:00
Sebastian Rittau
1f82564ee2
Move wsgiref.types to _typeshed.wsgi ( #4175 )
...
Re-export the types from wsgiref.types for now to avoid breaking
existing code. wsgiref.types should be removed eventually.
Also, reduce the boilerplate description in _typeshed/wsgi.pyi as it
mirrors the description in _typeshed/__init__.pyi.
2020-06-04 15:38:45 -07:00
Sebastian Rittau
eea9be6e73
Add a _typeshed.pyi file and a PathLike alias ( #4161 )
2020-06-04 14:06:43 +02:00
Willy Wu
ec3370b2b0
datetimerange: Allow datetime.datetime in addition to str ( #4167 )
...
Closes : #4166
2020-06-04 13:23:21 +02:00
Sebastian Rittau
a913af9523
flake8: Enable F811 ( #4158 )
2020-06-02 14:08:54 -07:00
Steve Dignam
10b87bdfbb
redis: add more precise types for hash commands ( #4148 )
2020-06-01 05:33:03 +02:00
Shantanu
da2aa297a2
pathlib: update for py39 ( #4134 )
...
Co-authored-by: hauntsaninja <>
2020-05-28 13:41:53 -07:00
Ilaï Deutel
846d922df2
More precise return types for open(), Path.open(), bz2.open(), etc. ( #3371 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2020-05-28 09:20:23 -07:00
Jelle Zijlstra
ca553cd589
fix type for ipaddress._BaseNetwork.overlaps ( #4124 )
2020-05-28 13:22:50 +02:00
Sam Bull
5c1806ab88
Add more annotations to jinja2.utils. ( #4004 )
2020-05-27 20:28:56 -07:00
Kunal Arya
639771a22a
Broaden _Serialized type in protobufs to ByteString. ( #3890 )
2020-05-27 19:53:58 -07:00
Julin S
851efa550e
add stubs for language models ( #3848 )
...
* add stubs for language models
* fix syntax error in __init__.pyi
* fix syntax error in universaldetector.pyi
* remove erroneous imports
* delete cli directory
* make tuple types variable length
2020-05-27 19:43:04 -07:00
Sebastian Rittau
694fa80596
Add dateparser module ( #4106 )
...
Based on PR 3704 by @xcthulhu (Matthew Doty)
2020-05-27 18:53:16 -07:00
Rune Tynan
fcdfacf944
Fix stubtest failures for socketserver on windows ( #4103 )
2020-05-27 19:34:35 +02:00
Ivan Levkivskyi
e199c2e4bc
Fix concurrent.futures import for re-export ( #4105 )
...
Also update stubtest whitelist as a workaround.
2020-05-27 13:51:01 +01:00
Alexandre Yang
a8834fcd46
Add pyVmomi stubs ( #3921 )
2020-05-26 12:04:56 +02:00
Shantanu
18121d71c8
concurrent.futures: fix top level available objects, add InvalidStateError ( #4021 )
...
* concurrent.futures: add InvalidStateError
* concurrent.futures: fix package imports
* asyncio.futures: fix import
* concurrent.futures: fix version availability for BrokenExecutor
* concurrent.futures: make consistent
* concurrent.futures: update whitelist
Co-authored-by: hauntsaninja <>
2020-05-25 15:38:09 -07:00
Markus Wamser
1996361adc
cryptography: add signature of Prehashed ( #4048 )
...
* cryptography: add signature of Prehashed
* cryptography: modify signature of Prehashed
mark internal attributes as undocumented
add public attribute digest_size
* cryptography: modify signature of Prehashed
drop Optional from argument of __init__
2020-05-25 15:36:54 -07:00
Shantanu
9b89423f02
chardet: add default value ( #4074 )
...
Co-authored-by: hauntsaninja <>
2020-05-24 18:48:24 -07:00
Shantanu
8cf04f3a74
boto.compat, base64: fix version handling of (en|de)codebytes ( #4070 )
...
Co-authored-by: hauntsaninja <>
2020-05-24 18:44:43 -07:00
Jakub Stasiak
8827f84763
Clarify that cryptography's Fernet accepts text keys ( #4061 )
...
* Clarify that cryptography's Fernet accepts text keys
* simplify code
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2020-05-24 18:44:36 -07:00
Sebastian Rittau
be016c6793
Add retry_after to TooManyRequests and ServiceUnavailable ( #4059 )
...
Added in werkzeug 1.0.0
While the implementation accepts any value for retry_after, the docstring
allows only datetime and int. Using any other value could lead to an
invalid HTTP response.
2020-05-23 13:39:48 -07:00
Jeff Hunter
e1e99245bb
google.protobuf.message.Message.ParseFromString() returns an int ( #4053 )
2020-05-21 19:15:40 +02:00
Markus Wamser
960c4eb42d
cryptography: fix signature of ECDSA ( #4049 )
2020-05-20 18:58:21 -07:00
Gal Ben David
d11da2c5d1
revert orjson.pyi obj parameter ( #4046 )
...
After submitting a pull request to orjson repository, the author has changed the library and "obj" parameter is now positional only.
Not this behavior is aligned with the stub file and the change can be reverted.
https://github.com/ijl/orjson/releases/tag/3.0.1
2020-05-20 09:11:39 -07:00
Mark Mendoza
092fdb2ca5
[pyre] Fix typo in click/decorators ( #4044 )
2020-05-20 00:55:34 +02:00
Razzi Abuissa
18aa8e0adb
Add cli field to flask helper _PackageBoundObject ( #4040 )
2020-05-18 23:14:41 +02:00
Nipunn Koorapati
1436181587
Make EnumTypeWrapper generic in google.protobuf.internal ( #3995 )
...
This is necessary so that mypy-protobuf can autogenerate NewType
wrappers around the int values of the enum!
2020-05-18 21:42:47 +02:00
Nipunn Koorapati
f0927787f0
Update type var typing on protobuf message.pyi ( #3996 )
...
Add support for message type var generics
2020-05-18 11:59:37 -07:00
Razzi Abuissa
949378fdd9
flask: Add types for cli_group argument to flask.Blueprint ( #4011 )
...
* Add types for cli_group argument to flask.Blueprint
* Use private _Sentinel type for default argument to Blueprint cli_group
2020-05-18 11:58:42 -07:00
Graham Bleaney
6dca3f7fc5
New attributes and types on HTTPServerRequest ( #3971 )
...
Porting type information directly from the tornado repository:
712d61079d/tornado/httputil.py (L340-L384)
2020-05-14 08:20:24 -07:00
Shantanu
0630c4b1fd
unittest.mock: fix MRO of Mock ( #3990 )
...
* unittest.mock: fix MRO of Mock
* Make consistent
Co-authored-by: hauntsaninja <>
2020-05-14 08:57:50 +02:00
Sam Bull
6932ff26c5
Set default for newstyle ( #3962 )
...
* Set default for newstyle
* Change default values to ...
2020-05-13 18:01:30 -07:00
dosisod
2ead8123a6
Add Waitress stubs ( #3889 )
2020-05-13 16:22:13 +02:00
Gal Ben David
1d2ec3cd3b
Update orjson.pyi to support two new flags ( #3975 )
...
Updated orjson.pyi to support two new added flags `OPT_INDENT_2` and `OPT_NON_STR_KEYS`.
Renamed `__obj` to `obj` to allow using named parameter `obj` instead of positional, without getting errors.
2020-05-12 18:06:06 -07:00
Shantanu
637dba1beb
concurrent.futures: fix BrokenProcessPool base ( #3972 )
...
Co-authored-by: hauntsaninja <>
2020-05-11 21:52:55 -07:00
Graham Bleaney
66cd36268a
Refine types on tornado.web.RequestHandler ( #3970 )
...
This diff refines the types on `RequestHandler` by porting types directly from the `tornado` repo.
2020-05-08 20:52:14 +02:00
Bruce Merry
c81b3cfe59
Fix some incorrect redis Text annotations ( #3969 )
...
I've changed some instances of `Text` to `_Key` so that bytes will be
accepted as well. I'm not sure if they should be `_Str` instead. The
existing annotations seem to use a mix of the two. _Str is a better
reflection of what redis-py will accept (any arguments that it passes
through to the redis server can be _Str and it'll convert to bytes); but
passing an int or float where a key is expected may be a code smell.
2020-05-07 19:32:56 -07:00
Ivan Levkivskyi
5342d66dcc
Fix assert_has_calls() signature ( #3967 )
...
See the docs https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
2020-05-05 19:20:56 +01:00
Rahix
d818821121
atomicwrites: Allow any PathLike for paths ( #3965 )
...
As of version 1.4.0, from PR untitaker/python-atomicwrites#48 ,
atomicwrites allows any PathLike object for its path args.
2020-05-05 14:01:24 +02:00
Anis
630b50e458
feat(3rd_party): adding stub for tzlocal ( #3948 )
...
- tzlocal uses pytz types
2020-04-29 22:28:01 -07:00
Jia Chen
db2ee3cf3c
Replace value assignments with import statements in requests.__init__ ( #3941 )
2020-04-25 13:18:03 +02:00
Lars
9dab57b0e8
Fix attr-defined check for werkzeug.wrappers.BaseRequest ( fixes #3913 ) ( #3925 )
...
The PR #2740 added __setattr__ and __getattr__ to the
werkzeug.wrappers.BaseRequest definition to silence mypy when
monkeypatching this class.
The change disabled the errors for monkeypatching, but disabled disabled the
important check attr-defined.
2020-04-25 13:14:31 +02:00
Max R
31705fca7a
Add misc types for mock and unittest.mock ( #3923 )
2020-04-24 08:51:34 +02:00
Brian Turek
6e9e059f0c
Add return type for pathlib.Path.replace on Python >= 3.8 ( #3936 )
2020-04-22 01:52:33 +02:00
Peter Pentchev
0503fb0f50
Fix some pkg_resources variable types. ( #3919 )
...
Allow passing proper metadata to Distribution.from_location() and
Distribution.from_filename().
Correct the order of arguments for the importer functions.
Note that some functions accept any iterables, not just sized ones.
Correct the type of the VersionConflict classes' context.
2020-04-09 12:22:14 +02:00
Vishal Kuo
12b53fa46d
[redis] add some missing stubs to redis ( #3907 )
2020-04-04 21:51:06 -07:00
Shantanu
e56adddc48
dataclasses: change hash to unsafe_hash, add a minor overload ( #3892 )
...
Co-authored-by: hauntsaninja <>
2020-04-03 17:23:05 -07:00
David Euresti
5f4ad2b014
Update stubs for attrs 19.3.0 ( #3900 )
2020-04-02 20:14:53 +02:00
Shantanu
ab6811aa4f
yaml: fix python version availability ( #3891 )
2020-03-31 17:05:39 +02:00