#19973: Management commands migration to argparse
-------------------------------------+-------------------------------------
     Reporter:  jose                 |                    Owner:  jose
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |                  Version:  master
    Component:  Core (Management     |               Resolution:
  commands)                          |             Triage Stage:  Accepted
     Severity:  Normal               |      Needs documentation:  0
     Keywords:  optparse, argparse,  |  Patch needs improvement:  0
  basecommand                        |                    UI/UX:  0
    Has patch:  0                    |
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by Adys):

 So on Pootle we've been working on moving away from optparse in all our
 backend scripts but due to the dependency django has on optparse for
 specifically this, we are forced to use both optparse and argparse in the
 code which makes kittens cry.

 @claudep I would go with option 2. The advantage here is that it is much
 more powerful right out of the box. Subcommands would create their own
 parser and would be able to inherit the parent parser simply by calling
 super(). This allows easy creation of things such as subcommands and such.

 Being declarative is nice in principle but doesn't really work out for
 argument parsing - there is a reason python changed the logic there.

 Are you planning to work on this bug? I would love to help, FWIW.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19973#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/062.eea1bfb8b2d685ba6689687653bb5f04%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to