Skip to content

pip install --no-binary :all: confluent-kafka Deprecation Warning #1507

@mkmoisen

Description

@mkmoisen

Description

To install confluent_kafka with kerberos support, we need to compile rdkafka from source and then install confluent_kafka without downloading the wheel, via:

pip install --no-binary :all: confluent-kafka

However, this throws a deprecation warning:

[root@91e9a6f59495 app-root]# pip install --no-binary :all: confluent-kafka
DEPRECATION: --no-binary currently disables reading from the cache of locally built wheels. In the future --no-binary will not influence the wheel cache. pip 23.1 will enforce this behaviour change. A possible replacement is to use the --no-cache-dir option. You can use the flag --use-feature=no-binary-enable-wheel-cache to test the upcoming behaviour. Discussion can be found at https://github.com/pypa/pip/issues/11453
Collecting confluent-kafka
  Downloading confluent-kafka-2.0.2.tar.gz (119 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 119.5/119.5 kB 2.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Installing collected packages: confluent-kafka
  DEPRECATION: confluent-kafka is being installed using the legacy 'setup.py install' method, because the '--no-binary' option was enabled for it and this currently disables local wheel building for projects that don't have a 'pyproject.toml' file. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/11451
  Running setup.py install for confluent-kafka ... done
Successfully installed confluent-kafka-2.0.2

However, using any combination of --no-cache-dir and --use-pip and -use-feature=no-binary-enable-wheel-cache results in downloading the wheel.

Is there a workaround for this to get rid of the deprecation warning?


Using pip install --no-cache-dir confluent_kafka will result in downloading the wheel:

[root@91e9a6f59495 app-root]# pip install --no-cache-dir confluent-kafka
Collecting confluent-kafka
  Downloading confluent_kafka-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 4.6 MB/s eta 0:00:00
Installing collected packages: confluent-kafka
Successfully installed confluent-kafka-2.0.2

Using pip install --use-pep517 results in the same:

[root@91e9a6f59495 app-root]# pip install --use-pep517 confluent-kafka
Collecting confluent-kafka
  Downloading confluent_kafka-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 8.1 MB/s eta 0:00:00
Installing collected packages: confluent-kafka
Successfully installed confluent-kafka-2.0.2

Using both flags results in the same:

[root@91e9a6f59495 app-root]# pip install --use-pep517 --no-cache-dir confluent-kafka
Collecting confluent-kafka
  Downloading confluent_kafka-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 2.5 MB/s eta 0:00:00
Installing collected packages: confluent-kafka
Successfully installed confluent-kafka-2.0.2

How to reproduce

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()): 2.0.2 and 2.0.2
  • Apache Kafka broker version:
  • Client configuration: {...}
  • Operating system: RHEL
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigate furtherIt's unclear what the issue is at this time but there is enough interest to look into itworkaroundFor tagging issues that have a workaround documented in the comments or description

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy