[issue14307] Make subclassing SocketServer simpler for non-blocking frameworks

Kristján Valur Jónsson report at bugs.python.org
Thu Mar 15 00:22:58 CET 2012


New submission from Kristján Valur Jónsson <kristjan at ccpgames.com>:

SocketServer employs select.select to achieve timeout behaviour on accepting new requests.  Unfortunately, the way this is implemented makes it tricky to bypass this behaviour for users that want to achieve timeout in a different manner.
This defect presents two patches.  One shows how we delegate the timeout to a new function, _get_request_timeout(), that can be overridden by subclasses.
The second shows a concrete version of this function, one that uses the socket's own timeout property rather than select, to get the same behaviour.

----------
files: 75646.patch
keywords: patch
messages: 155816
nosy: krisvale
priority: normal
severity: normal
status: open
title: Make subclassing SocketServer simpler for non-blocking frameworks
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file24850/75646.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14307>
_______________________________________


More information about the Python-bugs-list mailing list