Skip to content

Releases

v3.7.0

Choose a tag to compare

@sysid sysid released this 07 Nov 11:15

Fixed

  • A generator whose finally gets 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_timeout parameter on EventSourceResponse: seconds to wait for the
    generator's cleanup after an encoding failure or interrupted send. Default: 30.0.
    None means no limit.

Behaviour change

  • Cleanup that takes longer than 30s on this path is now cancelled, and a warning is
    logged. Pass a larger cleanup_timeout, or None, to allow more time.
  • The deadline only reaches cleanup that can be cancelled. A nested shield or a
    blocking call in finally can 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

Full Changelog: v3.6.0...v3.7.0

v3.6.0

Choose a tag to compare

@sysid sysid released this 25 Oct 20:31

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

Full Changelog: v3.5.1...v3.6.0

v3.5.1

Choose a tag to compare

@sysid sysid released this 24 Oct 08:44

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

Full Changelog: v3.5.0...v3.5.1

v3.5.0

Choose a tag to compare

@sysid sysid released this 28 Sep 17:47

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_exit is no longer set when sse-starlette detects uvicorn's
    own Server.should_exit (fallback path, e.g. uvicorn "module:app"). Streams
    still close on shutdown. If you read AppStatus.should_exit to detect
    shutdown, use shutdown_event instead.
  • A real SIGTERM/SIGINT still sets AppStatus.should_exit process-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

Choose a tag to compare

@sysid sysid released this 05 Sep 12:10

What's Changed

New Contributors

Full Changelog: v3.4.10...v3.4.11

v3.4.10

Choose a tag to compare

@sysid sysid released this 03 Sep 09:35

What's Changed

  • fix: apply send timeout to heartbeat messages by @wse114 in #208

New Contributors

Full Changelog: v3.4.9...v3.4.10

v3.4.9

Choose a tag to compare

@sysid sysid released this 03 Sep 09:02

What's Changed

Full Changelog: v3.4.8...v3.4.9

v3.4.8

Choose a tag to compare

@sysid sysid released this 05 Aug 11:19

Full Changelog: v3.4.7...v3.4.8

v3.4.6

Choose a tag to compare

@sysid sysid released this 20 Jul 14:15

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

Choose a tag to compare

@sysid sysid released this 20 Jun 17:36

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