From e0e5013a5a4b62e1e09c9d7e7f20b05b9a44e2df Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 8 Nov 2024 10:34:23 +0000 Subject: [PATCH] Doc: Recommend shlex.quote alongside pipes removal One of the most common reasons I see the old `pipes` module still in use when porting to Python 3.13 is for the undocumented `pipes.quote` function, which can easily be replaced with `shlex.quote`. I think it's worth specifically calling this out, since being directed to the `subprocess` module would be confusing in this case. --- Doc/whatsnew/3.13.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index de4c7fd4c0486b..664b1866172378 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1568,6 +1568,8 @@ and are now removed: For audio playback, use the :pypi:`pygame` library from PyPI instead. * :mod:`!pipes`: Use the :mod:`subprocess` module instead. + Use :func:`shlex.quote` to replace the undocumented ``pipes.quote`` + function. * :mod:`!sndhdr`: The :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic` libraries should be used as replacements.