refactor(reporters): remove cancel_event from progress reporters

Thread cancel_event explicitly through the parameter chain
(sync_run closure → download_book() → streaming calls) instead of
stashing it on reporter objects as shared state. Remove the
cancel_event attribute from both PlainTextReporter and
ProgressReporter — cancellation is not a reporting concern.

Closes #39

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AlexKuceraandClaude Opus 4.6 committed 2026-06-05 18:45:27 +02:00
1 parent caca930c7c
commit 2930d163b2
9 files changed
+154 -9

No files matched your search

+6
View File
@@ -29,6 +29,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Refactored
- **cancel:** Thread `cancel_event` explicitly through parameter chain
(`sync_run` → `download_book()` → streaming calls) instead of stashing
it on reporter objects as shared state. Remove `cancel_event` attribute from
both `PlainTextReporter` and `ProgressReporter`. 429 tests (+5 net).
Closes #39.
- **session:** Expose public `transport` property on `LibroFmSession` returning
the underlying httpx transport. Update sole call site in `downloader.py` from
`session._client._transport` to `session.transport`. 2 new tests, 425 total.