Skip to content

Commit 590f483

Browse files
authored
Deprecate nturl2path (#14065)
1 parent 51db405 commit 590f483

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

stdlib/nturl2path.pyi

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
1-
def url2pathname(url: str) -> str: ...
2-
def pathname2url(p: str) -> str: ...
1+
import sys
2+
from typing_extensions import deprecated
3+
4+
if sys.version_info >= (3, 14):
5+
@deprecated("nturl2path module was deprecated since Python 3.14")
6+
def url2pathname(url: str) -> str: ...
7+
@deprecated("nturl2path module was deprecated since Python 3.14")
8+
def pathname2url(p: str) -> str: ...
9+
10+
else:
11+
def url2pathname(url: str) -> str: ...
12+
def pathname2url(p: str) -> str: ...

0 commit comments

Comments
 (0)