summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* bpo-39764: Make Task.get_stack accept ag_frame (GH-18669)Miss Islington (bot)2020-03-021-3/+10
| | | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 4482337decdbd0c6e2150346a68b3616bda664aa) Co-authored-by: Lidi Zheng <scallopsky@gmail.com>
* bpo-38356: Fix ThreadedChildWatcher thread leak in test_asyncio (GH-16552)Miss Islington (bot)2020-01-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivation for this PR (comment from @vstinner in bpo issue): ``` Warning seen o AMD64 Ubuntu Shared 3.x buildbot: https://buildbot.python.org/all/GH-/builders/141/builds/2593 test_devnull_output (test.test_a=syncio.test_subprocess.SubprocessThreadedWatcherTests) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) ``` The following implementation details for the new method are TBD: 1) Public vs private 2) Inclusion in `close()` 3) Name 4) Coroutine vs subroutine method 5) *timeout* parameter If it's a private method, 3, 4, and 5 are significantly less important. I started with the most minimal implementation that fixes the dangling threads without modifying the regression tests, which I think is particularly important. I typically try to avoid directly modifying existing tests as much as possible unless it's necessary to do so. However, I am open to changing any part of this. https://bugs.python.org/issue38356 (cherry picked from commit 0ca7cc7fc0518c24dc9b78c38418e6064e64f148) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* [3.8] bpo-39191: Fix RuntimeWarning in asyncio test (GH-17863) (#17894)Andrew Svetlov2020-01-071-3/+3
| | | | | | https://bugs.python.org/issue39191. (cherry picked from commit 10ac0cded26d91c3468e5e5a87cecad7fc0bcebd) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.8] bpo-39191: Don't spawn a task before failing (GH-17796) (GH-17820)Andrew Svetlov2020-01-041-3/+7
| | | | | (cherry picked from commit 3a5de511596f17575de082dcb8d43d63b2bd2da9) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Fix import path for asyncio.TimeoutError (GH-17691)Miss Islington (bot)2019-12-241-2/+2
| | | | | (cherry picked from commit 025eeaa19607b2a80c979668dad405f567444573) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR ↵Miss Islington (bot)2019-12-091-7/+18
| | | | | | | (GH-17311) (#17529) (cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-39006: Fix asyncio when the ssl module is missing (GH-17524)Miss Islington (bot)2019-12-091-10/+10
| | | | | | | Fix asyncio when the ssl module is missing: only check for ssl.SSLSocket instance if the ssl module is available. (cherry picked from commit 82b4950b5e92bec343a436b3f9c116400b66e1b9) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.8] bpo-37404: Raising value error if an SSLSocket is passed to asyncio ↵Andrew Svetlov2019-12-071-0/+10
| | | | | | | | functions (GH-16457) (#17496) https://bugs.python.org/issue37404 (cherry picked from commit 892f9e0777f262d366d4747a54c33a1c15a49da6) Co-authored-by: idomic <michael.ido@gmail.com>
* bpo-38529: Fix asyncio stream warning (GH-17474)Miss Islington (bot)2019-12-071-18/+1
| | | | | (cherry picked from commit 7ddcd0caa4c2e6b43265df144f59c5aa508a94f2) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38785: Prevent asyncio from crashing (GH-17144)Miss Islington (bot)2019-11-131-1/+4
| | | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785 (cherry picked from commit dad6be5ffe48beb74fad78cf758b886afddc7aed) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-34679: ProactorEventLoop only uses set_wakeup_fd() in main thread (GH-16901)Miss Skeleton (bot)2019-10-231-3/+3
| | | | | | | bpo-34679, bpo-38563: asyncio.ProactorEventLoop.close() now only calls signal.set_wakeup_fd() in the main thread. (cherry picked from commit 1b53a24fb4417c764dd5933bce505f5c94249ca6) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)Miss Islington (bot)2019-10-031-2/+2
| | | | | (cherry picked from commit b23a8423a923077e4f83d3f328bb7542b4c940ed) Co-authored-by: idomic <michael.ido@gmail.com>
* Fix and improve `asyncio.run()` docs (GH-16403) (GH-16504)Miss Islington (bot)2019-10-011-5/+1
| | | | | (cherry picked from commit e407013089259e4c0b271703e1975bbcd578a2d5) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-38242: Revert "bpo-36889: Merge asyncio streams (GH-13251)" (#16482) ↵Yury Selivanov2019-09-303-1242/+112
| | | | | (#16485) See https://bugs.python.org/issue38242 for more details
* bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe ↵Miss Islington (bot)2019-09-291-0/+11
| | | | | | | (GH-16472) (cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) ↵Miss Islington (bot)2019-09-251-1/+1
| | | | | | | (GH-16383) (cherry picked from commit edad4d89e357c92f70c0324b937845d652b20afd) Co-authored-by: Yury Selivanov <yury@edgedb.com>
* bpo-38260: Add Docs on asyncio.run (GH-16337)Miss Islington (bot)2019-09-251-0/+4
| | | | | | | | | | Add docs about return and raise exception on asyncio.run https://bugs.python.org/issue38260 Automerge-Triggered-By: @asvetlov (cherry picked from commit 17deb16883fa574a86e42551cc37f044182347ad) Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
* [3.8] bpo-38148: Add slots to asyncio transports (GH-16077) (GH-16093)Andrew Svetlov2019-09-131-0/+14
| | | | | | | | | | * bpo-38148: Add slots to asyncio transports * Update Misc/NEWS.d/next/Library/2019-09-13-08-55-43.bpo-38148.Lnww6D.rst Co-Authored-By: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit 9eb35ab0d71a6bd680e84fa0f828cb634e72b681) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-36889: Document Stream class and add docstrings (GH-14488)Miss Islington (bot)2019-09-131-0/+21
| | | | | | | | | | | * This just copies the docs from `StreamWriter` and `StreamReader`. * Add docstring for asyncio functions. https://bugs.python.org/issue36889 Automerge-Triggered-By: @asvetlov (cherry picked from commit d31b31516c71890e8735606aec1dbf2bfb8fd6be) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Miss Islington (bot)2019-09-122-2/+30
| | | | | (cherry picked from commit a488879cbaf4b8b52699cadccf73bb4c271bcb29) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901)Andrew Svetlov2019-09-112-2/+2
| | | | | | https://bugs.python.org/issue36373 (cherry picked from commit 7264e92b718d307cc499b2f10eab7644b00f0499) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-38066: Hide internal Stream methods (GH-15762)Miss Islington (bot)2019-09-102-11/+48
| | | | | | | | feed_eof(), feed_data(), set_exception(), and set_transport() are prefixed with underscore now. https://bugs.python.org/issue38066 (cherry picked from commit 12c122ae958a55c9874ed4c7d7805ceb084411d7) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs ↵Miss Islington (bot)2019-09-101-0/+4
| | | | | | | | | | | | | | [queue] (GH-13950) This PR deprecate explicit loop parameters in all public asyncio APIs This issues is split to be easier to review. fourth step: queue.py https://bugs.python.org/issue36373 (cherry picked from commit 9008be303a89bfab8c3314c6a42330b5523adc8b) Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
* bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs ↵Miss Islington (bot)2019-09-101-12/+29
| | | | | | | | | | | | | | [locks] (GH-13920) This PR deprecate explicit loop parameters in all public asyncio APIs This issues is split to be easier to review. Third step: locks.py https://bugs.python.org/issue36373 (cherry picked from commit 537877d85d1c27d2c2f5189e39da64a7a0c413d3) Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
* Fix typos mostly in comments, docs and test names (GH-15209)Miss Islington (bot)2019-08-301-2/+2
| | | | | (cherry picked from commit 39d87b54715197ca9dcb6902bb43461c0ed701a2) Co-authored-by: Min ho Kim <minho42@gmail.com>
* bpo-34679: Restore instantiation Windows IOCP event loop from non-main ↵Miss Islington (bot)2019-08-261-1/+4
| | | | | | | | | | thread (GH-15492) * Restore running proactor event loop from non-main thread Co-Authored-By: Kyle Stanley <aeros167@gmail.com> (cherry picked from commit 1c0600998681295735a18690fae184b0c9a4ca51) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.8] Fix typos in docs, comments and test assert messages (GH-14872). (#14900)Kyle Stanley2019-07-221-1/+1
| | | | | (cherry picked from commit 96e12d5f4f3c5a20986566038ee763dff3c228a1) Co-authored-by: Min ho Kim <minho42@gmail.com>
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Miss Islington (bot)2019-06-301-29/+244
| | | | | | | non-main thread (GH-14344) (cherry picked from commit 0d671c04c39b52e44597491b893eb0b6c86b3d45) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Replace deprecation warning with RuntimeError (GH-14397)Miss Islington (bot)2019-06-271-4/+2
| | | | | (cherry picked from commit 97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.8] Use threadpool for reading from file in sendfile fallback mode ↵Andrew Svetlov2019-06-151-1/+1
| | | | | | | (GH-14076) (GH-14102) (cherry picked from commit 0237265e8287141c40faa8719da3a2d21d511d0d) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-37279: Fix asyncio sendfile support when extra data are sent in ↵Miss Islington (bot)2019-06-151-2/+2
| | | | | | | fallback mode. (GH-14075) (cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971)Miss Islington (bot)2019-06-111-6/+32
| | | | | | | | If internal tasks weak set is changed by another thread during iteration. https://bugs.python.org/issue36607 (cherry picked from commit 65aa64fae89a24491aae84ba0329eb8f3c68c389) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-34767: Do not always create a collections.deque() in asyncio.Lock() ↵Miss Islington (bot)2019-06-051-2/+7
| | | | | | | | (GH-13834) https://bugs.python.org/issue34767 (cherry picked from commit 9aa78566fbeeb8cdaa669ad22f92cf63765f4135) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs ↵Miss Islington (bot)2019-06-051-0/+16
| | | | | | | | | | | | | | [streams] (GH-13671) This PR deprecate explicit loop parameters in all public asyncio APIs This issues is split to be easier to review. Second step: streams.py https://bugs.python.org/issue36373 (cherry picked from commit 6d64a8f49eb321116f585c4b036c81bb976d2d5c) Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
* Revert "bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close ↵Łukasz Langa2019-06-041-3/+1
| | | | | (GH-13786)" (#13802) This reverts commit 0f0a30f4da4b529e0f7df857b9f575b231b32758.
* Revert "bpo-35621: Support running subprocesses in asyncio when loop is ↵Andrew Svetlov2019-06-041-212/+28
| | | | | executed in non-main thread (#13630)" (GH-13793) https://bugs.python.org/issue35621
* bpo-34037, asyncio: add BaseEventLoop.wait_executor_on_close (GH-13786)Victor Stinner2019-06-031-1/+3
| | | | | | | 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.
* Fix typos in docs and docstrings (GH-13745)Xtreak2019-06-021-1/+1
|
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-021-28/+212
| | | | non-main thread (#13630)
* bpo-36999: Add asyncio.Task.get_coro() (GH-13680)Alex Grönholm2019-05-301-0/+3
| | | https://bugs.python.org/issue36999
* bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)依云2019-05-291-5/+0
| | | | | | | | | Drop isinstance checks from create_subprocess_exec function and let subprocess module do them. https://bugs.python.org/issue35246 https://bugs.python.org/issue35246
* bpo-29883: Asyncio proactor udp (GH-13440)Andrew Svetlov2019-05-282-16/+199
| | | | | | Follow-up for #1067 https://bugs.python.org/issue29883
* bpo-36686: Improve the documentation of the std* params in ↵sbstp2019-05-271-1/+18
| | | | | loop.subprocess_exec (GH-13586) https://bugs.python.org/issue36686
* bpo-36889: Merge asyncio streams (GH-13251)Andrew Svetlov2019-05-274-155/+1156
| | | https://bugs.python.org/issue36889
* bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') ↵Yury Selivanov2019-05-274-6/+215
| | | | | | | | | | (GH-13530) Return a safe to use proxy socket object from `transport.get_extra_info('socket')` https://bugs.python.org/issue37027
* bpo-37035: Don't log OSError (GH-13548)Andrew Svetlov2019-05-275-11/+4
| | | https://bugs.python.org/issue37035
* bpo-32528: Make asyncio.CancelledError a BaseException. (GH-13528)Yury Selivanov2019-05-2712-53/+130
| | | | | | | | | | | | | | | This will address the common mistake many asyncio users make: an "except Exception" clause breaking Tasks cancellation. In addition to this change, we stop inheriting asyncio.TimeoutError and asyncio.InvalidStateError from their concurrent.futures.* counterparts. There's no point for these exceptions to share the inheritance chain. In 3.9 we'll focus on implementing supervisors and cancel scopes, which should allow better handling of all exceptions, including SystemExit and KeyboardInterrupt
* bpo-37028: asyncio REPL; activated via 'python -m asyncio'. (GH-13472)Yury Selivanov2019-05-271-0/+125
| | | | | This makes it easy to play with asyncio APIs with simply using async/await in the REPL.
* bpo-36932: use proper deprecation-removed directive (GH-13349)Matthias Bussonnier2019-05-211-8/+8
| | | | | | | | .. And update some deprecation warnings with version numbers. https://bugs.python.org/issue36932
* bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails ↵Niklas Fiekas2019-05-201-6/+12
| | | | | | | | (GH-11553) This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it. https://bugs.python.org/issue35721