Commit 6636302f authored by Jason R. Coombs's avatar Jason R. Coombs

Update documentation to match more aggressive absolute path exclusion in resources.

parent 91d769e8
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.
...@@ -1133,8 +1133,7 @@ segment will be treated as a peer of the top-level modules or packages in the ...@@ -1133,8 +1133,7 @@ segment will be treated as a peer of the top-level modules or packages in the
distribution. distribution.
Note that resource names must be ``/``-separated paths rooted at the package, Note that resource names must be ``/``-separated paths rooted at the package,
cannot contain relative names like ``".."``, and cannot begin with a cannot contain relative names like ``".."``, and cannot be absolute. Do *not* use
leading ``/``. Do *not* use
``os.path`` routines to manipulate resource paths, as they are *not* filesystem ``os.path`` routines to manipulate resource paths, as they are *not* filesystem
paths. paths.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment