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

pipes is deprecated in python 3.13 #1101

Closed
cidrblock opened this issue Jul 14, 2022 · 0 comments · Fixed by #1102
Closed

pipes is deprecated in python 3.13 #1101

cidrblock opened this issue Jul 14, 2022 · 0 comments · Fixed by #1102

Comments

@cidrblock
Copy link
Contributor

and throws a deprecation warning:

(venv) x1 ➜  ansible-navigator git:(main) ✗ python -W error
Python 3.11.0b3 (main, Jun  1 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ansible_runner.utils
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/bthornto/github/ansible-navigator/venv/lib64/python3.11/site-packages/ansible_runner/__init__.py", line 3, in <module>
    from .interface import run, run_async, \
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bthornto/github/ansible-navigator/venv/lib64/python3.11/site-packages/ansible_runner/interface.py", line 27, in <module>
    from ansible_runner.config.runner import RunnerConfig
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bthornto/github/ansible-navigator/venv/lib64/python3.11/site-packages/ansible_runner/config/runner.py", line 31, in <module>
    from ansible_runner.config._base import BaseConfig, BaseExecutionMode
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bthornto/github/ansible-navigator/venv/lib64/python3.11/site-packages/ansible_runner/config/_base.py", line 42, in <module>
    from ansible_runner.utils import (
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bthornto/github/ansible-navigator/venv/lib64/python3.11/site-packages/ansible_runner/utils/__init__.py", line 16, in <module>
    import pipes
    ^^^^^^^^^^^^
  File "/usr/lib64/python3.11/pipes.py", line 68, in <module>
    warnings._deprecated(__name__, remove=(3, 13))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/warnings.py", line 514, in _deprecated
    warn(msg, DeprecationWarning, stacklevel=3)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
>>> 
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Jul 14, 2022
Akasurde pushed a commit that referenced this issue Jul 20, 2022
- Replace deprecated pipes.quote with shlex.quote
- Fix file handle not being closed

Both were observed as affecting ansible-navigator testing, which is configured to run with warnings as errors. Ideally, we should be able to do the here with the runner at some point.

Fixes #1101
@sivel sivel removed the needs_triage New item that needs to be triaged label May 16, 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

Successfully merging a pull request may close this issue.

2 participants