[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Thanks! Updated as you suggested and committed as r84450 and r84451. -- keywords: -needs review stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The documentation of WSASocket(), and the code of PyBluez http://code.google.com/p/pybluez/source/browse/trunk/msbt/_msbt.c#374 both suggest to use the FROM_PROTOCOL_INFO constant. Otherwise, the patch looks good. -- _

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file18724/issue9753.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: Following the advice of DuplicateHandle's documentation, I reimplemented dup on Windows using WSADuplicateHandle. Attached is a patch. With the patch, the tests pass on my Windows machine. Would someone like to review the patch? -- assignee: ->

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: On Windows, socket.dup is implemented using DuplicateHandle. The documentation for DuplicateHandle reads: You should not use DuplicateHandle to duplicate handles to the following objects: * I/O completion ports. No error is returned, but the duplicate

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I run it the same way. I wonder what's different? :-( I will try to find some time to investigate further. -- ___ Python tracker ___ __

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: test_socket.py passes here. I run: python_d.exe -m test.regrtest -v test_socket -- nosy: +amaury.forgeotdarc ___ Python tracker ___ __

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : The errors below show up on my XP machine in Python 3.1 as well as a recent build from the py3k branch. I'm not sure why they *don't* show up on the XP buildbot. fromfd() ultimately calls dup(), so the underlying problem is likely the same for all the f