Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation missing pipes.quote() #60255

Closed
BarryMorrison mannequin opened this issue Sep 26, 2012 · 2 comments
Closed

Documentation missing pipes.quote() #60255

BarryMorrison mannequin opened this issue Sep 26, 2012 · 2 comments
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@BarryMorrison
Copy link
Mannequin

BarryMorrison mannequin commented Sep 26, 2012

BPO 16051
Nosy @bitdancer

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-09-26.11:25:56.606>
created_at = <Date 2012-09-26.01:09:26.229>
labels = ['type-feature', 'docs']
title = 'Documentation missing pipes.quote()'
updated_at = <Date 2012-09-26.11:25:56.583>
user = 'https://bugs.python.org/BarryMorrison'

bugs.python.org fields:

activity = <Date 2012-09-26.11:25:56.583>
actor = 'r.david.murray'
assignee = 'docs@python'
closed = True
closed_date = <Date 2012-09-26.11:25:56.606>
closer = 'r.david.murray'
components = ['Documentation']
creation = <Date 2012-09-26.01:09:26.229>
creator = 'Barry.Morrison'
dependencies = []
files = []
hgrepos = []
issue_num = 16051
keywords = []
message_count = 2.0
messages = ['171326', '171338']
nosy_count = 3.0
nosy_names = ['r.david.murray', 'docs@python', 'Barry.Morrison']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue16051'
versions = ['Python 2.7']

@BarryMorrison
Copy link
Mannequin Author

BarryMorrison mannequin commented Sep 26, 2012

Documentation here: http://docs.python.org/library/pipes.html makes no mention of quote()

But the link to Source code: Lib/pipes.py http://hg.python.org/cpython/file/2.7/Lib/pipes.py has:

267 def quote(file):
268 """Return a shell-escaped version of the file string."""
269 for c in file:
270 if c not in _safechars:
271 break
272 else:
273 if not file:
274 return "''"
275 return file
276 # use single quotes, and put single quotes into double quotes
277 # the string $'b is then quoted as '$'"'"'b'
278 return "'" + file.replace("'", "'\"'\"'") + "'"

First _ever_ bug report, apologies if this is incorrect.

@BarryMorrison BarryMorrison mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Sep 26, 2012
@bitdancer
Copy link
Member

Thanks for the report.

pipes.quote used to be an undocumented helper function in pipes. When we decided to make it public, we moved it to the shlex module. Therefore you'll find that as of Python 3.3 the source code has moved to shlex and it is documented in the shlex documentation.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant