Skip to content

Drop 'Response(on_close=...)' from API#1572

Merged
lovelydinosaur merged 1 commit intomasterfrom
drop_response_on_close
Apr 16, 2021
Merged

Drop 'Response(on_close=...)' from API#1572
lovelydinosaur merged 1 commit intomasterfrom
drop_response_on_close

Conversation

@lovelydinosaur
Copy link
Contributor

Stop supporting Response(on_close=...) in the API, which really is a bit of niggly implementation detail that's being unnecessarily exposed.

I figure we can get away without any deprecation period on this one with a 0.18 bump, since it really has only every been intended as an implementation detail, rather than user-facing API.

Instead, once we've got a response instance we upgrade the stream on it to a bound stream, that closes the timer once it's elapsed.

Figure this is worth doing, since API is king, and we really don't want that public API close callback there if we can avoid it.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants