-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[configparser] Add several deprecated attributes #14487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[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 |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
SafeConfigParser
ParsingError
filename parameterParsingError
methodsRawConfigParser.readfp
method