Edgewall Software
Modify

Opened 4 years ago

Closed 3 years ago

#12148 closed task (fixed)

Replace uses of optparse with argparse

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.1
Component: general Version:
Severity: normal Keywords: python3
Cc: Branch:
Release Notes:

Replaced uses of optparse with argparse throughout codebase.

API Changes:

Description (last modified by Ryan J Ollos)

Python has deprecated the optparse module and replaced it with argparse. The limited number of instances of optparse in the Trac codebase should be fairly easy to replace. optparse is deprecated in Python 2.7/3.2 and later.

Attachments (0)

Change History (6)

comment:1 by Ryan J Ollos, 4 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 4 years ago

Description: modified (diff)

comment:3 by Ryan J Ollos, 3 years ago

Owner: set to Ryan J Ollos
Status: newassigned

comment:4 by Ryan J Ollos, 3 years ago

Release Notes: modified (diff)

Proposed changes in log:rjollos.git:t12148_argparse:

A few of the subtleties with the changes are:

  • ArgumentParser.error returns exit code 2 in cases where exit code 1 was previously returned.
  • More could be done to improve htdigest.py, but I will save that for later, likely as part of #8361.
  • I haven't tested on Windows or Linux yet.

comment:5 by Ryan J Ollos, 3 years ago

Revised changes in log:rjollos.git:t12148_argparse.1. Tests on Travis CI and AppVeyor are passing. I'll be doing more testing before committing the changes.

comment:6 by Ryan J Ollos, 3 years ago

Resolution: fixed
Status: assignedclosed

I did additional testing and made minor revisions. Changes committed to trunk in r15064.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.