Skip to content

Soft-deprecate and reimplement IOStream.read_until_close #3728

Description

@bdarnell

IOStream.read_until_close is rarely the best choice since it offers poor flow control (delivering the entire data stream as one blob, up to the max_buffer_size limit) and limited error reporting. Its implementation has had subtle bugs due to the way it is handled as a special case in close().

We should soft-deprecate this method and encourage alternatives, primarily calling read_bytes() with partial=True in a loop. We can also remove the special-case functionality in the IOStream internals by replacing read_until_close() itself with such a loop.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions