Skip to content

Make force attr for ClientResponse.close() True by default #479

Closed
@asvetlov

Description

resp.close(force=False) is not safe: you should make sure that all response body has been read.
That can be done by yield from resp.release() call.
So let's change .close() to forcing close behavior. This simplifies response usage rules.

Appliying .close(force=False) should produce DeprecationWarning in next releases (say, until New Year). After that let's remove the parameter completely.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions