Skip to content

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

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Mar 25, 2025

@StanFromIreland
Copy link
Member Author

@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
@StanFromIreland
Copy link
Member Author

StanFromIreland commented Mar 30, 2025

cc @terryjreedy unrelated odd test_idle fails

@StanFromIreland StanFromIreland marked this pull request as ready for review March 30, 2025 12:43
@StanFromIreland
Copy link
Member Author

!buildbot s390x

@bedevere-bot
Copy link

You don't have write permissions to trigger a build

@StanFromIreland
Copy link
Member Author

StanFromIreland commented Mar 30, 2025

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)])
Copy link
Member Author

@StanFromIreland StanFromIreland Mar 30, 2025

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
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
Member Author

@serhiy-storchaka friendly ping:-)

@StanFromIreland
Copy link
Member Author

Little ping @tomasr8 / @serhiy-storchaka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy