Report the http(s):// gRPC endpoint deprecation as a DeprecationWarning, not a UserWarning on every client
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- grpc, python
調査の方向性
dapr/conf/helpers.py の GrpcEndpoint._set_scheme から始めてください。この関数は、カテゴリも stacklevel も指定せずに warn() を呼び出しています。その後、tests/conf/ と tests/clients/ にある既存のエンドポイント解析テストを読んでください。完了の条件は、メッセージが DeprecationWarning になり、呼び出し元を指す stacklevel が設定されていること(またはプロセスごとに一度だけ発生すること)、http/https の解析結果が変わらないこと、新しい assertWarns テストと uv run pytest tests -m "not e2e" がどちらも成功することです。
索引モデルが issue の本文から書いたものです。
説明
Problem
Setting DAPR_GRPC_ENDPOINT to an https:// (or http://) URL, for example https://grpc.example.com:443, prints this every time a gRPC endpoint is parsed:
dapr/conf/helpers.py:43: UserWarning: http and https schemes are deprecated for grpc, use myhost?tls=false or myhost?tls=true instead
The sidecar endpoint proposal says SDKs "will continue to accept the old behaviour of DAPR_GRPC_ENDPOINT with the scheme value https to signal to use TLS". The format is supported, so a UserWarning (shown by default, and with no category) is too loud. Because GrpcEndpoint is built for every DaprClient, workflow client and worker, an app that creates several clients logs the same line many times.
The warning comes from GrpcEndpoint._set_scheme in dapr/conf/helpers.py, which calls warn(...) with no category and no stacklevel.
Proposed change
Keep accepting http:// and https:// exactly as today. Only change how the deprecation is reported:
- Emit it as a
DeprecationWarning(hidden by default, visible under-W defaultor in pytest), not aUserWarning. - Pass a
stacklevelthat points at the caller rather than athelpers.py, or emit it at most once per process. - Keep the message, and add the equivalent form for the URL given, e.g.
use grpc.example.com:443?tls=true.
Acceptance criteria
https://host:443andhttp://host:80parse to the same hostname, port and TLS settings as today.- Parsing them raises a
DeprecationWarning, not aUserWarning. Add a test withassertWarns(DeprecationWarning)and one showing that noUserWarningis raised. - Building several clients against the same
https://endpoint doesn't repeat the warning, if you choose the once-per-process approach. - Per the proposal,
https://host?tls=falsestill errors. Add a test if one doesn't exist. - Tests live with the existing endpoint parsing tests under
tests/conf/andtests/clients/.uv run ruff check,uv run ruff formatanduv run pytest tests -m "not e2e"pass.
Pointers for a first contribution
- Code:
dapr/conf/helpers.py, theGrpcEndpoint._set_schememethod. - Python docs:
warnings.warn(category,stacklevel). - Setup: see
CONTRIBUTING.md;uv sync --frozen --all-packages --group devinstalls everything.
- 主要言語
- Python
- スター
- 274
- フォーク
- 157
- 平均マージ
- 5日 20時間
- マージ済み PR(30日)
- 71
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dapr/python-sdk のほかの issue
-
SDK Alignment of Workflow Examples再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdapr-ext-workflow good first issue kind/enhancement P2
難易度 2/5 1〜2日 初心者へのやさしさ 72/100
dapr/python-sdk#853 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
ci/release-failure release
難易度 2/5 1〜3時間 初心者へのやさしさ 49/100
dapr/python-sdk#1311 ·
メンテナーはふだん 2 日以内に返信
-
help wanted kind/enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
dapr/python-sdk#1296 ·
メンテナーはふだん 2 日以内に返信
-
[WORKFLOW SDK FEATURE REQUEST] Retry WaitForInstanceCompletion/Start on a server-sent CANCELLEDオープンdapr-ext-workflow kind/enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
dapr/python-sdk#1246 ·
メンテナーはふだん 2 日以内に返信
-
[BUG] subscribe_with_handler stops silently: async task can die or be collected, sync retry path exits, handler errors reconnect the stream対応中かも @CasperGN が 23 日前に担当しました。 オープンkind/bug
難易度 4/5 3〜5日 初心者へのやさしさ 65/100
dapr/python-sdk#1233 ·
メンテナーはふだん 2 日以内に返信
dapr/python-sdk の issue をすべて見る
似ている issue
-
`lvm_compact` has no self-hosted twin, and `docs/158` §5 says every language-face component mustオープンbug sev-3 vm
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sierra-research/tau2-bench#635 ·
メンテナーはふだん 1 日以内に返信
-
The add-ssm-model skill requires a Cython simulator; the contributing guide allows Python ones対応中かも @fmuia が今日担当しました。 オープンdocumentation skill
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
lnccbrown/ssm-simulators#406 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
btclib-org/btclib-ecc#309 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
autowarefoundation/autoware_carla_scenario#281 ·
メンテナーはふだん 1 日以内に返信