python / python/cpython

Unify all smtplib commands to be uppercase

Aperta
#136,191 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

stdlib topic-email type-feature
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Hello,

I know there was a previous issue made years ago about smtplib being inconsistent with uppercase and lowercase commands, however the succeeding fix made the commands lowercase. I think these should be switched to uppercase and here's why:

RFC 5321 states "A few SMTP servers, in violation of this specification (and RFC 821) require that command verbs be encoded by clients in upper case. Implementations MAY wish to employ this encoding to accommodate those servers."

Servers such as Postfix and many others have resolved to simply making all SMTP commands and options uppercase as depicted (though not required) in all the RFC documents. Though it is not strictly necessary, it will have better support (even if marginally) and is a quick fix.

Also, smtplib seems to already send some of these commands and options like STARTTLS and SMTPUTF8 uppercase which technically leaves the inconsistency of the last issue unsolved.

Ultimately, I think it would be best for posterity to simply make all of these uppercase and it should be a quick fix.

I can make the proper edits and make a pull request if there isn't some obvious reason for this I'm missing.

Let me know your thoughts! 🙂

Linked PRs
  • gh-136733

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

Esamina i percorsi dei comandi smtplib e i test correlati per identificare ogni comando e opzione la cui combinazione di maiuscole e minuscole non è coerente. La modifica è completa quando tutti i comandi smtplib usano verbi in maiuscolo e i test esistenti passano; nota che la PR collegata gh-136733 indica che il lavoro è già in corso.

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

Valutazione

Stack tecnologico
python
Ambito
networking
Tipo di issue
Funzionalità
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.