Skip to content

Commit 70e4c69

Browse files
committed
[configparser] Deprecate SafeConfigParser
"Remove" PR for deprecation message: python/cpython#92503
1 parent 9f13289 commit 70e4c69

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/configparser.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ from _typeshed import MaybeNone, StrOrBytesPath, SupportsWrite
33
from collections.abc import Callable, ItemsView, Iterable, Iterator, Mapping, MutableMapping, Sequence
44
from re import Pattern
55
from typing import Any, ClassVar, Final, Literal, TypeVar, overload
6-
from typing_extensions import TypeAlias
6+
from typing_extensions import TypeAlias, deprecated
77

88
if sys.version_info >= (3, 14):
99
__all__ = (
@@ -329,7 +329,8 @@ class ConfigParser(RawConfigParser):
329329
) -> str | _T: ...
330330

331331
if sys.version_info < (3, 12):
332-
class SafeConfigParser(ConfigParser): ... # deprecated alias
332+
@deprecated("Deprecated since Python 3.2; removed in Python 3.12. Use `ConfigParser` instead.")
333+
class SafeConfigParser(ConfigParser): ...
333334

334335
class SectionProxy(MutableMapping[str, str]):
335336
def __init__(self, parser: RawConfigParser, name: str) -> None: ...

0 commit comments

Comments
 (0)