Compare commits

1 Commits
1.1 ... main

4 changed files with 104 additions and 43 deletions

BIN
importlib_resources-6.0.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
importlib_resources-6.5.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +1,57 @@
-------------------------------------------------------------------
Tue Apr 8 17:52:29 UTC 2025 - Ben Greiner <code@bnavigator.de>
- Update to 6.5.2
* Replaced reference to typing_extensions with stdlib Literal.
(#323)
- Previous releases since 6.1.1
* Updated Traversable.read_text() to reflect the errors parameter
(python/cpython#127012). (#321)
* Add type annotations for Traversable.open. (#317)
* Require Python 3.9 or later.
* Omit sentinel values from a namespace path. (#311)
* When inferring the caller in files() correctly detect ones own
module even when the resources package source is not present.
(gh#python/cpython#123085)
* Merged fix for UTF-16 BOM handling in functional tests. (#312)
* When constructing ZipReader, only append the name if the
indicated module is a package. (python/cpython#121735)
* 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/cpython#109829).
* Restored expectation that local standard readers are preferred
over degenerate readers. (#298)
* Restored expectation that stdlib readers are suppressed on
Python 3.10. (#257)
* Add Anchor to importlib.resources (in order for the code to
comply with the documentation)
* Future compatibility adapters now ensure that standard library
readers are replaced without overriding non-standard readers.
(#295)
* Fixed NotADirectoryError when calling files on a subdirectory
of a namespace package. (#293)
-------------------------------------------------------------------
Tue Mar 12 06:05:56 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Explicitly BuildRequires zipp, it is now used by the testsuite, and
was pulled in anyway.
-------------------------------------------------------------------
Mon Nov 27 19:08:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 6.1.1:
* Added missed stream argument in simple.ResourceHandle. Ref
python/cpython#111775.
* MultiplexedPath now expects Traversable paths. String
arguments to MultiplexedPath are now deprecated.
* Enabled support for resources in namespace packages in zip
files. (#287)
-------------------------------------------------------------------
Tue Aug 8 11:05:56 UTC 2023 - Dirk Müller <dmueller@suse.com>
@@ -45,7 +99,7 @@ Mon Jan 2 19:11:16 UTC 2023 - Dirk Müller <dmueller@suse.com>
-------------------------------------------------------------------
Tue Dec 13 15:37:42 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to v5.10.1
- Update to v5.10.1
* v5.10.1
#274: Fixed ResourceWarning in _common.
@@ -57,7 +111,7 @@ Fri Oct 28 17:45:02 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
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).
* #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).
-------------------------------------------------------------------
Tue Sep 13 06:45:26 UTC 2022 - Matej Cepl <mcepl@suse.com>
@@ -165,56 +219,56 @@ Fri Nov 20 12:24:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Update to 3.2.0
* #68: Resources in PEP 420 Namespace packages are now supported.
- v3.1.1
* bpo-41490: contents is now also more aggressive about consuming
* bpo-41490: contents is now also more aggressive about consuming
any iterator from the Reader.
- v3.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
* #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.
- v3.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 or backport) directly. This change
* 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 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.
- v2.0.1
* Select pathlib and contextlib imports based on Python version
* Select pathlib and contextlib imports based on Python version
and avoid pulling in deprecated [pathlib](https://pypi.org/
project/pathlib). Closes #97.
- v2.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
* Loaders are no longer expected to implement the
abc.TraversableResources interface, but are instead expected to
return TraversableResources from their get_resource_reader
method.
- v1.5.0
* Traversable is now a Protocol instead of an Abstract Base Class
* 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.
- v1.4.0
* #79: Temporary files created will now reflect the filename of
* #79: Temporary files created will now reflect the filename of
their origin.
- v1.3.1
* For improved compatibility, importlib_resources.trees is now
* For improved compatibility, importlib_resources.trees is now
imported implicitly. Closes #88.
- v1.3.0
* Add extensibility support for non-standard loaders to supply
Traversable resources. Introduces a new abstract base class
abc.TraversableResources that supersedes (but implements for
compatibility) abc.ResourceReader. Any loader that implements
(implicitly or explicitly) the TraversableResources.files
method will be capable of supplying resources with subdirectory
* Add extensibility support for non-standard loaders to supply
Traversable resources. Introduces a new abstract base class
abc.TraversableResources that supersedes (but implements for
compatibility) abc.ResourceReader. Any loader that implements
(implicitly or explicitly) the TraversableResources.files
method will be capable of supplying resources with subdirectory
support. Closes #77.
* Preferred way to access as_file is now from top-level module.
importlib_resources.trees.as_file is deprecated and
* Preferred way to access as_file is now from top-level module.
importlib_resources.trees.as_file is deprecated and
discouraged. Closes #86.
* Moved Traversable abc to abc module. Closes #87.
- v1.2.0
* Traversable now requires an open method. Closes #81.
* Fixed error on Python 3.5.{0,3}. Closes #83.
* Updated packaging to resolve version from package metadata.
* Updated packaging to resolve version from package metadata.
Closes #82.
-------------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-importlib-resources
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,21 +18,21 @@
%{?sle15_python_module_pythons}
Name: python-importlib-resources
Version: 6.0.1
Version: 6.5.2
Release: 0
Summary: Read resources from Python packages
License: Apache-2.0
URL: https://importlib-resources.readthedocs.io/
Source: https://files.pythonhosted.org/packages/source/i/importlib_resources/importlib_resources-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module jaraco.test >= 5.4}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest >= 6}
BuildRequires: %{python_module setuptools_scm >= 3.4.1}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module wheel}
# Breaking the depcycle; not absolutely needed as ZipReader is not executed in tests.
# BuildRequires: %%{python_module zipp >= 3.1.0 if %%python-base < 3.10}
BuildRequires: %{python_module zipp >= 3.1.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Provides: python-importlib_resources = %{version}
@@ -44,15 +44,22 @@ Requires: python-zipp >= 3.1.0
%python_subpackages
%description
importlib_resources is a backport of Python standard library
importlib.resources module for older Pythons. Users of Python 3.9 and
beyond should use the standard library module, since for these versions,
importlib_resources just delegates to that module.
importlib_resources is a library which provides for access to resources in
Python packages. It provides functionality similar to pkg_resources Basic
Resource Access API, but without all of the overhead and performance problems
of pkg_resources.
The key goal of this module is to replace parts of pkg_resources with a
solution in Pythons stdlib that relies on well-defined APIs. This makes
reading resources included in packages easier, with more stable and
consistent semantics.
In our terminology, a resource is a file tree that is located alongside an
importable Python module. Resources can live on the file system or in a zip
file, with support for other loader classes that implement the appropriate API
for reading resources.
importlib_resources supplies a backport of importlib.resources, enabling early
access to features of future Python versions and making functionality available
for older Python versions. Users are encouraged to use the Python standard
library where suitable and fall back to this library for future compatibility.
Developers looking for detailed API descriptions should refer to the standard
library documentation.
%prep
%setup -q -n importlib_resources-%{version}
@@ -71,6 +78,6 @@ consistent semantics.
%doc README.rst
%license LICENSE
%{python_sitelib}/importlib_resources
%{python_sitelib}/importlib_resources-%{version}*-info
%{python_sitelib}/importlib_resources-%{version}.dist-info
%changelog