| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
various create_task functions (#128306)
Some create_task() functions were changed from `name=None, context=None` to `**kwargs`.
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
|
| |
|
| |
|
|
|
|
| |
to transport (#131376)
|
| |
|
|
|
| |
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets
Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other
than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address
families, and the call with fail with Linux kernel 6.12.9 and newer.
* Apply suggestions from code review
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
---------
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
|
| |
|
|
|
| |
Adds `_ThreadSafeHandle` to be used for callbacks scheduled with `loop.call_soon_threadsafe`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
(#124810)
* Revert "GH-124639: add back loop param to staggered_race (#124700)"
This reverts commit e0a41a5dd12cb6e9277b05abebac5c70be684dd7.
* Revert "gh-124309: Modernize the `staggered_race` implementation to support eager task factories (#124390)"
This reverts commit de929f353c413459834a2a37b2d9b0240673d874.
|
|
|
|
|
|
|
|
| |
task factories (#124390)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
|
| |
Deprecate `asyncio.iscoroutinefunction` in favor of `inspect.iscoroutinefunction`.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
|
|
|
| |
(#122269)
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(#115622)
|
|
|
|
|
|
|
| |
create_datagram_endpoint() (#114893)
Also improve exception message.
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
|
|
|
|
|
| |
asyncio.BaseEventLoop.create_server() (GH-114420)
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Try to fix asyncio.Server.wait_closed() again
I identified the condition that `wait_closed()` is intended
to wait for: the server is closed *and* there are no more
active connections.
When this condition first becomes true, `_wakeup()` is called
(either from `close()` or from `_detach()`) and it sets `_waiters`
to `None`. So we just check for `self._waiters is None`; if it's
not `None`, we know we have to wait, and do so.
A problem was that the new test introduced in 3.12 explicitly
tested that `wait_closed()` returns immediately when the server
is *not* closed but there are currently no active connections.
This was a mistake (probably a misunderstanding of the intended
semantics). I've fixed the test, and added a separate test that
checks exactly for this scenario.
I also fixed an oddity where in `_wakeup()` the result of the
waiter was set to the waiter itself. This result is not used
anywhere and I changed this to `None`, to avoid a GC cycle.
* Update Lib/asyncio/base_events.py
---------
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
|
|
|
| |
Effectively introduce an unstable, private (really: protected) API for subclasses that want to override `run_forever()`.
|
| |
|
| |
|
|
|
|
| |
method (#105685)
|
|
|
|
|
| |
`asyncio.base_events.BaseEventLoop._add_callback` (#101197)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
| |
`asyncio.open_connection` (#100615)
|
|
|
|
|
|
|
|
|
|
|
| |
It was a no-op when used as recommended (after close()).
I had to debug one test (test__sock_sendfile_native_failure) --
the cleanup sequence for the test fixture was botched.
Hopefully that's not a portend of problems in user code --
this has never worked so people may well be doing this wrong. :-(
Co-authored-by: kumar aditya
|
|
|
|
|
|
|
| |
raises (#95739)
Break reference cycles to resolve memory leak, by
removing local exception and future instances from the frame
|
|
|
|
|
| |
call_exception_handler() (#96756)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
| |
Ensure that the event loop's `_thread_id` attribute and the asyncgen hooks set by `sys.set_asyncgen_hooks()` are always restored no matter where a KeyboardInterrupt exception is raised.
|
|
|
|
|
| |
* When chaining futures, skip callback if loop closed.
* When shutting down an executor, don't wake a closed loop.
|
|
|
|
| |
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|
|
|
|
| |
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
|
| |
|
|
|
|
| |
(GH-31837)
|
|
|
|
|
|
| |
This change aligns the documentation at https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.Server
with the actual implementation
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
| |
(GH-31442)
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-44011: New asyncio ssl implementation
Co-Authored-By: Andrew Svetlov <andrew.svetlov@gmail.com>
* fix warning
* fix typo
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
This parameter was accidentally removed when fixing
https://bugs.python.org/issue45129, this reverts the unnecessary changes
there.
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
|
|
|
|
| |
sense (GH-29894)
|
|
|
|
|
|
|
|
| |
Due to significant security concerns, the reuse_address parameter of
asyncio.loop.create_datagram_endpoint, deprecated in Python 3.9, is
now removed. This is because of the behavior of the socket option
SO_REUSEADDR in UDP.
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
| |
(GH-24540)
|
|
|
|
| |
This reverts commit 5fb06edbbb769561e245d0fe13002bab50e2ae60 and all
subsequent dependent commits.
|
| |
|
|
|
|
| |
(GH-23521)
|
|
|
|
|
|
| |
(GH-21533)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
|