diff options
-rw-r--r-- | changelog.d/1635.change.rst | 2 | ||||
-rw-r--r-- | docs/pkg_resources.txt | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/changelog.d/1635.change.rst b/changelog.d/1635.change.rst index 7c35dfd1..d23f3fe3 100644 --- a/changelog.d/1635.change.rst +++ b/changelog.d/1635.change.rst @@ -1 +1 @@ -Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents or begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. +Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents, that begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors. diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index cdc1a5a5..806f1b14 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1133,8 +1133,7 @@ segment will be treated as a peer of the top-level modules or packages in the distribution. Note that resource names must be ``/``-separated paths rooted at the package, -cannot contain relative names like ``".."``, and cannot begin with a -leading ``/``. Do *not* use +cannot contain relative names like ``".."``, and cannot be absolute. Do *not* use ``os.path`` routines to manipulate resource paths, as they are *not* filesystem paths. |