[Python-checkins] cpython: Port the fix for #13193 to packaging
eric.araujo
python-checkins at python.org
Sun Feb 12 05:26:33 CET 2012
http://hg.python.org/cpython/rev/f06effb61cde
changeset: 74884:f06effb61cde
user: Éric Araujo <merwok at netwok.org>
date: Sun Feb 12 05:01:42 2012 +0100
summary:
Port the fix for #13193 to packaging
files:
Lib/packaging/manifest.py | 6 ++----
Misc/NEWS | 3 ++-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Lib/packaging/manifest.py b/Lib/packaging/manifest.py
--- a/Lib/packaging/manifest.py
+++ b/Lib/packaging/manifest.py
@@ -366,10 +366,8 @@
# ditch end of pattern character
empty_pattern = _glob_to_re('')
prefix_re = _glob_to_re(prefix)[:-len(empty_pattern)]
- # match both path separators, as in Postel's principle
- sep_pat = "[" + re.escape(os.path.sep + os.path.altsep
- if os.path.altsep else os.path.sep) + "]"
- pattern_re = "^" + sep_pat.join([prefix_re, ".*" + pattern_re])
+ # paths should always use / in manifest templates
+ pattern_re = "^%s/.*%s" % (prefix_re, pattern_re)
else: # no prefix -- respect anchor flag
if anchor:
pattern_re = "^" + pattern_re
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -777,7 +777,8 @@
- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
handles non-valid attributes, including adjacent and unquoted attributes.
-- Issue #13193: Fix distutils.filelist.FileList under Windows.
+- Issue #13193: Fix distutils.filelist.FileList and packaging.manifest.Manifest
+ under Windows.
- Issue #13384: Remove unnecessary __future__ import in Lib/random.py
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list