diff options
author | Barney Gale <barney.gale@gmail.com> | 2025-03-19 19:33:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-19 19:33:01 (GMT) |
commit | 8abfaba5a67a99c446f0c13253ee0ce97bf6fa5c (patch) | |
tree | 7b6535e35d05a39e6a7adc18620413bb729146ca /Lib/nturl2path.py | |
parent | 8a33034d82314e2a5a8f39f9348e93135f94807d (diff) | |
download | cpython-8abfaba5a67a99c446f0c13253ee0ce97bf6fa5c.zip cpython-8abfaba5a67a99c446f0c13253ee0ce97bf6fa5c.tar.gz cpython-8abfaba5a67a99c446f0c13253ee0ce97bf6fa5c.tar.bz2 |
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`.
Diffstat (limited to 'Lib/nturl2path.py')
-rw-r--r-- | Lib/nturl2path.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/nturl2path.py b/Lib/nturl2path.py index 7b5b820..57c7858 100644 --- a/Lib/nturl2path.py +++ b/Lib/nturl2path.py @@ -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 |