docs: fix facts in docs and the missing-client error message - #97
Merged
Merged
Conversation
- Python requirement is 3.11+, matching requires-python. - Idle backoff jitter is applied before the cap, so worst-case idle latency is max_polling_interval, not 1.5x. - timeline_key and payloads_key are per-topic key prefixes. - Redis Cluster: the constructor raises TypeError. - Drop "NoCast-typed" and an unused import from examples. - Make the router prefix example valid Python. - Missing-client error now says to pass a client to TimersBroker. - Plainer wording on timer ID overwrite and cancel_all side effects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several statements in the docs and README did not match the code, and one error message gave advice the broker cannot follow.
Changes
docs/introduction/installation.md: "Python 3.13+" changed to 3.11+, matchingrequires-python = ">=3.11,<4"inpyproject.toml.max_polling_interval × 1.5.subscriber/schedule.py:50computesmin(base * 2**n * jitter, max_idle), so jitter is applied before the cap and the worst case ismax_polling_interval. Fixed inhow-it-works.mdandsubscriber.md; the jitter mentions inREADME.mdand thesubscriber.mdtable now say it is applied before the cap.docs/usage/basic.md:timeline_key/payloads_keyare prefixes;TimerStore._keys(store.py:95-97) builds{key}:{topic}.how-it-works.mdpointed to the broker docstring for the Cluster restriction, but that docstring does not mention it. The check isbroker.py:142, which raisesTypeError; the docs now say so.subscriber.md: removed "NoCast-typed"; the example usesStreamMessage[TimerMessage].publisher.md: removed an unusedStreamMessageimport.router.md:async def handle_invoice(...): ...was not valid Python; it now byte-compiles.configs.py:28: "Connection not available. Connect the broker first." The client only comes from the constructor (broker.py:150,ConnectionState(client));connect()cannot supply one. New message: "TimersBroker has no Redis client; pass one to TimersBroker(client)." The existing test now asserts the message; it failed before the change.basic.mdfor timer ID overwrites andcancel_allside effects.All Python blocks in
README.mdanddocs/byte-compile, ruff reports no unused imports in them, and the threetesting.mdexamples pass under pytest.Checklist
ruff)ty)uv build) if packaging or build config changeddescription, profile blurb) if this touches packaging