Skip to content

Commit 2880798

Browse files
[3.13] gh-136516: Mention installation artifacts as de-facto resources (GH-136419) (GH-137039)
Files like NUL on windows are, from `importlib.resources` point of view, an artifact caused by installing to a filesystem directory. Mention these. (cherry picked from commit fac4964) Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 6ffeef1 commit 2880798

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/library/importlib.resources.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ within *packages*.
1616
"Resources" are file-like resources associated with a module or package in
1717
Python. The resources may be contained directly in a package, within a
1818
subdirectory contained in that package, or adjacent to modules outside a
19-
package. Resources may be text or binary. As a result, Python module sources
20-
(.py) of a package and compilation artifacts (pycache) are technically
21-
de-facto resources of that package. In practice, however, resources are
22-
primarily those non-Python artifacts exposed specifically by the package
23-
author.
19+
package. Resources may be text or binary. As a result, a package's Python
20+
module sources (.py), compilation artifacts (pycache), and installation
21+
artifacts (like :func:`reserved filenames <os.path.isreserved>`
22+
in directories) are technically de-facto resources of that package.
23+
In practice, however, resources are primarily those non-Python artifacts
24+
exposed specifically by the package author.
2425

2526
Resources can be opened or read in either binary or text mode.
2627

0 commit comments

Comments
 (0)