]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119670: Add `force` keyword only argument to `shlex.quote` (#148846)
authorjb2170 <email@jb2170.com>
Thu, 4 Jun 2026 09:06:02 +0000 (10:06 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2026 09:06:02 +0000 (11:06 +0200)
commitae507e3b14a133b62b3aae9cd531a7dbfdaa8f24
tree6cde767979f1a05785ad4844c5ca588cef5bb2e6
parent6b24376fed9ba1d5249b3f284ccad6be49f31198
gh-119670: Add `force` keyword only argument to `shlex.quote` (#148846)

There are propositions to add a single-quote-double-quote switch
(gh-90630), so to avoid hiccups of people passing `force` as a
positional and it being used for the single-double switch, we make
kwargs kwargs-only.

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Doc/library/shlex.rst
Doc/whatsnew/3.16.rst
Lib/shlex.py
Lib/test/test_shlex.py
Misc/NEWS.d/next/Library/2026-04-21-06-30-59.gh-issue-119670.pMWZfY.rst [new file with mode: 0644]