From 590f48306c83be5b84b24019fb966341b0fda8aa Mon Sep 17 00:00:00 2001 From: Semyon Moroz Date: Wed, 14 May 2025 13:40:39 +0000 Subject: [PATCH] Deprecate `nturl2path` (#14065) --- stdlib/nturl2path.pyi | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/stdlib/nturl2path.pyi b/stdlib/nturl2path.pyi index b8ad8d682..c38a35946 100644 --- a/stdlib/nturl2path.pyi +++ b/stdlib/nturl2path.pyi @@ -1,2 +1,12 @@ -def url2pathname(url: str) -> str: ... -def pathname2url(p: str) -> str: ... +import sys +from typing_extensions import deprecated + +if sys.version_info >= (3, 14): + @deprecated("nturl2path module was deprecated since Python 3.14") + def url2pathname(url: str) -> str: ... + @deprecated("nturl2path module was deprecated since Python 3.14") + def pathname2url(p: str) -> str: ... + +else: + def url2pathname(url: str) -> str: ... + def pathname2url(p: str) -> str: ...