circus-tent/circus

DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13

Opened this issue · 2 comments

The following DeprecationWarning started appearing in Python 3.11 and will become relevant later this year when Python 3.13 is released

    from circus.client import CircusClient
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/circus/client.py:11: in <module>
    from circus.util import DEFAULT_ENDPOINT_DEALER, get_connection, to_bytes
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/circus/util.py:42: in <module>
    from pipes import quote as shell_escape_arg
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/pipes.py:68: in <module>
    warnings._deprecated(__name__, remove=(3, 13))
DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13

The pipes module was deprecated in PEP-594:

The pipes module provides helpers to pipe the input of one command into the output of another command. The module is built on top of os.popen. Users are encouraged to use the subprocess module instead.

https://peps.python.org/pep-0594/#pipes

Just stumbled on this issue, as well, while using Python 3.13, in which pipes is actually removed (leading to a ModuleNotFoundError when calling verdi status in AiiDA, originating from this library). I realized that this is fixed on main, see here (@sphuber is everywhere hehe). Not sure how well-maintained the library is at this point, as the last changes on master, as well as the v0.18.0 release, are abut 2 years in the past.

There has indeed been almost no maintenance of this package. De facto it has been me and @biozz most recently, but we are clearly not active. It seems that the PR you linked is the only real fix on the master branch since the v0.18.0 release. So I guess I could simply trigger a new patch release. I seem to have added a CD workflow to automate it, so it should be straight forward, but it has been a while 😅

EDIT: Just realized that just addressing this one deprecation warning doesn't automatically guarantees that it is actually compatible with Python 3.13. The package doesn't even officially claim compatibility with Python 3.12 yet. So that will have to be done first.