Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Report the http(s):// gRPC endpoint deprecation as a DeprecationWarning, not a UserWarning on every client

クローズ 初心者向け
#1,275 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@kocaemre がすでに取り組んでいます。

2026年10月13日 から。

  • #1276 @kocaemre による — オープン

評価

難易度
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 の本文から書いたものです。

説明

good first 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:

  1. Emit it as a DeprecationWarning (hidden by default, visible under -W default or in pytest), not a UserWarning.
  2. Pass a stacklevel that points at the caller rather than at helpers.py, or emit it at most once per process.
  3. Keep the message, and add the equivalent form for the URL given, e.g. use grpc.example.com:443?tls=true.

Acceptance criteria

  1. https://host:443 and http://host:80 parse to the same hostname, port and TLS settings as today.
  2. Parsing them raises a DeprecationWarning, not a UserWarning. Add a test with assertWarns(DeprecationWarning) and one showing that no UserWarning is raised.
  3. Building several clients against the same https:// endpoint doesn't repeat the warning, if you choose the once-per-process approach.
  4. Per the proposal, https://host?tls=false still errors. Add a test if one doesn't exist.
  5. Tests live with the existing endpoint parsing tests under tests/conf/ and tests/clients/. uv run ruff check, uv run ruff format and uv run pytest tests -m "not e2e" pass.

Pointers for a first contribution

  • Code: dapr/conf/helpers.py, the GrpcEndpoint._set_scheme method.
  • Python docs: warnings.warn (category, stacklevel).
  • Setup: see CONTRIBUTING.md; uv sync --frozen --all-packages --group dev installs everything.
主要言語
Python
スター
274
フォーク
157
平均マージ
5日 20時間
マージ済み PR(30日)
71

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dapr/python-sdk のほかの issue

dapr/python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。