Bas van Beek
a1ca55037a
Update the xxhash and hashlib stubs ( #6031 )
...
* `name`, `block_size`, `digest_size` and `digestsize` attributes of hash objects were made read-only.
* It is now a type-checking error to subclass `xxhash` classes, such as `xxhash.xxh32`. Previously it was an error only at runtime.
* `xxhash` functions now accept strings as input and any object with `__index__()` method for `seed` (instead of requiring an integer). They also fail the type checking if no arguments are given.
2021-09-14 12:01:11 +03:00
Sebastian Rittau
ca38856670
Fix set annotations in concurrent.futures._base ( #6034 )
2021-09-14 11:50:20 +03:00
Sebastian Rittau
b562d233ae
(a)next only requires __(a)next__, not Iterator ( #6036 )
2021-09-14 11:43:21 +03:00
Sam Martin
8a704ab290
Add more annotations to aws_xray_sdk.core.recorder ( #6029 )
2021-09-13 14:05:47 +02:00
Screwtapello
4c6e98ed0c
Add many missing tkinter type annotations ( #6002 )
...
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-09-12 11:42:12 +03:00
Shantanu
8576b344b8
binhex: removed in py311 ( #6011 )
2021-09-10 15:27:24 -07:00
Shantanu
c74fd22931
Update pytype ( #6026 )
...
Co-authored-by: hauntsaninja <>
2021-09-11 01:11:05 +03:00
Sander
7bfdacb4c4
stdlib/logging use object over Any for parameter types ( #6025 )
2021-09-10 16:04:32 +02:00
Akuli
e69ca588ac
Stubs for ttkthemes ( #6024 )
2021-09-10 15:59:12 +02:00
Nikita Sobolev
392c81d767
Switch from toml to tomli ( #6023 )
2021-09-10 15:48:15 +02:00
Nikita Sobolev
7d41e670ad
Annotate more NamedTuples for psutil ( #6021 )
2021-09-10 14:14:36 +02:00
Jungkook Park
18d4868fce
Fix type of blocking_timeout argument to redis.lock.Lock ( #6019 )
2021-09-10 04:27:05 +02:00
Sebastian Rittau
9295c70ec0
'module' argument to ForwardRef.__init__() added in Python 3.9.7 ( #6017 )
...
Pin Python 3.9.7 for stubtest and update 3.10.0 to rc2
2021-09-10 01:10:28 +02:00
Nikita Sobolev
6122b5e8b4
Annotate several NamedTuples in psutil ( #6016 )
2021-09-09 22:37:00 +02:00
Nikita Sobolev
2a6f4afc80
Annotate more methods of psutil.Process ( #6012 )
2021-09-09 21:30:56 +02:00
Sebastian Rittau
2f3964e24b
Return ItemsView/KeysView from Mapping methods ( #6014 )
...
* Return ItemsView/KeysView from Mapping methods
* Make RawConfigParser compatible with Mapping
2021-09-09 07:37:26 -07:00
Bas van Beek
b9e1d7d522
Replace Mapping with types.MappingProxyType ( #6013 )
...
Mark `Signature.parameters` and `.return_annotation` as read-only properties
2021-09-09 09:58:53 +02:00
Nikita Sobolev
6188a3eec7
Improves psutil/_common.pyi ( #6010 )
...
* Improves `psutil/_common.pyi`
In this iteration I've fixed the most obvious types and corrected several mistakes.
We can go deeper in the next iteration(s).
* We don't need to import `Union`
* Update _common.pyi
* Update _common.pyi
* Update _common.pyi
2021-09-06 20:37:53 +02:00
Fares Ahmed
d8ec167681
Fix type of stroke_width parameter in Pillow's ImageDraw.*text* functions ( #6008 )
2021-09-06 13:13:28 +02:00
Sebastian Rittau
2620120a90
Update deprecated.sphinx.deprecated signature ( #6005 )
...
The signature was changed in Deprecated 1.2.13.
2021-09-05 19:11:27 -07:00
Nikita Sobolev
1f7b87b6b7
Adds more missing ContextManager types ( #6007 )
...
1. c3e63b4dd5/psutil/_psbsd.py (L571)
2. c3e63b4dd5/psutil/_psosx.py (L365)
2021-09-05 17:57:33 -07:00
Nikita Sobolev
5d7e201784
Fix return type of Process.oneshot() ( #6006 )
2021-09-05 21:03:45 +02:00
Gergely Kalmár
96b5254056
Fix python-slugify replacements argument type ( #6004 )
...
Update version field, remove Python 2 compatibility marker
2021-09-05 20:44:23 +02:00
Bas van Beek
d599a535b2
Allow math.trunc to only accept __trunc__-supporting objects ( #6003 )
...
Add SupportsTrunc protocol
2021-09-04 18:16:53 +02:00
Anton Grübel
3819f8e6ff
add missing functions in sys ( #6001 )
2021-09-04 16:30:13 +02:00
Akuli
832a24c8a1
Create send2trash stubs ( #6000 )
2021-09-03 22:51:03 +02:00
Andrew Svetlov
c0030b2b12
Fix msg parameter type for asyncio Future.cancel() and Task.cancel() ( #5999 )
2021-09-03 09:07:20 -07:00
HunterAP23
ffaa0ea3d1
Added initial rework of the concurrent.futures module ( #5646 )
...
* Added initial rework of the concurrent.futures module
* Minor fixes
* Fixed some generics & changed to collections over typing for some types
* Switched thread to use queues instead of multiprocessing.queues
* More fixes
* More fixes following results from running tests locally
* Tmp commit of changes
* Minor flake8 fix
* Fixing some issues
* Fixed a weakref.ref issue
* Fixed one more weakref issue
* Fixed some issues with required version
* Fixed more python min version requirements
* More min version fixes
* Fixed misc error in workflow regarded outdated pip
* Replaced any usage of Optional and Union with proper form as described in the contributions guide
* Fixed issue with using Callable definition
* Fixed last seen issues as per review
* Fixed some basic issues & more proper import calls
* Update stdlib/concurrent/futures/process.pyi
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
* Update stdlib/concurrent/futures/process.pyi
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
* Minor fixes
* More minor fixes
* Fixed up some issues & cleaned up imports
* Removed usage of Union
* Changed wait method to use Set of Future to work with mypy-primer for Optuna repo
* Reverted change to wait method and DoneAndNotDoneFutures class
* Fixed DoneAndNotDoneFutures again
Co-authored-by: Akuli <akuviljanen17@gmail.com >
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-09-03 13:06:48 +02:00
Anton Grübel
1af6810b5d
Improve typing in zipfile ( #5991 )
...
* Improve typing in zipfile
* fix CR suggestions
2021-09-03 13:02:11 +02:00
Carl Meyer
003f916acd
Add SymbolTableFactory to symtable stub ( #5998 )
...
This is not documented API, but AFAIR the typeshed policy is now that stubs should preferably reflect reality rather than solely documented API.
See https://github.com/python/cpython/blob/main/Lib/symtable.py#L21
2021-09-03 00:15:17 -07:00
Peter Law
425a35309a
Relax DictWriter.fieldnames closer to implementation ( #5994 )
...
Fixes #5993
2021-09-02 20:17:30 +02:00
JP Sugarbroad
d5ff0e8399
dateutil.parser: Complete the isoparser module ( #5983 )
2021-09-02 14:57:16 +02:00
Anthony Sottile
f1e367851c
Fix types of enum _member_names, etc. ( #5986 )
...
Move fields onto EnumMeta
2021-09-02 11:46:57 +02:00
Akuli
6307bfd421
Delete yaml.CDangerLoader and yaml.CDangerDumper ( #5990 )
...
These no longer exist in PyYAML 4.2.
2021-09-01 10:50:30 +03:00
Jon Dufresne
a9a612df98
Add certifi.contents() ( #5989 )
...
Added in commit:
3e585603ff
Available since version 2020.04.05.
2021-08-31 21:10:04 -07:00
Ashley Whetter
026405b014
Add C{Full,Unsafe}Loader and UnsafeConstructor ( #5988 )
2021-09-01 00:50:31 +02:00
Jon Dufresne
2d8fe52d08
Remove geoip2 stubs in favor of upstream ( #5964 )
...
The geoip2 package has shipped a PEP 561 py.typed file since Jul 28,
2020.
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-08-31 23:15:55 +02:00
Torsten Wörtwein
d4f0725452
BUG: typing.final supports properties ( #5985 )
...
Fixes #5984
2021-08-31 09:07:57 +02:00
Sebastian Rittau
5f77310418
Update bleach version (no changes) ( #5982 )
2021-08-30 07:15:23 -07:00
Jon Dufresne
4381e0a558
Remove @python2-only third party stubs that aren't also dependencies ( #5975 )
...
Closes #5969
2021-08-30 14:23:28 +02:00
Sebastian Rittau
bc19a28c0d
CI: use one runner per mypy version ( #5909 )
...
This makes it easier to see in which version(s) an error occurred.
2021-08-29 04:00:10 -07:00
Akuli
8d5452e873
do not use mypy-specific syntax in '# type: ignore' comments ( #5953 )
2021-08-29 03:58:34 -07:00
Akuli
cd90721604
Clean up tests/check_pep_604.py ( #5980 )
2021-08-28 21:56:53 -07:00
github-actions[bot]
ed25989ef2
Remove unused stubtest allowlist entries ( #5981 )
...
Co-authored-by: hauntsaninja <hauntsaninja@users.noreply.github.com >
2021-08-28 21:22:24 -07:00
Shantanu
2d4fcbc81e
zipfile: py310 changes, fix open ( #5979 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 22:45:01 +02:00
Sebastian Rittau
8e0e13a2d5
Commit messages for stubs are now used as changelog ( #5950 )
2021-08-28 12:11:22 -07:00
Sebastian Rittau
f1532745bc
A few html5lib annotations ( #5913 )
2021-08-28 12:08:45 -07:00
Shantanu
ba998cd5f9
multiprocessing.pool: fix __init__ methods ( #5833 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 12:04:08 -07:00
Shantanu
670929e908
dateparser: use PEP 604 ( #5977 )
...
Co-authored-by: hauntsaninja <>
2021-08-28 21:03:02 +02:00
Shantanu
f6e4c9c38f
Check for PEP 604 usage in CI ( #5903 )
...
Since this is a common review issue and our stubs have all been
converted
Co-authored-by: hauntsaninja <>
2021-08-28 11:37:50 -07:00