Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Apr 16, 2021
Merged

Conversation

tomchristie
Copy link
Member

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.

@tomchristie tomchristie added this to the v0.18 milestone Apr 14, 2021
Copy link
Member

@florimondmanca florimondmanca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smart one about that "bound stream" idea. :-)

@tomchristie tomchristie merged commit 073a328 into master Apr 16, 2021
@tomchristie tomchristie deleted the drop_response_on_close branch April 16, 2021 09:03
@tomchristie tomchristie mentioned this pull request Apr 16, 2021
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.

None yet

2 participants