diff options
| author | Petr Vaněk <arkamar@atlas.cz> | 2023-03-10 13:55:48 +0100 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2023-03-10 13:55:13 +0000 |
| commit | f96aaa62cb7b6fff5dba9602c37ee8b1553ad3ca (patch) | |
| tree | eaae8f2c636a9aba484a12be4c7f0d5167401270 /dev-python/kafka-python/files/kafka-python-2.0.2-py311-test-fixes.patch | |
| parent | d7f6f2d938cc48a64919dce4fa295d4751c71a51 (diff) | |
| download | gentoo-f96aaa62cb7b6fff5dba9602c37ee8b1553ad3ca.tar.gz gentoo-f96aaa62cb7b6fff5dba9602c37ee8b1553ad3ca.tar.bz2 gentoo-f96aaa62cb7b6fff5dba9602c37ee8b1553ad3ca.zip | |
dev-python/kafka-python: enable py3.11
It was necessary to apply patch to fix tests with py3.11. The patch was
sent to upstream [1].
[1] https://github.com/dpkp/kafka-python/pull/2358
Closes: https://bugs.gentoo.org/896790
Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/30043
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/kafka-python/files/kafka-python-2.0.2-py311-test-fixes.patch')
| -rw-r--r-- | dev-python/kafka-python/files/kafka-python-2.0.2-py311-test-fixes.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/dev-python/kafka-python/files/kafka-python-2.0.2-py311-test-fixes.patch b/dev-python/kafka-python/files/kafka-python-2.0.2-py311-test-fixes.patch new file mode 100644 index 000000000000..8b983952fd47 --- /dev/null +++ b/dev-python/kafka-python/files/kafka-python-2.0.2-py311-test-fixes.patch @@ -0,0 +1,26 @@ +Fix tests for Py3.11 + +Upstream-PR: https://github.com/dpkp/kafka-python/pull/2358 + +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 = {} |
