Commit Graph

207 Commits

Author SHA1 Message Date
Jelle Zijlstra 207e1c5cae
asyncio docs: Fix dangling hyphen (#102227)
Currently this gets rendered with a dangling hyphen.
2023-02-25 05:21:32 -08:00
Brian Skinn c4de6b1d52
gh-85747: Active voice & suggested edits, 'running/stopping loop' & 'callbacks' subsections of asyncio-eventloop.rst (#100270)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-06 21:25:42 -08:00
Serhiy Storchaka e5bd5ad70d
gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410)
Partially revert changes made in GH-93453.

asyncio.DefaultEventLoopPolicy.get_event_loop() now emits a
DeprecationWarning and creates and sets a new event loop instead of
raising a RuntimeError if there is no current event loop set.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2023-01-13 14:40:29 +02:00
Ben Darnell 5234e1cbea
gh-99830: asyncio: Document returns of remove_{reader,writer} (#100302) 2022-12-16 11:04:55 -08:00
Serhiy Storchaka fd38a2f0ec
gh-93453: No longer create an event loop in get_event_loop() (#98440)
asyncio.get_event_loop() now always return either running event loop or
the result of get_event_loop_policy().get_event_loop() call. The latter
should now raise an RuntimeError if no current event loop was set
instead of creating and setting a new event loop.

It affects also a number of asyncio functions and constructors which
call get_event_loop() implicitly: ensure_future(), shield(), gather(),
etc.

DeprecationWarning is no longer emitted if there is no running event loop but
the current event loop was set.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-12-06 18:42:12 +01:00
Brian Skinn bf26bdf6ac
gh-85747: "Preface" section of asyncio-eventloop.rst: Switch to active voice and suggest other edits (#99784) 2022-12-03 16:48:41 -08:00
Oleg Iarygin 898d0d9ad8
gh-92679: Clarify asyncio.loop.start_tls parameters (#92682) 2022-11-01 21:52:19 -07:00
Stanley 79fd6ccdbe
gh-85299: Add note warning about entry point guard for asyncio example (#93457) 2022-10-16 10:04:43 -07:00
Guido van Rossum 74ea204634
GH-88968: Add notes about socket ownership transfers (#97936) 2022-10-05 16:42:01 -07:00
Guido van Rossum 8079bef56f
GH-96704: Add {Task,Handle}.get_context(), use it in call_exception_handler() (#96756)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-10-04 23:49:10 -07:00
Kumar Aditya 53503ff60e
GH-82604: fix docs about configuring selector (#97755) 2022-10-04 09:45:37 -07:00
Kumar Aditya 575a253b5c
GH-82448: Add thread timeout for loop.shutdown_default_executor (#97561)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2022-09-28 10:39:42 -07:00
C.A.M. Gerlach cc0f3a10f0
gh-96377: Update asyncio policy doc intro paras to be clear and accurate (#97603)
Also fix up some cross-references in the asyncio docs.
2022-09-27 16:47:14 -07:00
zhanpon 53a54b781d
gh-96706: [doc] Don't recomment deprecated use of get_event_loop() in examples (#96707) 2022-09-11 12:56:30 -07:00
Pamela Fox a0ad63e70e
gh-93973: Add all_errors to asyncio.create_connection (#93974)
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-09-04 18:33:50 -07:00
Andrzej Bartosiński 141f2517fc
gh-95767: Fix grammatical error in asyncio loop.create_task docs (#95768) 2022-08-09 15:59:27 +02:00
Andrew Svetlov 9523c0d84f
bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API (GH-31837) 2022-03-14 13:54:13 +02:00
Alex Grönholm 9f04ee569c
bpo-46805: Add low level UDP socket functions to asyncio (GH-31455) 2022-03-13 18:42:29 +02:00
Kumar Aditya 41ddcd3f40
bpo-44011: Document ssl_shutdown_timeout added by revisited asyncio SSL implementation (GH-31597) 2022-02-26 15:06:43 +02:00
Serhiy Storchaka 2923d87ca2
bpo-46777: Fix incorrect use of directives in asyncio documentation (GH-31388) 2022-02-18 10:58:48 +02:00
Kumar Aditya cf15419a99
typos (#30239) 2021-12-23 12:25:12 +02:00
Kumar Aditya 71ef0b4c2b
bpo-46157: fix typo in docs (GH-30237) 2021-12-23 11:17:31 +02:00
Paul Bryan e09705f58f
Clarify new_event_loop return value. (GH-30078) 2021-12-13 14:39:22 +02:00
Rob f27bef3043
bpo-45896: Fix docs default asyncio event loop on Windows (GH-29857) 2021-12-01 14:24:46 +02:00
Jim Crist-Harif d71c7bc733
bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760)
Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.

Automerge-Triggered-By: GH:ericvsmith
2021-11-24 11:43:57 -08:00
Hugo van Kemenade 59ea704df7
bpo-45129 Remove deprecated reuse_address (GH-28207)
Due to significant security concerns, the reuse_address parameter of
asyncio.loop.create_datagram_endpoint, deprecated in Python 3.9, is
now removed. This is because of the behavior of the socket option
SO_REUSEADDR in UDP.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-09-08 18:58:43 +02:00
meowmeowmeowcat 3240bc62f4
bpo-44508: [Doc] Document failure mode for loop.call_soon_threadsafe (GH-27688)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-08-18 00:55:04 +02:00
Vinicius Gubiani Ferreira 6fa4060b86
[doc] Fix typo in asyncio Event Loop (GH-27377)
First Pull Request to cpython, so forgive me for any mistakes

Automerge-Triggered-By: GH:Mariatta
2021-07-26 20:01:00 -07:00
Illia Volochii ddd5f36971
bpo-43234: Prohibit non-ThreadPoolExecutor in loop.set_default_executor (GH-24540) 2021-07-01 17:46:49 +03:00
Zac Bentley 225caf78d1
Typo fix in asyncio-eventloop.rst (GH-26482) 2021-06-02 12:00:25 -03:00
Bruno b66a03a491
[doc] Fix typo in asyncio-eventloop documentation (GH-22311) 2021-05-19 22:18:42 +01:00
Serhiy Storchaka 172c0f2752
bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() (GH-23554)
asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop.
In future releases it will became an alias of asyncio.get_running_loop().
2021-04-25 13:40:44 +03:00
Andre Delfino dcc997cd28
[doc] Fix erroneous backslashes in signatures and names (GH-23658)
The issue being resolved is shown in the 3.10 docs (if you select docs for older versions you won't see a visual glitch).

The newer sphinx version that produces the 3.10 docs doesn't treat the backslash to escape things in some situations it previously did.
2020-12-16 17:37:28 -08:00
Shane Harvey a1652da2c8
Document optional 'task'/'asyncgen' fields in call_exception_handler (#21735) 2020-11-26 15:24:48 +02:00
Roger Iyengar a16d697049
Improve asyncio.loop.call_soon() documentation (GH-20883)
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-06-22 22:16:00 -04:00
idomic 8af4712a16
bpo-39128: Added algorithm description (GH-18624)
# [bpo-39128](https://bugs.python.org/issue39128): happy eyeballs description

# [3.9] 39128 - happy eyeballs description (GH-18624)
# [3.8] 39128 - happy eyeballs description (GH-18624)



https://bugs.python.org/issue39128
2020-02-24 06:59:40 -08:00
idomic 5305cc9dbf bpo-39128: Added happy_eyeballs_delay, interleave to function signature (GH-18315) 2020-02-10 10:48:40 +01:00
Victor Stinner b9783d2e03
bpo-39429: Add a new "Python Development Mode" doc page (GH-18132) 2020-01-24 10:22:18 +01:00
Andrew Svetlov 2c49becc69
Fix asyncio.get_event_loop() documentation (GH-18051)
Mention that the function implicitly creates new event loop only if called from the main thread.
2020-01-21 00:46:38 +02:00
Jesús Cea b0d4949f1f
Doc typo (#17667) 2019-12-20 03:21:03 +01:00
Kyle Stanley ab513a38c9 bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR (#17311) 2019-12-09 15:21:10 +01:00
Kyle Stanley f900064ac4 docs: Add asyncio source code links (GH-16640) 2019-10-10 19:18:46 -04:00
Yury Selivanov 6758e6e12a
bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482)
See https://bugs.python.org/issue38242 for more details
2019-09-29 21:59:55 -07:00
Kyle Stanley 9fdc64cf12 bpo-34037: Fix test_asyncio failure and add loop.shutdown_default_executor() (GH-15735) 2019-09-19 15:47:22 +03:00
Xtreak 6793cce155 bpo-36889: Document asyncio Stream and StreamServer (GH-14203) 2019-06-24 21:16:58 +03:00
Ben Darnell 9ffca670ed asyncio: Fix docs for default event loop (#14308)
When the Windows default event loop changed, `asyncio-policy.rst` was updated but `asyncio-eventloop.rst` was missed.
2019-06-22 10:38:20 -07:00
Łukasz Langa 7f9a2ae780
Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)" (#13802)
This reverts commit 0f0a30f4da.
2019-06-04 13:03:20 +02:00
Victor Stinner 0f0a30f4da
bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)
Add BaseEventLoop.wait_executor_on_close attribute: true by default.

loop.close() now waits for the default executor to finish by default.
Set loop.wait_executor_on_close attribute to False to not wait for
the executor.
2019-06-03 23:31:04 +02:00
Andrew Svetlov bafd4b5ac8 bpo-29883: Asyncio proactor udp (GH-13440)
Follow-up for #1067


https://bugs.python.org/issue29883
2019-05-28 02:52:15 -07:00
sbstp f0d4c64019 bpo-36686: Improve the documentation of the std* params in loop.subprocess_exec (GH-13586)
https://bugs.python.org/issue36686
2019-05-27 16:51:19 -07:00