simplemodule implementing adapters from a low-level resource reader interface to a
TraversableResourcesinterface. Closes #90.
18 Jan 2021
Remove pyinstaller hook for hidden ‘trees’ module.
09 Jan 2021
importlib_resources.trees, deprecated since 1.3.0.
27 Dec 2020
Fixed badges in README.
24 Dec 2020
22 Dec 2020
23 Oct 2020
contentsis now also more aggressive about consuming any iterator from the
22 Oct 2020
30 Jun 2020
Package no longer exposes
importlib_resources.__version__. Users that wish to inspect the version of
importlib_resourcesshould instead invoke
importlib-metadata( stdlib or backport) directly. This change eliminates the dependency on
importlib_metadata. Closes #100.
Package now always includes its data. Closes #93.
Declare hidden imports for PyInstaller. Closes #101.
13 Jun 2020
07 Jun 2020
Loaders are no longer expected to implement the
abc.TraversableResourcesinterface, but are instead expected to return
26 Apr 2020
Traversable is now a Protocol instead of an Abstract Base Class (Python 2.7 and Python 3.8+).
Traversable objects now require a
06 Mar 2020
For improved compatibility,
importlib_resources.treesis now imported implicitly. Closes #88.
06 Mar 2020
Add extensibility support for non-standard loaders to supply
Traversableresources. Introduces a new abstract base class
abc.TraversableResourcesthat supersedes (but implements for compatibility)
abc.ResourceReader. Any loader that implements (implicitly or explicitly) the
TraversableResources.filesmethod will be capable of supplying resources with subdirectory support. Closes #77.
Preferred way to access
as_fileis now from top-level module.
importlib_resources.trees.as_fileis deprecated and discouraged. Closes #86.
abcmodule. Closes #87.
02 Mar 2020
29 Feb 2020
Add support for retrieving resources from subdirectories of packages through the new
files()function, which returns a
read_*interfaces matching those of
pathlib.Pathobjects. This new function supersedes all of the previous functionality as it provides a more general-purpose access to a package’s resources.
With this function, subdirectories are supported (Closes #58).
The documentation has been updated to reflect that this function is now the preferred interface for loading package resources. It does not, however, support resources from arbitrary loaders. It currently only supports resources from file system path and zipfile packages (a consequence of the ResourceReader interface only operating on Python packages).
01 Nov 2018
setup.cfg. Given by Anthony Sottile.
17 May 2018
15 May 2018
Move everything from
setup.cfg, with the added benefit of fixing the PyPI metadata. Closes #54
Turn off mypy’s
strict_optionalsetting for now.
01 May 2018
Resynchronize with Python 3.7; changes the return type of
contents()to be an
Iterable. Closes #52
17 Feb 2018
14 Dec 2017
Backward incompatible change. Split the
read()calls into separate binary and text versions, i.e.
read_text(). Closes #41
Fix a bug where unrelated resources could be returned from
contents(). Closes #44
Correctly prevent namespace packages from containing resources. Closes #20
06 Dec 2017