Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-passlib for openSUSE:Factory checked in at 2023-08-03 17:29:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-passlib (Old) and /work/SRC/openSUSE:Factory/.python-passlib.new.22712 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-passlib" Thu Aug 3 17:29:25 2023 rev:28 rq:1102111 version:1.7.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-passlib/python-passlib.changes 2023-05-10 16:18:50.871089476 +0200 +++ /work/SRC/openSUSE:Factory/.python-passlib.new.22712/python-passlib.changes 2023-08-03 17:29:26.243637852 +0200 @@ -1,0 +2,7 @@ +Thu Aug 3 06:29:11 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com> + +- Add patch no-pkg_resources.patch: + * Stop using pkg_resources. +- Switch to pyproject macros. + +------------------------------------------------------------------- New: ---- no-pkg_resources.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-passlib.spec ++++++ --- /var/tmp/diff_new_pack.ElW9s7/_old 2023-08-03 17:29:26.959642185 +0200 +++ /var/tmp/diff_new_pack.ElW9s7/_new 2023-08-03 17:29:26.963642210 +0200 @@ -32,10 +32,13 @@ Release: 0 Summary: Password hashing framework supporting over 20 schemes License: BSD-3-Clause -Group: Development/Languages/Python URL: https://foss.heptapod.net/python-libs/passlib Source: https://files.pythonhosted.org/packages/source/p/passlib/passlib-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Posted to https://foss.heptapod.net/python-libs/passlib/-/issues/185 +Patch0: no-pkg_resources.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with test} @@ -64,14 +67,14 @@ applications. %prep -%setup -q -n passlib-%{version} +%autosetup -p1 -n passlib-%{version} %build -%python_build +%pyproject_wheel %install %if !%{with test} -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -87,7 +90,7 @@ %license LICENSE %doc README %{python_sitelib}/passlib -%{python_sitelib}/passlib-%{version}-py%{python_version}.egg-info +%{python_sitelib}/passlib-%{version}.dist-info %endif %changelog ++++++ no-pkg_resources.patch ++++++ Index: passlib-1.7.4/passlib/pwd.py =================================================================== --- passlib-1.7.4.orig/passlib/pwd.py +++ passlib-1.7.4/passlib/pwd.py @@ -13,8 +13,8 @@ except ImportError: from collections import MutableMapping from math import ceil, log as logf import logging; log = logging.getLogger(__name__) -import pkg_resources import os +import sys # site # pkg from passlib import exc @@ -122,7 +122,14 @@ def _open_asset_path(path, encoding=None if not sep: raise ValueError("asset path must be absolute file path " "or use 'pkg.name:sub/path' format: %r" % (path,)) - return pkg_resources.resource_stream(package, subpath) + if sys.version_info >= (3, 9): + # We can use the new and shiny importlib.resources + import importlib.resources + return importlib.resources.files(package).joinpath(subpath).open('rb') + else: + # Fallback to pkg_resources + import pkg_resources + return pkg_resources.resource_stream(package, subpath) #: type aliases