Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update importlib-resources to 6.4.0 #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates importlib-resources from 1.4.0 to 6.4.0.

Changelog

6.4.0

======

Features
--------

- The functions
``is_resource()``,
``open_binary()``,
``open_text()``,
``path()``,
``read_binary()``, and
``read_text()`` are un-deprecated, and support
subdirectories via multiple positional arguments.
The ``contents()`` function also allows subdirectories,
but remains deprecated. (303)
- Deferred select imports in for a speedup (python/cpython109829).

6.3.2

======

Bugfixes
--------

- Restored expectation that local standard readers are preferred over degenerate readers. (298)

6.3.1

======

Bugfixes
--------

- Restored expectation that stdlib readers are suppressed on Python 3.10. (257)

6.3.0

======

Features
--------

- Add ``Anchor`` to ``importlib.resources`` (in order for the code to comply with the documentation)

6.2.0

======

Features
--------

- Future compatibility adapters now ensure that standard library readers are replaced without overriding non-standard readers. (295)

6.1.3

======

No significant changes.

6.1.2

======

Bugfixes
--------

- Fixed NotADirectoryError when calling files on a subdirectory of a namespace package. (293)

6.1.1

======

Bugfixes
--------

- Added missed stream argument in simple.ResourceHandle. Ref python/cpython111775.

6.1.0

======

Features
--------

- MultiplexedPath now expects Traversable paths. String arguments to MultiplexedPath are now deprecated.


Bugfixes
--------

- Enabled support for resources in namespace packages in zip files. (287)

6.0.1

======

Bugfixes
--------

- Restored Apache license. (285)

6.0.0

======

Deprecations and Removals
-------------------------

- Removed legacy functions deprecated in 5.3. (80)

5.13.0

=======

Features
--------

- Require Python 3.8 or later.

5.12.0

=======

* 257: ``importlib_resources`` (backport) now gives
precedence to built-in readers (file system, zip,
namespace packages), providing forward-compatibility
of behaviors like ``MultiplexedPath``.

5.11.1

=======

5.11.0

=======

* 265: ``MultiplexedPath`` now honors multiple subdirectories
in ``iterdir`` and ``joinpath``.

5.10.4

=======

* 280: Fixed one more ``EncodingWarning`` in test suite.

5.10.3

=======

* Packaging refresh, including fixing EncodingWarnings
and some tests cleanup.

5.10.2

=======

* 274: Prefer ``write_bytes`` to context manager as
proposed in gh-100586.

5.10.1

=======

* 274: Fixed ``ResourceWarning`` in ``_common``.

5.10.0

=======

* 203: Lifted restriction on modules passed to ``files``.
Now modules need not be a package and if a non-package
module is passed, resources will be resolved adjacent to
those modules, even for modules not found in any package.
For example, ``files(import_module('mod.py'))`` will
resolve resources found at the root. The parameter to
files was renamed from 'package' to 'anchor', with a
compatibility shim for those passing by keyword.

* 259: ``files`` no longer requires the anchor to be
specified and can infer the anchor from the caller's scope
(defaults to the caller's module).

5.9.0

======

* 228: ``as_file`` now also supports a ``Traversable``
representing a directory and (when needed) renders the
full tree to a temporary directory.

5.8.1

======

* 253: In ``MultiplexedPath``, restore expectation that
a compound path with a non-existent directory does not
raise an exception.

5.8.0

======

* 250: Now ``Traversable.joinpath`` provides a concrete
implementation, replacing the implementation in ``.simple``
and converging with the behavior in ``MultiplexedPath``.

5.7.1

======

* 249: In ``simple.ResourceContainer.joinpath``, honor
names split by ``posixpath.sep``.

5.7.0

======

* 248: ``abc.Traversable.joinpath`` now allows for multiple
arguments and specifies that ``posixpath.sep`` is allowed
in any argument to accept multiple arguments, matching the
behavior found in ``zipfile.Path`` and ``pathlib.Path``.

``simple.ResourceContainer`` now honors this behavior.

5.6.0

======

* 244: Add type declarations in ABCs.

5.5.0

======

* Require Python 3.7 or later.
* 243: Fix error when no ``__pycache__`` directories exist
when testing ``update-zips``.

5.4.0

======

* 80: Test suite now relies entirely on the traversable
API.

5.3.0

======

* 80: Now raise a ``DeprecationWarning`` for all legacy
functions. Instead, users should rely on the ``files()``
API introduced in importlib_resources 1.3. See
`Migrating from Legacy <https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy>`_
for guidance on avoiding the deprecated functions.

5.2.3

======

* Updated readme to reflect current behavior and show
which versions correspond to which behavior in CPython.

5.2.2

======

* 234: Fix refleak in ``as_file`` caught by CPython tests.

5.2.1

======

* bpo-38291: Avoid DeprecationWarning on ``typing.io``.

5.2.0

======

* 80 via 221: Legacy API (``path``, ``contents``, ...)
is now supported entirely by the ``.files()`` API with
a compatibility shim supplied for resource loaders without
that functionality.

5.1.4

======

* 225: Require
`zipp 3.1.0 <https://zipp.readthedocs.io/en/latest/history.html#v3-1-0>`_
or later on Python prior to 3.10 to incorporate those fixes.

5.1.3

======

* Refresh packaging and improve tests.
* 216: Make MultiplexedPath.name a property per the
spec.

5.1.2

======

* Re-release with changes from 5.0.4.

5.1.1

======

* Re-release with changes from 5.0.3.

5.1.0

======

* Added ``simple`` module implementing adapters from
a low-level resource reader interface to a
``TraversableResources`` interface. Closes 90.

5.0.7

======

* bpo-45419: Correct ``DegenerateFiles.Path`` ``.name``
and ``.open()`` interfaces to match ``Traversable``.

5.0.6

======

* bpo-38693: Prefer f-strings to ``.format`` calls.

5.0.5

======

* 216: Make MultiplexedPath.name a property per the
spec.

5.0.4

======

* Fixed non-hermetic test in test_reader, revealed by
GH-24670.

5.0.3

======

* Simplified DegenerateFiles.Path.

5.0.2

======

* 214: Added ``_adapters`` module to ensure that degenerate
``files`` behavior can be made available for legacy loaders
whose resource readers don't implement it. Fixes issue where
backport compatibility module was masking this fallback
behavior only to discover the defect when applying changes to
CPython.

5.0.1

======

* Remove pyinstaller hook for hidden 'trees' module.

5.0.0

======

* Removed ``importlib_resources.trees``, deprecated since 1.3.0.

4.1.1

======

* Fixed badges in README.

4.1.0

======

* 209: Adopt
`jaraco/skeleton <https://github.com/jaraco/skeleton>`_.

* Cleaned up some straggling Python 2 compatibility code.

* Refreshed test zip files without .pyc and .pyo files.

4.0.0

======

* 108: Drop support for Python 2.7. Now requires Python 3.6+.

3.3.1

======

* Minor cleanup.

3.3.0

======

* 107: Drop support for Python 3.5. Now requires Python 2.7 or 3.6+.

3.2.1

======

* 200: Minor fixes and improved tests for namespace package support.

3.2.0

======

* 68: Resources in PEP 420 Namespace packages are now supported.

3.1.1

======

* bpo-41490: ``contents`` is now also more aggressive about
consuming any iterator from the ``Reader``.

3.1.0

======

* 110 and bpo-41490: ``path`` method is more aggressive about
releasing handles to zipfile objects early, enabling use-cases
like ``certifi`` to leave the context open but delete the underlying
zip file.

3.0.0

======

* Package no longer exposes ``importlib_resources.__version__``.
Users that wish to inspect the version of ``importlib_resources``
should instead invoke ``.version('importlib_resources')`` from
``importlib-metadata`` (
`stdlib <https://docs.python.org/3/library/importlib.metadata.html>`_
or `backport <https://pypi.org/project/importlib-metadata>`_)
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.

2.0.1

======

* Select pathlib and contextlib imports based on Python version
and avoid pulling in deprecated
[pathlib](https://pypi.org/project/pathlib). Closes #97.

2.0.0

======

* Loaders are no longer expected to implement the
``abc.TraversableResources`` interface, but are instead
expected to return ``TraversableResources`` from their
``get_resource_reader`` method.

1.5.0

======

* Traversable is now a Protocol instead of an Abstract Base
Class (Python 2.7 and Python 3.8+).

* Traversable objects now require a ``.name`` property.
Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant