[Python-Dev] test_logging failing on Windows 2000 (original) (raw)
Vinay Sajip vinay_sajip@red-dove.com
Sat, 18 Jan 2003 19:48:11 -0000
- Previous message: [Python-Dev] test_logging failing on Windows 2000
- Next message: [Python-Dev] Adding Japanese Codecs to the distro
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum wrote:
I'd prefer a different approach: register the threads started by ThreadingTCPServer in the 'threads' variable. Then they are waited for in the 'finally:' clause. You probably should move the flushing and closing of sockOut also.
I've posted a patch on SourceForge:
http://sourceforge.net/tracker/?func=detail&aid=670390&group_id=5470&atid=30 5470
I've temporarily lost my Windows 2000 and Linux machines, so I could only test under Windows XP Home with ActivePython 2.1.1 build 212.
The CVS version of the script runs OK from the command line, but if invoked via the >>> prompt and "import test_logging; test_logging.test_main()" it caused a hang on my system. I think this is an obscure problem caused by some pathological interaction between logging, threading.py and SocketServer.py: to solve the problem I copied the process_request from SocketServer.ThreadingMixin to my ThreadingTCPServer-derived server. It was still failing, but when I commented out the redundant (the test script already imports threading) line "import threading" from process_request, the test passed! I couldn't figure out why commenting out the line caused success and leaving it in caused a hang - is there something obvious I've missed?
Regards
Vinay
- Previous message: [Python-Dev] test_logging failing on Windows 2000
- Next message: [Python-Dev] Adding Japanese Codecs to the distro
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]