From 3e51175e61279361da03b79ac16c0225fcf21cad7a30ec3b9bbb55807d0f7ea4 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 23 Feb 2023 06:09:52 +0000 Subject: [PATCH] - Add patch support-pyro-5.patch: * Use Pyro5's compatability layer. - Switch BuildRequires to Pyro5. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kombu?expand=0&rev=170 --- python-kombu.changes | 7 +++++++ python-kombu.spec | 11 ++++++----- support-pyro-5.patch | 17 +++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 support-pyro-5.patch diff --git a/python-kombu.changes b/python-kombu.changes index a35ba6a..a2d1cc6 100644 --- a/python-kombu.changes +++ b/python-kombu.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 23 06:08:55 UTC 2023 - Steve Kowalik + +- Add patch support-pyro-5.patch: + * Use Pyro5's compatability layer. +- Switch BuildRequires to Pyro5. + ------------------------------------------------------------------- Mon Mar 21 08:16:03 UTC 2022 - Dirk Müller diff --git a/python-kombu.spec b/python-kombu.spec index bd7e2c8..1c42bd9 100644 --- a/python-kombu.spec +++ b/python-kombu.spec @@ -1,7 +1,7 @@ # # spec file for package python-kombu # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,8 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-kombu Version: 5.2.4 Release: 0 @@ -25,9 +23,12 @@ Summary: AMQP Messaging Framework for Python License: BSD-3-Clause URL: https://github.com/celery/kombu Source: https://files.pythonhosted.org/packages/source/k/kombu/kombu-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Use Pyro4 compatibility for now, upstream should switch +# for 5.3 +Patch0: support-pyro-5.patch BuildRequires: %{python_module Brotli >= 1.0.0} BuildRequires: %{python_module PyYAML >= 3.10} -BuildRequires: %{python_module Pyro4} +BuildRequires: %{python_module Pyro5} BuildRequires: %{python_module SQLAlchemy} BuildRequires: %{python_module amqp >= 5.0.9} BuildRequires: %{python_module boto3 >= 1.9.12} @@ -67,7 +68,7 @@ providing an idiomatic high-level interface for the AMQP protocol, and also provide proven and tested solutions to common messaging problems. %prep -%setup -q -n kombu-%{version} +%autosetup -p1 -n kombu-%{version} # pinned dependencies are bad sed -i -e 's:==:>=:g' requirements/*.txt requirements/extras/*.txt # we don't want to pull in the whole azure stack because of few tests of a non-essential feature diff --git a/support-pyro-5.patch b/support-pyro-5.patch new file mode 100644 index 0000000..2a1f9b3 --- /dev/null +++ b/support-pyro-5.patch @@ -0,0 +1,17 @@ +Index: kombu-5.2.4/kombu/transport/pyro.py +=================================================================== +--- kombu-5.2.4.orig/kombu/transport/pyro.py ++++ kombu-5.2.4/kombu/transport/pyro.py +@@ -42,9 +42,9 @@ from kombu.utils.objects import cached_p + from . import virtual + + try: +- import Pyro4 as pyro +- from Pyro4.errors import NamingError +- from Pyro4.util import SerializerBase ++ from Pyro5.compatibility import Pyro4 as pyro ++ from Pyro5.errors import NamingError ++ from Pyro5.api import SerializerBase + except ImportError: # pragma: no cover + pyro = NamingError = SerializerBase = None +