Commit Graph

111 Commits

Author SHA1 Message Date
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
Alex Waygood
fbc279e3f5 stdlib: Add many missing dunder overrides (#7231) 2022-02-16 06:25:47 -08:00
Alex Waygood
66a229b709 stdlib: Add several missing comparison methods (#7202) 2022-02-14 11:09:52 -08:00
Alex Waygood
63489c305d asyncio: make AbstractServer abstract and remove unnecessary metaclass=ABCMeta (#7185) 2022-02-13 23:34:19 +02:00
Nikita Sobolev
6882e513c2 Improve Self type usage accross stdlib (#7183) 2022-02-13 12:21:01 +01:00
Sebastian Rittau
92685d18f7 Update to Python 3.9.10 and 3.10.2 (#6977) 2022-02-11 17:37:31 -08:00
Thomas Grainger
57b2bae031 correct asyncio.locks._ContextManagerMixin and _ContextManager types (#7124)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-02-04 18:30:55 +02:00
Thomas Grainger
4e67419b1f most asyncio lock methods always return True (#7122) 2022-02-04 11:18:17 +02:00
Alex Waygood
27c7aece10 Update asyncio.trsock to reflect methods removed in 3.11 (#7110)
* Update `asyncio.trsock` to reflect methods removed in 3.11

These were all removed in https://bugs.python.org/issue43232

* [pre-commit.ci] auto fixes from pre-commit.com hooks

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-02-02 09:44:26 -08:00
Alex Waygood
584336a41e Fix several methods that should be async def, but aren't (#7107) 2022-02-02 15:18:14 +01:00
Nikita Sobolev
1b99812621 Require coroutines for create_task() (#6779) 2022-02-02 13:35:00 +01:00
Shantanu
b88a6f19cd Upgrade black version (#7089) 2022-01-30 16:27:06 -08:00
Alex Waygood
33ecb68603 Fix return annotations of several methods that return self at runtime (#7070) 2022-01-28 17:37:49 -08:00
Nikita Sobolev
749d3db815 Make asyncio.isfuture a TypeGuard (#7057) 2022-01-28 11:08:31 -08:00
Nikita Sobolev
d43639d289 Improve asyncio.Future type (#7058) 2022-01-27 12:46:43 -08:00
Andrew Svetlov
56aa2088aa Add BufferedProtocol.eof_received() (#7043) 2022-01-27 12:09:29 +01:00