Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-100766: Note that locale.LC_MESSAGES is not universal (GH-100702) #100702

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

uranusjr
Copy link
Contributor

@uranusjr uranusjr commented Jan 3, 2023

The LC_MESSAGES value in locale is not universally available. The value is generally imported from C headers through localemodule.c. The sourc notes this specifically:

cpython/Lib/locale.py

Lines 25 to 26 in 73097d9

# Yuck: LC_MESSAGES is non-standard: can't tell whether it exists before
# trying the import. So __all__ is also fiddled at the end of the file.

This makes the fact more visible to users only reading the documentation.

@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Jan 3, 2023
@FFY00 FFY00 changed the title Doc: Note that locale.LC_MESSAGES is not universal GH-100766: Note that locale.LC_MESSAGES is not universal Jan 5, 2023
Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uranusjr thanks for the fix!

@FFY00 FFY00 added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Jan 5, 2023
@FFY00 FFY00 changed the title GH-100766: Note that locale.LC_MESSAGES is not universal GH-100766: Note that locale.LC_MESSAGES is not universal (GH-100702) Jan 5, 2023
@FFY00 FFY00 merged commit 105e373 into python:main Jan 5, 2023
@miss-islington
Copy link
Contributor

Thanks @uranusjr for the PR, and @FFY00 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-100767 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jan 5, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 5, 2023
…nGH-100702)

(cherry picked from commit 105e373)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@bedevere-bot
Copy link

GH-100768 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 5, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 5, 2023
…nGH-100702)

(cherry picked from commit 105e373)

Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@uranusjr uranusjr deleted the doc-locale-lc-messages-optional branch January 5, 2023 04:56
carljm added a commit to carljm/cpython that referenced this pull request Jan 5, 2023
* main:
  pythonGH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (pythonGH-100753)
  pythonGH-100766: Note that locale.LC_MESSAGES is not universal (pythonGH-100702)
carljm added a commit to carljm/cpython that referenced this pull request Jan 5, 2023
* main:
  pythonGH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (pythonGH-100753)
  pythonGH-100766: Note that locale.LC_MESSAGES is not universal (pythonGH-100702)
  Drop myself from pathlib maintenance (python#100757)
  pythongh-100739: Respect mock spec when checking for unsafe prefixes (python#100740)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants