Winston Chang
6653be1511
Add overloads for asyncio.sleep() ( #7873 )
...
Closes #7866 . This adds an overload to `asyncio.sleep()`, so that when it is called _without_ `return=None`, the type checker knows that the return type is `None` instead of `unknown`.
Also related to https://github.com/microsoft/pyright/issues/3475 .
2022-05-18 16:19:45 -07:00
Jelle Zijlstra
eab82c838a
asyncio: updates for 3.11 ( #7844 )
...
CPython changes:
- 13c10bfb77
- 9523c0d84f
- 9f04ee569c
- d03acd7270
- 195a46d6ff
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-17 18:11:29 -07:00
Alex Waygood
e9526faf40
Various py311 removals ( #7836 )
2022-05-16 17:28:13 -07:00
Rick Voormolen
693c4f19b4
Mark Future._callbacks as a @property ( #7829 )
2022-05-11 11:13:29 +02:00
Akuli
bfa918880f
asyncio: expose WriteTransport.get_write_buffer_limits on all Python versions ( #7718 )
2022-04-27 16:38:25 +03:00
Akuli
7576c5e1d5
asyncio: add missing methods to _FlowControlMixin ( #7719 )
2022-04-27 16:32:22 +03: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
a1b1b95f67
Unpin Python micro versions used by stubtest ( #7619 )
...
Add new `asyncio` method, fix allowlists
2022-04-13 22:07:01 +02:00
Akuli
40553277ad
asyncio: use WriteTransport in StreamWriter ( #7611 )
2022-04-09 07:03:34 -07:00
Alex Waygood
da3e69d093
stdlib: Improve a bunch of __(a)exit__ methods ( #7571 )
2022-04-01 08:05:25 +02:00
luzpaz
6550a30fdc
Fix source comment typo ( #7567 )
...
Found downstream in mypy
2022-03-30 18:06:09 +01:00
Stefan Zabka
f40747f81d
Add Server to asyncio.base_events' __all__ ( #7554 )
...
Add Server to asyncio.base_events' __all__
Closes #7552
2022-03-25 20:32:28 +00:00
Harry
b69d64df60
allow start_server to accept a Sequence of hosts ( #7546 )
2022-03-24 19:44:45 +01:00
Alex Grönholm
3a8d121890
Fix type of the "host" parameter in asyncio getaddrinfo() ( #7517 )
2022-03-20 13:17:55 +00:00
Jelle Zijlstra
b7d129f727
PEP 604: Remove some more uses of Union/Optional ( #7515 )
...
The following patterns still break mypy:
1. `type[]` at top level fails
2. `tuple[T1, T2]` at top level fails (but `tuple[T1, ...]` is fine)
3. `T1 | Callable[..., T2 | T3]` fails, but only <=3.9
This PR cleans up usage of `Union` and `Optional` outside these patterns.
2022-03-19 08:23:00 -07:00
Alex Waygood
3ab250eec8
Use PEP 604 syntax wherever possible ( #7493 )
2022-03-16 16:01:33 +01:00
Alex Waygood
bc72b25a2a
Make more miscellaneous fields read-only, annotate _json.make_encoder ( #7439 )
2022-03-06 15:41:49 -08:00
Jelle Zijlstra
0a6b6b095c
Add asyncio.windows_utils.Popen ( #7396 )
2022-03-02 12:37:54 +02:00
Alex Waygood
fd750bf065
asyncio.unix_events: Make AbstractChildWatcher abstract, add PidfdChildWatcher (#7412 )
2022-03-01 16:23:46 +01:00
Guido van Rossum
47cccff9cb
asyncio.Task: .cancelling() and .uncancel() now return int, not bool ( #7405 )
2022-02-28 17:35:42 -08:00
Alex Waygood
bf167d4df4
Add __all__ for asyncio.unix_events & asyncio.taskgroups, and simplify asyncio.__init__ ( #7343 )
2022-02-28 12:51:32 +01:00
Alex Waygood
2d6ab4d3bf
Fix several mypy errors when run on the 3.11 stdlib ( #7389 )
2022-02-26 17:49:36 -08:00
Alex Waygood
d2ddda00cf
Fix various __all__-related typos and omissions ( #7378 )
2022-02-25 15:10:00 +02:00
Thomas Cellerier
09a1932e68
Address parameter of datagram_received can be of type tuple[int, int] ( #7366 )
2022-02-23 12:09:26 +01: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
Andrew Svetlov
28fd555431
Sync asyncio.isfuture definitions by sharing asyncio.base_futures.isfuture definition ( #7353 )
2022-02-22 18:24:57 +01:00
Alex Waygood
e2524b0e96
Add asyncio.base_futures.__all__ ( #7279 )
2022-02-20 17:59:14 -08:00
Alex Waygood
8130e40536
Add asyncio.streams.__all__ ( #7275 )
2022-02-20 15:44:32 -08:00
Alex Waygood
3c5c890761
Add asyncio.selector_events.__all__ ( #7288 )
2022-02-19 12:22:08 -08:00
Alex Waygood
3446a40fb5
Add asyncio.transports.__all__ ( #7281 )
2022-02-18 19:25:33 -08:00
Alex Waygood
d9e7673273
Add asyncio.tasks.__all__ ( #7280 )
2022-02-18 19:15:09 -08:00
Alex Waygood
309b6f2b52
Add `asyncio.windows_utils.__all__ ( #7278 )
2022-02-18 19:06:01 -08:00
Alex Waygood
e3e3db6fe5
Add asyncio.threads.__all__ ( #7277 )
2022-02-18 18:45:58 -08:00
Alex Waygood
a9f80c64b9
Add asyncio.subprocess.__all__ ( #7276 )
2022-02-18 18:45:52 -08:00
Alex Waygood
1f2c21d9e9
Add asyncio.staggered.__all__ ( #7274 )
2022-02-18 18:37:18 -08:00
Alex Waygood
6672e57e75
Add asyncio.runners.__all__ ( #7273 )
...
Nice and simple, this one.
2022-02-18 18:37:09 -08:00
Alex Waygood
d690238d8b
Add asyncio.queues.__all__ ( #7272 )
2022-02-18 18:30:20 -08:00
Alex Waygood
8d63713200
Add asyncio.protocols.__all__ ( #7271 )
2022-02-18 18:30:06 -08:00
Alex Waygood
7dbd29174c
Add asyncio.proactor_events.__all__ ( #7270 )
2022-02-18 18:26:31 -08:00
Alex Waygood
29ac4cccc5
Add asyncio.locks.__all__ ( #7269 )
2022-02-18 18:26:25 -08:00
Alex Waygood
5729a239ae
Add asyncio.futures.__all__ ( #7268 )
2022-02-18 18:16:09 -08:00
Alex Waygood
b228c8d29e
Add asyncio.events.__all__ ( #7266 )
2022-02-18 17:50:28 -08:00
Alex Waygood
8fd630051d
Add asyncio.exceptions.__all__ ( #7267 )
2022-02-18 17:45:21 -08:00
Alex Waygood
9fb9a197b5
Add asyncio.base_events.__all__ ( #7264 )
2022-02-18 17:36:41 -08:00
Alex Waygood
ee4ee8bb0f
Add asyncio.coroutines.__all__ ( #7265 )
2022-02-18 17:36:29 -08:00
Guido van Rossum
644d5540bc
Tweaks to the TaskGroup API ( #7255 )
...
* Remove TaskGroup name arg and get_name() method
(We removed those from the implementation.)
* Add optional name arg to create_task()
See https://github.com/python/cpython/pull/31398
2022-02-17 21:32:37 -08:00
Guido van Rossum
35bddd289f
Add asyncio.taskgroups and new Task methods ( #7240 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-02-17 00:32:20 +02:00
Alex Waygood
5a8b9dafb3
Fix various py310 stubtest errors ( #7239 )
2022-02-16 11:47:49 -08:00