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 vinay.sajip
Recipients alexis, eric.araujo, flox, francismb, higery, jlove, michael.mulich, nadeem.vawda, paul.moore, pitrou, python-dev, rpetrov, tarek, vinay.sajip, westley.martinez
Date 2011-11-07.16:22:42
SpamBayes Score 5.551115e-17
Marked as misclassified No
Message-id <1320682952.10361.YahooMailNeo@web25803.mail.ukl.yahoo.com>
In-reply-to
Content
> 
>>  entirely deterministic: I couldn't see any other reason why the flag 
> would have different values
>>  on different machines.
> Sorry, what flag?

By "flag" I mean _cache_generated_egg ("flag" as in Boolean value)

> Patches for upstream cpython would be most helpful.  I also think that fixing 
> bugs in the pythonv branch makes it harder to review.

Ordinarily I'd submit a cpython patch, but in this case it's a one liner as Paul has
suggested, so there's not much to review / comment on.IMO BitBucket makes it
reasonably easy to review short patches like this. Here's the change to
packaging.manifest:

--- a/Lib/packaging/manifest.py    Sun Nov 06 22:27:53 2011 +0000
+++ b/Lib/packaging/manifest.py    Mon Nov 07 14:58:23 2011 +0000
@@ -366,7 +366,8 @@
         # ditch end of pattern character
         empty_pattern = _glob_to_re('')
         prefix_re = _glob_to_re(prefix)[:-len(empty_pattern)]
-        pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re)
+        # See issue 13193: Don't use os.path.join
+        pattern_re = "^%s/.*%s" % (prefix_re, pattern_re)
     else:                               # no prefix -- respect anchor flag
         if anchor:
             pattern_re = "^" + pattern_re

and the change to distutils.filelist:

--- a/Lib/distutils/filelist.py    Mon Nov 07 14:58:23 2011 +0000
+++ b/Lib/distutils/filelist.py    Mon Nov 07 15:06:18 2011 +0000
@@ -313,7 +313,8 @@
         # ditch end of pattern character
         empty_pattern = glob_to_re('')
         prefix_re = (glob_to_re(prefix))[:-len(empty_pattern)]
-        pattern_re = "^" + os.path.join(prefix_re, ".*" + pattern_re)
+        # See issue 13193: Don't use os.path.join
+        pattern_re = "^%s/.*%s" % (prefix_re, pattern_re)
     else:                               # no prefix -- respect anchor flag
         if anchor:
             pattern_re = "^" + pattern_re

You'll see I used a different idiom to Paul in my fix :-)

Can the distutils/packaging duplication not be avoided? IMO the correct
cpython fix would address this.
History
Date User Action Args
2011-11-07 16:22:43vinay.sajipsetrecipients: + vinay.sajip, paul.moore, pitrou, nadeem.vawda, tarek, eric.araujo, rpetrov, flox, alexis, michael.mulich, westley.martinez, python-dev, jlove, higery, francismb
2011-11-07 16:22:42vinay.sajiplinkissue13193 messages
2011-11-07 16:22:42vinay.sajipcreate