Wrong signature for `KafkaError`'s 1st parameter in `.pyi`
Los mantenedores suelen responder en 3 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Área
- developer-experience
Línea de trabajo
Compara la declaración de KafkaError en src/confluent_kafka/cimpl.pyi con el manejo del constructor en src/confluent_kafka/src/confluent_kafka.c. Reproduce la discrepancia con los comandos de mypy y Python indicados, y luego verifica que la firma elegida sea aceptada de forma coherente tanto por la comprobación de tipos como durante la ejecución.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The name of the 1st parameter for KafkaError's initialiser in src/confluent_kafka/cimpl.pyi is now code (ref here), however this does not match the underlying code itself.
For example, if we try to create an instance of KafkaError according to the signature:
# kafka_error_test.py
from confluent_kafka import KafkaError
error = KafkaError(code=1)
Then mypy is OK with this
# mypy kafka_error_test.py
Success: no issues found in 1 source file
But we get a TypeError when it runs
# python kafka_error_test.py
Traceback (most recent call last):
File "/workspaces/kafka_error_test.py", line 5, in <module>
error = KafkaError(code=1)
I'm happy to submit a PR to fix this but which way do we want to go here? Change the signature in the .pyi file so it matches what the underlying C code expects? Or change the underlying C code to match up with the signature?
- Lenguaje dominante
- Python
- Estrellas
- 528
- Forks
- 977
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 19
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de confluentinc/confluent-kafka-python
-
KIP-848 migration guide says never use assign()/unassign() with group.protocol='consumer'; it's only rejected after subscribePosiblemente ocupada @hidingmyname la tomó hace 22 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
confluentinc/confluent-kafka-python#2405 ·
Los mantenedores suelen responder en 3 días
-
init_transactions docstring says the transaction.timeout.ms clock starts there; it starts at begin_transactionPosiblemente ocupada @hidingmyname la tomó hace 22 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
confluentinc/confluent-kafka-python#2404 ·
Los mantenedores suelen responder en 3 días
-
Wrong type annotations for read only mapping types.Posiblemente ocupada @RasmusNygren la tomó hace 198 días. Abiertostatus:under-review
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
confluentinc/confluent-kafka-python#2244 ·
Los mantenedores suelen responder en 3 días
-
Use joserfc instead of authlib.josePosiblemente ocupada @yvaishalirao la tomó hace 135 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
confluentinc/confluent-kafka-python#2242 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Producer.poll(timeout) blocks for full timeout after delivery callback fires (regression in 2.13.0)Quizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertocomponent:producer
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
confluentinc/confluent-kafka-python#2215 · 1 comentario · 3 reacciones ·
Los mantenedores suelen responder en 3 días
Todos los issues de confluentinc/confluent-kafka-python
Issues similares
-
needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
flashinfer-ai/flashinfer#9803 ·
Los mantenedores suelen responder en 1 día
-
bug frontend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 89/100
cuadrao-ai/argus#2328 ·
Los mantenedores suelen responder en 1 día
-
bug frontend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
nikhilb2/simple_invoicing#907 ·