[issue29091] Python 3.5+ socket.socketpair fallback incorrectly implemented

Seth Michael Larson report at bugs.python.org
Wed Dec 28 02:23:21 EST 2016


New submission from Seth Michael Larson:

The socket.socketpair() fallback for Python 3.5+ is incorrectly implemented from the original source. The fallback doesn't provide a backlog argument to the lsock.listen() function call.

When running the function it gives the following error:
`TypeError: listen() takes exactly one argument (0 given)`

Issue can be seen here on line 514: 
https://hg.python.org/cpython/file/3.6/Lib/socket.py

Should add 1 as the argument to listen() to bring the implementation in line with the source implementation at: https://gist.github.com/geertj/4325783

----------
components: Library (Lib)
messages: 284158
nosy: SethMichaelLarson
priority: normal
severity: normal
status: open
title: Python 3.5+ socket.socketpair fallback incorrectly implemented
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

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


More information about the Python-bugs-list mailing list