Skip to content

Inconsistent behavior between _io.text_encoding and _pyio.text_encoding #127611

Closed as not planned
@donBarbos

Description

@donBarbos

Bug report

Bug description:

>>> import _io, _pyio
>>> _pyio.text_encoding(None, stacklevel=2)
'locale'
>>> _io.text_encoding(None, stacklevel=2)
Traceback (most recent call last):
  File "<python-input-54>", line 1, in <module>
    _io.text_encoding(None, stacklevel=2)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
TypeError: _io.text_encoding() takes no keyword arguments

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirstdlibPython modules in the Lib dirtopic-IOtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions