| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-128933) (#128969)
gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)
* 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
---------
(cherry picked from commit 3829104ab412a47bf3f36b8c133c886d2cc9a6d4)
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
socketservers (#103674)
sockserver gains ForkingUnixStreamServer and ForkingUnixDatagramServer classes for consistency with all of the others. Ironically these existed but were buried in our test suite.
Addresses #103673
<!-- gh-issue-number: gh-103673 -->
* Issue: gh-103673
<!-- /gh-issue-number -->
---------
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
| | |
|
| |
|
| |
Emscripten's socket emulation is limited. AF_UNIX, AF_PACKET, setsockopt(), and most SO_* constants are not supported.
|
| |
|
|
|
|
|
| |
* bpo-16594: Add allow_reuse_port on socketserver
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
|
| |
|
| |
This reverts commit aca67da4fe68d5420401ac1782203d302875eb27.
|
| |
|
|
|
| |
(GH-13893)" (GH-23107)
This reverts commit c41559021213cfc9dc62a83fc63306b3bdc3e64b.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-37193: remove the thread which finished process request from threads list
* rename variable t to thread.
* don't remove thread from list if it is daemon.
* use lock to protect self._threads.
* use finally block in case of exception from shutdown_request().
* check "not thread.daemon" before lock to avoid holding the lock if it's unnecessary.
* fix the place of _threads_lock.
* separate code to remove a current thread into a function.
* check ValueError when removing thread.
* fix wrong code which all instance shared same lock.
* Extract thread management into a _Threads class to encapsulate atomic operations and separate concerns.
* Replace multiple references of 'block_on_close' with one, avoiding the possibility that 'block_on_close' could change during the course of processing requests. Now, there's exactly one _threads object with behavior fixed for the duration.
* Add docstrings to private classes.
* Add test to ensure that a ThreadingTCPServer can be closed without serving any requests.
* Use _NoThreads as the default value. Fixes AttributeError when server is closed without serving any requests.
* Add blurb
* Add test capturing failure.
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
|
| | |
|
| |
|
|
| |
changed 'This is bad class design, but save some typing'
into 'This is bad class design, but saves some typing'.
|
| |
|
|
| |
Fix typo in the docstring of `service_actions`.
serve_forver -> serve_forever
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this revision, after the shutdown of a `BaseServer`,
the server accepted a last single request
if it was sent between the server socket polling
and the polling timeout.
This can be problematic for instance for a server restart
for which you do not want to interrupt the service,
by not closing the listening socket during the restart.
One request failed because of this behavior.
Note that only one request failed,
following requests were not accepted, as expected.
|
| |
|
|
| |
socketserver.ThreadingMixIn no longer tracks active threads if
block_on_close is false.
|
| |
|
|
| |
Add a new block_on_close class attribute to ForkingMixIn and
ThreadingMixIn classes of socketserver to opt-in for pre-3.7 behaviour.
|
| |
|
|
|
|
|
|
|
| |
socketserver.ThreadingMixIn now keeps a list of non-daemonic threads
to wait until all these threads complete in server_close().
Reenable test_logging skipped tests.
Fix SocketHandlerTest.tearDown(): close the socket handler before
stopping the server, so the server can join threads.
|
| |
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
| |
|
|
|
|
|
|
|
| |
* Add socketserver.ForkingMixIn.server_close()
bpo-31151: socketserver.ForkingMixIn.server_close() now waits until
all child processes completed to prevent leaking zombie processes.
* Fix test on Windows which doesn't have ForkingMixIn
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
as Windows that do not support os.fork().
|
| |\
| |
| |
| | |
messages.
|
| | | |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| |/
|
|
|
| |
Also make handle_error() consistently output to stderr, and fix the
documentation.
|
| |
|
|
| |
Patch by Aviv Palivoda.
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Patch by Martin Panter.
|
| | |
| |
| |
| | |
Patch by Martin Panter.
|
| |\ \
| |/
| |
| | |
Patch by Févry Thibault.
|
| |\ \
| |/ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
| |
ModuleNotFoundError.
|
| |\
| |
| |
| | |
Issue #14574: Ignore socket errors raised when flushing a connection on close.
|
| | |\
| | |
| | |
| | | |
Issue #14574: Ignore socket errors raised when flushing a connection on close.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
OSError.
|
| | | | |
|
| |/ / |
|
| | | |
|
| |\ \
| |/
| |
| |
| | |
This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
|