Skip to content

codecs.StreamWriter.write() returns None #134706

Open
@srittau

Description

@srittau

Bug report

Bug description:

This violates the usual write() contract of returning the number of items written (for synchronous I/O) and also affects StreamReaderWriter.write() transitively.

In this case it seems trivial to just return the result of the called self.stream.write().

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions