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

[master] Open file in binary mode when computing hash #66463

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oogali
Copy link

@oogali oogali commented May 3, 2024

What does this PR do?

What issues does this PR fix or reference?

Fixes #59014

Previous Behavior

SPM would open all files in text mode, causing an exception to be raised when traversing a file with binary or otherwise non-text content.

New Behavior

SPM opens all files in binary mode, resulting in no change for text files and avoiding exceptions on binary files.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@oogali oogali requested a review from a team as a code owner May 3, 2024 09:34
@oogali oogali requested review from twangboy and removed request for a team May 3, 2024 09:34
@salt-project-bot-prod-environment salt-project-bot-prod-environment bot changed the title Open file in binary mode when computing hash [master] Open file in binary mode when computing hash May 3, 2024
@twangboy
Copy link
Contributor

@oogali Could we get a changelog and a test written for this

@oogali
Copy link
Author

oogali commented May 13, 2024

@twangboy At the time I created this PR, I could not get the test suite to run per #66346.

@twangboy
Copy link
Contributor

You should be able to pip install nox and then run the following:

nox -e "test-zeromq-3(coverage=False)" -- .\tests\pytests\unit\spm\test_pkgfiles.py --run-slow --core-tests --run-destructive

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

Successfully merging this pull request may close these issues.

[BUG] SPM fails installing formula that has binary files in it
2 participants