Skip to content

Disable coerce_c_locale and utf8_mode by default in _PyPreConfig? #80624

Closed

Description

@vstinner
BPO 36443
Nosy @ncoghlan, @vstinner
PRs
  • bpo-36443: Disable C locale coercion and UTF-8 Mode by default #12589
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-03-27.17:30:10.749>
    created_at = <Date 2019-03-26.23:04:10.529>
    labels = ['interpreter-core', '3.8']
    title = 'Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?'
    updated_at = <Date 2019-03-27.17:30:10.748>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-03-27.17:30:10.748>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-03-27.17:30:10.749>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2019-03-26.23:04:10.529>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36443
    keywords = ['patch']
    message_count = 3.0
    messages = ['338922', '338978', '338980']
    nosy_count = 2.0
    nosy_names = ['ncoghlan', 'vstinner']
    pr_nums = ['12589']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36443'
    versions = ['Python 3.8']

    Activity

    1. vstinner commented on Mar 26, 2019

      @vstinner
      MemberAuthor

      bpo-36301 created a very strict separated between Python initialization and a new "pre-initialization" which is responsible to configure encodings and memory allocators.

      Nick Coghlan proposed to disable UTF-8 Mode and C locale coercion by default in the pre-initialization, so the LC_CTYPE locale is not coerced by Python when it's embedded in an application.

      Maybe the UTF-8 Mode can be automatically enabled (depending on the LC_CTYPE locale), but not the C locale coercion?

      This issue is related to bpo-36202: Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake.

    2. vstinner commented on Mar 27, 2019

      @vstinner
      MemberAuthor

      New changeset d929f18 by Victor Stinner in branch 'master':
      bpo-36443: Disable C locale coercion and UTF-8 Mode by default (GH-12589)
      d929f18

    3. vstinner commented on Mar 27, 2019

      @vstinner
      MemberAuthor

      Done. I close the issue.

    4. transferred this issue fromon Apr 10, 2022
    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.8 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions