Skip to content

text_encoding() is missing from io.__all__ #111356

Description

@ntessore

Bug report

Bug description:

The public io.text_encoding() function is missing from io.__all__.

>>> import io
>>> "text_encoding" in io.__all___
False

CPython versions tested on:

3.10, 3.11, 3.12

Operating systems tested on:

macOS

Linked PRs

Activity

  1. AlexWaygood commented on Oct 26, 2023

    @AlexWaygood
    Member

    The function was added in #19481, by @methane. It looks to me like this was just an accidental omission, rather than something that's been deliberately excluded from __all__. Want to make a PR to add it? :)

    Possibly we could also add a test to Lib/test/test_io.py similar to this one, so that we assert that all public module members are included in __all__:

    def test__all__(self):
    support.check__all__(self, inspect, not_exported=("modulesbyfile",))

  2. added a commit that references this issue on Nov 10, 2023
  3. added 2 commits that reference this issue on Nov 10, 2023
  4. added 2 commits that reference this issue on Nov 10, 2023
  5. hugovk commented on Dec 11, 2023

    @hugovk
    Member

    Fixed and backported, thanks for the issue!

  6. added a commit that references this issue on Feb 11, 2024
  7. added a commit that references this issue on Sep 2, 2024
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

    topic-IOtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions