Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-django-q for openSUSE:Factory 
checked in at 2024-01-14 19:02:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-q (Old)
 and      /work/SRC/openSUSE:Factory/.python-django-q.new.21961 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-q"

Sun Jan 14 19:02:35 2024 rev:10 rq:1138410 version:1.3.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-django-q/python-django-q.changes  
2023-06-26 18:17:04.330731140 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-django-q.new.21961/python-django-q.changes   
    2024-01-14 19:03:17.098962023 +0100
@@ -1,0 +2,12 @@
+Sat Jan 13 03:02:43 UTC 2024 - John Vandenberg <jay...@gmail.com>
+
+- Activate test suite
+- Fix permissions of install .py files
+
+-------------------------------------------------------------------
+Fri Jan 12 23:06:00 UTC 2024 - Georg Pfuetzenreuter 
<georg.pfuetzenreu...@suse.com>
+
+- Add gh-pr-737_importlib.patch to repair DistributionNotFound
+  error caused by deprecated pkg_resources APIs
+
+-------------------------------------------------------------------

New:
----
  gh-pr-737_importlib.patch

BETA DEBUG BEGIN:
  New:
- Add gh-pr-737_importlib.patch to repair DistributionNotFound
  error caused by deprecated pkg_resources APIs
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-django-q.spec ++++++
--- /var/tmp/diff_new_pack.dT9EuC/_old  2024-01-14 19:03:17.954993206 +0100
+++ /var/tmp/diff_new_pack.dT9EuC/_new  2024-01-14 19:03:17.958993352 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-django-q
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,8 @@
 License:        MIT
 URL:            https://django-q.readthedocs.org
 Source:         
https://files.pythonhosted.org/packages/source/d/django-q/django-q-%{version}.tar.gz
+# pkg_resources is broken since the flufl.lock update in Factory
+Patch:          gh-pr-737_importlib.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -43,12 +45,13 @@
 BuildRequires:  %{python_module croniter}
 BuildRequires:  %{python_module django-picklefield}
 BuildRequires:  %{python_module django-redis}
-BuildRequires:  %{python_module hiredis}
 BuildRequires:  %{python_module pymongo}
 BuildRequires:  %{python_module pytest-django}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module redis}
 BuildRequires:  dos2unix
+BuildRequires:  psmisc
+BuildRequires:  redis
 # /SECTION
 %python_subpackages
 
@@ -56,15 +59,22 @@
 This package provides a multiprocessing distributed task queue for Django.
 
 %prep
-%autosetup -n django-q-%{version} -p1
+%setup -n django-q-%{version}
+# wrong line endings prevent patching
+dos2unix django_q/conf.py
+%autopatch -p1
 
 # Fix permissions
 find -name "*.po" | xargs chmod a-x
+find -name "*.py" | xargs chmod a-x
 chmod a-x README.rst CHANGELOG.md LICENSE
 
 # Fix encoding
 dos2unix README.rst
 
+# Use real redis server
+sed -i '/HiredisParser/d' django_q/tests/settings.py
+
 %build
 %python_build
 
@@ -73,8 +83,20 @@
 %python_expand rm -r %{buildroot}%{$python_sitelib}/django_q/tests/
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
-#%%check
-# Tests require a docker container to run
+%check
+mv django_q/tests .
+sed -i 's/django_q.tests/tests/g' tests/*.py
+sed -i 's/brokers.redis_broker/django_q.brokers.redis_broker/' 
tests/test_brokers.py
+
+export DJANGO_SETTINGS_MODULE=tests.settings
+
+export PYTHONPATH=${PWD}
+
+%{_sbindir}/redis-server &
+# Mongo & Disque servers not installed
+# test_max_rss assertions fail
+%pytest -k 'not (mongo or disque or test_max_rss)'
+killall redis-server
 
 %files %{python_files}
 %doc CHANGELOG.md README.rst

++++++ gh-pr-737_importlib.patch ++++++
>From cbf7bae709348a4ef37919a447a25eae0438dc68 Mon Sep 17 00:00:00 2001
From: Georg Pfuetzenreuter <m...@georg-pfuetzenreuter.net>
Date: Sat, 13 Jan 2024 00:03:10 +0100
Subject: [PATCH] Migrate away from pkg_resources

Using pkg_resources as an API is deprecated.
Migrate functionality to importlib.

Signed-off-by: Georg Pfuetzenreuter <m...@georg-pfuetzenreuter.net>
---
 django_q/conf.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/django_q/conf.py b/django_q/conf.py
index 3a8f3982..d64caa01 100644
--- a/django_q/conf.py
+++ b/django_q/conf.py
@@ -5,7 +5,7 @@
 from signal import signal
 from warnings import warn
 
-import pkg_resources
+from importlib_metadata import entry_points
 from django.conf import settings
 from django.utils.translation import gettext_lazy as _
 
@@ -239,13 +239,13 @@ def report(self):
         # iterate through the configured error reporters,
         # and instantiate an ErrorReporter using the provided config
         for name, conf in error_conf.items():
-            for entry in pkg_resources.iter_entry_points(
-                "djangoq.errorreporters", name
+            for entry in entry_points(
+                group="djangoq.errorreporters", name=name
             ):
                 Reporter = entry.load()
                 reporters.append(Reporter(**conf))
         error_reporter = ErrorReporter(reporters)
-    except ImportError:
+    except ModuleNotFoundError:
         error_reporter = None
 else:
     error_reporter = None

Reply via email to