[issue1049] socket.socket.getsockname() has inconsistent UNIX/Windows behavior

2008-04-10 Thread Trent Nelson
Changes by Trent Nelson <[EMAIL PROTECTED]>: -- nosy: +Trent.Nelson __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubsc

[issue1049] socket.socket.getsockname() has inconsistent UNIX/Windows behavior

2008-04-09 Thread Bill Janssen
Bill Janssen <[EMAIL PROTECTED]> added the comment: Here's what the OS X man page says: The getsockname() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. __ Tracker <[EMAIL

[issue1049] socket.socket.getsockname() has inconsistent UNIX/Windows behavior

2007-08-29 Thread Martin v. Löwis
Martin v. Löwis added the comment: I think it is neither possible nor "good" to produce a uniform result. Python traditionally exposes APIs "as-is", providing the system actually has an API with the same name. It never tries to hide differing system behaviors in the Python wrapper; if systems var

[issue1049] socket.socket.getsockname() has inconsistent UNIX/Windows behavior

2007-08-28 Thread Bill Janssen
New submission from Bill Janssen: The behavior and return value for calling socket.socket.getsockname() on an unconnected unbound socket is unspecified. On UNIX, it returns an address ('0.0.0.0', 0), while on Windows it raises an obscure exception "error: (10022, 'Invalid argument')". This s