You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6ff0a82
Browse filesBrowse the repository at this point in the historyBrowse files
feat: allow configuring SSE shutdown grace periods (a2aproject#1222)
- [x] Follow the [`CONTRIBUTING`
Guide](https://github.com/a2aproject/a2a-python/blob/main/CONTRIBUTING.md).
- [x] Make your Pull Request title in the
<https://www.conventionalcommits.org/> specification.
- [x] Ensure the tests and linter pass (Run `bash scripts/format.sh`
from the repository root to format)
- [ ] Appropriate docs were updated (if necessary)
---
# Description
Adds an optional `shutdown_grace_period` parameter to the JSON-RPC and
REST route factories and forwards it to every `EventSourceResponse`,
including the v0.3 compatibility routes.
The default remains `0` for backward compatibility with `sse-starlette`.
The minimum supported `sse-starlette` version is updated to `3.3.0`,
where cooperative shutdown support was introduced.
Tests cover:
- Default and custom values for both route factories
- JSON-RPC and REST streaming responses
- JSON-RPC and REST v0.3 compatibility routes
- Empty REST streams
## Verification
- [x] `./scripts/lint.sh`
- [x] `uv run pytest`
- [x] `uv run pytest --cov=src --cov-report=term-missing`
- [x] 93% total coverage
Fixesa2aproject#1221 🦕
---------
Co-authored-by: mykytanetipa <mykytanetipa@google.com>
0 commit comments