mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
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.
This commit is contained in:
parent
aac51b8a69
commit
8bb8fa5dd6
5 changed files with 51 additions and 14 deletions
|
|
@ -640,16 +640,20 @@ class Pathname_Tests(unittest.TestCase):
|
|||
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(
|
||||
urlopen_FileTests,
|
||||
urlopen_HttpTests,
|
||||
urlretrieve_FileTests,
|
||||
QuotingTests,
|
||||
UnquotingTests,
|
||||
urlencode_Tests,
|
||||
Pathname_Tests,
|
||||
#FTPWrapperTests,
|
||||
)
|
||||
import warnings
|
||||
with test_support.catch_warning(record=False):
|
||||
warnings.filterwarnings('ignore', ".*urllib\.urlopen.*Python 3.0",
|
||||
DeprecationWarning)
|
||||
test_support.run_unittest(
|
||||
urlopen_FileTests,
|
||||
urlopen_HttpTests,
|
||||
urlretrieve_FileTests,
|
||||
QuotingTests,
|
||||
UnquotingTests,
|
||||
urlencode_Tests,
|
||||
Pathname_Tests,
|
||||
#FTPWrapperTests,
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue