This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年04月18日 17:12 by eric.araujo, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| subprocess.rst-2.7.patch | cvrebert, 2012年09月15日 19:53 | patch against 2.7; mentions pipes.quote | review | |
| subprocess.rst-default.diff | cvrebert, 2012年10月28日 08:33 | patch against default branch; only mention shlex.quote() | review | |
| pipes.rst.diff | cvrebert, 2012年10月28日 09:10 | document pipes.quote() in 2.7 | review | |
| Messages (15) | |||
|---|---|---|---|
| msg158641 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年04月18日 17:12 | |
The warning at http://docs.python.org/library/subprocess#frequently-used-arguments should IMO recommend using shlex.quote. Even if it strongly advises against using shell=True, there are people who need or want to use it, so let’s give them a pointer to the quote function. For older versions, I think we should talk about pipes.quote; even if it’s not documented in library/pipes, it is there, it is known and it is used, so I see no harm in mentioning it (with due mention that it’s only semi-official and that it becomes public in 3.3). |
|||
| msg160586 - (view) | Author: Chris Rebert (cvrebert) * | Date: 2012年05月14日 00:14 | |
Patch to mention shlex.quote() in the `subprocess` module's "Frequently Used Arguments" Warning box. Could perhaps be a separate Note, but that could be clutter-y. |
|||
| msg162570 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月10日 01:23 | |
Text LGTM; I haven’t looked at the position in the doc file though. Sandro, once again I’m adding you to nosy in the hope that you’ll have time to make a review and maybe a commit, with my thanks! |
|||
| msg162571 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年06月10日 01:23 | |
Please also take my note about pipes.quote in my OP into account. |
|||
| msg170528 - (view) | Author: Chris Rebert (cvrebert) * | Date: 2012年09月15日 19:54 | |
Updated patches to mention pipes.quote(). |
|||
| msg170611 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2012年09月17日 14:20 | |
You thought it was better not to mention that pipes.quote is semi-official and becomes public as shlex.quote in 3.3? |
|||
| msg173740 - (view) | Author: Chris Rebert (cvrebert) * | Date: 2012年10月25日 07:28 | |
No, the thought merely did not occur to me. I don't recall having seen such forward-looking notes in Python's documentation before. Should the pipes.quote() mention be axed from the 3.x patch? |
|||
| msg173759 - (view) | Author: Andrew Svetlov (asvetlov) * (Python committer) | Date: 2012年10月25日 13:51 | |
I think patch for 3.3 should mention only shlex.quote. I don't care about 2.7 patch but it looks good to me. |
|||
| msg173777 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2012年10月25日 17:44 | |
> I think patch for 3.3 should mention only shlex.quote. +1 I'm not sure what's the best thing to do about pipes.quote. Pointing to an undocumented function that is available in 3.3 in a different module doesn't sound like a really good idea. Maybe we could document pipes.quote as an internal/deprecated function so that people that follow the link from the subprocess docs will be aware that the function is available under a different name in 3.3+. Otherwise we could just document shlex.quote() in 3.3+. |
|||
| msg174011 - (view) | Author: Chris Rebert (cvrebert) * | Date: 2012年10月28日 08:33 | |
Here's a revised patch against the default branch (3.4 I presume?). |
|||
| msg174014 - (view) | Author: Chris Rebert (cvrebert) * | Date: 2012年10月28日 09:10 | |
Just to keep the ball rolling, in case it ends up being the solution ultimately chosen, here is a patch against 2.7 to document pipes.quote(). The text is yanked straight from shlex.quote(), the differences being: - qualify shlex.split() references - print function -> print statement - add deprecation note (currently backdated to when `pipes` was added to the std lib; mentions what happens in 3.3) |
|||
| msg174018 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月28日 09:43 | |
New changeset f9d11ca3ccd1 by Andrew Svetlov in branch '3.3': Issue #14616: Mention shlex.quote in subprocess docs. http://hg.python.org/cpython/rev/f9d11ca3ccd1 New changeset 72672cf5d850 by Andrew Svetlov in branch 'default': Merge issue #14616: Mention shlex.quote in subprocess docs. http://hg.python.org/cpython/rev/72672cf5d850 |
|||
| msg174019 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月28日 09:48 | |
New changeset d9ca966cd116 by Andrew Svetlov in branch '2.7': Issue #14616: Document pipes.quote and mention this one in subprocess docs. http://hg.python.org/cpython/rev/d9ca966cd116 |
|||
| msg174020 - (view) | Author: Andrew Svetlov (asvetlov) * (Python committer) | Date: 2012年10月28日 09:49 | |
I have applied all patches. Thanks, Chris. |
|||
| msg190234 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2013年05月28日 18:28 | |
> .. deprecated:: 1.6 This looks weird to me. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | github: 58821 |
| 2013年05月28日 18:28:56 | eric.araujo | set | messages: + msg190234 |
| 2012年10月28日 09:49:29 | asvetlov | set | status: open -> closed type: enhancement messages: + msg174020 resolution: fixed stage: resolved |
| 2012年10月28日 09:48:14 | python-dev | set | messages: + msg174019 |
| 2012年10月28日 09:43:14 | python-dev | set | nosy:
+ python-dev messages: + msg174018 |
| 2012年10月28日 09:10:30 | cvrebert | set | files:
+ pipes.rst.diff messages: + msg174014 versions: + Python 3.4, Python 3.5 |
| 2012年10月28日 09:04:15 | cvrebert | set | files: - subprocess.rst-3.3.patch |
| 2012年10月28日 08:33:24 | cvrebert | set | files:
+ subprocess.rst-default.diff messages: + msg174011 |
| 2012年10月25日 17:44:08 | ezio.melotti | set | nosy:
+ ezio.melotti messages: + msg173777 |
| 2012年10月25日 13:51:29 | asvetlov | set | nosy:
+ asvetlov messages: + msg173759 |
| 2012年10月25日 07:28:10 | cvrebert | set | messages: + msg173740 |
| 2012年09月17日 14:20:18 | eric.araujo | set | messages: + msg170611 |
| 2012年09月15日 19:54:51 | cvrebert | set | files: - subprocess_shlex_quote.patch |
| 2012年09月15日 19:54:42 | cvrebert | set | files:
+ subprocess.rst-3.3.patch messages: + msg170528 |
| 2012年09月15日 19:53:41 | cvrebert | set | files: + subprocess.rst-2.7.patch |
| 2012年06月10日 01:23:46 | eric.araujo | set | messages: + msg162571 |
| 2012年06月10日 01:23:02 | eric.araujo | set | nosy:
+ sandro.tosi messages: + msg162570 |
| 2012年05月14日 00:14:12 | cvrebert | set | files:
+ subprocess_shlex_quote.patch keywords: + patch messages: + msg160586 |
| 2012年04月23日 12:30:42 | cvrebert | set | nosy:
+ cvrebert |
| 2012年04月23日 08:41:24 | tshepang | set | nosy:
+ tshepang |
| 2012年04月18日 17:12:37 | eric.araujo | create | |