From 20f38687bbcf0e668902d37d51023f1fddc55273 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 17 Jan 2019 16:49:49 -0500 Subject: Update docs to match implementation that resource names are rooted at the package. Ref #1635. --- docs/pkg_resources.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 0c9fb5f2..21aac814 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1132,8 +1132,8 @@ relative to the root of the identified distribution; i.e. its first path 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 and cannot be absolute -(i.e. no leading ``/``) or contain relative names like ``".."``. Do *not* use +Note that resource names must be ``/``-separated paths rooted at the package +and cannot contain relative names like ``".."``. Do *not* use ``os.path`` routines to manipulate resource paths, as they are *not* filesystem paths. -- cgit v1.2.3 From 1b935caf64fc8f3eb72c7ee8c05a221f7ca9d9b7 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 20 Jan 2019 21:31:39 -0500 Subject: Also disallow leading '/' in resource paths. Ref #1635. --- docs/pkg_resources.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/pkg_resources.txt b/docs/pkg_resources.txt index 21aac814..cdc1a5a5 100644 --- a/docs/pkg_resources.txt +++ b/docs/pkg_resources.txt @@ -1132,8 +1132,9 @@ relative to the root of the identified distribution; i.e. its first path 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 -and cannot contain relative names like ``".."``. Do *not* use +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 ``os.path`` routines to manipulate resource paths, as they are *not* filesystem paths. -- cgit v1.2.3 From 6636302f735d94fe91b83469f1610e4112a91838 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 27 Jan 2019 13:01:20 -0500 Subject: Update documentation to match more aggressive absolute path exclusion in resources. --- docs/pkg_resources.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs') 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. -- cgit v1.2.3