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 nadeem.vawda
Recipients Adam.Groszer, benjamin.peterson, cjw296, eric.araujo, georg.brandl, jaraco, nadeem.vawda, tarek
Date 2012-02-25.08:33:19
SpamBayes Score 4.9960036e-16
Marked as misclassified No
Message-id <1330158800.65.0.150378145727.issue6884@psf.upfronthosting.co.za>
In-reply-to
Content
>>> Fix merged.  I don’t fully understand why one place needs two escapes and the others just one.
>> The places that use one level of escaping are the ones that deal with the regex string directly.
>> In glob_to_re() itself, the string you're building is a regex replacement pattern that *operates on*
>> the regex that gets returned
> Makes sense.  I’ve added a comment as you suggested (although an unfunny one, without dragons; I don’t like “you’re not supposed to understand this”-like comments).

Hmm yeah, I had just meant the dragons bit as a joke... I wouldn't want
people to get the impression that the code should be treated as magic.


>>> I didn’t take that part.  If someone wants to port Python with a new style of os.sep or os.extsep,
>>> I’ll deal with it when they report that.
>> If you want to leave it as it is, that's your choice. But I do think it's better to make this Do The
>> Right Thing now, given how easy it is.
> I’d be okay with some cleanup in packaging, but for distutils I want the minimal patch.

That's fine by me.


>> Well, as far as I can make out, the current implementation always uses r'\' to join paths. But it
>> won't convert existing '/'s in the start path to r'\'s, so you might still end up encountering both
>> separators (assuming the initial path is something you get from the user somewhere along the line).
> Hm, it should come from the manifest template, i.e. using '/' that get translated to os.sep.  I’ll remove the regex redundancy in packaging, we have rather good tests for manifest and sdist now.

I was thinking that maybe findall()'s 'dir' argument could be specified
by the user as a command-line flag or something. But looking through
the sdist code, it seems that it always uses the current directory. So
your change shouldn't be a problem.
History
Date User Action Args
2012-02-25 08:33:20nadeem.vawdasetrecipients: + nadeem.vawda, georg.brandl, jaraco, cjw296, benjamin.peterson, tarek, eric.araujo, Adam.Groszer
2012-02-25 08:33:20nadeem.vawdasetmessageid: <1330158800.65.0.150378145727.issue6884@psf.upfronthosting.co.za>
2012-02-25 08:33:20nadeem.vawdalinkissue6884 messages
2012-02-25 08:33:19nadeem.vawdacreate