[Django] #36376: Use argparse color on Python 3.14+
5 views
Skip to first unread message
Django
unread,
May 8, 2025, 6:21:42 AM5/8/25
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#36376: Use argparse color on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Type:
| Uncategorized
Status: new | Component: Core
| (Management commands)
Version: dev | Severity: Normal
Keywords: 6.1 | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Python 3.14 introduces colorized help to argparse:
https://docs.python.org/3.14/library/argparse.html#color
I propose that we enable this attribute for all argument parsers in
Django, notably for management commands.
Python supports common opt-out environment variables for the feature. I
think we’ll need to extend that to also avoid setting the `color`
attribute when `DJANGO_COLORS` is set to `nocolor`,
[https://docs.djangoproject.com/en/5.2/ref/django-admin/#syntax-coloring as already documented].
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com
#36376: Use argparse color on Python 3.14+
-------------------------------------+-------------------------------------
Reporter: Adam Johnson | Owner: (none)
Type: Uncategorized | Status: new
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
I propose that we enable this feature by setting `color=True` for all
argument parsers in Django, notably for management commands.
Python supports common opt-out environment variables for the feature. I
think we’ll need to extend that to also avoid setting the `color`
attribute when `DJANGO_COLORS` is set to `nocolor`,
[https://docs.djangoproject.com/en/5.2/ref/django-admin/#syntax-coloring as already documented].