[Python-Dev] Why does httplib import from test_support?
skip at pobox.com
skip at pobox.com
Mon Aug 18 13:08:40 CEST 2008
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
More information about the Python-Dev
mailing list