Skip to content

httpx migration problems #1882

Open
Open
@xdgrulez

Description

@xdgrulez

Description

Seems that the Python client with the latest update to 2.6.2 is broken...

All kinds of modules probably required for httpx are seemingly not listed in the dependencies of confluent_kafka and when you import confluent_kafka, you get all kinds of errors like this:

ModuleNotFoundError: No module named 'httpx'
ModuleNotFoundError: No module named 'cachetools'
ModuleNotFoundError: No module named 'google.type'

etc.

How to reproduce

import confluent_kafka
from confluent_kafka.schema_registry.avro import AvroDeserializer
Traceback (most recent call last):
File "", line 1, in
File "/tmp/bla/venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/init.py", line 20, in
from .schema_registry_client import (
File "/tmp/bla/venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/schema_registry_client.py", line 26, in
import httpx
ModuleNotFoundError: No module named 'httpx'
from confluent_kafka.schema_registry.json_schema import JSONDeserializer
Traceback (most recent call last):
File "", line 1, in
File "/tmp/bla/venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/init.py", line 20, in
from .schema_registry_client import (
File "/tmp/bla/venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/schema_registry_client.py", line 26, in
import httpx
ModuleNotFoundError: No module named 'httpx'
from confluent_kafka.schema_registry.protobuf import ProtobufDeserializer
Traceback (most recent call last):
File "", line 1, in
File "/tmp/bla/venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/init.py", line 20, in
from .schema_registry_client import (
File "/tmp/bla/venv/lib/python3.10/site-packages/confluent_kafka/schema_registry/schema_registry_client.py", line 26, in
import httpx
ModuleNotFoundError: No module named 'httpx'

...and if you install httpx, you get other missing dependencies...

I think these dependencies should be part of confluent_kafka and should not have to be installed manually by the user...

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()): 2.6.2
  • Apache Kafka broker version: doesn't matter here
  • Client configuration: doesn't matter here
  • Operating system: doesn't matter here
  • Provide client logs: see above
  • Provide broker log excerpts: doesn't matter here
  • Critical issue: I think so...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions