Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

python version locale.getencoding() warns deprecation and advice to use getencoding() again #103085

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@youknowone

Description

@youknowone

Bug report

When callinglocale.getencoding() while_locale.getencoding() is not available, it shows looking-recursive deprecation warnings.

../Lib/locale.py:657: DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead

This is happening because python versionlocale.getencoding() is callinglocale.getdefaultlocale()https://github.com/python/cpython/blob/v3.12.0a5/Lib/locale.py#L642

andlocale.getdefaultlocale warns regardless where the call came from

https://github.com/python/cpython/blob/v3.12.0a5/Lib/locale.py#L544-L547

Your environment

  • CPython versions tested on: v3.11.2 Lib with RustPython HEAD
  • Operating system and architecture: aarch64-apple-darwin

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp