Sync mode support for the httpx family
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read caldav/davclient.py alongside caldav/async_davclient.py to understand the sync client’s requests/niquests assumptions and the async client’s _USE_HTTPX handling. Check caldav/response.py for existing response compatibility; the issue leaves open whether to add a sync switch or design a shared transport layer. Done means the sync client can use the httpx family without requiring requests or niquests.
索引モデルが issue の本文から書いたものです。
説明
We should support using httpx2 for sync-requests, it seems preferable to the old requests module. The text below is AI-generated.
Today the two clients accept different HTTP libraries:
- async (
caldav/async_davclient.py): niquests, then httpx2, then httpxyz,
then httpx - whichever imports first. - sync (
caldav/davclient.py): niquests, then requests. The httpx family is
not an option at all.
So a project that already depends on httpx, and uses caldav synchronously, has to
pull in requests or niquests purely for this library. That is the same argument
as https://github.com/python-caldav/caldav/issues/690 - a library should prefer
the HTTP stack its consumer already has, rather than adding one - and it was
raised in https://github.com/python-caldav/caldav/issues/611#issuecomment-5335287677:
Considering that, we should consider supporting httpx/httpx2 also for sync
operations. However, this will have to wait for 3.4 - at least.
Filing it so it does not get lost.
What is involved
The sync client is written against the requests API and niquests is a drop-in for
it, which is why that fallback was nearly free. httpx is not a drop-in:
requests.Session/niquests.Sessionvshttpx.Clientrequests.auth.AuthBasevshttpx.Auth- different contract, and
_HttpxBearerAuthalready exists in the async client for exactly thisresponse.reasonvsresponse.reason_phrase-caldav/response.pyalready
handles both- different exception hierarchies, which matters wherever the client catches
connection or timeout errors close()vsclose()is fine, but the context-manager semantics differ
The async client already carries most of these distinctions behind _USE_HTTPX;
the interesting question is whether the sync client should grow the same switch or
whether the two should share one thin transport layer. The latter is more work
and much better, and is probably a 4.0 conversation rather than a 3.4 one.
Not urgent
Nothing is broken; this is about not forcing a dependency on consumers who
already have one that would do.
- 主要言語
- Python
- スター
- 412
- フォーク
- 113
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 41
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-caldav/caldav のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
python-caldav/caldav#687 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
python-caldav/caldav#774 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
python-caldav/caldav#769 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 50/100
python-caldav/caldav#765 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
python-caldav/caldav#763 ·
メンテナーはふだん 1 日以内に返信
python-caldav/caldav の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
aws-samples/sample-per-model-bedrock#243 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
FuRongJun-1999/dsh-memory#404 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
PennyLaneAI/catalyst#3337 ·
メンテナーはふだん 1 日以内に返信
-
Workflow.schedule stops when a cron deadline passes before sleep対応中かも @HuaTNA が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信