Skip to content

Normalize file modes stored in wheels - #702

Open
fhgffy wants to merge 1 commit into
pypa:mainfrom
fhgffy:fix-wheel-permission-normalization
Open

fhgffy wants to merge 1 commit into
pypa:mainfrom
fhgffy:fix-wheel-permission-normalization

Conversation

@fhgffy

@fhgffy fhgffy commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #362

WheelFile.write stored stat.S_IMODE from the build tree. That mode includes the process umask, so the same sources produced different wheels. Members are now stored as 0644, or 0755 when any execute bit is set.

Tests: pytest tests/test_wheelfile.py::test_write_normalizes_umask

Wheel members copied from the build tree kept the umask in their zip mode, so the same sources produced different wheels. Executable files stay 755 and other files are stored as 644.
@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.57%. Comparing base (c4b173a) to head (1453049).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #702      +/-   ##
==========================================
+ Coverage   63.54%   63.57%   +0.02%     
==========================================
  Files          15       15              
  Lines        1270     1271       +1     
==========================================
+ Hits          807      808       +1     
  Misses        463      463              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fhgffy

fhgffy commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

The failing test (ubuntu-latest, pypy-3.11") job is unrelated to this change. The matrix entry on main is missing its opening quote, so setup-python rejects the version. #703 fixes that.

This branch has not been deployed

No deployments
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.

Builds are not (fully) reproducible due to file permissions stored in .whl

1 participant