mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -3,7 +3,15 @@
|
|||
This module only exists to provide OS-specific code
|
||||
for urllib.requests, thus do not use directly.
|
||||
"""
|
||||
# Testing is done through test_urllib.
|
||||
# Testing is done through test_nturl2path.
|
||||
|
||||
import warnings
|
||||
|
||||
|
||||
warnings._deprecated(
|
||||
__name__,
|
||||
message=f"{warnings._DEPRECATED_MSG}; use 'urllib.request' instead",
|
||||
remove=(3, 19))
|
||||
|
||||
def url2pathname(url):
|
||||
"""OS-specific conversion from a relative URL of the 'file' scheme
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue