Sync mode support for the httpx family
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 32/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 412
- Fork
- 113
- Merge trung bình
- 22 giờ 43 phút
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-caldav/caldav
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
python-caldav/caldav#687 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
python-caldav/caldav#784 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
python-caldav/caldav#783 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
python-caldav/caldav#782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
python-caldav/caldav#780 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của python-caldav/caldav
Issue tương tự
-
Examples say cnxĐang mởdocumentation embedded
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Alishahryar1/free-claude-code#2111 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
namespace operations
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
EclipseFdn/open-vsx.org#14373 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày