Skip to content

Commit e94792e

Browse files
authored
[stdlib] Use "; removed ..." in deprecation messages (#16293)
1 parent 28b0c4d commit e94792e

9 files changed

Lines changed: 16 additions & 20 deletions

File tree

stdlib/argparse.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ if sys.version_info >= (3, 12):
458458
deprecated: bool = False,
459459
) -> None: ...
460460
@overload
461-
@deprecated("The `type`, `choices`, and `metavar` parameters are ignored and will be removed in Python 3.14.")
461+
@deprecated("The `type`, `choices`, and `metavar` parameters are ignored; removed in Python 3.14.")
462462
def __init__(
463463
self,
464464
option_strings: Sequence[str],
@@ -483,7 +483,7 @@ if sys.version_info >= (3, 12):
483483
help: str | None = None,
484484
) -> None: ...
485485
@overload
486-
@deprecated("The `type`, `choices`, and `metavar` parameters are ignored and will be removed in Python 3.14.")
486+
@deprecated("The `type`, `choices`, and `metavar` parameters are ignored; removed in Python 3.14.")
487487
def __init__(
488488
self,
489489
option_strings: Sequence[str],
@@ -509,7 +509,7 @@ else:
509509
help: str | None = None,
510510
) -> None: ...
511511
@overload
512-
@deprecated("The `type`, `choices`, and `metavar` parameters are ignored and will be removed in Python 3.14.")
512+
@deprecated("The `type`, `choices`, and `metavar` parameters are ignored; removed in Python 3.14.")
513513
def __init__(
514514
self,
515515
option_strings: Sequence[str],

stdlib/ctypes/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ c_buffer = create_string_buffer
168168
def create_unicode_buffer(init: int | str, size: int | None = None) -> Array[c_wchar]: ...
169169

170170
if sys.version_info < (3, 15):
171-
@deprecated("Deprecated; will be removed in Python 3.15.")
171+
@deprecated("Deprecated; removed in Python 3.15.")
172172
def SetPointerType(pointer: type[_Pointer[Any]], cls: _CTypeBaseType) -> None: ...
173173

174174
@deprecated("Soft deprecated. Use multiplication instead.")

stdlib/email/utils.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ elif sys.version_info >= (3, 12):
5959
@overload
6060
def localtime(dt: datetime.datetime | None = None) -> datetime.datetime: ...
6161
@overload
62-
@deprecated("The `isdst` parameter does nothing and will be removed in Python 3.14.")
62+
@deprecated("The `isdst` parameter is ignored; removed in Python 3.14.")
6363
def localtime(dt: datetime.datetime | None = None, isdst: Unused = None) -> datetime.datetime: ...
6464

6565
else:

stdlib/glob.pyi

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ if sys.version_info >= (3, 13):
1010
__all__ += ["translate"]
1111

1212
if sys.version_info < (3, 15):
13-
@deprecated(
14-
"Deprecated since Python 3.10; will be removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead."
15-
)
13+
@deprecated("Deprecated since Python 3.10; removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead.")
1614
def glob0(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
17-
@deprecated(
18-
"Deprecated since Python 3.10; will be removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead."
19-
)
15+
@deprecated("Deprecated since Python 3.10; removed in Python 3.15. Use `glob.glob()` with the *root_dir* argument instead.")
2016
def glob1(dirname: AnyStr, pattern: AnyStr) -> list[AnyStr]: ...
2117

2218
if sys.version_info >= (3, 11):

stdlib/http/server.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
128128
def executable(path: StrPath) -> bool: ... # undocumented
129129

130130
if sys.version_info < (3, 15):
131-
@deprecated("Deprecated and unsafe; will be removed in Python 3.15.")
131+
@deprecated("Deprecated and unsafe; removed in Python 3.15.")
132132
class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
133133
cgi_directories: list[str]
134134
have_fork: bool # undocumented

stdlib/pathlib/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class PurePath(PathLike[str]):
100100
if sys.version_info < (3, 15):
101101
if sys.version_info >= (3, 13):
102102
@deprecated(
103-
"Deprecated since Python 3.13; will be removed in Python 3.15. "
103+
"Deprecated since Python 3.13; removed in Python 3.15. "
104104
"Use `os.path.isreserved()` to detect reserved paths on Windows."
105105
)
106106
def is_reserved(self) -> bool: ...

stdlib/platform.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def mac_ver(
1111
) -> tuple[str, tuple[str, str, str], str]: ...
1212

1313
if sys.version_info < (3, 15):
14-
@deprecated("Deprecated; will be removed in Python 3.15.")
14+
@deprecated("Deprecated; removed in Python 3.15.")
1515
def java_ver(
1616
release: str = "",
1717
vendor: str = "",

stdlib/types.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class CodeType:
156156
def co_firstlineno(self) -> int: ...
157157
if sys.version_info < (3, 15):
158158
@property
159-
@deprecated("Deprecated since Python 3.10; will be removed in Python 3.15. Use `CodeType.co_lines()` instead.")
159+
@deprecated("Deprecated since Python 3.10; removed in Python 3.15. Use `CodeType.co_lines()` instead.")
160160
def co_lnotab(self) -> bytes: ...
161161

162162
@property

stdlib/wave.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ class Wave_read:
4747
def getcompname(self) -> str: ...
4848
def getparams(self) -> _wave_params: ...
4949
if sys.version_info < (3, 15):
50-
@deprecated("Deprecated; will be removed in Python 3.15.")
50+
@deprecated("Deprecated; removed in Python 3.15.")
5151
def getmarkers(self) -> None: ...
52-
@deprecated("Deprecated; will be removed in Python 3.15.")
52+
@deprecated("Deprecated; removed in Python 3.15.")
5353
def getmark(self, id: Any) -> Never: ...
5454

5555
def setpos(self, pos: int) -> None: ...
@@ -85,11 +85,11 @@ class Wave_write:
8585
def getparams(self) -> _wave_params: ...
8686

8787
if sys.version_info < (3, 15):
88-
@deprecated("Deprecated; will be removed in Python 3.15.")
88+
@deprecated("Deprecated; removed in Python 3.15.")
8989
def setmark(self, id: Any, pos: Any, name: Any) -> Never: ...
90-
@deprecated("Deprecated; will be removed in Python 3.15.")
90+
@deprecated("Deprecated; removed in Python 3.15.")
9191
def getmark(self, id: Any) -> Never: ...
92-
@deprecated("Deprecated; will be removed in Python 3.15.")
92+
@deprecated("Deprecated; removed in Python 3.15.")
9393
def getmarkers(self) -> None: ...
9494

9595
def tell(self) -> int: ...

0 commit comments

Comments
 (0)