Slow IDNA encoding with large strings
Aperta
@encukou ci sta già lavorando.
Dal 17/9/2026.
stdlib
type-feature
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
This is the opposite of #98433 which concerned IDNA decoding.
IDNA uses the quadratic-complexity codec punycode, making it slow with large inputs.
We do check the limit (64 bytes per label), but too late (after the quadratic step is done).
Note that #155475 added documentation warnings, urging users to limit the input size:
- https://docs.python.org/3/library/codecs.html#text-encodings
- https://docs.python.org/3/library/codecs.html#module-encodings.idna
Linked PRs
- gh-157682
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.