• 
      

    Support positional arguments in management commands.

    Review Request #10493 — Created April 2, 2019 and submitted — Latest diff uploaded

    Information

    Djblets
    release-2.0.x

    Reviewers

    The compatibility layer for management commands tries to convert
    new-style argument definitions to optparse on Django 1.6. However, one
    major difference between the two is that argparse supports defining
    positional arguments whereas optparse does not allow explicitly
    defining these, instead leaving this up to the consuming command.

    This change simply filters out the positional argument definitions when
    using optparse, avoiding a crash. It still leaves the handling up to
    the command, however, passing all positional arguments from the command
    line.

    Tested management commands defining positional arguments on both
    Django 1.6 and 1.11.

    Commits

    Files