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

Tests fail on Python 3.11 #13820

Closed
4 of 9 tasks
jelly opened this issue Apr 7, 2023 · 3 comments
Closed
4 of 9 tasks

Tests fail on Python 3.11 #13820

jelly opened this issue Apr 7, 2023 · 3 comments

Comments

@jelly
Copy link

jelly commented Apr 7, 2023

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.

Bug Summary

=================================== FAILURES ===================================
__________________ TestOptions.test_actions_with_primary_key ___________________
Traceback (most recent call last):
  File "/build/awxkit/src/awx/awxkit/test/cli/test_options.py", line 180, in test_actions_with_primary_key
    ResourceOptionsParser(None, page, 'jobs', self.parser)
  File "/build/awxkit/src/awx/awxkit/awxkit/cli/options.py", line 97, in __init__
    self.build_list_actions()
  File "/build/awxkit/src/awx/awxkit/awxkit/cli/options.py", line 116, in build_list_actions
    parser = self.parser.add_parser(method, help='')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/argparse.py", line 1192, in add_parser
    raise ArgumentError(self, _('conflicting subparser: %s') % name)
argparse.ArgumentError: argument {list,create,get,modify,delete,stdout,monitor}: conflicting subparser: list
=============================== warnings summary ===============================
../../../../../usr/lib/python3.11/site-packages/pkg_resources/__init__.py:121
  /usr/lib/python3.11/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/cli/test_options.py::TestOptions::test_actions_with_primary_key
============ 1 failed, 230 passed, 5 deselected, 1 warning in 0.46s ============

AWX version

22.0.0

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

N/A

Modifications

no

Ansible version

No response

Operating system

No response

Web browser

No response

Steps to reproduce

pytest -vv

Expected results

Tests pass

Actual results

Tests do not pass

Additional information

No response

@shanemcd
Copy link
Member

shanemcd commented Apr 7, 2023

Hi. Thanks for the issue. AWX doesn't try to support multiple versions of Python. Our builds are currently based on centos:stream9 and it ships with python3.9. Feel free to submit a PR that works with both 3.9 and 3.11, or we will fix this whenever we get around to updating to 3.11.

@mgorny
Copy link

mgorny commented Apr 13, 2023

FYI, my original bug about this was "fixed" by #13174 (except it wasn't) — so perhaps you can manage to actually fix it via extending the same approach to more subparsers. But I don't know the code at all, so I don't know if it won't break anything.

@dmzoneill
Copy link
Member

This is resolved in
#14771
As python 3.11 will be released in the next release. I'm pre-emptively closing this issue.

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

No branches or pull requests

5 participants