Commit Graph

74 Commits

Author SHA1 Message Date
Jukka Lehtosalo
e4d0d3d9d7 Make the return type of multiprocessing.connection.Pipe more precise (#8706)
The precise return type depends on the platform. Link to implementation:
68fb03249f/Lib/multiprocessing/connection.py (L518)

Now users no longer need to use the internal-looking class
`_ConnectionBase` in annotations, at least in code that doesn't
need to be cross-platform.
2022-09-08 13:24:49 +01:00
Nikita Sobolev
6e985ef3de stdlib mapping classes: Use better names for various pos-only parameters (#8637) 2022-08-28 23:29:00 +01:00
Nikita Sobolev
0259068ad6 Remove duplicate definitions in sub-classes (#8594) 2022-08-26 17:10:55 +02:00
Alex Waygood
c2966bc5ed multiprocessing.reduction: Any -> Incomplete (#8585) 2022-08-21 17:43:55 -07:00
Nikita Sobolev
510feeb3fc Improve constructor for builtins.dict (#8517)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-08-10 19:04:07 +01:00
Nikita Sobolev
ac86defef7 Simplify multiprocessing.context.{SpawnProcess,SpawnContext} (#8499) 2022-08-06 12:03:43 +01:00
Alex Waygood
892796a794 Remove, move or # noqa more TypeAlias declarations (#8450) 2022-08-05 13:03:19 +01:00
Nikita Sobolev
799fd2c8d8 Improve multiprocessing.context module (#8466)
* Use `ClassVar` where applicable
* Fix `_Popen()` return types
* Remove non-existing field `BaseContext.Process`

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-08-04 12:30:23 +02:00
Kevin Kirsche
f550c24886 Add multiprocessing.popen_spawn_win32 submodule (#8428) 2022-07-29 16:02:15 +01:00
Kevin Kirsche
17e3cf99a4 Add multiprocessing.popen_spawn_posix submodule (#8427) 2022-07-29 15:52:49 +01:00
Kevin Kirsche
1f0e641521 Add multiprocessing.popen_forkserver submodule (#8425)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-28 17:26:06 +01:00
Alex Waygood
a9f6632d1b multiprocessing.reduction: improve recvfds and recv_handle (#8422) 2022-07-28 17:05:08 +01:00
Alex Waygood
26d09359cf multiprocessing.resource_sharer: remove unused TypeAlias (#8424) 2022-07-28 17:43:36 +02:00
Kevin Kirsche
fe1e3ef91b Add multiprocessing.heap submodule (#8412)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-28 16:27:25 +01:00
Kevin Kirsche
087fb6b96d Add multiprocessing.popen_fork submodule (#8420)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-28 16:19:43 +01:00
Kevin Kirsche
dd24bba3dd Add multiprocessing.resource_sharer submodule (#8413)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-28 16:09:18 +01:00
Kevin Kirsche
48e502c431 fix: Add missing multiprocessing.util types (#8404)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-27 20:22:54 +01:00
Kevin Kirsche
5397d430ea Add multiprocessing.resource_tracker submodule (#8405) 2022-07-27 17:31:31 +01:00
Kevin Kirsche
a0c1a2f566 Add multiprocessing.forkserver submodule (#8406)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-07-27 17:08:12 +01:00
Shantanu
f76c6ed55a multiprocessing: make some overloads more precise (#8330)
See discussion here: https://github.com/python/typeshed/issues/4266#issuecomment-1187867029

Co-authored-by: hauntsaninja <>
2022-07-19 16:55:23 +01:00
Alex Waygood
edc0ecd857 Remove Python 3.6 branches from typeshed (#8269) 2022-07-11 10:55:17 +02:00
Alex Waygood
a2e8346d9a Improve multiprocessing stubs (#8202)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-07-01 23:50:39 +05:30
Alex Waygood
ca44b893e3 multiprocessing: audit callback annotations (#8178) 2022-06-26 13:15:26 +01:00
Alex Waygood
01d5e28ff7 Fix miscellaneous invalid TypeVar usages (#8074) 2022-06-14 08:48:41 -07:00
Alex Waygood
591593c85f Simplify __all__ for modules beginning with 'm' to 't' (#8028) 2022-06-07 20:14:15 +01:00
Alex Waygood
d511312e21 multiprocessing.managers: fix TypeVar usage (#7938)
#7928

`dict()` and `list()` just return empty dictionaries and lists (respectively) if no arguments are supplied:

```python
>>> from multiprocessing.managers import SyncManager
>>> with SyncManager() as s:
...     print(s.dict())
...
{}
```
2022-05-26 07:18:43 -07:00
Jelle Zijlstra
573539ba2a multiprocessing: add shutdown_timeout param to BaseManager (#7692)
python/cpython#32112
2022-04-25 22:12:56 -06:00
Alex Waygood
b093c90a94 Use TypeAlias for type aliases where possible, part II (#7667) 2022-04-20 20:02:47 +01:00
Alex Waygood
97a74bc1aa Import from collections.abc wherever possible (#7635) 2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc Use TypeAlias where possible for type aliases (#7630) 2022-04-15 18:01:00 -07:00
Alex Waygood
da3e69d093 stdlib: Improve a bunch of __(a)exit__ methods (#7571) 2022-04-01 08:05:25 +02:00
Rebecca Chen
f39f20c4dd Fix the type signature of multiprocessing.managers.BaseManager.__exit__ (#7529)
All parameters should accept None.
2022-03-22 07:32:15 +01:00
Jelle Zijlstra
ba475a04c3 multiprocessing: args can be any Iterable (#7500)
https://github.com/python/cpython/blob/main/Lib/multiprocessing/process.py#L91
2022-03-17 01:44:25 +00:00
Alex Waygood
3ab250eec8 Use PEP 604 syntax wherever possible (#7493) 2022-03-16 16:01:33 +01:00
Alex Waygood
f4ae363b56 stdlib: correct many pos-or-kw arg names in dunder methods (#7451) 2022-03-07 16:40:03 +01:00
Alex Waygood
947724a5cb stdlib: Add several missing @abstractmethod decorators (#7443) 2022-03-06 16:41:13 -08:00
Alex Waygood
cda3d9cf72 Use latest stubtest in CI (#7438) 2022-03-04 15:19:29 +01:00
Alex Waygood
a0b41959ec stdlib: fix many attributes which are read-only at runtime but read-write in the stub (#7395) 2022-02-27 16:23:09 -08:00
Alex Waygood
d2ddda00cf Fix various __all__-related typos and omissions (#7378) 2022-02-25 15:10:00 +02:00
Rebecca Chen
da093c395c Allow multiprocessing.pool.ThreadPool.__exit__ to accept None (#7376) 2022-02-23 19:21:25 -08:00
Alex Waygood
240628c4dd Add missing objects to plistlib, and improve __all__ in asyncio.tasks, http.server, & multiprocessing.__init__ (#7363) 2022-02-22 16:39:34 -08:00
Alex Waygood
070bbb4fb9 Add multiprocessing.reduction submodule (#7361) 2022-02-22 16:36:26 -08:00
Alex Waygood
6fc4c14181 Add missing objects in codecs, configparser, and multiprocessing.dummy (#7360) 2022-02-22 18:25:27 +01:00
Alex Waygood
07de01f29e Add __all__ to modules beginning with 'm' (#7330) 2022-02-20 14:08:07 -08:00
Alex Waygood
fbc279e3f5 stdlib: Add many missing dunder overrides (#7231) 2022-02-16 06:25:47 -08:00
Nikita Sobolev
5014f9f50c Improve __reduce__ signature accross stdlib (#7182) 2022-02-13 12:24:27 +01:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex Waygood
96c9abb058 Always use _typeshed.Self, where applicable (#6880)
* Always use `_typeshed.Self`, where applicable

* Revert changes to `google-cloud-ndb` (ambiguous)

* Remove empty line added by script

* Revert changes to `stubs/python-dateutil/dateutil/relativedelta.pyi`

* Manually add a few more that the script missed

* Improve `filelock` annotation

Source code here: 79ec7b2826/src/filelock/_api.py (L207)

* Improve `opentracing/scope` annotation

Source code here: 3e1d357a34/opentracing/scope.py (L71)

* Improve `redis/client` stub

Source code here: 15f315a496/redis/client.py (L1217)

* Improve `redis/lock` annotation

Source code here: 15f315a496/redis/lock.py (L155)

* Improve `requests/models` annotation

Source code here: d718e75383/requests/models.py (L653)
2022-01-09 19:16:19 -08:00
Alex Waygood
4e046163b5 Delete many redundant method redefinitions (#6877) 2022-01-09 11:21:03 -08:00
Alex Waygood
a40d79a4e6 Use lowercase type everywhere (#6853) 2022-01-08 16:09:29 +01:00