Update management commands to work on newer versions of Django.
Review Request #8742 — Created Feb. 13, 2017 and submitted
Modern versions of Django require some changes for management commands. For instance, ArgumentParser is used instead of OptionParser, and options can't be defined directly on the class. Django Evolution needs to support versions of Django prior to these changes. In order to do that, we now have a new base class for management commands that allows subclasses to adhere to the new requirements while also providing backwards-compatibility for older versions of Django. All common types of options are supported. This brings us a step closer to supporting Django 1.10.
Unit tests pass.
Tested the management commands on Django 1.6 through 1.10.
Tested Djblets against these changes on Django 1.6 through 1.10.
Description | From | Last Updated |
---|---|---|
I don't see where this method is used |
david | |
Docstring? |
david | |
Docstring? |
david | |
'make_option' imported but unused |
reviewbot | |
It might be nice to extract everything within this block into its own method--things are getting pretty deeply nested. |
david | |
The cursor needs to be closed. |
david |
- Change Summary:
-
- Added docstrings.
- Removed an unused import.
- Commit:
-
45d89420ad94a9c8ac60b4e1c38aab46ba0b83eccdfb0bf4202e25973924c31f9dad4af12ab58a5e
-
Tool: Pyflakes Processed Files: django_evolution/management/commands/wipe-evolution.py django_evolution/management/commands/evolve.py django_evolution/management/commands/list-evolutions.py django_evolution/compat/commands.py Tool: PEP8 Style Checker Processed Files: django_evolution/management/commands/wipe-evolution.py django_evolution/management/commands/evolve.py django_evolution/management/commands/list-evolutions.py django_evolution/compat/commands.py
- Change Summary:
-
Added a TODO comment about closing the cursor.
- Commit:
-
cdfb0bf4202e25973924c31f9dad4af12ab58a5eb2396f0c06f6a043f00ba86ba3ea0737bfd26842
-
Tool: Pyflakes Processed Files: django_evolution/management/commands/wipe-evolution.py django_evolution/management/commands/evolve.py django_evolution/management/commands/list-evolutions.py django_evolution/compat/commands.py Tool: PEP8 Style Checker Processed Files: django_evolution/management/commands/wipe-evolution.py django_evolution/management/commands/evolve.py django_evolution/management/commands/list-evolutions.py django_evolution/compat/commands.py