[3.13] Doc: Recommend shlex.quote alongside pipes removal (GH-126570) (#126820)

Doc: Recommend shlex.quote alongside pipes removal (GH-126570)

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.
(cherry picked from commit 73e34b6808)

Co-authored-by: Colin Watson <cjwatson@debian.org>
This commit is contained in:
Miss Islington (bot) 2024-11-14 06:08:22 +01:00 committed by GitHub
parent 75d643166c
commit 94e536e283
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.