This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Replace deprecated optparse by argparse (NFC)
ClosedPublic

Authored by mib on Aug 14 2023, 3:03 AM.

Details

Summary

This patch replace the deprecated optparse module used for the
crashlog& save_crashlog commands with the new argparse from the
python standard library. This provides many benefits such as showing the
default values for each option in the help description, but also greatly
improve the handling of position arguments.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

Diff Detail

Event Timeline

mib created this revision.Aug 14 2023, 3:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 14 2023, 3:03 AM
mib requested review of this revision.Aug 14 2023, 3:03 AM

Makes sense to me. optparse has been deprecated since Python 3.2 in favor of argparse. It's good to get ahead of the curve here.

bulbazord accepted this revision.Aug 14 2023, 11:23 AM
This revision is now accepted and ready to land.Aug 14 2023, 11:23 AM
JDevlieghere accepted this revision.Aug 14 2023, 2:05 PM
This revision was automatically updated to reflect the committed changes.