[issue29832] Don't refer to getsockaddrarg in error messages

Oren Milman report at bugs.python.org
Fri Mar 17 16:50:11 EDT 2017


Oren Milman added the comment:

note that #15988 also left 3 changes for this issue to fix, as can be
seen by searching for '29832' in the comments of PR 668.

for example, this issue should also fix the following inconsistent
error messages:
>>> socket.socket(family=socket.AF_INET6).bind(('::1', -1))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: getsockaddrarg: port must be 0-65535.
>>> socket.socket(family=socket.AF_INET6).bind(('::1', -1 << 1000))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C long

----------

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


More information about the Python-bugs-list mailing list