Serhiy Storchaka added the comment:
Updated patch addresses Eric's comment.
--
Added file: http://bugs.python.org/file32687/glob_escape_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
Eric V. Smith added the comment:
Looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset 5fda36bff39d by Serhiy Storchaka in branch 'default':
Issue #8402: Added the escape() function to the glob module.
http://hg.python.org/cpython/rev/5fda36bff39d
--
nosy: +python-dev
___
Python tracker
Serhiy Storchaka added the comment:
Thank you Ezio and Eric for your reviews.
--
assignee: - serhiy.storchaka
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Could anyone please review the patch before feature freeze?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
___
Changes by Michele OrrĂ¹ maker...@gmail.com:
--
nosy: -maker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Updated patch addresses Ezio's and Eric's comments.
--
Added file: http://bugs.python.org/file32673/glob_escape_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Escaping for glob on Windows should not be such trivial. Special characters in
the drive part have no special meaning and should not be escaped. I.e.
``escape('//?/c:/Quo vadis?.txt')`` should return ``'//?/c:/Quo
vadis[?].txt'``. Perhaps we should move the
Matthew Barnett added the comment:
I've attached fnmatch_implementation.py, which is a simple pure-Python
implementation of the fnmatch function.
It's not as susceptible to catastrophic backtracking as the current re-based
one. For example:
fnmatch('a' * 50, '*a*' * 50)
completes quickly.
Serhiy Storchaka added the comment:
I think it should be a separate issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
___
___
Serhiy Storchaka added the comment:
It is good, if stdlib has function for escaping any special characters, even if
this function is simple. There are already escape functions for re and
sgml/xml/html.
Private function glob.glob1 used in Lib/msilib and Tools/msi to prevent
unexpected
Ezio Melotti added the comment:
The workaround is now documented.
I'm still not sure if this should still be added, or if it should be closed as
rejected now that the workaround is documented.
A third option would be adding it as a recipe in the doc, given that the whole
functions boils down
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: docs@python -
components: -Documentation
keywords: +needs review
resolution: invalid -
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
Changes by Serhiy Storchaka storch...@gmail.com:
--
title: Add a way to escape metacharacters in glob/fnmatch - Add a function to
escape metacharacters in glob/fnmatch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8402
15 matches
Mail list logo