Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SocketServer allow_reuse_address checked in constructor #44229

Closed
parente mannequin opened this issue Nov 13, 2006 · 6 comments
Closed

SocketServer allow_reuse_address checked in constructor #44229

parente mannequin opened this issue Nov 13, 2006 · 6 comments
Labels
stdlib Python modules in the Lib dir

Comments

@parente
Copy link
Mannequin

parente mannequin commented Nov 13, 2006

BPO 1595742
Nosy @birkenfeld

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 = <Date 2007-03-10.14:44:22.000>
created_at = <Date 2006-11-13.16:54:22.000>
labels = ['library']
title = 'SocketServer allow_reuse_address checked in constructor'
updated_at = <Date 2007-03-10.14:44:22.000>
user = 'https://bugs.python.org/parente'

bugs.python.org fields:

activity = <Date 2007-03-10.14:44:22.000>
actor = 'collinwinter'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2006-11-13.16:54:22.000>
creator = 'parente'
dependencies = []
files = []
hgrepos = []
issue_num = 1595742
keywords = []
message_count = 6.0
messages = ['30534', '30535', '30536', '30537', '30538', '30539']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'collinwinter', 'parente']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1595742'
versions = ['Python 2.6']

@parente
Copy link
Mannequin Author

parente mannequin commented Nov 13, 2006

Python 2.4.3 (#1, Oct 1 2006, 18:00:19)
[GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2

The documentation in the SocketServer class indicates
that the allow_reuse_address flag may be set on a
SocketServer subclass *or instance.* However, the flag
is read in a call to the server_bind() from the
constructor of the server object. Therefore, setting
the flag on a created instance has no effect. This is
problematic when trying to set the flag on
SimpleXMLRPCServer instances, for instance, which are
often not subclassed.

This flag should probably become one of the keyword
arguments in the constructor of a SocketServer object.

@parente parente mannequin closed this as completed Nov 13, 2006
@parente parente mannequin added the stdlib Python modules in the Lib dir label Nov 13, 2006
@parente parente mannequin closed this as completed Nov 13, 2006
@parente parente mannequin added the stdlib Python modules in the Lib dir label Nov 13, 2006
@birkenfeld
Copy link
Member

Would you want to work on a patch for this?

@parente
Copy link
Mannequin Author

parente mannequin commented Nov 17, 2006

Will do.

@parente
Copy link
Mannequin Author

parente mannequin commented Nov 20, 2006

The SimpleXMLRPCServer class in SVN HEAD now has allow_reuse_address set to True by default. This mimics the implementation of the BaseHTTPServer class which also has it set to True. Therefore, this patch should probably not concentrate on just making allow_reuse_address flag accessible on instances via __init__. Instead, the patch should probably be for TCPServer and specify whether server_bind and server_activate are called automatically or not by the constructor. The default behavior will remain the same as it is now. Specifying False on this flag will allow a developer to set the various variables on a TCPServer server instance before invoking bind/activate manually.

@parente
Copy link
Mannequin Author

parente mannequin commented Nov 20, 2006

Submitted as patch bpo-1599845 in patch tracker.

@collinwinter
Copy link
Mannequin

collinwinter mannequin commented Mar 10, 2007

Fixed by applying patch bpo-1599845 as r54262. Thanks for your bug report!

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

1 participant