Skip to content

Reorganize the I/O Base classes documentation #148467

Closed

Activity

  1. changed the title [-][TextIOBase class](https://github.com/python/cpython/blob/main/Doc/library/io.rst#text-io-1) should be under the [I/O Base Classes](https://github.com/python/cpython/blob/main/Doc/library/io.rst#io-base-classes) section[/-] [+]TextIOBase class should be under the I/O Base Classes section[/+] on Apr 12, 2026
  2. picnixz commented on Apr 12, 2026

    @picnixz
    Member

    It took me a while to understand what you meant but I now I see:

    Image

    In Text I/O, we have class io.TextIOBase and class io.TextIOWrapper, but indeed io.TextIOBase should be moved to the I/O base section.

  3. serhiy-storchaka commented on Apr 13, 2026

    @serhiy-storchaka
    Member
  4. dagangtj commented on Apr 13, 2026

    @dagangtj

    I'd like to work on this. I'll submit a PR to move the TextIOBase class documentation under the I/O Base Classes section.

  5. dagangtj commented on Apr 13, 2026

    @dagangtj
  6. serhiy-storchaka commented on Apr 13, 2026

    @serhiy-storchaka
    Member

    Creating a PR request is trivial, but deciding what it should do is not. We should first ask the author of the original documentation, @birkenfeld. Moving TextIOBase to the I/O Base Classes section will move it too far from TextIOWrapper.

    BufferedIOBase was initially in the Buffered Streams section. It was moved to the I/O Base Classes by @benjaminp in b6c7beb. But TextIOBase was left in its original place.

  7. birkenfeld commented on Apr 13, 2026

    @birkenfeld
    Member

    I don't think I can remember anything about this anymore :)

  8. serhiy-storchaka commented on Apr 14, 2026

    @serhiy-storchaka
    Member

    What is your opinion, @birkenfeld and @benjaminp? Should we move TextIOBase to "I/O Base Classes" or move BufferedIOBase back to "Buffered Streams"? Or leave it as is, in inconsistent state?

  9. habib-source commented on Apr 14, 2026

    @habib-source
    Author

    If you move BufferedIOBase back to "Buffered Streams". I think RawIOBase would have to move to "Raw File I/O"

  10. cmaloney commented on Apr 21, 2026

    @cmaloney
    Contributor

    I'd lean moving the *IOBase to the particular I/O section. The *IOBase defines the .read() and .write() guarantees / API shape that is then implemented by specific final classes. In this particular case what StringIO and TextIOWrapper should do for read and write, very common APIs, is defined in TextIOBase so having those close together makes for easy understanding.

    The I/O Base classes all being in one section together makes it easier to compare across them. Each layer has some distinct specific API guarantees such as RawIO doesn't retry while BufferedIO does. That is useful to see side by side for an implementer but I don't think most the readers of the documentation are implementing all the I/O clases; they just want to read and write some data.

  11. pinned and unpinned a comment on Apr 21, 2026
  12. changed the title [-]TextIOBase class should be under the I/O Base Classes section[/-] [+]Reorganize the I/O Base classes documentation[/+] on Jun 3, 2026
  13. added
    3.13only security fixes
    3.14bugs and security fixes
    3.15bugs and security fixes
    3.16new features, bugs and security fixes
    on Jun 3, 2026
  14. added 2 commits that reference this issue on Nov 12, 2026
  15. removed
    3.13only security fixes
    3.14bugs and security fixes
    on Nov 13, 2026
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

    3.15bugs and security fixes3.16new features, bugs and security fixesdocsDocumentation in the Doc dirtopic-IO

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions