mirror of
https://github.com/python/cpython.git
synced 2025-09-12 11:46:52 +00:00
GH-125866: Deprecate nturl2path
module (#131432)
Deprecate the `nturl2path` module. Its functionality is merged into `urllib.request`. Add `tests.test_nturl2path` to exercise `nturl2path`, as it's no longer covered by `test_urllib`.
This commit is contained in:
parent
8a33034d82
commit
8abfaba5a6
6 changed files with 179 additions and 34 deletions
|
@ -44,10 +44,6 @@ class TrivialTests(unittest.TestCase):
|
|||
context = {}
|
||||
exec('from urllib.%s import *' % module, context)
|
||||
del context['__builtins__']
|
||||
if module == 'request' and os.name == 'nt':
|
||||
u, p = context.pop('url2pathname'), context.pop('pathname2url')
|
||||
self.assertEqual(u.__module__, 'nturl2path')
|
||||
self.assertEqual(p.__module__, 'nturl2path')
|
||||
for k, v in context.items():
|
||||
self.assertEqual(v.__module__, 'urllib.%s' % module,
|
||||
"%r is exposed in 'urllib.%s' but defined in %r" %
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue