Commit Graph

3571 Commits

Author SHA1 Message Date
Akuli
75ca712f3c check_new_syntax.py: check nested annotations (#6167) 2021-10-14 00:28:38 +03:00
Akuli
e72a4034bf Cleanup: use lower-case list and dict, add a test (#6161) 2021-10-13 22:59:27 +03:00
Stefan Tatschner
7720f9b7df Add CAN_RAW_JOIN_FILTERS constant to socket stub (#6159)
This constant has been added in python 3.9.
2021-10-13 16:29:03 +02:00
Kevin Rose
3c8c2519b4 Fix small issues in ftplib (#6154) 2021-10-12 18:51:52 -07:00
David Robertson
498f1aa41d Mark sqlite3.Cursor.rowcount as an int (#6150) 2021-10-11 14:54:30 +02:00
Anton Grübel
e3ae2e9291 Add missing items and types in site.pyi (#6142)
Use `set` instead of `Iterable` for `known_paths` argument
2021-10-11 12:11:24 +02:00
KotlinIsland
b7d1d099d9 add TypeGuard to coroutines.iscoroutine (#6105)
make CoroutineType extend Coroutine
2021-10-09 17:01:36 +02:00
Théo Cavignac
e018ad66dc General object for sys.ps1 and sys.ps2 (#6139) 2021-10-09 15:38:39 +03:00
EXPLOSION
ca983cd319 Allow empty strings for show in tkinter.ttk.Treeview (#6135) 2021-10-09 11:17:02 +03:00
hardikpnsp
ee31999caf Add missing methods to ExtensionFileLoader (#6120)
Closes: #4769
2021-10-08 23:14:32 +02:00
Nikita Sobolev
373c4e582a traceback can be None in sys.excepthook (#6133) 2021-10-08 09:17:32 +00:00
Đỗ Quốc Vương
3c58736d01 Change type of backupCount from str to int (#6128) 2021-10-07 15:31:53 +02:00
Shantanu
55cf343ba9 zip: update for PEP 618 (#6123)
Resolves #6122

Co-authored-by: hauntsaninja <>
2021-10-06 12:54:47 -07:00
Kevin Rose
98dde9c364 Mark some contextlib method arguments as positional-only (#6118) 2021-10-05 19:41:52 -07:00
Kevin Rose
47e9788246 Add the rest of string.Template's class attributes (#6109) 2021-10-05 18:26:34 +02:00
Jake Bailey
b9ea346c14 Use overrides for IntFlag dunder-r methods (#6114) 2021-10-04 18:00:36 -07:00
Jake Bailey
4707e1d763 Fix use of unexported Pool type in multiprocessing.pool (#6111) 2021-10-04 17:20:24 -07:00
Anton Grübel
5f1adbfbd2 Add missing property in urllib.response, fix code types (#6108) 2021-10-04 16:01:33 -07:00
Peter Law
9b86402c77 pickle: use protocols instead of IO[bytes] (#6101) 2021-10-02 11:32:16 +03:00
Matthew Suozzo
947e851cf8 Remove typevar in mock.patch.multiple (#6090) 2021-09-30 19:14:10 +02:00
MapleCCC
b04512eaaa Fix return type of st2tuple() and STType.totuple() (#6091) 2021-09-30 09:35:38 +02:00
hardikpnsp
fe4062af54 Fix "value" types in dump and dumps (#6085) 2021-09-29 15:07:29 +02:00
Kumar Aditya
25ae5b8871 Add __await__, name, qualname to CoroutineType (#6087) 2021-09-29 14:07:09 +02:00
Matthew Suozzo
9efd6521be Fix unittest.mock.patch class decorator annotation. (#6070) 2021-09-29 09:27:47 +02:00
Luciano Ramalho
b99ddc1f2f change chained maps to MutableMapping (#6044)
Fixes #6042
2021-09-28 21:18:50 -07:00
Nikita Sobolev
4ac969ad2c Fixes __init__ of typing.NamedTuple (#6080)
Closes #6079
2021-09-28 20:42:27 -07:00
Zac Hatfield-Dodds
7cc5eb2950 StackSummary.extract() takes an Iterable (#6084) 2021-09-28 09:24:54 +02:00
Vincent Pelletier
4c0dccac0f Fold remaining custom stdlib *Buffer types into _typeshed. (#6082)
Add ctypes base type to WriteableBuffer.
Add a ReadOnlyBuffer type from fcntl.
Base ReadableBuffer on WriteableBuffer and ReadOnlyBuffer.
Use these types in fcntl and ctypes stubs.
2021-09-28 09:15:26 +02:00
Ju4tCode
328d09a9a5 Fix error type for inspect Parameter/Signature empty (#6073) 2021-09-27 13:49:22 +02:00
Nikita Sobolev
3bc309daaa Adds AM_STR and PM_STR to locale.py (#6065) 2021-09-24 10:51:33 +02:00
Estelle Poulin
15cec1da8e Change Traversable to be inline with pathlib.Path (#5818)
`pathlib.Path` objects are now valid `importlib.abc.Traversable`s.
2021-09-21 21:36:10 +03:00
Akuli
196f69b27e dict.__init__: support dict(string.split(sep) for string in iterable) (#6050) 2021-09-20 13:52:41 +02:00
KotlinIsland
1b5c4e1d57 Add support for dict.{keys,values,items}.mapping (#6039)
Co-authored-by: KotlinIsland <kotlinisland@users.noreply.github.com>
2021-09-19 22:30:14 -07:00
Anton Grübel
caa642dd3b improve typing in inspect (#6020) 2021-09-18 20:11:55 -07:00
Rebecca Chen
d74a5a9ef8 Add undocumented attribute multiprocessing.process.BaseProcess._identity (#6041)
A user filed an issue against pytype about this attribute being missing:
https://github.com/google/pytype/issues/1010. I determined its type from
the source code:
https://github.com/python/cpython/blob/3.9/Lib/multiprocessing/process.py.
2021-09-17 13:14:07 -07:00
SupImDos
e4c2c0f302 Add SysLogHandler.address attribute (#6037) 2021-09-14 13:58:02 +02:00
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
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
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
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
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
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
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