classification
Title: struni: correction for sockets on win32
Type: Stage:
Components: Windows Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: amaury.forgeotdarc, gvanrossum (2)
Priority: normal Keywords patch

Created on 2007-07-17 01:14 by amaury.forgeotdarc, last changed 2008-01-06 22:29 by admin.

Files
File name Uploaded Description Edit Remove
socket.diff amaury.forgeotdarc, 2007-07-17 01:14
Messages (2)
msg52898 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) Date: 2007-07-17 01:14
On Windows, os.dup() works on files, but not on socket handles.
Thus I changed the condition from
_os_has_dup = hasattr(os, "dup")
to
_can_dup_socket = hasattr(_socket, "dup")

This corrects many tests involving a socket server (test_ftplib at least).
msg52899 - (view) Author: Guido van Rossum (gvanrossum) Date: 2007-07-17 20:41
Committed revision 56415.
History
Date User Action Args
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: + Python 3.0
2007-07-17 01:14:51amaury.forgeotdarccreate