File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1+ In development
2+ --------------
3+
4+ * #890: Revert #849. ``global-exclude .foo `` will not match all
5+ ``*.foo `` files any more. Package authors must add an explicit
6+ wildcard, such as ``global-exclude *.foo ``, to match all
7+ ``.foo `` files. See #886, #849.
8+
19v31.0.1
210-------
311
@@ -132,7 +140,11 @@ v28.5.0
132140
133141* #810: Tests are now invoked with tox and not setup.py test.
134142* #249 and #450 via #764: Avoid scanning the whole tree
135- when building the manifest.
143+ when building the manifest. Also fixes a long-standing bug
144+ where patterns in ``MANIFEST.in `` had implicit wildcard
145+ matching. This caused ``global-exclude .foo `` to exclude
146+ all ``*.foo `` files, but also ``global-exclude bar.py `` to
147+ exclude ``foo_bar.py ``.
136148
137149v28.4.0
138150-------
Original file line number Diff line number Diff line change @@ -457,7 +457,7 @@ def global_include(self, pattern):
457457 """
458458 if self .allfiles is None :
459459 self .findall ()
460- match = translate_pattern (os .path .join ('**' , '*' + pattern ))
460+ match = translate_pattern (os .path .join ('**' , pattern ))
461461 found = [f for f in self .allfiles if match .match (f )]
462462 self .extend (found )
463463 return bool (found )
@@ -466,7 +466,7 @@ def global_exclude(self, pattern):
466466 """
467467 Exclude all files anywhere that match the pattern.
468468 """
469- match = translate_pattern (os .path .join ('**' , '*' + pattern ))
469+ match = translate_pattern (os .path .join ('**' , pattern ))
470470 return self ._remove_files (match .match )
471471
472472 def append (self , item ):
Original file line number Diff line number Diff line change @@ -449,11 +449,6 @@ def test_global_include(self):
449449 assert file_list .files == ['a.py' , l ('d/c.py' )]
450450 self .assertWarnings ()
451451
452- file_list .process_template_line ('global-include .txt' )
453- file_list .sort ()
454- assert file_list .files == ['a.py' , 'b.txt' , l ('d/c.py' )]
455- self .assertNoWarnings ()
456-
457452 def test_global_exclude (self ):
458453 l = make_local_path
459454 # global-exclude
@@ -470,13 +465,6 @@ def test_global_exclude(self):
470465 assert file_list .files == ['b.txt' ]
471466 self .assertWarnings ()
472467
473- file_list = FileList ()
474- file_list .files = ['a.py' , 'b.txt' , l ('d/c.pyc' ), 'e.pyo' ]
475- file_list .process_template_line ('global-exclude .py[co]' )
476- file_list .sort ()
477- assert file_list .files == ['a.py' , 'b.txt' ]
478- self .assertNoWarnings ()
479-
480468 def test_recursive_include (self ):
481469 l = make_local_path
482470 # recursive-include
You can’t perform that action at this time.
0 commit comments