FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-120485: Add an override of `allow_reuse_port` on classes inheriting `socketserver.TCPServer` by idankap · Pull Request #120488 · python/cpython · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .py  (4) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Next Next commit
Added an override to allow_reuse_port where allow_reuse_address is ov…
…erriden
  • Loading branch information
Idan Kapustian committed Jun 14, 2024
commit 6bdd2dc36a6bc77bde84778574837442ed94f7d5
1 change: 1 addition & 0 deletions Lib/http/server.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
class HTTPServer(socketserver.TCPServer):

allow_reuse_address = 1 # Seems to make sense in testing environment
allow_reuse_port = 1

def server_bind(self):
"""Override server_bind to store the server name."""
Expand Down
1 change: 1 addition & 0 deletions Lib/logging/config.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ class ConfigSocketReceiver(ThreadingTCPServer):
"""

allow_reuse_address = 1
allow_reuse_port = 1

def __init__(self, host='localhost', port=DEFAULT_LOGGING_CONFIG_PORT,
handler=None, ready=None, verify=None):
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_logging.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ class TestTCPServer(ControlMixin, ThreadingTCPServer):
"""

allow_reuse_address = True
allow_reuse_port = True

def __init__(self, addr, handler, poll_interval=0.5,
bind_and_activate=True):
Expand Down
1 change: 1 addition & 0 deletions Lib/xmlrpc/server.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ class SimpleXMLRPCServer(socketserver.TCPServer,
"""

allow_reuse_address = True
allow_reuse_port = True

# Warning: this is for debugging purposes only! Never set this to True in
# production code, as will be sending out sensitive information (exception
Expand Down

Back | FazBrowse Home | New Git URL