Wrong signature for `KafkaError`'s 1st parameter in `.pyi`
メンテナーはふだん 3 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
調査の方向性
src/confluent_kafka/cimpl.pyi の KafkaError 宣言と、src/confluent_kafka/src/confluent_kafka.c のコンストラクター処理を比較します。報告されている mypy コマンドと Python コマンドで不一致を再現し、選択したシグネチャが型チェックと実行時の両方で一貫して受け入れられることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Python
- スター
- 528
- フォーク
- 977
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 19
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
confluentinc/confluent-kafka-python のほかの issue
-
KIP-848 migration guide says never use assign()/unassign() with group.protocol='consumer'; it's only rejected after subscribe対応中かも @hidingmyname が 22 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
confluentinc/confluent-kafka-python#2405 ·
メンテナーはふだん 3 日以内に返信
-
init_transactions docstring says the transaction.timeout.ms clock starts there; it starts at begin_transaction対応中かも @hidingmyname が 22 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
confluentinc/confluent-kafka-python#2404 ·
メンテナーはふだん 3 日以内に返信
-
Wrong type annotations for read only mapping types.対応中かも @RasmusNygren が 198 日前に担当しました。 オープンstatus:under-review
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
confluentinc/confluent-kafka-python#2244 ·
メンテナーはふだん 3 日以内に返信
-
Use joserfc instead of authlib.jose対応中かも @yvaishalirao が 135 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
confluentinc/confluent-kafka-python#2242 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
Producer.poll(timeout) blocks for full timeout after delivery callback fires (regression in 2.13.0)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンcomponent:producer
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
confluentinc/confluent-kafka-python#2215 · コメント 1 件 · リアクション 3 件 ·
メンテナーはふだん 3 日以内に返信
confluentinc/confluent-kafka-python の issue をすべて見る
似ている issue
-
needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
flashinfer-ai/flashinfer#9803 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
cuadrao-ai/argus#2328 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nikhilb2/simple_invoicing#907 ·