Michael Merickel
2015-12-18 2447da701e2b75d8936af81f37fe59693a764594
Merge pull request #2188 from mmerickel/backport/2187

ensure IAssetDescriptor.abspath always returns an abspath
2 files modified
10 ■■■■■ changed files
CHANGES.txt 7 ●●●●● patch | view | raw | blame | history
pyramid/path.py 3 ●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -24,6 +24,13 @@
- Add a new ``config.add_cache_buster`` API for attaching cache busters to
  static assets. See https://github.com/Pylons/pyramid/pull/2186
Bug Fixes
---------
- Ensure that ``IAssetDescriptor.abspath`` always returns an absolute path.
  There were cases depending on the process CWD that a relative path would
  be returned. See https://github.com/Pylons/pyramid/issues/2188
1.6b2 (2015-10-15)
==================
pyramid/path.py
@@ -396,7 +396,8 @@
        return '%s:%s' % (self.pkg_name, self.path)
    def abspath(self):
        return self.pkg_resources.resource_filename(self.pkg_name, self.path)
        return os.path.abspath(
            self.pkg_resources.resource_filename(self.pkg_name, self.path))
    def stream(self):
        return self.pkg_resources.resource_stream(self.pkg_name, self.path)