A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-August/081848.html below:

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

[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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4