[Django] #36321: Use argparse suggest_on_error on Python 3.14+

21 views
Skip to first unread message

Django

unread,
Apr 11, 2025, 4:29:35 PMApr 11
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Type: New
| feature
Status: new | Component: Core
| (Management commands)
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
https://docs.python.org/3.14/library/argparse.html#suggest-on-error

This new feature provides friendly feedback when mistyping an argument. We
can activate for all argparse Parsers (mostly management commands) when
Django supports Python 3.14.
--
Ticket URL: <https://code.djangoproject.com/ticket/36321>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 14, 2025, 8:28:58 AMApr 14
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

* keywords: => 6.1
* stage: Unreviewed => Someday/Maybe

Comment:

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.
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:1>

Django

unread,
Apr 14, 2025, 8:53:52 AMApr 14
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):

#36322 was a duplicate.
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:2>

Django

unread,
Apr 14, 2025, 12:21:33 PMApr 14
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adam Johnson):

The very next ticket... what are the chances?
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:3>

Django

unread,
Jul 17, 2025, 2:54:17 AMJul 17
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Ahmed Ibrahim):

* cc: Ahmed Ibrahim (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:4>

Django

unread,
Oct 20, 2025, 3:00:49 AMOct 20
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: ontowhee
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by ontowhee):

* owner: (none) => ontowhee
* stage: Someday/Maybe => Accepted
* status: new => assigned

Comment:

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.
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:5>

Django

unread,
Oct 21, 2025, 12:46:54 PMOct 21
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Stephen kihuni):

* owner: ontowhee => Stephen kihuni

--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:6>

Django

unread,
Oct 30, 2025, 2:29:11 AMOct 30
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Stephen kihuni):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:7>

Django

unread,
Oct 30, 2025, 2:49:09 AMOct 30
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Stephen kihuni):

https://github.com/django/django/pull/20021
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:8>

Django

unread,
Oct 30, 2025, 8:54:15 AMOct 30
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 0 => 1

Comment:

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!
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:9>

Django

unread,
Nov 6, 2025, 11:08:25 AMNov 6
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Jacob Walls:

Old description:

> https://docs.python.org/3.14/library/argparse.html#suggest-on-error
>
> This new feature provides friendly feedback when mistyping an argument.
> We can activate for all argparse Parsers (mostly management commands)
> when Django supports Python 3.14.

New description:

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.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:10>

Django

unread,
Nov 20, 2025, 2:25:11 PMNov 20
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: assigned
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: 6.1 | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:11>

Django

unread,
Nov 20, 2025, 3:40:19 PMNov 20
to django-...@googlegroups.com
#36321: Use argparse suggest_on_error on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: Stephen
| kihuni
Type: New feature | Status: closed
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution: fixed
Keywords: 6.1 | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):

* resolution: => fixed
* status: assigned => closed

Comment:

In [changeset:"b1a65eac7c09250d36e12464fc8fff2a401246b6" b1a65ea]:
{{{#!CommitTicketReference repository=""
revision="b1a65eac7c09250d36e12464fc8fff2a401246b6"
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.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36321#comment:12>
Reply all
Reply to author
Forward
0 new messages