async with AIOKafkaProducer() fails with AttributeError
- Lenguaje dominante
- Python
- Estrellas
- 1.4k
- Forks
- 269
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 6
Descripción
**Describe the bug**
```python
async with AIOKafkaProducer(...) as producer:
producer.send(...)
```
fails with `AttributeError: 'NoneType' object has no attribute 'send'`. `producer` is indeed `None`.
**Expected behaviour**
`producer` is an `AIOKafkaProducer` object.
**Environment (please complete the following information):**
- aiokafka version (`python -c "import aiokafka; print(aiokafka.__version__)"`): 0.7.0
- kafka-python version (`python -c "import kafka; print(kafka.__version__)"`): 2.0.2
- Kafka Broker version (`kafka-topics.sh --version`): 2.6.0
- Other information (Confluent Cloud version, etc.): none relevant
**Reproducible example**
```python
async with AIOKafkaProducer(...) as producer:
producer.send(...)
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.