Skip to content

Commit 7990ddf

Browse files
committed
docs: note the removed http_sync exports
required_library_error()'s only caller was require_async_session(), which went with the JMAP extraction, and its tests pinned the exact wording using "the async JMAP client" as the example - a string naming something no longer in the tree, in tests that can no longer go red for a real user. The helper is kept, since the condition it describes recurs whenever a component is built on a single library, but the example is now a hypothetical. The AsyncSession and require_async_session removals from caldav.lib.http_sync get the CHANGELOG line they were missing. Prompt: look into PR [#711] Assisted-By: Claude Opus 5 <noreply@anthropic.com>
1 parent d16d961 commit 7990ddf

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ The JMAP support was declared experimental in 3.0, hence the changes below are d
2424

2525
### Changed
2626

27+
* `caldav.lib.http_sync` no longer exports `AsyncSession` or `require_async_session()`. They existed only for the async JMAP client, which has moved out of this library; `caldav.lib.http_libraries.required_library_error()` is kept, but has no caller in caldav today.
2728
* `caldav.jmap` no longer carries its own JMAP client implementation. It's now a thin re-export of calendaring-jmap.
2829
* Old imports still work, including the submodule paths the 3.3 documentation used: `from caldav.jmap import JMAPClient`, `from caldav.jmap.error import JMAPAuthError`, `caldav.jmap.convert.jscal_to_ical` and so on all resolve to calendaring-jmap's own modules.
2930
* Importing `caldav.jmap` now emits a `DeprecationWarning`. Use `from calendaring_jmap import JMAPClient` going forward; the wrapper will be removed in a future release.

‎tests/test_http_libraries.py‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,26 @@ def test_async_candidates_is_niquests_then_the_httpx_family(self) -> None:
181181

182182
class TestRequiredLibraryMessage:
183183
"""A library that has no fallback needs different wording from "none of
184-
them is installed" - the sync stack may well be running on requests."""
184+
them is installed" - the sync stack may well be running on requests.
185+
186+
The helper has no caller in caldav today; its last one was
187+
require_async_session(), removed when JMAP moved out into
188+
calendaring-jmap. It is kept because the condition it describes recurs
189+
whenever a component is built on one library, and the example below is
190+
written as a hypothetical rather than naming something that no longer
191+
exists."""
185192

186193
def test_names_the_required_library(self) -> None:
187-
message = required_library_error("niquests", "the async JMAP client")
194+
message = required_library_error("niquests", "some niquests-only component")
188195
assert "niquests" in message
189-
assert "the async JMAP client" in message
196+
assert "some niquests-only component" in message
190197

191198
def test_does_not_claim_nothing_is_installed(self) -> None:
192-
message = required_library_error("niquests", "the async JMAP client")
199+
message = required_library_error("niquests", "some niquests-only component")
193200
assert "none of the supported" not in message
194201

195202
def test_still_points_at_the_extra_and_the_docs(self) -> None:
196-
message = required_library_error("niquests", "the async JMAP client")
203+
message = required_library_error("niquests", "some niquests-only component")
197204
assert "caldav[niquests]" in message
198205
assert DOCS_URL in message
199206

0 commit comments

Comments
 (0)