Replace optparse with argparse for python 2.7+

Bug #1480565 reported by Aaron Whitehouse
6
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://docs.python.org/2/library/optparse.html
https://docs.python.org/2/library/argparse.html

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.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

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!

Changed in duplicity:
importance: Undecided → Wishlist
importance: Wishlist → Low
assignee: nobody → Aaron Whitehouse (aaron-whitehouse)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.