Skip to content

gh-131725: Generate GNU hash table in msgfmt.py - #131727

Open
StanFromIreland wants to merge 13 commits into
python:mainfrom
StanFromIreland:msgfmt-hash
Open

gh-131725: Generate GNU hash table in msgfmt.py#131727
StanFromIreland wants to merge 13 commits into
python:mainfrom
StanFromIreland:msgfmt-hash

Conversation

@StanFromIreland

@StanFromIrelandStanFromIreland commented Mar 25, 2025

Copy link
Copy Markdown
Member

@StanFromIreland

Copy link
Copy Markdown
MemberAuthor

@serhiy-storchaka any thoughts? Anything else you would like to see?

# Conflicts:
#	Lib/test/test_tools/msgfmt_data/general.mo
#	Lib/test/test_tools/test_msgfmt.py
Comment threadTools/i18n/msgfmt.py Outdated
Comment threadTools/i18n/msgfmt.py Outdated
Comment threadTools/i18n/msgfmt.py
@StanFromIreland

StanFromIreland commented Mar 30, 2025

Copy link
Copy Markdown
MemberAuthor

cc @terryjreedy unrelated odd test_idle fails

Comment threadTools/i18n/msgfmt.py Outdated
Comment threadTools/i18n/msgfmt.py Outdated
Comment threadLib/test/test_tools/test_msgfmt.py Outdated
@StanFromIreland
StanFromIreland marked this pull request as ready for review March 30, 2025 12:43
@StanFromIreland

Copy link
Copy Markdown
MemberAuthor

!buildbot s390x

@bedevere-bot

Copy link
Copy Markdown

You don't have write permissions to trigger a build

@StanFromIreland

StanFromIreland commented Mar 30, 2025

Copy link
Copy Markdown
MemberAuthor

Can a core dev please call them, we should test the tests on a big endian system.

Comment on lines +59 to +63
header = struct.unpack("=7I", mo_data[:28])
hash_table_size, hash_table_offset = header[5:7]

hash_tab = struct.unpack(f"={hash_table_size}I",
mo_data[hash_table_offset : hash_table_offset + (hash_table_size * 4)])

@StanFromIrelandStanFromIrelandMar 30, 2025

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I could just hardcode these sizes since we test them below. Is that preferred?

@terryjreedy

Copy link
Copy Markdown
Member

Test_idle failure did not repeat. Next time, copy specific OS and specific failure if you can find it, into your message.

# Conflicts:
#	Lib/test/test_tools/msgfmt_data/general.mo
@StanFromIreland

Copy link
Copy Markdown
MemberAuthor

@serhiy-storchaka friendly ping:-)

@StanFromIreland

Copy link
Copy Markdown
MemberAuthor

Little ping @tomasr8 / @serhiy-storchaka

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label Apr 23, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewstaleStale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@StanFromIreland@bedevere-bot@terryjreedy@serhiy-storchaka@tomasr8@m-aciek