1 new commit in py:

https://bitbucket.org/hpk42/py/changeset/5e251d9b4c21/
changeset:   5e251d9b4c21
user:        hpk42
date:        2012-06-11 19:08:25
summary:     fix visit() bug
affected #:  5 files

diff -r c467a077be406daf8890fa239c9fdccf9be195d3 -r 
5e251d9b4c2104e46a43800a358bb0144ebe81ea CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
 Changes between 1.4.8 and 1.4.9.DEV
 ==================================================
 
+- fix bug of path.visit() which would not recognize glob-style patterns
+  for the "rec" recursion argument
 - changed iniconfig parsing to better conform, now the chars ";"
   and "#" only mark a comment at the stripped start of a line
 - include recent apipkg-1.2


diff -r c467a077be406daf8890fa239c9fdccf9be195d3 -r 
5e251d9b4c2104e46a43800a358bb0144ebe81ea py/__init__.py
--- a/py/__init__.py
+++ b/py/__init__.py
@@ -8,7 +8,7 @@
 
 (c) Holger Krekel and others, 2004-2010
 """
-__version__ = '1.4.9.dev1'
+__version__ = '1.4.9.dev2'
 
 from py import _apipkg
 


diff -r c467a077be406daf8890fa239c9fdccf9be195d3 -r 
5e251d9b4c2104e46a43800a358bb0144ebe81ea py/_path/common.py
--- a/py/_path/common.py
+++ b/py/_path/common.py
@@ -67,7 +67,7 @@
             except (py.error.ENOENT, py.error.ENOTDIR, py.error.EBUSY):
                 # EBUSY feels not entirely correct,
                 # but its kind of necessary since ENOMEDIUM
-                # is not accessible in python     
+                # is not accessible in python
                 for name in self._depend_on_existence:
                     if name in kw:
                         if kw.get(name):
@@ -177,7 +177,7 @@
                 exists=1  # exists
 
             You can specify multiple checker definitions, for example::
-                
+
                 path.check(file=1, link=1)  # a link pointing to a file
         """
         if not kw:
@@ -331,7 +331,7 @@
         if isinstance(fil, str):
             fil = FNMatcher(fil)
         if isinstance(rec, str):
-            self.rec = fnmatch(fil)
+            self.rec = FNMatcher(rec)
         elif not hasattr(rec, '__call__') and rec:
             self.rec = lambda path: True
         else:


diff -r c467a077be406daf8890fa239c9fdccf9be195d3 -r 
5e251d9b4c2104e46a43800a358bb0144ebe81ea setup.py
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@
         name='py',
         description='library with cross-python path, ini-parsing, io, code, 
log facilities',
         long_description = open('README.txt').read(),
-        version='1.4.9.dev1',
+        version='1.4.9.dev2',
         url='http://pylib.org',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],


diff -r c467a077be406daf8890fa239c9fdccf9be195d3 -r 
5e251d9b4c2104e46a43800a358bb0144ebe81ea testing/path/test_local.py
--- a/testing/path/test_local.py
+++ b/testing/path/test_local.py
@@ -213,6 +213,14 @@
         # check that breadth comes last
         assert l[2] == p3
 
+    def test_visit_rec_fnmatch(self, tmpdir):
+        p1 = tmpdir.ensure("a","123")
+        p2 = tmpdir.ensure(".b","345")
+        l = list(tmpdir.visit("???", rec="[!.]*"))
+        assert len(l) == 1
+        # check that breadth comes last
+        assert l[0] == p1
+
 class TestExecutionOnWindows:
     pytestmark = win32only

Repository URL: https://bitbucket.org/hpk42/py/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to