[PATCH] D25173: [lit] Use argparse instead of optparse

Brian Gesiak via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 2 19:41:43 PDT 2016


modocache created this revision.
modocache added reviewers: ddunbar, echristo, beanz.
modocache added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

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.


https://reviews.llvm.org/D25173

Files:
  utils/lit/lit/main.py
  utils/lit/tests/usage.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25173.73233.patch
Type: text/x-patch
Size: 10168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161003/38ba2d1e/attachment.bin>


More information about the llvm-commits mailing list