Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pylama for openSUSE:Factory checked in at 2026-09-28 10:47:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pylama (Old) and /work/SRC/openSUSE:Factory/.python-pylama.new.383539 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pylama" Mon Sep 28 10:47:47 2026 rev:12 rq:1381011 version:8.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pylama/python-pylama.changes 2023-06-14 16:31:42.551342209 +0200 +++ /work/SRC/openSUSE:Factory/.python-pylama.new.383539/python-pylama.changes 2026-09-28 10:48:45.229737317 +0200 @@ -1,0 +2,6 @@ +Mon Sep 28 03:06:01 UTC 2026 - Steve Kowalik <[email protected]> + +- Add patch no-more-pkg-resources.patch: + * Do not use pkg_resources to discover entry points. + +------------------------------------------------------------------- New: ---- no-more-pkg-resources.patch ----------(New B)---------- New: - Add patch no-more-pkg-resources.patch: * Do not use pkg_resources to discover entry points. ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pylama.spec ++++++ --- /var/tmp/diff_new_pack.i04t2O/_old 2026-09-28 10:48:45.792760907 +0200 +++ /var/tmp/diff_new_pack.i04t2O/_new 2026-09-28 10:48:45.794760991 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pylama # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,10 +22,11 @@ Release: 0 Summary: Code audit tool for python License: MIT -Group: Development/Languages/Python URL: https://github.com/klen/pylama Source: https://github.com/klen/pylama/archive/refs/tags/%{version}.tar.gz#/pylama-%{version}-gh.tar.gz -BuildRequires: %{python_module base >= 3.7} +# PATCH-FIX-UPSTREAM gh#klen/pylama#254 +Patch0: no-more-pkg-resources.patch +BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module mccabe >= 0.7.0} BuildRequires: %{python_module pip} BuildRequires: %{python_module pycodestyle >= 2.9.1} @@ -33,6 +34,8 @@ BuildRequires: %{python_module pyflakes >= 2.5.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} +# We need the sqlite3 module +BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: git-core %if 0%{?suse_version} > 1500 @@ -40,7 +43,7 @@ %endif BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives Requires: python-mccabe >= 0.7.0 Requires: python-pycodestyle >= 2.9.1 Requires: python-pydocstyle >= 6.1.1 @@ -108,5 +111,5 @@ %license LICENSE %python_alternative %{_bindir}/pylama %{python_sitelib}/pylama -%{python_sitelib}/pylama-%{version}*-info +%{python_sitelib}/pylama-%{version}.dist-info ++++++ no-more-pkg-resources.patch ++++++ >From e34d6d4caec7e6bee1a8fe2496e5673c5e1a9016 Mon Sep 17 00:00:00 2001 From: Ben Elliston <[email protected]> Date: Fri, 21 Jun 2024 16:40:24 +1000 Subject: [PATCH 1/3] - Switch from pkg_resources to importlib_metadata. - Eliminate the use of pkg_resources which is no longer installed with Python 3.12 and greater. - Add setuptools to requirements.txt which is no longer included in Python distributions (>= 3.12). --- pylama/lint/__init__.py | 4 ++-- requirements/requirements.txt | 1 + setup.py | 28 +++++++++++++++++++--------- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/pylama/lint/__init__.py b/pylama/lint/__init__.py index c50dee3..7587224 100644 --- a/pylama/lint/__init__.py +++ b/pylama/lint/__init__.py @@ -7,7 +7,7 @@ from pkgutil import walk_packages from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type -from pkg_resources import iter_entry_points +from importlib_metadata import entry_points LINTERS: Dict[str, Type[LinterV2]] = {} @@ -58,7 +58,7 @@ def run_check(self, ctx: RunContext): pass # Import installed linters -for entry in iter_entry_points("pylama.linter"): +for entry in entry_points(group="pylama.linter"): if entry.name not in LINTERS: try: LINTERS[entry.name] = entry.load() diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 2ee8fd7..4bcde32 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -4,3 +4,4 @@ mccabe >= 0.7.0 pycodestyle >= 2.9.1 pydocstyle >= 6.1.1 pyflakes >= 2.5.0 +setuptools diff --git a/setup.py b/setup.py index 911aea6..de8dae8 100644 --- a/setup.py +++ b/setup.py @@ -4,22 +4,32 @@ import pathlib -import pkg_resources from setuptools import setup - -def parse_requirements(path: str) -> "list[str]": - with pathlib.Path(path).open(encoding='utf-8') as requirements: - return [str(req) for req in pkg_resources.parse_requirements(requirements)] - - OPTIONAL_LINTERS = ['pylint', 'eradicate', 'radon', 'mypy', 'vulture'] setup( - install_requires=parse_requirements("requirements/requirements.txt"), + install_requires=[ + 'mccabe>=0.7.0', + 'pycodestyle>=2.9.1', + 'pydocstyle>=6.1.1', + 'pyflakes>=2.5.0' + ], extras_require=dict( - tests=parse_requirements("requirements/requirements-tests.txt"), + tests=[ + 'pytest>=7.1.2', + 'pytest-mypy', + 'eradicate>=2.0.0', + 'radon>=5.1.0', + 'mypy', + 'pylint>=2.11.1', + 'pylama-quotes', + 'toml', + 'vulture', + 'types-setuptools', + 'types-toml' + ], all=OPTIONAL_LINTERS, **{linter: [linter] for linter in OPTIONAL_LINTERS}, toml="toml>=0.10.2", ), >From c3f05ed65c88230be20b134ee7cef71744190d82 Mon Sep 17 00:00:00 2001 From: Ben Elliston <[email protected]> Date: Fri, 30 Jan 2026 08:41:17 +1100 Subject: [PATCH 2/3] importlib.metadata is no longer provisional as of Python 3.10. --- pylama/lint/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylama/lint/__init__.py b/pylama/lint/__init__.py index 7587224..c40d492 100644 --- a/pylama/lint/__init__.py +++ b/pylama/lint/__init__.py @@ -7,7 +7,7 @@ from pkgutil import walk_packages from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type -from importlib_metadata import entry_points +from importlib.metadata import entry_points LINTERS: Dict[str, Type[LinterV2]] = {} >From fe9c95ae9e7ceaa6214abe4403e3300e82ab388f Mon Sep 17 00:00:00 2001 From: Ben Elliston <[email protected]> Date: Fri, 30 Jan 2026 08:55:32 +1100 Subject: [PATCH 3/3] Require Python 3.8 for importlib.metadata. --- setup.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index d7f4683..ee3012c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,16 +24,15 @@ classifiers = License :: OSI Approved :: MIT License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Topic :: Software Development :: Quality Assurance Topic :: Software Development :: Testing [options] packages = pylama -python_requires = >= 3.7 +python_requires = >= 3.8 include_package_data = True [options.package_data]
