Skip to content

open() documentation still says default encoding is locale-dependent in 3.15 #148603

@honglei

Description

@honglei

Documentation

Documentation page

https://docs.python.org/3.15/library/functions.html#open

Bug description

The Python 3.15 open() documentation still says that the default encoding is platform-dependent and comes from locale.getencoding().

But What's New in Python 3.15 says that Python 3.15 now uses UTF-8 as the default encoding for text files by default (PEP 686), independent of the system locale/environment:
https://docs.python.org/3.15/whatsnew/3.15.html#whatsnew315-utf8-default

So these pages appear inconsistent and the open() docs may still have pre-3.15 wording.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15new features, bugs and security fixesdocsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions