[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-02-14 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.0 ___ Python tracker ___

[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-02-14 Thread Roman Zeyde
Roman Zeyde added the comment: I've checked Python 3.0.1 today (at http://svn.python.org/projects/python/tags/r301/Modules/socketmodule.c) and it seems that the bug above has been fixed there too. ___ Python tracker ___

[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-01-31 Thread Gregory P. Smith
Gregory P. Smith added the comment: Fixed in trunk (2.7) r69156. All places in socketmodule that called htons and silently truncated values that were too large have been changed to raise OverflowError. Unit tests included. I'm leaving this open until it is merged into the py3k branch for 3.1.

[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-01-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: heh yes, not a big deal but this should raise an overflow error in that case. -- assignee: -> gregory.p.smith nosy: +gregory.p.smith priority: -> low ___ Python tracker __

[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-01-29 Thread Roman Zeyde
Changes by Roman Zeyde : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-01-29 Thread Roman Zeyde
Changes by Roman Zeyde : -- components: +Extension Modules -None ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5104] getsockaddrarg() casts port number from int to short without any warning

2009-01-29 Thread Roman Zeyde
New submission from Roman Zeyde : The following code shouldn't fail without any warning at all: >>> import socket >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.bind(('localhost', 7)) >>> print(s.getsockname()) ('127.0.0.1', 4464) After looking through socketmodule.c (rev.