From 1afc1696167547a5fa101c53e5a3ab4717f8852c Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 18 Jun 2008 20:49:58 +0000 Subject: Make a new urllib package . It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran. --- Lib/test/regrtest.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Lib/test/regrtest.py') diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 217703b195..94c2248ab7 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -725,7 +725,7 @@ def dash_R(the_module, test, indirect_test, huntrleaks): def dash_R_cleanup(fs, ps, pic, abcs): import gc, copyreg import _strptime, linecache - import urlparse, urllib, urllib2, mimetypes, doctest + import urllib.parse, urllib.request, mimetypes, doctest import struct, filecmp, _abcoll from distutils.dir_util import _path_created from weakref import WeakSet @@ -758,9 +758,8 @@ def dash_R_cleanup(fs, ps, pic, abcs): _path_created.clear() re.purge() _strptime._regex_cache.clear() - urlparse.clear_cache() - urllib.urlcleanup() - urllib2.install_opener(None) + urllib.parse.clear_cache() + urllib.request.urlcleanup() linecache.clearcache() mimetypes._default_mime_types() filecmp._cache.clear() -- cgit v1.2.1