#30098: Permit using packages (directories) in custom django-admin commands.
-------------------------------------+-------------------------------------
     Reporter:  Andrey Volkov        |                    Owner:  Andrey
                                     |  Volkov
         Type:  New feature          |                   Status:  closed
    Component:  Core (Management     |                  Version:  2.1
  commands)                          |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

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


Comment:

 Hi Andrey. Thanks for the suggestion and PR demonstrating it. As it stands
 I think I agree with Tim's initial comment.

 I'm not sure I see any real benefit to allowing packages here. It's
 already possible to add a package to contain any supporting files (if
 there's more than one) — either in `management` or in `commands` — so I'm
 not convinced any extra encapsulation merits the change. (I'm not sure I
 buy either the ''renaming'' or ''extra features'' points you make.)

 The restriction to modules has been there ≈forever. See
 f25b8cdbcdc99812299e9081cd3b03ddc08dcf74 for #5222, which introduced
 `find_commands()`. Just on the principle that ''There should be one-- and
 preferably only one --obvious way to do it.'' I don't think changing that
 design choice is merited.

 Also, people will be using the fact that you **can** put a package in
 `commands` and not have it detected. If we change that such packages will
 be picked up by `find_commands()` and we'll have a whole load of reports
 of `help` listing phantom commands that only lead to `AttributeError:
 module '...' has no attribute 'Command'` errors when invoked.

 So for both these reasons I'm going to opt for `wontfix` here. Possibly
 you could raise it on the DevelopersMailingList if you feel strongly on
 the issue.

 Thanks again.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30098#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.7f7d78085e2d6dbef7743f35502474ac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to