summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* 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
* bpo-35545: Fix asyncio discarding IPv6 scopes (GH-11271)Erwan Le Pape2019-05-171-3/+3
| | | | | | | | This PR proposes a solution to [bpo-35545](https://bugs.python.org/issue35545) by adding an optional `flowinfo` and `scopeid` to `asyncio.base_events._ipaddr_info` to carry the full address information into `_ipaddr_info` and avoid discarding IPv6 specific information. Changelog entry & regression tests to come. https://bugs.python.org/issue35545
* bpo-36921: Deprecate @coroutine for sake of async def (GH-13346)Andrew Svetlov2019-05-163-4/+14
| | | | | | The second attempt. Now deprecate `@coroutine` only, keep `yield from fut` as is. https://bugs.python.org/issue36921
* bpo-35589: Prevent buffer copy in sock_sendall() (GH-11418)Andrew Svetlov2019-05-161-7/+10
| | | | | | No NEWs is needed since the problem was introduced on master only and never released. https://bugs.python.org/issue35589
* bpo-36801: Temporarily fix regression in writer.drain() (#13330)Andrew Svetlov2019-05-141-3/+1
|
* bpo-36916: asyncio: Swallow unhandled write() exception (GH-13313)Andrew Svetlov2019-05-141-1/+10
|
* bpo-36802: Drop awrite()/aclose(), support await write() and await close() ↵Andrew Svetlov2019-05-091-8/+27
| | | | instead (#13099)
* bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport ↵Andrew Svetlov2019-05-072-8/+22
| | | | | (GH-13098) https://bugs.python.org/issue36801
* bpo-35125: remove inner callback on outer cancellation in asyncio shield ↵Romain Picard2019-05-071-2/+8
| | | | | | | | | | | | | | (GH-10340) When the future returned by shield is cancelled, its completion callback of the inner future is not removed. This makes the callback list of inner inner future grow each time a shield is created and cancelled. This change unregisters the callback from the inner future when the outer future is cancelled. https://bugs.python.org/issue35125
* bpo-31922: Do not connect UDP sockets when broadcast is allowed (GH-423)Vincent Michel2019-05-072-7/+13
| | | | | | | | | | | | *Moved from python/asyncio#493.* This PR fixes issue python/asyncio#480, as explained in [this comment](https://github.com/python/asyncio/issues/480#issuecomment-278703828). The `_SelectorDatagramTransport.sendto` method has to be modified ~~so `_sock.sendto` is used in all cases (because it is tricky to reliably tell if the socket is connected or not). Could that be an issue for connected sockets?~~ *EDIT* ... so `_sock.send` is used only if `_sock` is connected. It also protects `socket.getsockname` against `OSError` in `_SelectorTransport`. This might happen on Windows if the socket is not connected (e.g. for UDP broadcasting). https://bugs.python.org/issue31922
* Forbid creating of stream objects outside of asyncio (#13101)Andrew Svetlov2019-05-072-26/+73
|
* bpo-33530: Implement Happy Eyeballs in asyncio, v2 (GH-7237)twisteroid ambassador2019-05-053-37/+238
| | | | | | | | | | Added two keyword arguments, `delay` and `interleave`, to `BaseEventLoop.create_connection`. Happy eyeballs is activated if `delay` is specified. We now have documentation for the new arguments. `staggered_race()` is in its own module, but not exported to the main asyncio package. https://bugs.python.org/issue33530
* bpo-24638: Improve the error message in asyncio.ensure_future() (#12848)Zackery Spytz2019-05-031-1/+2
|
* bpo-36613: call remove_done_callback if exception (GH-12800)gescheit2019-05-031-1/+2
| | | | | | Call remove_done_callback() in finally block. https://bugs.python.org/issue36613
* bpo-34139: Remove unix datagram socket from FS before binding (GH-8323)Quentin Dawans2019-04-091-0/+14
| | | https://bugs.python.org/issue34139
* asyncio: PendingDeprecationWarning -> DeprecationWarning (GH-12494)Inada Naoki2019-03-221-2/+2
| | | `Task.current_task()` and `Task.all_tasks()` will be removed in 3.9.
* bpo-34745: Fix asyncio sslproto memory issues (GH-12386)Fantix King2019-03-171-0/+4
| | | | | | | | | | | | | | * Fix handshake timeout leak in asyncio/sslproto Refs MagicStack/uvloop#222 * Break circular ref _SSLPipe <-> SSLProtocol * bpo-34745: Fix asyncio ssl memory leak * Break circular ref SSLProtocol <-> UserProtocol * Add NEWS entry
* asyncio: use dict instead of OrderedDict (GH-11710)Inada Naoki2019-02-051-1/+1
|
* bpo-23846: Fix ProactorEventLoop._write_to_self() (GH-11566)Victor Stinner2019-01-151-1/+7
| | | | | | asyncio.ProactorEventLoop now catchs and logs send errors when the self-pipe is full: BaseProactorEventLoop._write_to_self() now catchs and logs OSError exceptions, as done by BaseSelectorEventLoop._write_to_self().
* bpo-11555: Enhance IocpProactor.close() log again (GH-11563)Victor Stinner2019-01-151-3/+2
| | | | Add repr(self) to the log to display the number of pending overlapped in the log.
* bpo-34323: Enhance IocpProactor.close() log (GH-11555)Victor Stinner2019-01-151-3/+15
| | | | | IocpProactor.close() now uses time to decide when to log: wait 1 second before the first log, then log every second. Log also the number of seconds since close() was called.
* asyncio: __del__() keep reference to warnings.warn (GH-11491)Victor Stinner2019-01-107-24/+16
| | | | | | | | | | | | | | | * asyncio: __del__() keep reference to warnings.warn The __del__() methods of asyncio classes now keep a strong reference to the warnings.warn() to be able to display the ResourceWarning warning in more cases. Ensure that the function remains available if instances are destroyed late during Python shutdown (while module symbols are cleared). * Rename warn parameter to _warn "_warn" name is a hint that it's not the regular warnings.warn() function.
* IocpProactor: prevent modification if closed (GH-11494)Victor Stinner2019-01-101-6/+22
| | | | | | * _wait_for_handle(), _register() and _unregister() methods of IocpProactor now raise an exception if closed * Add "closed" to IocpProactor.__repr__() * Simplify IocpProactor.close()
* bpo-35682: Fix _ProactorBasePipeTransport._force_close() (GH-11462)Victor Stinner2019-01-081-1/+1
| | | | | | | bpo-32622, bpo-35682: Fix asyncio.ProactorEventLoop.sendfile(): don't attempt to set the result of an internal future if it's already done. Fix asyncio _ProactorBasePipeTransport._force_close(): don't set the result of _empty_waiter if it's already done.
* bpo-23057: Use 'raise' to emulate ctrl-c in proactor tests (#11274)Vladimir Matveev2019-01-051-0/+5
|
* bpo-23057: add loop self socket as wakeup fd for signals (#11135)Vladimir Matveev2018-12-182-1/+14
|
* bpo-35394: Add empty slots to abstract asyncio protocols (#10889)Andrew Svetlov2018-12-111-0/+10
| | | | | | * bpo-35394: Add empty slots to abstract asyncio protocols * Add missing test file
* bpo-35380: Enable TCP_NODELAY for proactor event loop (#10867)Andrew Svetlov2018-12-033-13/+17
|
* bpo-35202: Remove unused imports in Lib directory (GH-10450)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-151-1/+0
|
* bpo-30064: Refactor sock_* asyncio API (#10419)Andrew Svetlov2018-11-121-40/+49
|
* bpo-35065: Remove `StreamReaderProtocol._untrack_reader` (#10212)Vincent Michel2018-11-082-11/+0
| | | | | The call to `_untrack_reader` is performed too soon, causing the protocol to forget about the reader before `connection_lost` can run and feed the EOF to the reader. See bpo-35065.
* bpo-34970: Protect tasks weak set manipulation in asyncio.all_tasks() (GH-9837)Andrew Svetlov2018-10-131-2/+6
| | | https://bugs.python.org/issue34970
* bpo-34769: Thread safety for _asyncgen_finalizer_hook(). (GH-9716)twisteroid ambassador2018-10-091-4/+1
|
* bpo-34849: Don't log wating for selector.select in asyncio loop iteration ↵Andrew Svetlov2018-09-301-22/+1
| | | | | | | | | | (GH-9641) The waiting is pretty normal for any asyncio program, logging its time just adds a noise to logs without any useful information provided. https://bugs.python.org/issue34849
* asyncio/docs: Replace Python 4.0 -> 3.10 (GH-9579)Yury Selivanov2018-09-251-6/+6
|
* bpo-34687: Make asynico use ProactorEventLoop by default (GH-9538)Victor Stinner2018-09-251-1/+1
|
* bpo-34728: Remove deprecate *loop* argument in asyncio.sleep (GH-9415)João Júnior2018-09-241-3/+16
| | | | | | | | | | | | | | | | * Insert the warn in the asyncio.sleep when the loop argument is used * Insert the warn in the asyncio.wait and asyncio.wait_for when the loop argument is used * Better format of the code * Add news file * change calls for get_event_loop() to calls for get_running_loop() * Change message to be more clear in News * Improve the comments in test_tasks