Replace optparse with argparse for python 2.7+
Bug #1480565 reported by
Aaron Whitehouse
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
New
|
Low
|
Aaron Whitehouse |
Bug Description
As of python 2.7, optparse is deprecated in favour of argparse:
https:/
https:/
At some point, we should therefore change commandline.py to use argparse instead of optparse.
Note that argparse is new in 2.7, so isn't included by default in python 2.6 and below. It is, however, available as a separate package that is compatible with python 2.3+. Options for supporting python 2.6 after updating commandline.py would be to require the installation of the separate package, or include a copy of the module with duplicity.
To post a comment you must log in.
It looks as though argparse will make some of my unicode work easier, so this has bumped up my list a bit.
The challenge is making sure we have enough test coverage of the commandline options to know straightaway if I break anything!