Handle urllib's renaming for Python 3.0:
* Deprecate urllib.urlopen() in favor of urllib2.urlopen() for 3.0.
* Update docs to mention split/rename of the module and deprecation of
urlopen().
Changes to lib2to3 are in a separate commit. Work is for issue #2885.
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 5e225ee..0404b77 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -182,9 +182,13 @@
def test_main():
test_support.requires('network')
- test_support.run_unittest(URLTimeoutTest,
- urlopenNetworkTests,
- urlretrieveNetworkTests)
+ from warnings import filterwarnings
+ with test_support.catch_warning(record=False):
+ filterwarnings('ignore', '.*urllib\.urlopen.*Python 3.0',
+ DeprecationWarning)
+ test_support.run_unittest(URLTimeoutTest,
+ urlopenNetworkTests,
+ urlretrieveNetworkTests)
if __name__ == "__main__":
test_main()