Import argparse directly

We were importing _argparse (private) from cliff to get at
argparse.HelpFormatter, which was present there only because it was
being transitively imported directly from argparse itself. Commit
584352dcd008d58c433136539b22a6ae9d6c45cc got rid of this transitive
import, which means that rsdclient would have broken on the next cliff
release.

This commit just imports argparse directly instead.

And because that was the only reference to cliff in the project, this
commit also removes it from the requirements.

For more information, see http://lists.openstack.org/pipermail/openstack-discuss/2020-January/011852.html

Change-Id: I7f99d80a3be38acc45af83e54b32ebc2f5b40859
This commit is contained in:
Eric Fried 2020-01-08 13:31:02 -06:00
parent d5935fdae6
commit d1a515eac0
2 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,6 @@
# process, which may cause wedges in the gate later.
pbr>=2.0 # Apache-2.0
cliff>=2.8.0 # Apache-2.0
osc-lib>=1.7.0 # Apache-2.0
rsd-lib>=1.2.0 # Apache-2.0
six>=1.10.0 # MIT

View File

@ -13,7 +13,7 @@
# under the License.
#
from cliff import _argparse
import argparse
from osc_lib.command import command
@ -27,7 +27,7 @@ class Command(command.Command):
return parser
class _SmartHelpFormatter(_argparse.HelpFormatter):
class _SmartHelpFormatter(argparse.HelpFormatter):
"""New smart argparse HelpFormatter
Smart help formatter to output raw help message if it contains newline