FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-130655: Add a test for big-endian MO files in `gettext` by tomasr8 · Pull Request #132469 · python/cpython · GitHub

Repository navigation

gh-130655: Add a test for big-endian MO files in gettext - #132469

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
tomasr8:gettext-bigendian
May 1, 2025
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
tomasr8:gettext-bigendian

Conversation

tomasr8 commented Apr 13, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

MO files can be stored either in little or big-endian format. Which is which is dictated by the file header.
All our test MO files are currently little-endian. We should have at least one test with big-endian as well.

StanFromIreland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM.

Comment thread Lib/test/test_gettext.py
]))


GNU_MO_DATA_BIG_ENDIAN = base64.b64encode(bytes([

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It is weird to use b64encode here, and then decode it back. In future we may use bytes literals.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Noted, thanks for the review!

serhiy-storchaka merged commit 474f296 into python:main May 1, 2025

Copy link
Copy Markdown

Thanks @tomasr8 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 1, 2025
…nGH-132469)

(cherry picked from commit 474f296)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>

bedevere-app Bot commented May 1, 2025

Copy link
Copy Markdown

GH-133248 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 1, 2025
serhiy-storchaka pushed a commit that referenced this pull request May 1, 2025
…32469) (GH-133248)

(cherry picked from commit 474f296)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
tomasr8 deleted the gettext-bigendian branch May 1, 2025 12:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL