forked from pool/python-kombu
c45107de47
- Revert _lookup api and correct redis implemetnation. - Major overhaul of redis test cases by adding more full featured fakeredis module. - Add more test cases to boost coverage of kombu redis transport. - Refactor the producer consumer test cases to be based on original mocks and be passing - Fix lingering line length issue in test. - Sanitise url when include_password is false - Pinned pycurl to 7.43.0.2 as it is the latest build with wheels provided - Bump py-amqp to 2.5.2 - Rebase python38.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kombu?expand=0&rev=147
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From c75039547a57036a627e067173a2b4c136350b66 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
|
Date: Tue, 20 Aug 2019 11:30:02 +0200
|
|
Subject: [PATCH] Use importlib.metadata from the standard library on Python
|
|
3.8+
|
|
|
|
---
|
|
kombu/utils/compat.py | 6 +++++-
|
|
requirements/default.txt | 2 +-
|
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
Index: kombu-4.6.5/kombu/utils/compat.py
|
|
===================================================================
|
|
--- kombu-4.6.5.orig/kombu/utils/compat.py
|
|
+++ kombu-4.6.5/kombu/utils/compat.py
|
|
@@ -7,7 +7,11 @@ import sys
|
|
from functools import wraps
|
|
|
|
from contextlib import contextmanager
|
|
-import importlib_metadata
|
|
+
|
|
+try:
|
|
+ from importlib import metadata as importlib_metadata
|
|
+except ImportError:
|
|
+ import importlib_metadata
|
|
|
|
from kombu.five import reraise
|
|
|
|
Index: kombu-4.6.5/requirements/default.txt
|
|
===================================================================
|
|
--- kombu-4.6.5.orig/requirements/default.txt
|
|
+++ kombu-4.6.5/requirements/default.txt
|
|
@@ -1,2 +1,2 @@
|
|
amqp==2.5.1
|
|
-importlib-metadata>=0.18
|
|
+importlib-metadata>=0.18; python_version<"3.8"
|