From 41428813d89c000c1d05718e4fb73cea6f02c88c Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Tue, 26 May 2020 14:58:58 +0200 Subject: [PATCH] [stable-only] Add confluent-kafka to test-requirements As confluent-kafka 1.4.2 was released, which is based on librdkafka v1.4.2, which drops python 2 support, the py27 tox job started to fail with the following error: [..]/confluent_kafka/cimpl.so: undefined symbol: PyUnicodeUCS2_FromObject confluent-kafka is pulled in by an extra with oslo.messaging. In oslo.messaging's setup.cfg kafka is lower constrained only [1]. oslo.messaging uses global upper-constraints.txt which constrain confluent-kafka to version 0.11.6. Ceilometer however does not use global upper-constraints.txt, so when installing oslo.message[kafka] it pulls in latest confluent-kafka. To avoid failure of py27 tox target, this patch introduces explicit requirement of confluent-kafka, with an upper constraint for python 2. NOTE(elod.illes): this patch is only needed in Stein and older stable branches, as from Train ceilometer uses global upper-constraints.txt. [1] https://opendev.org/openstack/oslo.messaging/src/branch/stable/stein/setup.cfg#L28 Change-Id: Ia0d4b2c3d46764315b02e7fb2ade17a73a46f4b7 --- test-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test-requirements.txt b/test-requirements.txt index c03917cdce..fc77c03d8c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,6 +6,8 @@ coverage>=3.6 # Apache-2.0 fixtures<2.0,>=1.3.1 # Apache-2.0/BSD mock>=1.2 # BSD os-win>=0.2.3 # Apache-2.0 +confluent-kafka>=0.11.6,<1.4.2; python_version<'3.0' # Apache-2.0 +confluent-kafka>=0.11.6; python_version>='3.0' # Apache-2.0 oslo.messaging[kafka]!=9.0.0,>=5.12.0 # Apache-2.0 oslotest>=2.15.0 # Apache-2.0 oslo.vmware>=1.16.0 # Apache-2.0