You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since this is typing related, I'll ask here before adding to cpython's 5k+ issues.
In pypa/setuptools#4604 (comment) (read this comment for more details) , I found a usage of configparser.ConfigParser(default_section=None, delimiters=("=",)) seemingly to not have a default section.
The documentation doesn't make any mention of leveraging that behaviour. So we're left wondering if the parameter type should be updated (along as a request for cpython's doc to make it explicit), use "" instead, or just type-ignoring it, marking as using undocumented behaviour.
The text was updated successfully, but these errors were encountered:
If it works and is in use, we should probably add this to our stubs. Looking at the CPython code, that this works looks incidental, but changing it on CPython's would break code, and would most likely need a deprecation period.
I can see adding a @deprecated marker to a None overload, though, depending on what the CPython authors say.
Avasam
changed the title
Should None an acceptable default_section parameter of configparser.ConfigParser
Should None be an acceptable default_section parameter of configparser.ConfigParserOct 2, 2024
Since this is typing related, I'll ask here before adding to cpython's 5k+ issues.
In pypa/setuptools#4604 (comment) (read this comment for more details) , I found a usage of
configparser.ConfigParser(default_section=None, delimiters=("=",))
seemingly to not have a default section.The documentation doesn't make any mention of leveraging that behaviour. So we're left wondering if the parameter type should be updated (along as a request for cpython's doc to make it explicit), use
""
instead, or just type-ignoring it, marking as using undocumented behaviour.The text was updated successfully, but these errors were encountered: