diff options
author | Sebastian Ramacher <sramacher@debian.org> | 2015-06-23 22:03:40 +0200 |
---|---|---|
committer | Sebastian Ramacher <sramacher@debian.org> | 2015-06-23 22:03:40 +0200 |
commit | ea76bcfc9a97f06d04899ea8ec5754050d543638 (patch) | |
tree | e545e5e7bafefdd434cdb6f01348bcc03a19e27a | |
parent | 9c33104993029ce0d71ed86ab8bc5e5cd2e34d6d (diff) |
Imported Upstream version 1.4.28
-rw-r--r-- | CHANGELOG | 6 | ||||
-rw-r--r-- | PKG-INFO | 2 | ||||
-rw-r--r-- | py.egg-info/PKG-INFO | 2 | ||||
-rw-r--r-- | py/__init__.py | 2 | ||||
-rw-r--r-- | py/_path/local.py | 14 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | testing/path/test_local.py | 6 |
7 files changed, 24 insertions, 10 deletions
@@ -1,3 +1,9 @@ +1.4.28 +================================================== + +- fix issue64 -- dirpath regression when "abs=True" is passed. + Thanks Gilles Dartiguelongue. + 1.4.27 ================================================== @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: py -Version: 1.4.27 +Version: 1.4.28 Summary: library with cross-python path, ini-parsing, io, code, log facilities Home-page: http://pylib.readthedocs.org/ Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others diff --git a/py.egg-info/PKG-INFO b/py.egg-info/PKG-INFO index dfebf13..c4abe4c 100644 --- a/py.egg-info/PKG-INFO +++ b/py.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: py -Version: 1.4.27 +Version: 1.4.28 Summary: library with cross-python path, ini-parsing, io, code, log facilities Home-page: http://pylib.readthedocs.org/ Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others diff --git a/py/__init__.py b/py/__init__.py index 7d09fee..659c405 100644 --- a/py/__init__.py +++ b/py/__init__.py @@ -8,7 +8,7 @@ dictionary or an import path. (c) Holger Krekel and others, 2004-2014 """ -__version__ = '1.4.27' +__version__ = '1.4.28' from py import _apipkg diff --git a/py/_path/local.py b/py/_path/local.py index a7f00c3..c1f7248 100644 --- a/py/_path/local.py +++ b/py/_path/local.py @@ -304,13 +304,15 @@ class LocalPath(FSBase): raise ValueError("invalid part specification %r" % name) return res - def dirpath(self, *args): + def dirpath(self, *args, **kwargs): """ return the directory path joined with any given path arguments. """ - path = object.__new__(self.__class__) - path.strpath = dirname(self.strpath) - if args: - path = path.join(*args) - return path + if not kwargs: + path = object.__new__(self.__class__) + path.strpath = dirname(self.strpath) + if args: + path = path.join(*args) + return path + return super(LocalPath, self).dirpath(*args, **kwargs) def join(self, *args, **kwargs): """ return a new path by appending all 'args' as path @@ -7,7 +7,7 @@ def main(): name='py', description='library with cross-python path, ini-parsing, io, code, log facilities', long_description = open('README.txt').read(), - version='1.4.27', + version='1.4.28', url='http://pylib.readthedocs.org/', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff --git a/testing/path/test_local.py b/testing/path/test_local.py index 83e7f57..ec9b7ec 100644 --- a/testing/path/test_local.py +++ b/testing/path/test_local.py @@ -34,6 +34,12 @@ class TestLocalPath(common.CommonFSTests): p = tmpdir.join("..//%s/" % tmpdir.basename) assert p == tmpdir + @skiponwin32 + def test_dirpath_abs_no_abs(self, tmpdir): + p = tmpdir.join('foo') + assert p.dirpath('/bar') == tmpdir.join('bar') + assert tmpdir.dirpath('/bar', abs=True) == py.path.local('/bar') + def test_gethash(self, tmpdir): md5 = py.builtin._tryimport('md5', 'hashlib').md5 lib = py.builtin._tryimport('sha', 'hashlib') |