Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:RISCV
python-django-q
gh-pr-737_importlib.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gh-pr-737_importlib.patch of Package python-django-q
From cbf7bae709348a4ef37919a447a25eae0438dc68 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter <mail@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 <mail@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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor