Commit Graph

231 Commits

Author SHA1 Message Date
Stephen Morton 87267342d5 add asyncio.__all__ (#13038) 2024-12-27 20:58:40 -08:00
Stephen Morton d8822689f7 fix stubs for asyncio.BaseEventLoop.subprocess_exec (#13220) 2024-12-25 14:25:39 -08:00
Stephen Morton b0768596d2 correct parameter name for sock_recv of BaseEventLoop subclasses (#13212) 2024-12-09 18:26:34 -08:00
Ekin Dursun 61ba4de28f Change return type of as_completed in Python 3.13 (#12912) 2024-10-27 16:33:35 +00:00
Stephen Morton aedf65abe9 remove unneeded AsyncIterator base class from asyncio.StreamReader (#12815) 2024-10-15 11:25:40 -07:00
Stephen Morton f83b6fadbe add _asyncio (#12766)
improves naming and inheritance for asyncio.Future and asyncio.Task

related to https://github.com/python/typeshed/issues/3968
2024-10-09 20:55:28 -07:00
sobolevn 6f248dfa37 Bump mypy to 1.11.1 (#12463) 2024-08-04 23:19:28 -07:00
Peter Bierma d2ccc9a723 Fix return type annotation for asyncio.Task.get_coro() (#12445) 2024-07-27 10:00:45 -07:00
Max Muoto 0df6028dc8 Use Final for Constant Literals in the stdlib (#12332)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-07-15 18:07:34 +01:00
Max Muoto 670ca3125b Resolve asyncio issues for 3.13 (#12327) 2024-07-13 10:12:15 +02:00
Kumar Aditya 23c489642d remove child watchers from asyncio (#12189)
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>
2024-06-23 15:09:45 +01:00
Kumar Aditya 8ddd5102ed remove Generator from _FutureLike (#12185)
It is not allowed in Python 3.12+.
2024-06-22 06:59:30 -07:00
Jelle Zijlstra eeea0ac614 asyncio: fix task factory types (#11993) 2024-05-21 11:18:38 +02:00
Shantanu d9cf43c4c3 Mark pos-only __class_getitem__ args (#11970) 2024-05-18 23:27:51 +02:00
Marc Mueller 9178f5a414 Use TypeIs for asyncio function (#11847) 2024-04-29 15:17:09 -07:00
Eric Traut 17f1c4628a Add precise values for enum members where possible (#11299)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-04-22 15:10:59 +01:00
Bruce Merry 9d234d9c3f Update asyncio.Stream.readuntil for Python 3.13 (#11755) 2024-04-14 14:11:44 +02:00
Shantanu 470a13ab09 Use PEP 570 syntax in stdlib (#11250) 2024-03-09 14:50:16 -08:00
Jelle Zijlstra 5b1fd121e0 asyncio: Fix type of add_child_handler callback (#11548) 2024-03-09 17:02:05 +01:00
Nikita Sobolev 675ab38ab7 Update pyright version to 1.1.350 (#11501)
If you're reading about this commit in an auto-generated changelog: this is an internal change that should have no impact on how these stubs are understood by static-analysis tools such as type checkers or IDEs
2024-02-29 10:14:39 +00:00
Jelle Zijlstra bba8cbd6f8 stdlib: more deprecations (#11009)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-18 06:50:29 -08:00
Nikita Sobolev e961db9492 Change the asyncio.Task constructor type (#10228) 2024-02-17 15:50:26 -08:00
Alex Waygood 15cdc20744 Fix stdlib stubtest for Python 3.11.8 and 3.12.2 (#11384)
Fix stubtest for Python 3.11.8 and 3.12.2
2024-02-09 02:28:03 -08:00
Alex Waygood c49c84f319 A new shade of Black (#11362) 2024-02-04 16:38:55 -08:00
Oleg A b4f60ac5bf asyncio: Correct _waiters type (#11315) 2024-01-25 20:24:54 +01:00
Sebastian Rittau 53a8193d64 Update typing_extensions imports in stdlib (#11244)
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2024-01-05 08:15:19 -08:00
Sebastian Rittau 23604858a6 Remove Python 3.7 branches (#11238) 2024-01-05 11:39:39 +01:00
Stephen Morton 45b1db9f8e use _LoopBoundMixin in asyncio when appropriate (#11127)
related to https://github.com/python/typeshed/issues/3968
2023-12-09 20:36:34 -08:00
Alex Waygood a08d2d5d66 Use PEP-646 in stubs for asyncio (#11015) 2023-12-08 22:59:42 +00:00
tungol db3024d2e7 Use builtin TimeoutError in asyncio and concurrent.futures (#11109)
related to https://github.com/python/typeshed/issues/3968

Co-authored-by: Stephen Morton <git@tungol.org>
2023-12-06 00:22:26 -08:00
Paul J. Dorn 1d3a18c6da asyncio: create_subprocess_exec is the same as create_subprocess_shell, except where it isn't (#11076)
asyncio.subprocess: duplicate _shell args to _exec

Fixes: 38dfb57adf

Expanding the keywords used True arguments for shell in both _exec and _shell. The _exec one is for shell=False. With the text argument, its the other way around: both demand Falsy here, so match those lines.
2023-11-29 16:11:03 +00:00
Alex Waygood 10febc4fe0 stdlib: remove unused type: ignore comments (#11061) 2023-11-23 14:00:07 +01:00
Jelle Zijlstra c2c8d7cf5d stdlib: Apply some simple deprecations (#11044) 2023-11-23 09:03:01 +01:00
Alex Waygood 83964a4dc5 stdlib: add many missing __del__ methods (#11042) 2023-11-18 11:32:12 -08:00
Alex Waygood 516f665505 Bump flake8-pyi to 23.11.0 (#10997) 2023-11-08 16:01:24 +00:00
Jelle Zijlstra b36f3c5229 asyncio: remove overly specific protocols (#10984)
The _warn parameter to these methods is just there to work around
some finalization issues and should never be used by users. In
addition, these protocols are out of date (the "stacklevel" argument
is not used by current CPython main). I don't think we gain anything
by trying to maintain these protocol definitions.
2023-11-07 19:26:25 -08:00
Alex Waygood a08d4c8d2e Remove many redundant inheritances from Generic[] (#10933) 2023-10-26 20:07:20 +02:00
James Hilton-Balfe 25eb99cbec Add better types for asyncio.gather (#9678) 2023-10-04 10:10:41 +01:00
Alex Waygood 860e34eec9 Fix allowlist entries in asyncio.windows_events (#10824)
And fix the return value of return value of `IocpProactor.recvfrom_into()`, which was incorrect

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-10-02 16:04:11 +01:00
Alex Waygood efa7a51d09 Add a few missing things on Windows, py310+ (#10817) 2023-10-01 23:30:44 +01:00
Alex Waygood fecb84eb05 Update asyncio.tasks for py312 (#10669)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-09-06 12:35:48 +01:00
Kyle Altendorf 28d3ce2951 asyncio.wait() no longer allows awaitables in 3.11 (#10626)
https://docs.python.org/3.10/library/asyncio-task.html#asyncio.wait
> Run awaitable objects in the aws iterable concurrently and block until the condition specified by `return_when`.

https://docs.python.org/3.11/library/asyncio-task.html#asyncio.wait
> Run Future and Task instances in the aws iterable concurrently and block until the condition specified by `return_when`.
2023-08-29 10:56:44 +01:00
Joseph Courtney 2cd8f26e66 Add _loop, _tasks, and _on_task_done to the stub for asyncio.TaskGroup (#10612) 2023-08-28 16:02:40 +01:00
Dave Halter 40c639fcb0 The name param in asyncio.Task.__init__ is optional (#10615) 2023-08-25 13:42:53 -07:00
Nikita Sobolev 4990da6c60 Update asyncio.base_events for py312 (#10543) 2023-08-08 15:28:36 +01:00
Nikita Sobolev a5783555e8 asyncio.streams: py312 updates (#10542) 2023-08-08 08:33:37 +01:00
Nikita Sobolev 3968308e74 Update asyncio.constants module for python3.12 (#10535) 2023-08-06 15:30:55 +01:00
Nikita Sobolev 86218a52b7 Add get_context methods to asyncio in 3.12 (#10534) 2023-08-06 12:02:48 +01:00
Nikita Sobolev 81d1362247 Fix asyncio.Task.__init__ signature (#10532) 2023-08-04 15:12:51 +02:00
Sam Bull b325815f44 Fix type of Future._exception (#10502) 2023-07-24 14:49:13 -07:00