forked from pool/python-kafka-python
- Add python-311.patch to fix tests for py3.11 gh#dpkp/kafka-python#2358
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kafka-python?expand=0&rev=26
This commit is contained in:
parent
942cad42a5
commit
61054451df
31
python-311.patch
Normal file
31
python-311.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From cca513e3f511834e8f8c833a619ee8d7fa1b0ee1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Petr=20Van=C4=9Bk?= <arkamar@atlas.cz>
|
||||||
|
Date: Fri, 10 Mar 2023 14:24:06 +0100
|
||||||
|
Subject: [PATCH] Fix tests for Py3.11
|
||||||
|
|
||||||
|
---
|
||||||
|
test/test_assignors.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/test_assignors.py b/test/test_assignors.py
|
||||||
|
index 67e91e131..a1214d8fa 100644
|
||||||
|
--- a/test/test_assignors.py
|
||||||
|
+++ b/test/test_assignors.py
|
||||||
|
@@ -661,7 +661,7 @@ def test_reassignment_with_random_subscriptions_and_changes(mocker, execution_nu
|
||||||
|
|
||||||
|
subscriptions = defaultdict(set)
|
||||||
|
for i in range(n_consumers):
|
||||||
|
- topics_sample = sample(all_topics, randint(1, len(all_topics) - 1))
|
||||||
|
+ topics_sample = sample(sorted(all_topics), randint(1, len(all_topics) - 1))
|
||||||
|
subscriptions['C{}'.format(i)].update(topics_sample)
|
||||||
|
|
||||||
|
member_metadata = make_member_metadata(subscriptions)
|
||||||
|
@@ -671,7 +671,7 @@ def test_reassignment_with_random_subscriptions_and_changes(mocker, execution_nu
|
||||||
|
|
||||||
|
subscriptions = defaultdict(set)
|
||||||
|
for i in range(n_consumers):
|
||||||
|
- topics_sample = sample(all_topics, randint(1, len(all_topics) - 1))
|
||||||
|
+ topics_sample = sample(sorted(all_topics), randint(1, len(all_topics) - 1))
|
||||||
|
subscriptions['C{}'.format(i)].update(topics_sample)
|
||||||
|
|
||||||
|
member_metadata = {}
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 10 11:36:09 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add python-311.patch to fix tests for py3.11 gh#dpkp/kafka-python#2358
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 12 02:26:13 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
Wed Oct 12 02:26:13 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-kafka-python
|
# spec file for package python-kafka-python
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
Name: python-kafka-python
|
Name: python-kafka-python
|
||||||
Version: 2.0.2
|
Version: 2.0.2
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -31,6 +30,8 @@ Source3: https://raw.githubusercontent.com/dpkp/kafka-python/master/test/
|
|||||||
Source4: https://raw.githubusercontent.com/dpkp/kafka-python/master/test/service.py
|
Source4: https://raw.githubusercontent.com/dpkp/kafka-python/master/test/service.py
|
||||||
# PATCH-FIX-OPENSUSE Remove use of mock module
|
# PATCH-FIX-OPENSUSE Remove use of mock module
|
||||||
Patch0: remove-mock.patch
|
Patch0: remove-mock.patch
|
||||||
|
# PATCH-FIX-UPSTREAM fix tests for py3.11 gh#dpkp/kafka-python#2358
|
||||||
|
Patch1: python-311.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
Loading…
Reference in New Issue
Block a user