Sebastian Rittau
d2a7889fe0
Drop support for Python 3.5 ( #4675 )
...
Python 3.5 EOL was on 2020-09-30.
2020-11-02 16:18:20 +01:00
Ashwin Vishnu
1efbc01d98
Update multiprocessing.pool: Function argument "iterable" has no default value ( #4698 )
2020-10-23 12:55:50 +02:00
Utsav
6f943d43ea
Added __class_getitem__ ( #4695 )
...
Resolves #4682
Co-authored-by: hauntsaninja <>
2020-10-22 14:05:04 -07:00
Eric Traut
bbd8c96e34
Added some missing types from various stdlib stubs ( #4466 )
2020-08-29 16:45:36 -07:00
Eric Traut
e4b48edbba
Fix a couple of type name collisions ( #4419 )
...
PEP 484 indicates that all type annotations within a stub file are supposed to be considered forward references even if they are not quoted. This means a type checker needs to use scope-based symbol resolution without regard for code flow order. Lookups will find same-named symbols within the same scope even if they are declared after the type annotation. This change fixes a couple of cases where this occurs and confuses pyright.
Co-authored-by: Eric Traut <erictr@microsoft.com >
2020-08-08 11:29:23 +02:00
Eric Traut
04c74640f0
Removed imported symbols that are not accessed or re-exported ( #4387 )
...
Co-authored-by: Eric Traut <erictr@microsoft.com >
2020-08-05 22:49:17 -07:00
Shantanu
d998d37954
multiprocessing: revert changes to queue classes ( #4314 )
...
Partial revert of #4289 . Fixes #4313
2020-07-16 15:03:25 -07:00
Sebastian Rittau
5e76f51930
Upgrade to isort 5 ( #4323 )
...
This now also reformats imports not at the top of files.
2020-07-16 07:01:57 -07:00
Jelle Zijlstra
0142a87da8
adjust isort config ( #4290 )
...
Fixes #4288 .
- Default imports to THIRD_PARTY, so in effect we merge the FIRST_PARTY and THIRD_PARTY stubs. This means import order is no longer affected by whether typing_extensions is installed locally.
- Treat typing_extensions, _typeshed and some others as standard library modules.
Note that isort master is very different from the latest release; we'll have to do something
different if and when the next isort release comes out.
2020-06-29 00:00:21 -07:00
Vishal Kuo
cc8344b8c6
[multiprocessing] fixes more incorrect types ( #4289 )
2020-06-28 16:08:14 -07:00
Jelle Zijlstra
5d553c9584
apply black and isort ( #4287 )
...
* apply black and isort
* move some type ignores
2020-06-28 13:31:00 -07:00
Vishal Kuo
e467fd50ab
multiprocessing: add sharedctypes, fix some stubtest cases ( #4282 )
2020-06-26 23:38:34 -07:00
Jelle Zijlstra
44a852dff5
Literal: always import from typing_extensions for simplicity ( #4219 )
2020-06-10 21:23:58 -07:00
Sebastian Rittau
afe1e543b3
Make multiprocessing.Namespace accept any attribute ( #4204 )
...
Update multiprocessing.dummy.Namespace as well
Closes : #4186
2020-06-09 12:34:36 -07:00
Sebastian Rittau
a913af9523
flake8: Enable F811 ( #4158 )
2020-06-02 14:08:54 -07:00
Gal Ben David
d1ef2fff7a
added multiprocessing.connection.Connection constructor definition ( #3974 )
2020-05-13 15:13:06 -07:00
Ben Motz
c12162e4a1
add missing multiprocessing.connection.Connection context manager methods ( #3875 )
...
Co-authored-by: Ben Motz <ben.motz@bluwireless.com >
2020-03-22 08:50:50 -07:00
Debjyoti Biswas
6d3af1c472
Add stubs for multiprocessing.managers.Token ( #3872 )
2020-03-22 08:47:15 -07:00
Debjyoti Biswas
24691fa03a
Adding stubs for multiprocessing.managers BaseProxy ( #3868 )
2020-03-20 12:11:53 +01:00
Alan Du
42d68dd765
Use overloads for more precise get_context type ( #3605 )
2020-01-15 18:43:46 +01:00
cshesse
9c87b24041
Add default value to BaseContext.Pipe() ( #3479 )
2019-11-23 16:12:45 +01:00
Martijn Pieters
c53bc5a7ab
Add missing elements for multiprocessing.dummy ( #3471 )
...
`multiprocessing.dummy` exports names that were not yet listed in the typeshed stub:
```python
>>> from multiprocessing import dummy as mpdummy
>>> imported_objects = (
... (name, obj) for name, obj in vars(mpdummy).items()
... if name in mpdummy.__all__ and not obj.__module__.startswith("multiprocessing.dummy")
... )
>>> print(*(f"{name}: {obj.__module__}" for name, obj in sorted(imported_objects)), sep="\n")
Barrier: threading
BoundedSemaphore: threading
Condition: threading
Event: threading
JoinableQueue: queue
Lock: _thread
Queue: queue
RLock: threading
Semaphore: threading
current_process: threading
```
Of these, only `JoinableQueue` was listed.
2019-11-20 10:40:12 +00:00
Anthony Sottile
9c724e9e60
Fix signature of multiprocessing.get_start_method ( #3415 )
2019-10-28 17:39:14 +01:00
Sebastian Rittau
87d7dd3d95
Fix annotations with literal values ( #3411 )
2019-10-28 06:59:28 -07:00
Nathaniel Brahms
fa9e1ab445
multiprocessing.pool: Fix return of map_async() ( #3378 )
...
Closes #3377
2019-10-17 17:43:37 +02:00
Sebastian Rittau
6b55f5c498
Clean up multiprocessing + shared_memory ( #3351 )
...
* Make multiprocessing stubs match implementation
* Add multiprocessing.process.BaseProcess
* Use BaseProcess in multiprocessing.context where applicable
* Remove non-existing BaseContext.Process()
* Derive DefaultContext from BaseContext
* Fix BaseContext/DefaultContext.set_start_method() signatures
* Re-export multiprocessing.context.Process from multiprocessing,
instead of using a custom definition
* Re-export multiprocessing.active_from from multiprocessing.process
instead of using a custom definition
* Add parent_process() (Python 3.8)
* Complete BaseManager; add Server
* Add multiprocessing.shared_memory et al
2019-10-14 09:54:45 +02:00
Sebastian Rittau
07c8675ba5
Remove unused # type: ignore comments ( #3325 )
2019-10-09 10:27:18 -07:00
Sebastian Rittau
256b3ce8ab
Remove a bunch of unused imports ( #3323 )
2019-10-08 07:59:32 -07:00
Sebastian Rittau
c32e1e2280
Enable --disallow-any-generics for stubs ( #3288 )
2019-10-01 05:31:34 -07:00
Alan Du
d4727c39f1
Add multiprocessing.Array ( #3272 )
2019-09-29 16:30:09 +02:00
plokmijnuhby
8d053f139f
Change SyncManager behaviour when used as a context decorator ( #3230 )
...
Resolves #3018 .
2019-09-11 18:24:36 +02:00
秋葉
5ccf017ca0
fix: Add MapResult type ( #3228 )
2019-09-11 18:20:40 +02:00
Alan Du
e252094354
multiprocessing.Value can also take a Type ( #3200 )
2019-08-19 17:52:00 +02:00
Rebecca Chen
fab2ee0d7c
Remove unnecessary quotes around forward references. ( #3191 )
2019-08-16 20:29:32 -07:00
ikelos
3e700224ba
Add in multiprocessing.managers.ValueProxy types ( #3100 )
...
Fixes #1778
2019-07-03 08:49:16 +02:00
Philipp Schrader
d9c5422ebf
Add stub for multiprocessing.Value.get_lock() ( #2920 )
...
I also noticed that the "lock" parameter for Value's __init__ was
incomplete. The parameter also accepts lock objects directly.
https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.Value
Fixes #2917
2019-04-13 11:35:52 -07:00
Michael Lee
efb67946f8
Use variable annotations everywhere ( #2909 )
2019-04-13 10:40:52 +02:00
Sean McLemon
17cd91eeb3
multiprocessing.spawn submodule and multiprocessing.pool stubs ( #2823 )
...
Added stub for multiprocessing.spawn submodule and updated multiprocessing.pool stub
Closes #2758
2019-03-05 14:52:02 +01:00
Maxim Kurnikov
b80b2e4b98
make IMapIterator a subclass of Iterator ( #2814 )
2019-03-05 10:15:25 +01:00
Juan Gonzalez
c18b75b2e6
Make mypy aware of IMapUnorderedIterator ( #2701 )
2018-12-20 19:41:58 -08:00
Dev Aggarwal
c7b0e60032
Add missing stubs for multiprocessing.connection module. ( #2596 )
2018-11-11 16:54:11 +01:00
Sebastian Rittau
006a79220f
Flake8 fixes ( #2549 )
...
* Fix over-indented continuation lines
* Fix under-indented continuation lines
* Fix whitespace around default operator problems
* Limit line lengths
* Fix inconsistent files
2018-10-24 07:20:53 -07:00
Stig Johan Berggren
92a697cabd
Make BaseManager.register a classmethod ( #2356 ) ( #2357 )
2018-08-07 10:02:21 -07:00
Sebastian Rittau
b05e99297c
Drop Python 3.3 support from several stubs ( #2266 )
...
* Drop Python 3.3 support from importlib stubs
* Drop Python 3.3 support from html and symbol stubs
2018-06-20 16:46:11 -07:00
Jelle Zijlstra
4e6af84640
improve multiprocessing.Pool types ( #2126 )
...
Fixes #1703
Mostly introduce typevars to express that the return types match the return types of the
callbacks.
Removed comment about incompleteness since all documented classes from
https://docs.python.org/3/library/multiprocessing.html#module-multiprocessing.pool
are covered.
2018-06-11 14:42:57 -07:00
Jelle Zijlstra
53fde2ddf7
make timeout argument to Connection.poll Optional ( #2122 )
...
Fixes #2094
2018-06-11 14:04:45 -07:00
Jelle Zijlstra
91af6291b1
make shlex.shlex and multiprocessing.pool.IMapIterator instantiable ( #2120 )
...
Part of #1476 .
2018-06-11 14:04:05 -07:00
Michael J. Sullivan
2ba90a65c0
Remove __all__ = ... from stubs ( #2161 )
...
The presence of a __all__ causes everything to not get picked up by
import *, which among other things breaks the new six.moves stubs.
2018-05-24 19:00:07 -07:00
Martin DeMello
2935017157
Add multiprocessing.dummy pyi files ( #2059 )
2018-04-18 19:20:01 -07:00
John Reese
a51b480609
Add type annotations for multiprocessing manager address/connect ( #2033 )
2018-04-10 20:54:23 -07:00