[Django] #29152: management commands rigid ArgumentParser initialization

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[Django] #29152: management commands rigid ArgumentParser initialization

Django
#29152: management commands rigid ArgumentParser initialization
-------------------------------------+-------------------------------------
               Reporter:  Dmitry     |          Owner:  nobody
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Core       |        Version:  2.0
  (Management commands)              |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Hello everyone.
 Noticed today that there is no way to customize CommandParser
 (ArgumentParser subclass), initialized in management commands
 (https://github.com/django/django/blob/master/django/core/management/base.py#L227).
 There is no option (or i was unable to find it - please correct me in this
 case) to pass any kwargs in CommandParser constructor. The public method
 create_parser contains some django-related hard-coded add_arguments calls,
 so overriding it directly leads to some copy paste.

 I needed to use some custom formatter for ArgumentParser
 (https://docs.python.org/3/library/argparse.html?highlight=argparse#argparse.ArgumentDefaultsHelpFormatter)
 to add default values to help page, but was unable to do this properly.
 There is also some other usefull keyword arguments available in
 ArgumentParser.

 As a proposal a new method could be added to BaseCommand (let's say
 BaseCommand.get_parser_instance), for example like this:

 {{{
 def get_parser_instance(self):
         return CommandParser(
             self, prog="%s %s" % (os.path.basename(prog_name),
 subcommand),
             description=self.help or None,
         )

 def create_parser(self, prog_name, subcommand)::
        parser = self.get_parser_instance()
        ... etc
 }}}

 This should not break anything in BaseCommand, but will allow have more
 control on parser's creation overriding just get_parser_instance method.
 Please sorry for mistakes.

--
Ticket URL: <https://code.djangoproject.com/ticket/29152>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/054.56f0fd8b8c65e072e9bead8d9f6c5076%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: management commands - more control on ArgumentParser initialization (was: management commands rigid ArgumentParser initialization)

Django
#29152: management commands - more control on ArgumentParser initialization
-------------------------------------+-------------------------------------
     Reporter:  dmippolitov          |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:1>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.1714eac906286f92cfa62eaa9cf9807f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: management commands - more control on ArgumentParser initialization

Django
In reply to this post by Django
#29152: management commands - more control on ArgumentParser initialization
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Dmitry):

 * type:  New feature => Cleanup/optimization


--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:2>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.c6b55e20c58ad64e96b09d90e8e807a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands (was: management commands - more control on ArgumentParser initialization)

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * stage:  Unreviewed => Accepted


Comment:

 Would a hook to provide some additional keyword arguments be sufficient?

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:3>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.44d6626bfff24c60fc2505e115f2ffc6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Dmitry):

 Replying to [comment:3 Tim Graham]:
 > Would a hook to provide some additional keyword arguments be sufficient?
 Yeah, this will be great, maybe the better way. I was thinking about way
 to implement this, but was unable to find beautiful enough way to add such
 hook. Maybe you have some good ideas.

 As a reference my idea was something like this:
 1. Add parser_kwargs argument in BaseCommand.__init__, defaults to {}
 {{{
         def __init__(self, stdout=None, stderr=None, no_color=False,
 parser_kwargs=None):
         self.stdout = OutputWrapper(stdout or sys.stdout)
         self.stderr = OutputWrapper(stderr or sys.stderr)
         if no_color:
             self.style = no_style()
         else:
             self.style = color_style()
             self.stderr.style_func = self.style.ERROR
        if not parser_kwargs:
            parser_kwargs = {}
 }}}

 2. use parser_kwargs in create_parser method
 {{{
     def create_parser(self, prog_name, subcommand):
         """
         Create and return the ``ArgumentParser`` which will be used to
         parse the arguments to this command.
         """
         if not 'prog' in self.parser_kwargs:
             self.parser_kwargs['prog'] = os.path.basename(prog_name),
 subcommand)
         if not 'description' in self.parser_kwargs:
             self.parser_kwargs['description'] = self.help or None
         parser = CommandParser(
             self, **self.parser_kwargs
         )
 }}}

 The problem is that in this case you will have two conflicting way to
 define description (using parser_kwargs or help).

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:4>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.6877615d89a56a1112cbdd236c41eb4f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Tom Forbes):

 The create_parser method could just pass in all kwargs to CommandParser,
 rather than having a parser_kwargs instance variable?


 {{{#!python
 def create_parser(self, **kwargs):
     return super().create_parser(my_custom_arg=123)

 # In BaseCommand
 def create_parser(self, **kwargs):
     kwargs.setdefault('description', ...)
     return CommandParser(self, **kwargs)
 }}}

 Might be a bit more flexible

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:5>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.e658cc855deaade919b4b536e020b251%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tom Forbes):

 * cc: Tom Forbes (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:6>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.b450007d32c962212b9943df6b535d8d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Dmitry):

 Replying to [comment:5 Tom Forbes]:
 > The create_parser method could just pass in all kwargs to CommandParser,
 rather than having a parser_kwargs instance variable?
 >
 >
 > {{{#!python
 > def create_parser(self, **kwargs):
 >     return super().create_parser(my_custom_arg=123)
 >
 > # In BaseCommand
 > def create_parser(self, **kwargs):
 >     kwargs.setdefault('description', ...)
 >     return CommandParser(self, **kwargs)
 > }}}
 >
 > Might be a bit more flexible
 I agree, this looks better.

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:7>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.1baa7c8895150e568350972b29ffd254%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by humbertotm):

 * status:  new => assigned
 * owner:  nobody => humbertotm


Comment:

 Hi, guys.

 I would like to work on this.
 There's been no activity in this thread lately, so I'm hoping this is
 still a valid issue. If not, please let me know.
 Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.2364c4d061c2c521100248f8586bcdfc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by humbertotm):

 Replying to [comment:7 Dmitry]:
 > Replying to [comment:5 Tom Forbes]:
 > > The create_parser method could just pass in all kwargs to
 CommandParser, rather than having a parser_kwargs instance variable?
 > >
 > >
 > > {{{#!python
 > > def create_parser(self, **kwargs):
 > >     return super().create_parser(my_custom_arg=123)
 > >
 > > # In BaseCommand
 > > def create_parser(self, **kwargs):
 > >     kwargs.setdefault('description', ...)
 > >     return CommandParser(self, **kwargs)
 > > }}}
 > >
 > > Might be a bit more flexible
 > I agree, this looks better.

 By the looks of this, I am guessing that every call to this method in the
 code base would have to be modified to fit this new signature, right?

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:9>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.1c0a948a7e5905808f288d7a4c55af7f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by humbertotm):

 This is the fix I'm proposing based on my understanding of the issue. As
 far as I understand, the requested enhancement requires that
 `CommandParser` can ultimately receive any additional args that it can
 pass to its parent class `ArgumentParser`. What I did was adding an
 additional positional argument in the form of `kwargs` to the
 `create_parser()` method in `BaseCommand` as follows:

 {{{
 def create_parser(self, prog_name, subcommand, **kwargs):
         """
         Create and return the ``ArgumentParser`` which will be used to
         parse the arguments to this command. Hi.
         """
         default_kwargs = {
             'prog': '%s %s' % (os.path.basename(prog_name), subcommand),
             'description': self.help or None,
             'formatter_class': DjangoHelpFormatter,
             'missing_args_message': getattr(self, 'missing_args_message',
 None),
             'called_from_command_line': getattr(self,
 '_called_from_command_line', None)
         }
         kwargs.update(default_kwargs)
         parser = CommandParser(**kwargs)
         ...
 }}}

 This way, the `kwargs` provided to the method call are merged with the
 default kwargs into a single dictionary to be passed on to
 `CommandParser`. These changes do not break the test suite, but additional
 regression tests are still pending.
 Let me know if I'm failing to see or understand something by following
 this approach.
 Thanks!

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:10>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.63418b618dee99e65d7f596b0f3f8634%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

 * has_patch:  0 => 1
 * needs_tests:  0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:11>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.bab3cf7e71811f742012afe6ea5400ef%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by humbertotm):

 Replying to [comment:11 Claude Paroz]:

 Hi, Claude!

 I was going through the tests dir looking for the appropriate place for
 this fix's test, but I am a bit lost.
 The `/tests/admin_scripts/tests.py` file seems like a good candidate, but
 I have my doubts.
 Any guidance on this would be greatly appreciated!

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:12>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.15c4fcedfd0d98faeb24cf14318aca41%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson):

 Replying to [comment:12 humbertotm]:

 > The `/tests/admin_scripts/tests.py` file seems like a good candidate

 Either that or `tests/user_commands`.

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:13>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.7220e2ecec43bfce0a6736734a0e893e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  assigned
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

 +1 for `user_commands`.

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:14>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.33e1641eb63ae69b0cd035413b0ad6f8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Django] #29152: Allow more control over ArgumentParser initialization in management commands

Django
In reply to this post by Django
#29152: Allow more control over ArgumentParser initialization in management
commands
-------------------------------------+-------------------------------------
     Reporter:  Dmitry               |                    Owner:
         Type:                       |  humbertotm
  Cleanup/optimization               |                   Status:  closed
    Component:  Core (Management     |                  Version:  2.0
  commands)                          |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

 In [changeset:"e95008f2411d50929873f634c3e14ebac811fd28" e95008f2]:
 {{{
 #!CommitTicketReference repository=""
 revision="e95008f2411d50929873f634c3e14ebac811fd28"
 Fixed #29152 -- Allowed passing kwargs to ArgumentParser initialization in
 management commands.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29152#comment:15>
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/069.fbcac230952444cf48b7ee4c576387d7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.