python / python/cpython

Suggest a future feature name in `from __future__ import`

Aperta
#145,868 1 commento 1 reazione 1 assegnatario Vedi su GitHub

@sobolevn ci sta già lavorando.

Dal 21/7/2026.

interpreter-core topic-parser type-feature
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Feature or enhancement

Proposal:

When from __future__ import with a wrong name, maybe it is a typo. We can suggest a possible name. Just like:

>>> from __future__ import annotation
  File "<python-input-0>", line 1
    from __future__ import annotation
                           ^^^^^^^^^^
SyntaxError: future feature 'annotation' is not defined. Did you mean: 'annotations'?

One possible way is just read the line and analyse.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-154347

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.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.