Repository navigation
Releases
Releases · sysid/sse-starlette
v3.7.0
Fixed
- A generator whose
finallygets stuck after an encoding failure or an interrupted
send no longer keeps the response open forever (#217). Previously the background
task never ran, and uvicorn without a graceful timeout could not finish shutting
down. - Body iterators are now closed when SSE event encoding fails, so generator cleanup
runs before the error escapes (#223). - Encoding no longer mutates event dictionaries yielded by a generator (#225).
Added
cleanup_timeoutparameter onEventSourceResponse: seconds to wait for the
generator's cleanup after an encoding failure or interrupted send. Default:30.0.
Nonemeans no limit.
Behaviour change
- Cleanup that takes longer than 30s on this path is now cancelled, and a warning is
logged. Pass a largercleanup_timeout, orNone, to allow more time. - The deadline only reaches cleanup that can be cancelled. A nested shield or a
blocking call infinallycan still hang.
Dependencies
- Upgraded locked dependencies, including Twisted 26.10.0, which addresses open
security advisories against Twisted 26.4.0 and earlier. The lockfile does not ship
with the package: if you use Daphne, make sure your own environment has Twisted
26.10.0 or later.
What's Changed
- Close body iterators when SSE event encoding fails by @Claire-ovo in #223
- fix: avoid mutating event dictionaries during encoding by @HuaTNA in #225
- fix: bound shielded iterator cleanup with cleanup_timeout by @sysid in #234
New Contributors
- @Claire-ovo made their first contribution in #223
- @HuaTNA made their first contribution in #225
Full Changelog: v3.6.0...v3.7.0
v3.6.0
What's Changed
- chore(deps): bump virtualenv from 21.7.13 to 21.14.13 by @dependabot[bot] in #227
- chore(deps): bump certifi from 2025.11.12 to 2026.10.19 by @dependabot[bot] in #226
- fix: do not stream on HEAD requests by @AryanRajMaurya in #220
- Fix/issue218 head followups by @sysid in #229
- build(deps)!: upgrade dependencies and drop Python 3.10 by @sysid in #230
New Contributors
- @AryanRajMaurya made their first contribution in #220
Full Changelog: v3.5.1...v3.6.0
v3.5.1
What's Changed
- chore(deps): bump urllib3 from 2.7.0 to 2.8.0 by @dependabot[bot] in #213
- chore(deps): bump actions/setup-python from 6 to 7 by @dependabot[bot] in #204
- chore(deps): bump virtualenv from 20.36.1 to 21.7.13 by @dependabot[bot] in #214
- Close SSE generators after interrupted sends by @JackyHsu-X in #215
New Contributors
- @JackyHsu-X made their first contribution in #215
Full Changelog: v3.5.0...v3.5.1
v3.5.0
Fixed
- A stopped uvicorn server no longer cancels SSE streams of later servers in
the same process (#211, regression since 3.1.1). Typical trigger: test suites
starting a real server per test.
Behaviour change
AppStatus.should_exitis no longer set when sse-starlette detects uvicorn's
ownServer.should_exit(fallback path, e.g.uvicorn "module:app"). Streams
still close on shutdown. If you readAppStatus.should_exitto detect
shutdown, useshutdown_eventinstead.- A real SIGTERM/SIGINT still sets
AppStatus.should_exitprocess-wide; see
README "Testing" if your tests send real signals to an in-process server.
Upgrade note
- If you called
AppStatus.disable_automatic_graceful_drain()only to work
around #211, remove it to get automatic stream draining back.
What's Changed
- fix(shutdown): stop stopped uvicorn servers from cancelling later SSE streams (#211) by @sysid in #212
Full Changelog: v3.4.11...v3.5.0
v3.4.11
What's Changed
- fix(examples): handle slow broadcasting clients by @varadfromeast in #209
New Contributors
- @varadfromeast made their first contribution in #209
Full Changelog: v3.4.10...v3.4.11
v3.4.10
v3.4.9
v3.4.8
v3.4.6
What's Changed
- chore(deps): bump daphne from 4.2.1 to 4.2.2 by @dependabot[bot] in #201
- chore(deps): bump actions/checkout from 6 to 7 by @dependabot[bot] in #200
- make ping tests independent of wall-clock timing by @mahenzon in #202
New Contributors
Full Changelog: v3.4.5...v3.4.6
v3.4.5
What's Changed
- chore(deps): bump ujson from 5.12.0 to 5.12.1 by @dependabot[bot] in #187
- chore(deps): bump idna from 3.11 to 3.15 by @dependabot[bot] in #188
- chore(deps): bump actions/download-artifact from 4 to 8 by @dependabot[bot] in #190
- chore(deps): bump starlette from 0.50.0 to 1.0.1 by @dependabot[bot] in #193
- chore(deps): bump twisted from 25.5.0 to 26.4.0rc2 by @dependabot[bot] in #194
- chore(deps): bump cryptography from 46.0.7 to 48.0.1 by @dependabot[bot] in #196
- chore(deps): bump msgpack from 1.1.2 to 1.2.1 by @dependabot[bot] in #197
- chore(deps): bump ujson from 5.12.1 to 5.13.0 by @dependabot[bot] in #198
- fix: test selection by @sysid in #199
- chore(deps): bump starlette from 1.0.1 to 1.3.1 by @dependabot[bot] in #195
Full Changelog: v3.4.4...v3.4.5