[Django] #36089: Refactor the ManagementUtility to make get_commands a method

6 views
Skip to first unread message

Django

unread,
Jan 12, 2025, 7:40:37 AM1/12/25
to django-...@googlegroups.com
#36089: Refactor the ManagementUtility to make get_commands a method
-------------------------------------+-------------------------------------
Reporter: d9pouces | Type: New
| feature
Status: new | Component: Core
| (Management commands)
Version: dev | Severity: Normal
Keywords: commands | Triage Stage:
ManagementUtility | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
The ManagementUtility directly uses the get_commands function instead of
encapsulating it in a method that could be overridden, for example to
exclude some unwanted Django commands.

To ensure compatibility, the simplest way is to add a method to
ManagementUtility that only calls the original get_methods function.
--
Ticket URL: <https://code.djangoproject.com/ticket/36089>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 12, 2025, 7:42:37 AM1/12/25
to django-...@googlegroups.com
#36089: Refactor the ManagementUtility to make get_commands a method
-------------------------------------+-------------------------------------
Reporter: d9pouces | Owner: (none)
Type: New feature | Status: new
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution:
Keywords: commands | Triage Stage:
ManagementUtility | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by d9pouces:

Old description:

> The ManagementUtility directly uses the get_commands function instead of
> encapsulating it in a method that could be overridden, for example to
> exclude some unwanted Django commands.
>
> To ensure compatibility, the simplest way is to add a method to
> ManagementUtility that only calls the original get_methods function.

New description:

The ManagementUtility directly uses the `get_commands` function instead of
encapsulating it in a method that could be overridden, for example to
exclude some unwanted Django commands.

To ensure compatibility, the simplest way is to add a
`get_management_commands` method to ManagementUtility that only calls the
original `get_commands` function.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36089#comment:1>

Django

unread,
Jan 12, 2025, 9:42:27 AM1/12/25
to django-...@googlegroups.com
#36089: Refactor the ManagementUtility to make get_commands a method
-------------------------------------+-------------------------------------
Reporter: d9pouces | Owner: (none)
Type: New feature | Status: closed
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution: wontfix
Keywords: commands | Triage Stage:
ManagementUtility | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* resolution: => wontfix
* status: new => closed

Comment:

I don't see any reason to exclude management commands, or at least this is
not something that would be widely used. Please first start a discussion
on the DevelopersMailingList, where you'll reach a wider audience and see
what other think, and
[https://docs.djangoproject.com/en/stable/internals/contributing/bugs-and-
features/#requesting-features follow the guidelines with regards to
requesting features].
--
Ticket URL: <https://code.djangoproject.com/ticket/36089#comment:2>

Django

unread,
Jan 12, 2025, 9:42:36 AM1/12/25
to django-...@googlegroups.com
#36089: Refactor the ManagementUtility to make get_commands a method
-------------------------------------+-------------------------------------
Reporter: d9pouces | Owner: (none)
Type: New feature | Status: closed
Component: Core (Management | Version: dev
commands) |
Severity: Normal | Resolution: wontfix
Keywords: commands | Triage Stage:
ManagementUtility | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* cc: Mariusz Felisiak (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/36089#comment:3>
Reply all
Reply to author
Forward
0 new messages