Should `None` be an acceptable `default_section` parameter of `configparser.ConfigParser`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 2.1k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 82
Description
Since this is typing related, I'll ask here before adding to cpython's 5k+ issues.
In https://github.com/pypa/setuptools/pull/4604#discussion_r1777834900 (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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the ConfigParser default_section annotation in the relevant typeshed stub and the linked setuptools discussion, then compare it with the documented and observed behavior. Done means resolving whether None is supported and updating the type or documenting the behavior accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100