| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Co-authored-by: tirkarthi
(cherry picked from commit 1988344a6bff253f017e053f69318ecf03587294)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-17311) (GH-17570)
(cherry picked from commit ab513a38c98695f271e448fe2cb7c5e39eeaaaaf)
Co-authored-by: Kyle Stanley <aeros167@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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
main() is now responsible to send the ANSWER, rather than
ServerProto. main() now waits until it got the HELLO before sending
the ANSWER over the new transport.
Previously, there was a race condition between main() replacing the
protocol and the protocol sending the ANSWER once it gets the HELLO.
TLSv1.3 was disabled for the test: reenable it.
(cherry picked from commit fab4ef2df0857ab0c97f3058ac5ec3280c4eb891)
|
| |
|
|
|
|
|
| |
(GH-16472)
(cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
| |
This reverts commit e34b5f4d6483187969d5149c801d056b72ef2ddb.
|
| |
|
| |
(cherry picked from commit 8f4ef3b019ce380022018587571b0f970e668de3)
|
| |
|
|
|
|
|
| |
(GH-14188) (GH-14192)
(cherry picked from commit a514f782b822bd7bca7c8d78be7bd53bc25c1908)
Co-authored-by: Ned Deily <nad@python.org>
|
| |
|
|
|
|
|
|
| |
bpo-35031, bpo-35998: Reintroduce workaround on Windows and FreeBSD
in test_start_tls_server_1() of test_asyncio: disable TLS v1.3 on the
client context.
(cherry picked from commit c034b7824f5a7c50f2946ab3931633200e31d903)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
| |
|
|
|
|
|
| |
fallback mode. (GH-14075). (GH-14103)
(cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
| |
(GH-14080) (GH-14086)
(cherry picked from commit f0749da9a535375f05a2015e8960e8ae54877349)
|
| |
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
| |
SelectorEventLoopUnixSockSendfileTests (GH-11338)
There is a race condition in SelectorEventLoopUnixSockSendfileTests that causes the prepare() method return a non connected server protocol, making the cleanup() method skips the correct handling of the transport. This commit makes prepare() always return a connected server protocol that can always be cleaned up correctly.
(cherry picked from commit d51324a2f5d172665f8824b25456c9822797fc84)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-11337)
There is a race condition regarding signal delivery in test_signal_handling_args for
test_asyncio.test_events.KqueueEventLoopTests. The signal can be received at any moment outside the time window provided in the test. The fix is to wait for the signal to be received instead with a bigger timeout.
(cherry picked from commit 5471420faa84519530f29b08f2b042b2288e3e96)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
| |
(GH-11175)
(cherry picked from commit 842acaab1376c5c84fd5966bb6070e289880e1ca)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Replace time.time() with time.monotonic() in tests to measure time
delta.
test_zipfile64: display progress every minute (60 secs) rather than
every 5 minutes (5*60 seconds).
(cherry picked from commit 2cf4c202ffeb30787c944365ba54013688b854c2)
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
directory (GH-10826) (GH-10834)
* bpo-35352: test_asyncio uses the certificate set from the test directory (GH-10826)
Modify asyncio tests to utilize the certificates from the test directory
instead of its own set, as they are the same and with each update they had
to be updated as well.
(cherry picked from commit b062ba77b617b0f89b7ea25d14cc77c991462ad4)
* bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)
'here' variable is no longer needed.
(cherry picked from commit 7212148c95947b0fdfcb0c8e37d4357287bdb4bd)
|
| |
|
|
|
|
| |
Some FreeBSD buildbots fail to run this test as the eof was not being received by the server if the size is not big enough. This behaviour only appears if the client is using TLS1.3.
(cherry picked from commit f6a47f3e316cede2a07a1f74a509f6d80ab8fef0)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit c880ffe7d2ce2fedb1831918c8a36e3623e0fb76)
Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-9679) (GH-9691)
The C implementation of asyncio.Task currently fails to perform the
cancellation cleanup correctly in the following scenario.
async def task1():
async def task2():
await task3 # task3 is never cancelled
asyncio.current_task().cancel()
await asyncio.create_task(task2())
The actuall error is a hardcoded call to `future_cancel()` instead of
calling the `cancel()` method of a future-like object.
Thanks to Vladimir Matveev for noticing the code discrepancy and to
Yury Selivanov for coming up with a pathological scenario..
(cherry picked from commit 548ce9dedd2e90945970671d441436a6a91608ab)
Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
https://bugs.python.org/issue34872
|
| |
|
|
|
|
|
|
|
|
|
| |
transport.get_extra_info('sockname') (GH-8907) (#9286)
* [3.7] Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') (GH-8907).
(cherry picked from commit 413118ebf3162418639a5c4af14b02d26571a02c)
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
* Update test_events.py
|
| |
|
|
|
|
|
|
|
|
| |
Update all test certs and keys to use future proof crypto settings:
* 3072 bit RSA keys
* SHA-256 signature
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e6dac0077996b1e1f886f036d6f2606237fa4c85)
|
| |
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
| |
_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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-33789: test_asyncio: Fix ResourceWarning (GH-7460)
* Close sockets and streams to fix ResourceWarning warnings
* Catch also OSError to hide a traceback on an expected handshake
error
(cherry picked from commit 0eba7c39132614a5730cda6b340e18dfb2d30d14)
* bpo-33789, test_asyncio: Hide PendingDeprecationWarning (GH-7461)
Hide PendingDeprecationWarning in test__register_task_3().
(cherry picked from commit 7ed61e9431ee2c191aeeeb26f86a71bb90ab99fd)
* bpo-32676, test_asyncio: Fix warning in test_error_in_call_soon() (GH-7462)
Fix "<CoroWrapper ...> was never yielded from" warning in
PyTask_PyFuture_Tests.test_error_in_call_soon() of
test_asyncio.test_tasks.
Close manually the coroutine on error.
(cherry picked from commit 9f04f0df6fdb27190690bda949d213893d14e807)
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
| |
(cherry picked from commit 6f75bae74866b6acf638e3aa610d830d55b7e314)
Co-authored-by: Yury Selivanov <yury@magic.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
| |
(cherry picked from commit 4fadf0c639476fa50a40ec6f119f98c01e56ad95)
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 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>
|