#24518: OptionParser verbosity not cast to int (Python3) --------------------------------------------+---------------------- Reporter: jthi3rry | Owner: jthi3rry Type: Bug | Status: new Component: Core (Management commands) | Version: 1.8rc1 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 1 | UI/UX: 0 --------------------------------------------+---------------------- With Python3, when not using argparse for a management command, the verbosity option uses a type=choice, which leads to a `TypeError: unorderable types: str() > int()` in `django/core/management/commands/test.py` at line 65 (`if options['verbosity'] > 0`)
The problem comes from this line: {{{ parser.add_option('-v', '--verbosity', action='store', dest='verbosity', default='1', type='choice', choices=['0', '1', '2', '3'], help='Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output') }}} -- Ticket URL: <https://code.djangoproject.com/ticket/24518> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.8df7adbd1d777e212886d779599b2f3b%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.