#24518: OptionParser verbosity not cast to int (Python3)
-------------------------------------+-------------------------------------
     Reporter:  jthi3rry             |                    Owner:  jthi3rry
         Type:  Bug                  |                   Status:  closed
    Component:  Core (Management     |                  Version:  1.8rc1
  commands)                          |
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by claudep):

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


Comment:

 I'm not sure we want to change that. If you look at Django management
 commands in pre-1.8 versions, you'll read many `self.verbosity =
 int(options.get('verbosity'))` or `if int(options['verbosity']) > 0:`
 patterns. The future is definitely using `argparse`, so if for any reason
 you still want to keep using `optparse`, you should continue to cast the
 result of the `verbosity` option to `int`.
 Your proposed patch would remove the option list checking of `verbosity`,
 which would be slightly backwards incompatible.

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

Reply via email to