[Python-Dev] Why does httplib import from test_support?

2008年8月18日 04:09:01 -0700

Is this new as of the last couple of days?
 Traceback (most recent call last):
 File "/Users/skip/tmp/py/mmfold.py", line 182, in <module>
 sys.exit(main())
 File "/Users/skip/tmp/py/mmfold.py", line 95, in main
 for line in urllib.urlopen(url+"?adminpw=%s" % passwd):
 File "/Users/skip/local/lib/python2.6/urllib.py", line 87, in urlopen
 return opener.open(url)
 File "/Users/skip/local/lib/python2.6/urllib.py", line 203, in open
 return getattr(self, name)(url)
 File "/Users/skip/local/lib/python2.6/urllib.py", line 285, in open_http
 import httplib
 File "/Users/skip/local/lib/python2.6/httplib.py", line 72, in <module>
 from test.test_support import catch_warning
 ImportError: No module named test_support
The import statement seems to work from an interactive shell (I have a
module named test in the same directory as the main prog, hence the
problem), but even if it does work should we be importing stuff from the
test package in non-test code?
Skip
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to