summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
Commit message (Collapse)AuthorAgeFilesLines
* 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
* bpo-34666: Implement stream.awrite() and stream.aclose() (GH-9274)Andrew Svetlov2018-09-131-1/+9
|
* bpo-34630: Skip logging SSL certificate errors by asyncio code (GH-9169)Andrew Svetlov2018-09-121-0/+3
|
* bpo-34638: Store a weak reference to stream reader to break strong ↵Andrew Svetlov2018-09-122-10/+86
| | | | | | | | references loop (GH-9201) Store a weak reference to stream readerfor breaking strong references It breaks the strong reference loop between reader and protocol and allows to detect and close the socket if the stream is deleted (garbage collected)
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-1112-98/+130
|
* bpo-34270: Make it possible to name asyncio tasks (GH-8547)Alex Grönholm2018-08-084-8/+41
| | | Co-authored-by: Antti Haapala <antti.haapala@anttipatterns.com>
* bpo-34263 Cap timeout submitted to epoll/select etc. to one day. (GH-8532)MartinAltmayer2018-07-311-1/+4
|
* bpo-33833: Fix ProactorSocketTransport AssertionError (#7893)twisteroid ambassador2018-07-301-0/+4
|
* bpo-34075: Deprecate non-ThreadPoolExecutor in loop.set_default_executor() ↵Elvis Pranskevichus2018-07-301-0/+6
| | | | | | | (GH-8533) Various asyncio internals expect that the default executor is a `ThreadPoolExecutor`, so deprecate passing anything else to `loop.set_default_executor()`.
* bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993)Yury Selivanov2018-06-291-4/+10
|
* bpo-30805: Avoid race condition with debug logging (GH-7545)Yury Selivanov2018-06-081-2/+4
| | | Supersedes https://github.com/python/cpython/pull/2490
* bpo-33694: Fix typo in helper function name (GH-7522)Victor Stinner2018-06-083-3/+3
| | | | | | _feed_data_to_bufferred_proto() renamed to _feed_data_to_buffered_proto() ("bufferred" => "buffered"). Typo spotted by Nathaniel J. Smith.
* bpo-33792: Add selector and proactor windows policies (GH-7487)Yury Selivanov2018-06-081-3/+8
|
* bpo-33694: Fix race condition in asyncio proactor (GH-7498)Victor Stinner2018-06-073-145/+73
| | | | | | | | | | | | | | | | The cancellation of an overlapped WSARecv() has a race condition which causes data loss because of the current implementation of proactor in asyncio. No longer cancel overlapped WSARecv() in _ProactorReadPipeTransport to work around the race condition. Remove the optimized recv_into() implementation to get simple implementation of pause_reading() using the single _pending_data attribute. Move _feed_data_to_bufferred_proto() to protocols.py. Remove set_protocol() method which became useless.
* bpo-33769: start_tls: Fix error message; cancel callbacks on error (GH-7403)Yury Selivanov2018-06-052-3/+6
| | | In addition to that, mark SSLTransport as "closed" in its "abort()" method to prevent bogus warnings.
* bpo-33734: asyncio/ssl: a bunch of bugfixes (#7321)Yury Selivanov2018-06-044-37/+39
| | | | | | | * Fix AttributeError (not all SSL exceptions have 'errno' attribute) * Increase default handshake timeout from 10 to 60 seconds * Make sure start_tls can be cancelled correctly * Make sure any error in SSLProtocol gets propagated (instead of just being logged)
* bpo-33238: Add InvalidStateError to concurrent.futures. (GH-7056)jhaydaman2018-05-301-6/+2
| | | | | | | Future.set_result and Future.set_exception now raise InvalidStateError if the futures are not pending or running. This mirrors the behavior of asyncio.Future, and prevents AssertionErrors in asyncio.wrap_future when set_result is called multiple times.
* Revert "bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)" (#7232)Yury Selivanov2018-05-301-7/+0
| | | This reverts commit 5d97b7bcc19496617bf8c448d2f149cc28c73bc7.
* bpo-32751: Wait for task cancellation in asyncio.wait_for() (GH-7216)Elvis Pranskevichus2018-05-291-2/+21
| | | | | | | | | | | | | | | | | | | | | | | Currently, asyncio.wait_for(fut), upon reaching the timeout deadline, cancels the future and returns immediately. This is problematic for when *fut* is a Task, because it will be left running for an arbitrary amount of time. This behavior is iself surprising and may lead to related bugs such as the one described in bpo-33638: condition = asyncio.Condition() async with condition: await asyncio.wait_for(condition.wait(), timeout=0.5) Currently, instead of raising a TimeoutError, the above code will fail with `RuntimeError: cannot wait on un-acquired lock`, because `__aexit__` is reached _before_ `condition.wait()` finishes its cancellation and re-acquires the condition lock. To resolve this, make `wait_for` await for the task cancellation. The tradeoff here is that the `timeout` promise may be broken if the task decides to handle its cancellation in a slow way. This represents a behavior change and should probably not be back-patched to 3.6 and earlier.
* bpo-32684: Fix gather to propagate cancel of itself with return_exceptions ↵Yury Selivanov2018-05-291-1/+13
| | | | (GH-7209)
* bpo-22087: Fix Policy.get_event_loop() to detect fork (GH-7208)Yury Selivanov2018-05-291-0/+7
| | | | Original patch by Dan O'Reilly.
* bpo-33353: test_asyncio use set_write_buffer_limits() (GH-7200)Victor Stinner2018-05-291-1/+1
| | | | | | | Use transport.set_write_buffer_limits() in sendfile tests of test_asyncio to make sure that the protocol is paused after sending 4 KiB. Previously, test_sendfile_fallback_close_peer_in_the_middle_of_receiving() failed on FreeBSD if the DATA was smaller than the default limit of 64 KiB.
* bpo-33654: Support protocol type switching in SSLTransport.set_protocol() ↵Yury Selivanov2018-05-291-4/+7
| | | | (#7194)
* bpo-33674: Pause the transport as early as possible (#7192)Yury Selivanov2018-05-291-2/+5
|
* bpo-33674: asyncio: Fix SSLProtocol race (GH-7175)Victor Stinner2018-05-281-1/+1
| | | | | | Fix a race condition in SSLProtocol.connection_made() of asyncio.sslproto: start immediately the handshake instead of using call_soon(). Previously, data_received() could be called before the handshake started, causing the handshake to hang or fail.
* bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172)Yury Selivanov2018-05-282-2/+9
|
* bpo-32610: Fix asyncio.all_tasks() to return only pending tasks. (GH-7174)Yury Selivanov2018-05-283-3/+16
|
* bpo-33469: RuntimeError after closing loop that used run_in_executor (GH-7171)Yury Selivanov2018-05-281-0/+3
|
* bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines (GH-7161)Yury Selivanov2018-05-282-40/+50
|
* bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)Yury Selivanov2018-05-286-26/+107
| | | | | | | | | | | In this commit: * Support BufferedProtocol in set_protocol() and start_tls() * Fix proactor to cancel readers reliably * Update tests to be compatible with OpenSSL 1.1.1 * Clarify BufferedProtocol docs * Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving * Rewrite test_start_tls_server_1
* bpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836)jimmylai2018-05-281-5/+5
|
* bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149)twisteroid ambassador2018-05-281-1/+1
| | | | | Fixed bug where calling write_eof() on a _SelectorSocketTransport after it's already closed raises AttributeError.
* bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450)Vlad Starostin2018-05-211-3/+9
| | | | | | | | | * bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450) Under particular circumstances _SelectorSocketTransport can try to add a reader even the transport is already being closed. This can lead to FD leak and invalid stated of the following connections. Fixed the SelectorSocketTransport to add the reader only if the trasport is still active.
* bpo-32262: Fix typo in f-string (GH-7016)Christian Heimes2018-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo from commit 6370f345e1d5829e1fba59cd695c8b82c5a8c620 Signed-off-by: Christian Heimes <christian@python.org> <!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. # Pull Request title It should be in the following format: ``` bpo-NNNN: Summary of the changes made ``` Where: bpo-NNNN refers to the issue number in the https://bugs.python.org. Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue. # Backport Pull Request title If this is a backport PR (PR made against branches other than `master`), please ensure that the PR title is in the following format: ``` [X.Y] <title from the original PR> (GH-NNNN) ``` Where: [X.Y] is the branch name, e.g. [3.6]. GH-NNNN refers to the PR number from `master`. --> <!-- issue-number: bpo-32262 --> https://bugs.python.org/issue32262 <!-- /issue-number -->
* bpo-33584: Fix several minor bugs in asyncio. (GH-7003)Serhiy Storchaka2018-05-201-1/+1
| | | | | | | | | | | | Fix the following bugs in the C implementation: * get_future_loop() silenced all exceptions raised when look up the get_loop attribute, not just an AttributeError. * enter_task() silenced all exceptions raised when look up the current task, not just a KeyError. * repr() was called for a borrowed link in enter_task() and task_step_impl(). * str() was used instead of repr() in formatting one error message (in Python implementation too). * There where few reference leaks in error cases.
* bpo-26819: Prevent proactor double read on resume (#6921)CtrlZvi2018-05-201-1/+7
| | | | | | | | | | The proactor event loop has a race condition when reading with pausing/resuming. `resume_reading()` unconditionally schedules the read function to read from the current future. If `resume_reading()` was called before the previously scheduled done callback fires, this results in two attempts to get the data from the most recent read and an assertion failure. This commit tracks whether or not `resume_reading` needs to reschedule the callback to restart the loop, preventing a second attempt to read the data.
* bpo-33332: Add signal.valid_signals() (GH-6581)Antoine Pitrou2018-05-041-2/+2
|
* Fix duplicating words words. (GH-6296)Serhiy Storchaka2018-03-281-1/+1
| | | Most of them have been added in 3.7.
* Fix senfile typo (#6265)Sam Dunster2018-03-281-1/+1
| | | * Also in docs
* bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044)Andrew Svetlov2018-03-101-1/+5
| | | | * Skip write()/data_received() if sslpipe is destroyed
* bpo-32622: Native sendfile on windows (#5565)Andrew Svetlov2018-02-252-1/+91
| | | * Support sendfile on Windows Proactor event loop naively.
* bpo-32841: Fix cancellation in awaiting asyncio.Condition (#5665)Bar Harel2018-02-141-1/+5
|