homepage

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.

Author wayned
Recipients
Date 2006年05月19日.07:55:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The regex substitution in distutils.filelist.glob_to_re
fails to do the right thing in a couple cases:
1. it fails to translate a dot after an even number of
backslashes.
2. it fails to translate multiple dots in row.
For example:
foo\\* -> foo\\.*$
foo???? -> foo[^/].[^/].$
The following substitution fixes these problems:
 re.sub(r'((?<!\\)(\\\\)*)\.', r'1円[^/]', re_pattern)
This allows the dot to be preceeded by an even number
of backslashes (including 0) and it utilizes a negative
look-behind assertion so that adjacent dots are handled.
This problem is present in the svn code, and appears to
be identical in versions 2.4.2 and 2.3.5 (the only two
versions I had around to check).
History
Date User Action Args
2008年01月20日 09:58:43adminlinkissue1491431 messages
2008年01月20日 09:58:43admincreate

AltStyle によって変換されたページ (->オリジナル) /