Opened 8 months ago

Closed 2 weeks ago

#36321 closed New feature (fixed)

Use argparse suggest_on_error on Python 3.14+

Reported by: Adam Johnson Owned by: Stephen kihuni
Component: Core (Management commands) Version: dev
Severity: Normal Keywords: 6.1
Cc: Ahmed Ibrahim Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Jacob Walls)

https://docs.python.org/3.14/library/argparse.html#suggest-on-error

This new feature provides friendly feedback when mistyping a choice or subparser. We can activate for all argparse Parsers (mostly management commands) when Django supports Python 3.14.

Change History (12)

comment:1 by Natalia Bidart, 8 months ago

Keywords: 6.1 added
Triage Stage: UnreviewedSomeday/Maybe

Thank you Adam, the feature request makes sense. Given that Python 3.14 is scheduled for October 1st, and the feature freeze for 6.0 is mid September, we could only include this starting in 6.1.

comment:2 by Natalia Bidart, 8 months ago

#36322 was a duplicate.

comment:3 by Adam Johnson, 8 months ago

The very next ticket... what are the chances?

comment:4 by Ahmed Ibrahim, 5 months ago

Cc: Ahmed Ibrahim added

comment:5 by ontowhee, 7 weeks ago

Owner: set to ontowhee
Status: newassigned
Triage Stage: Someday/MaybeAccepted

Changing status to "Accepted" following the merge of ticket #35844. Also assigning to myself to reserve for Djangonaut Space. I hope these changes are fine. If anyone objects, let me know.

comment:6 by Stephen kihuni, 6 weeks ago

Owner: changed from ontowhee to Stephen kihuni

comment:7 by Stephen kihuni, 5 weeks ago

Has patch: set

comment:8 by Stephen kihuni, 5 weeks ago

Last edited 5 weeks ago by Stephen kihuni (previous) (diff)

comment:9 by Jacob Walls, 5 weeks ago

Patch needs improvement: set

Great, thanks for submitting a PR. When you've addressed the first round of feedback, make sure to come back here and unset "Patch needs improvement". Cheers!

comment:10 by Jacob Walls, 4 weeks ago

Description: modified (diff)

comment:11 by Jacob Walls, 2 weeks ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:12 by Jacob Walls <jacobtylerwalls@…>, 2 weeks ago

Resolution: fixed
Status: assignedclosed

In b1a65ea:

Fixed #36321 -- Defaulted suggest_on_error=True in management commands.

Python 3.15 defaults suggest_on_error=True, but the feature is available
from 3.14, so this change opts in earlier. This change can be reverted
when Python 3.15 is the minimum supported version.

Note: See TracTickets for help on using tickets.
Back to Top