Open
Description
BPO | 36003 |
---|---|
Nosy | @taleinat, @giampaolo, @asvetlov, @1st1 |
PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2019-02-15.13:44:39.433>
labels = ['easy', '3.8', 'type-feature', 'library']
title = 'set better defaults for TCPServer options'
updated_at = <Date 2019-06-08.18:18:49.463>
user = 'https://github.com/giampaolo'
bugs.python.org fields:
activity = <Date 2019-06-08.18:18:49.463>
actor = 'taleinat'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2019-02-15.13:44:39.433>
creator = 'giampaolo.rodola'
dependencies = []
files = []
hgrepos = []
issue_num = 36003
keywords = ['patch', 'easy']
message_count = 3.0
messages = ['335612', '335614', '345058']
nosy_count = 5.0
nosy_names = ['taleinat', 'giampaolo.rodola', 'asvetlov', 'neologix', 'yselivanov']
pr_nums = ['11875']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue36003'
versions = ['Python 3.8']
Activity
giampaolo commentedon Feb 15, 2019
socketserver.TCPServer provides the following defaults:
Proposal is to:
giampaolo commentedon Feb 15, 2019
Update: because "request_queue_size" is passed to server_activate() method which can be subclassed, a better default for not breaking backward compatibility is 0 (not None).
taleinat commentedon Jun 8, 2019
I'm not sure that changing the default value for "reuse address" justifies breaking backwards compatibility like this. Admittedly, I'm not an expert on networking, so perhaps there's a good reason that I'm unaware of.
As for the queue size, passing 0 to socket.listen() does seem like a more reasonable default than the rather arbitrary value of 5. Again, it's arguable whether it's worth changing this given that it has been like this for a long time, but in this case at least the potential for harm seems negligible.
gpshead commentedon May 19, 2025
agreed, lets use 0 as the queue size but leave reuse address alone.
gpshead commentedon May 19, 2025
(we're working out if we even want to that on the PR, see comments there)
gh-80184: Set getattr(socket, "SOMAXCONN", 5) as the default queue si…