Closed blodow closed 5 months ago
@blodow, thank you for this PR, much appreciated! Please give me some time to review it properly.
@blodow , following feedback
make test
was not working, which I fixed.After upgrade dependecies:
make tox
are breaking for python 12: anyio
has got breaking changes: ExceptionGroups
At this point I need to stop due to time constraints. However, make tox
needs to pass in order to get the PR merged.
Maybe you can have a look at it.
@sysid I think I managed to fix the remaining issues in a sort of minimally-invasive way. Let me know if you would like to see any other changes.
As described in #89, this adds a
send_timeout
parameter to theEventSourceResponse
initializer. In the event of thesend
call inside the response's sending logic exceeding this duration, aSendTimeoutError
is raised, aborting the SSE event generator and effectively canceling the HTTP connection.