Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infrared fails on python3.11 #416

Open
gthiemonge opened this issue Nov 28, 2022 · 1 comment
Open

infrared fails on python3.11 #416

gthiemonge opened this issue Nov 28, 2022 · 1 comment

Comments

@gthiemonge
Copy link
Member

When using infrared with python3.11 (from fedora), I get the following backtrace:

/usr/lib/python3.11/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "/home/gthiemon/.local/bin/ir", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/gthiemon/.local/lib/python3.11/site-packages/infrared/main.py", line 527, in main
    specs_manager.register_spec(
  File "/home/gthiemon/.local/lib/python3.11/site-packages/infrared/api.py", line 196, in register_spec
    spec_object.extend_cli(self.root_subparsers)
  File "/home/gthiemon/.local/lib/python3.11/site-packages/infrared/main.py", line 342, in extend_cli
    import_parser = plugin_subparsers.add_parser(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/argparse.py", line 1185, in add_parser
    raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument command0: conflicting subparser: import

It appears that the import command is added twice in the parser:
https://github.com/redhat-openstack/infrared/blob/master/infrared/main.py#L337-L345

@tosky
Copy link
Contributor

tosky commented Jan 17, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants