Skip to content

📦 Normalize tmp dir path in built artifacts#1591

Merged
webknjaz merged 2 commits intoaio-libs:masterfrom
webknjaz:packaging/tmp-build-dir-normalization
Oct 30, 2025
Merged

📦 Normalize tmp dir path in built artifacts#1591
webknjaz merged 2 commits intoaio-libs:masterfrom
webknjaz:packaging/tmp-build-dir-normalization

Conversation

@webknjaz
Copy link
Member

@webknjaz webknjaz commented Oct 30, 2025

This patch makes sure that the random temporary directory path does not end up in the built C-extensions. The effect is that downstreams will get reproducible build results.

Are there changes in behavior for the user?

Not really. It's just a different less random string that might end up in the built C-extensions.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

This patch makes sure that the random temporary directory path does
not end up in the built C-extensions. The effect is that downstreams
will get reproducible build results.
@webknjaz webknjaz self-assigned this Oct 30, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #1591 will not alter performance

Comparing webknjaz:packaging/tmp-build-dir-normalization (7b651df) with master (6cbe369)

Summary

✅ 99 untouched

webknjaz added a commit to webknjaz/yarl that referenced this pull request Oct 30, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 30, 2025
@webknjaz webknjaz force-pushed the packaging/tmp-build-dir-normalization branch from d25bef6 to 7b651df Compare October 30, 2025 02:25
@webknjaz webknjaz marked this pull request as ready for review October 30, 2025 02:25
@webknjaz webknjaz requested a review from Copilot October 30, 2025 02:26

This comment was marked as resolved.

@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.57%. Comparing base (6cbe369) to head (7b651df).
⚠️ Report is 24 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1591   +/-   ##
=======================================
  Coverage   99.57%   99.57%           
=======================================
  Files          29       29           
  Lines        5872     5881    +9     
  Branches      266      266           
=======================================
+ Hits         5847     5856    +9     
  Misses         21       21           
  Partials        4        4           
Flag Coverage Δ
CI-GHA 99.57% <100.00%> (+<0.01%) ⬆️
MyPy 97.95% <100.00%> (+<0.01%) ⬆️
OS-Linux 99.80% <ø> (ø)
OS-Windows 99.48% <ø> (ø)
OS-macOS 99.68% <ø> (ø)
Py-3.10.11 99.45% <ø> (ø)
Py-3.10.18 99.70% <ø> (ø)
Py-3.11.13 99.70% <ø> (ø)
Py-3.11.9 99.45% <ø> (ø)
Py-3.12.10 99.45% <ø> (ø)
Py-3.12.11 99.70% <ø> (ø)
Py-3.13.7 99.75% <ø> (ø)
Py-3.13.9 99.65% <ø> (ø)
Py-3.13.9t 99.75% <ø> (ø)
Py-3.14.0 99.75% <ø> (ø)
Py-3.14.0t 99.75% <ø> (ø)
Py-3.9.13 99.41% <ø> (ø)
Py-3.9.23 99.65% <ø> (ø)
Py-pypy3.10.16-7.3.19 99.36% <ø> (ø)
Py-pypy3.9.19-7.3.16 99.33% <ø> (ø)
VM-macos-latest 99.68% <ø> (ø)
VM-ubuntu-latest 99.80% <ø> (ø)
VM-windows-latest 99.48% <ø> (ø)
pytest 99.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@webknjaz webknjaz merged commit 4e1d72a into aio-libs:master Oct 30, 2025
69 of 71 checks passed
@rossburton
Copy link

This doesn't appear to work:

ERROR: python3-yarl-1.22.0-r0 do_package_qa: QA Issue: File /usr/lib/python3.13/site-packages/yarl/.debug/_quoting_c.cpython-313-aarch64-linux-gnu.so in package python3-yarl-dbg contains reference to TMPDIR [buildpaths]

I had to set with-cython-tracing=true to get the debug symbols so this might be a problem with the coverage but:

$ strings _quoting_c.cpython-313-aarch64-linux-gnu.so|grep ross
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/listobject.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/unicodeobject.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/tupleobject.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/object.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/dictobject.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/bytearrayobject.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/longintrepr.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython/bytesobject.h
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/cpython
../../../work/ross/build/tmp/work/cortexa57-poky-linux/python3-yarl/1.22.0/recipe-sysroot/usr/include/python3.13/internal

@webknjaz
Copy link
Member Author

@rossburton what did you expect? I thought you wanted static paths so I've set it up to replace paths that contain random substrings with a path to the source checkout.

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

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants