| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit 3a5de511596f17575de082dcb8d43d63b2bd2da9)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
| |
(GH-17311) (GH-17570)
(cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
functions (GH-16457)
https://bugs.python.org/issue37404
(cherry picked from commit 892f9e0777f262d366d4747a54c33a1c15a49da6)
Co-authored-by: idomic <michael.ido@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit b23a8423a923077e4f83d3f328bb7542b4c940ed)
Co-authored-by: idomic <michael.ido@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit e407013089259e4c0b271703e1975bbcd578a2d5)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
|
|
|
| |
(GH-16472)
(cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
fallback mode. (GH-14075). (GH-14103)
(cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 0237265e8287141c40faa8719da3a2d21d511d0d)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
https://bugs.python.org/issue37035.
(cherry picked from commit 1f39c28e489cca0397fc4c3675d13569318122ac)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
(GH-11553)
This slightly expands an existing test case `test_popen_error` to trigger a `ResourceWarning` and fixes it.
https://bugs.python.org/issue35721
(cherry picked from commit 9932fd91e878b740704ff599522e945a4bbe2ae1)
Co-authored-by: Niklas Fiekas <niklas.fiekas@backscattering.de>
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit ac8eb8f36bf7ca636f8d886eb65a3b532f4725d5)
Co-authored-by: Erwan Le Pape <lepaperwan@users.noreply.github.com>
|
|
|
|
|
| |
transport (GH-13098)" (GH-13328)
This reverts commit 93aa57ac6594d1cc30d147720fc8a7a4e1ca2d3e.
|
|
|
|
|
|
|
|
| |
(GH-13098)
https://bugs.python.org/issue36801
(cherry picked from commit 1cc0ee7d9f6a2817918fafd24c18d8bb093a85d3)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
(cherry picked from commit b35acc5b3a0148c5fd4462968b310fb436726d5a)
Co-authored-by: Romain Picard <romain.picard@oakbits.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*Moved from python/asyncioGH-493.*
This PR fixes issue python/asyncioGH-480, as explained in [this comment](https://github.com/python/asyncio/issues/480GH-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
(cherry picked from commit 63deaa5b70108ef441c57728322da6b4321db4fc)
Co-authored-by: Vincent Michel <vxgmichel@gmail.com>
|
|
|
|
|
|
|
|
| |
Call remove_done_callback() in finally block.
https://bugs.python.org/issue36613
(cherry picked from commit c1964e9e2177eabe821f3e4243be8b99e0d2d542)
Co-authored-by: gescheit <gescheit12@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix handshake timeout leak in asyncio/sslproto
Refs MagicStack/uvloopGH-222
* Break circular ref _SSLPipe <-> SSLProtocol
* bpo-34745: Fix asyncio ssl memory leak
* Break circular ref SSLProtocol <-> UserProtocol
* Add NEWS entry
(cherry picked from commit f683f464259715d620777d7ed568e701337a703a)
Co-authored-by: Fantix King <fantix.king@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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().
(cherry picked from commit c9f872b0bdce5888f1879fa74e098bf4a05430c5)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* IocpProactor: prevent modification if closed (GH-11494)
* _wait_for_handle(), _register() and _unregister() methods of
IocpProactor now raise an exception if closed
* Add "closed" to IocpProactor.__repr__()
* Simplify IocpProactor.close()
(cherry picked from commit 9b07681c09182d4b9d23cd52566a4992b8afecbb)
* bpo-34323: Enhance IocpProactor.close() log (GH-11555)
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.
(cherry picked from commit b1e45739d832e1e402a563c6727defda92e193b7)
* bpo-34323: Enhance IocpProactor.close() log again (GH-11563)
Add repr(self) to the log to display the number of pending overlapped
in the log.
(cherry picked from commit b91140fdb17472d03a7b7971f143c08a40fde923)
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 80fda712c83f5dd9560d42bf2aa65a72b18b7759)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
|
| |
(GH-10872)
* bpo-35380: Enable TCP_NODELAY for proactor event loop (GH-10867)
(cherry picked from commit 3bc0ebab17bf5a2c29d2214743c82034f82e6573)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-9837) (GH-9849)
https://bugs.python.org/issue34970
(cherry picked from commit 97cf0828727ac2a269c89c5aa09570a69a22c83c)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit c880ffe7d2ce2fedb1831918c8a36e3623e0fb76)
Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
|
|
|
|
| |
(GH-8532) (GH-8586)
|
|
|
|
|
| |
(cherry picked from commit 9045199c5aaeac9b52537581be127d999b5944ee)
Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit d904c238ca3551750cb97d15d827c3e525970867)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
| |
Supersedes https://github.com/python/cpython/pull/2490
(cherry picked from commit 12f482e0ae33021c04264294f33fa6baa9617cec)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
|
|
| |
_feed_data_to_bufferred_proto() renamed to
_feed_data_to_buffered_proto() ("bufferred" => "buffered").
Typo spotted by Nathaniel J. Smith.
(cherry picked from commit ff6c07729211fb98431a2793e074d07a21e0650a)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit 8f4042964d5b0ddf5cdf87862db962ba64e3f64a)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 79790bc35fe722a49977b52647f9b5fe1deda2b7)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
|
| |
(GH-7428)
In addition to that, mark SSLTransport as "closed" in its "abort()" method to prevent bogus warnings.
(cherry picked from commit 415bc46a78e785f357c8960ae70f18a6b6cccbb6)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
|
|
|
| |
* 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)
(cherry picked from commit 9602643120a509858d0bee4215d7f150e6125468)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
| |
(GH-7233)
This reverts commit 2a7eb0b531656f4a77d85078e6e009e4b3639ef9.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit e2b340ab4196e1beb902327f503574b5d7369185)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
|
|
|
|
|
|
|
| |
(GH-7209) (#7222)
(cherry picked from commit 863b6749093a86810c4077112a857363410cc221)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
| |
Original patch by Dan O'Reilly.
(cherry picked from commit 5d97b7bcc19496617bf8c448d2f149cc28c73bc7)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 9551f7719213243fd96c4f284079243773c26b3c)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
|
|
| |
(GH-7194)
(cherry picked from commit 2179022d94937d7b0600b0dc192ca6fa5f53d830)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
| |
(cherry picked from commit f295587c45f96b62d24f9a12cef6931b0805f596)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit be00a5583a2cb696335c527b921d1868266a42c6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit 7165754b6b5f3b7c07050d921fa1c58bba5f0ff1)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
| |
(cherry picked from commit 416c1ebd9896b394790dcb4f9f035b1a44ebe9ff)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
| |
(cherry picked from commit fdccfe09f0b10776645fdb04a0783d6864c32b21)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
| |
(GH-7173)
(cherry picked from commit 989b9e0e6d7dd2fa911f9bfd4744e7f3a82d6006)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
(cherry picked from commit dbf102271fcc316f353c7e0a283811b661d128f2)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
|
|
|
|
|
|
| |
(GH-6836) (#7162)
(cherry picked from commit e549c4be5fb010f5faf12236af8faa720a1429be)
Co-authored-by: jimmylai <albert_chs@yahoo.com.tw>
|