[configparser] Add several deprecated attributes#14487
Conversation
"Remove" PR for deprecation message: python/cpython#92503
This comment has been minimized.
This comment has been minimized.
|
The same PR also removed a deprecated parameter from ParsingError, which isn't reflected in the stubs yet. Might as well add that as well while we're here! |
Thanks, again it seems to me that it is worth adding some removed deprecated methods since they reflected some capabilities of if sys.version_info < (3, 12):
@property
@deprecated("Removed in Python 3.12. Use `source` instead.")
def filename(self) -> str: ...
@filename.setter
@deprecated("Removed in Python 3.12. Use `source` instead.")
def filename(self, value: str) -> None: ...
@deprecated("Removed in Python 3.12. Use `parser.read_file()` instead.")
def readfp(self, fp: Iterable[str], filename: str | None = None) -> None: ... |
This comment has been minimized.
This comment has been minimized.
|
Looks like they were documented APIs, so adding them sounds reasonable to me |
SafeConfigParser
Indeed, I didn't notice that they were documented |
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
SafeConfigParserParsingErrorfilename parameterParsingErrormethodsRawConfigParser.readfpmethod