Skip to content

Commit

Permalink
[3.13] Doc: Recommend shlex.quote alongside pipes removal (pythonGH-1…
Browse files Browse the repository at this point in the history
…26570) (python#126820)

Doc: Recommend shlex.quote alongside pipes removal (pythonGH-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 73e34b6)

Co-authored-by: Colin Watson <[email protected]>
  • Loading branch information
miss-islington and cjwatson authored Nov 14, 2024
1 parent 75d6431 commit 94e536e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 94e536e

Please sign in to comment.