This is an archive of the discontinued LLVM Phabricator instance.

[lit] Use argparse instead of optparse
ClosedPublic

Authored by modocache on Oct 2 2016, 7:41 PM.

Details

Summary

optparse is deprecated in Python 2.7, which is the minimum version of
Python required to run the LLVM test suite. Replace its usage in lit
with argparse, optparse's 2.7 replacement module.

argparse has several benefits over optparse, but this commit does not
make use of those benefits yet. Instead, it simply uses the new API,
and attempts to keep the number of changes to a minimum.

Confirmed that lit's test suite, as well as LLVM's regression test suite,
still pass with these changes.

Event Timeline

modocache updated this revision to Diff 73233.Oct 2 2016, 7:41 PM
modocache retitled this revision from to [lit] Use argparse instead of optparse.
modocache updated this object.
modocache added reviewers: ddunbar, echristo, beanz.
modocache added a subscriber: llvm-commits.
beanz accepted this revision.Oct 3 2016, 2:46 PM
beanz edited edge metadata.

LGTM!

This revision is now accepted and ready to land.Oct 3 2016, 2:46 PM

Awesome, thanks! Allow me to try merging this one myself, I just received commit access (thanks for suggesting it!).

modocache closed this revision.Oct 3 2016, 4:54 PM

Ah, looks like it's already been merged -- thanks! I'll look for another good test commit. :)