| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
(GH-124039) (#124067)
gh-122957: Fix test flakiness in asyncio test in free-thread build (GH-124039)
(cherry picked from commit eadb9660ed836b40667d4f662eae90287ff18397)
Co-authored-by: Loïc Estève <loic.esteve@ymail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Linux >= 6.10 (GH-120227) (#123421)
gh-120226: Fix test_sendfile_close_peer_in_the_middle_of_receiving on Linux >= 6.10 (GH-120227)
The worst case is that the kernel buffers 17 pages with a page size of 64k.
(cherry picked from commit a7584245661102a5768c643fbd7db8395fd3c90e)
Co-authored-by: Xi Ruoyao <xry111@xry111.site>
|
| |
|
|
|
|
|
|
| |
than advertised (GH-123423) (#123443)
gh-122136: test_asyncio: Don't fail if the kernel buffers more data than advertised (GH-123423)
(cherry picked from commit b379f1b26c1e89c8e9160b4dede61b980cc77be6)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
| |
|
|
|
| |
`_asyncio.FutureIter` (#122837)
* Backport #122834 for 3.13
|
| |
|
|
|
|
|
|
| |
(GH-122338) (#122344)
gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (GH-122338)
(cherry picked from commit c08696286f52d286674f264eecf7b33a335a890b)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(GH-122189) (#122263)
gh-122187: Avoid TSan reported race in `run_udp_echo_server` (GH-122189)
TSan doesn't fully recognize the synchronization via I/O, so ensure that
socket name is retrieved earlier and use a different socket for sending
the "STOP" message.
(cherry picked from commit 2f74b709b637cad7a9c18a2d90b0747823f2ff51)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
| |
|
|
|
|
|
| |
These tests fail when run under thread sanitizer due to the use of fork
and threads.
(cherry picked from commit 64e221d7ada8f6c20189035c7e81503f4c914f04)
Co-authored-by: Sam Gross <colesbury@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-121126) (#121194)
gh-87744: fix waitpid race while calling send_signal in asyncio (GH-121126)
asyncio earlier relied on subprocess module to send signals to the process, this has some drawbacks one being that subprocess module unnecessarily calls waitpid on child processes and hence it races with asyncio implementation which internally uses child watchers. To mitigate this, now asyncio sends signals directly to the process without going through the subprocess on non windows systems. On Windows it fallbacks to subprocess module handling but on windows there are no child watchers so this issue doesn't exists altogether.
(cherry picked from commit bd473aa598c5161521a7018896dc124728214a6c)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
| |
|
|
|
|
|
|
| |
gh-121025: Improve partialmethod.__repr__ (GH-121033)
It no longer contains redundant commas and spaces.
(cherry picked from commit d2646e3f45e3e4e831ee2ae84d55b161a361d592)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
ensure that the given socket is in non-blocking mode (GH-119519) (#119912)
(cherry picked from commit cf3bba3f0671d2c9fee099e3ab0f78b98b176131)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
|
| |
|
|
|
|
|
|
| |
(#119206)
gh-119121: Fix and test `async.staggered.staggered_race` (GH-119173)
(cherry picked from commit 16b46ebd2b0025aa461fdfc95fbf98a4f04b49e6)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| |
|
|
|
|
|
| |
(GH-119065) (GH-119087)
(cherry picked from commit 0152dc4ff5534fa2948b95262e70ff6b202b9b99)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
gh-16429 introduced support for an iterable of separators in
Stream.readuntil. Since bytes-like types are themselves iterable, this
can introduce ambiguities in deciding whether the argument is an
iterator of separators or a singleton separator. In gh-16429, only 'bytes'
was considered a singleton, but this will break code that passes other
buffer object types.
Fix it by only supporting tuples rather than arbitrary iterables.
Closes gh-117722.
|
| |
|
|
|
|
|
|
|
|
| |
This prevents external cancellations of a task group's parent task to
be dropped when an internal cancellation happens at the same time.
Also strengthen the semantics of uncancel() to clear self._must_cancel
when the cancellation count reaches zero.
Co-Authored-By: Tin Tvrtković <tinchester@gmail.com>
Co-Authored-By: Arthur Tacca
|
| | |
|
| |
|
| |
Co-authored-by: Duprat <yduprat@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
| |
* as_completed returns object that is both iterator and async iterator
* Existing tests adjusted to test both the old and new style
* New test to ensure iterator can be resumed
* New test to ensure async iterator yields any passed-in Futures as-is
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Relax error string text expectations in SSL-related tests
As suggested [here][1], this change relaxes the OpenSSL error string
text expectations in a number of tests. This was specifically done in
support of more easily building CPython [AWS-LC][2], but because AWS-LC
is a fork of [BoringSSL][3], it should increase compatibility with that
library as well.
In addition to the error string relaxations, we also add some guards
around the `tls-unique` channel binding being used with TLSv1.3, as that
feature (described in [RFC 6929][4]) is [not defined][5] for TLSv1.3.
[1]: https://discuss.python.org/t/support-building-ssl-and-hashlib-modules-against-aws-lc/44505/4
[2]: https://github.com/aws/aws-lc
[3]: https://github.com/google/boringssl
[4]: https://datatracker.ietf.org/doc/html/rfc5929#section-3
[5]: https://datatracker.ietf.org/doc/html/rfc8446#appendix-C.5
|
| |
|
|
| |
early by asyncio (GH-116774)
|
| |
|
|
|
|
|
| |
These give applications the option of more forcefully terminating client
connections for asyncio servers. Useful when terminating a service and
there is limited time to wait for clients to finish up their work.
This is a do-over with a test fix for gh-114432, which was reverted.
|
| |
|
|
|
|
|
|
|
|
| |
(#114432)" (#116632)
Revert "gh-113538: Add asycio.Server.{close,abort}_clients (#114432)"
Reason: The new test doesn't always pass:
https://github.com/python/cpython/pull/116423#issuecomment-1989425489
This reverts commit 1d0d49a7e86257ff95b4de0685e6997d7533993c.
|
| |
|
|
|
|
| |
These give applications the option of more forcefully terminating client
connections for asyncio servers. Useful when terminating a service and
there is limited time to wait for clients to finish up their work.
|
| |
|
|
| |
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
| | |
|
| |
|
| |
Co-authored-by: @CendioOssman
|
| |
|
| |
Signed-off-by: cui fliter <imcusg@gmail.com>
|
| |
|
|
| |
(#115918)
|
| |
|
|
|
|
| |
Nothing else in Python generally logs the contents of variables, so this
can be very unexpected for developers and could leak sensitive
information in to terminals and log files.
|
| |
|
|
|
|
|
|
|
|
| |
In some cases we might cause a StreamWriter to stay alive even when the
application has dropped all references to it. This prevents us from
doing automatical cleanup, and complaining that the StreamWriter wasn't
properly closed.
Fortunately, the extra reference was never actually used for anything so
we can just drop it.
|
| |
|
|
| |
(#115622)
|
| |
|
|
| |
Also include the UDP packet header sizes (8 bytes per packet)
in the buffer size reported to the flow control subsystem.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#114889)
Add test annotations required to run the test suite on iOS (PEP 730).
The majority of the change involve annotating tests that use subprocess,
but are skipped on Emscripten/WASI for other reasons, and including
iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks.
`is_apple` and `is_apple_mobile` test helpers have been added to
identify *any* Apple platform, and "any Apple platform except macOS",
respectively.
|
| |
|
|
|
|
|
| |
create_datagram_endpoint() (#114893)
Also improve exception message.
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
|
| |
|
|
|
| |
Task.cancel() (#112201)
Also did a general cleanup of asyncio locks.py comments and docstrings.
|
| | |
|
| |
|
|
| |
(GH-113991)
|
| |
|
|
|
|
|
|
| |
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.
[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0
|
| |
|
|
|
|
|
|
| |
block (GH-113819)
If other exception was raised during exiting an expired
asyncio.timeout() block, insert TimeoutError in the exception context
just above the CancelledError.
|
| | |
|
| |
|
|
|
|
| |
When an `StopIteration` raises into `asyncio.Future`, this will cause
a thread to hang. This commit address this by not raising an exception
and silently transforming the `StopIteration` with a `RuntimeError`,
which the caller can reconstruct from `fut.exception().__cause__`
|
| |
|
|
|
| |
asyncio.Condition.wait() (#111694)
Also fix a race condition in `asyncio.Semaphore.acquire()` when cancelled.
|
| |
|
|
| |
cancelled (#113690)
|
| |
|
|
| |
(#113040)
|
| |
|
|
|
|
| |
When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.
This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).
|
| | |
|
| |
|
|
|
|
|
| |
(#111983)
Issue a ResourceWarning instead.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
| |
|
|
|
| |
Try to clean up the socket file we create so we don't add unused noise to the file system.
|