python / python/typeshed

Should `None` be an acceptable `default_section` parameter of `configparser.ConfigParser`

Aperta
#12,700 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Python
Stelle
5.1k
Fork
2.1k
Merge medio
1g 19h
PR unite (30g)
82

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.