[issue10146] Incorrect regex generation in translate_pattern

Noah Kantrowitz report at bugs.python.org
Tue Oct 19 21:10:45 CEST 2010


New submission from Noah Kantrowitz <noah+bugs.python.org at coderanger.net>:

If a prefix is passed to translate_pattern it will generate a pattern using the unescaped output of os.path.join(). This is fine on *nix, but on Windows it results in a pattern like r'build\.*', which matches any string starting with "build" (in my case, "buildout.cfg"). Escaping the separator fixes this (patch attached).

----------
assignee: tarek
components: Distutils
files: filelist.diff
keywords: patch
messages: 119159
nosy: coderanger, eric.araujo, tarek
priority: normal
severity: normal
status: open
title: Incorrect regex generation in translate_pattern
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1
Added file: http://bugs.python.org/file19287/filelist.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10146>
_______________________________________


More information about the Python-bugs-list mailing list