[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.

Conflicts:
    test-requirements.txt

[1] https://opendev.org/openstack/oslo.messaging/src/branch/stable/stein/setup.cfg#L28

Change-Id: Ia0d4b2c3d46764315b02e7fb2ade17a73a46f4b7
(cherry picked from commit 41428813d8)
This commit is contained in:
Elod Illes 2020-05-26 14:58:58 +02:00
parent 4ab9e91d85
commit 93baa22645
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,8 @@ mock>=1.2 # BSD
os-win>=0.2.3 # Apache-2.0
# Docs Requirements
openstackdocstheme>=1.11.0 # 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
reno>=1.6.2 # Apache2
oslotest>=2.15.0 # Apache-2.0