One function
InTemporaryDirectory in pypa/auditwheel
The author described this change as “fix: resolve path of InTemporaryDirectory name (#569)”. It counts as a record because the check below fails on the code as it stood at a67aa8726 and passes on a6f2bd70b, with nothing else changed between the two runs.
Projectpypa/auditwheel
Fix saved2025-04-05
Sharing licenceMIT · LICENSE
Change size+6 −4
What the code was meant to do, written into the code itself as a docstring
Create, return, and change directory to a temporary directory Examples --------
The change
| 17 | 17 | ||
| 18 | 18 | def __init__(self) -> None: | |
| 19 | 19 | self._tmpdir = TemporaryDirectory() | |
| 20 | + | self._name = Path(self._tmpdir.name).resolve(strict=True) | |
| 20 | 21 | ||
| 21 | 22 | @property | |
| 22 | 23 | def name(self) -> Path: | |
| 23 | - | return Path(self._tmpdir.name) | |
| 24 | + | return self._name | |
| 24 | 25 | ||
| 25 | 26 | def __enter__(self) -> Path: | |
| 26 | 27 | self._pwd = Path.cwd() | |
| 27 | - | os.chdir(self._tmpdir.name) | |
| 28 | - | return Path(self._tmpdir.__enter__()) | |
| 28 | + | os.chdir(self._name) | |
| 29 | + | self._tmpdir.__enter__() | |
| 30 | + | return self._name | |
| 29 | 31 | ||
| 30 | 32 | def __exit__( | |
| 31 | 33 | self, | |
| ⋯ | |||
| 34 | 36 | tb: TracebackType | None, | |
| 35 | 37 | ) -> None: | |
| 36 | 38 | os.chdir(self._pwd) | |
| 37 | - | return self._tmpdir.__exit__(exc, value, tb) | |
| 39 | + | self._tmpdir.__exit__(exc, value, tb) | |
The check that tells the two apart
fail→pass·tests/unit/test_wheeltools.py::test_inwheel_tmpdir
Check file tests/unit/test_wheeltools.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before ita67aa872656c49b87867a9e89d8d0de832e108cd
Broken version dated2025-04-05
Moduleauditwheel.tmpdirs
Units changedInTemporaryDirectory
Fingerprintff52d8f130b93d63
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in pypa/auditwheel
- 2026-03-28add_platforms
- 2022-01-08dir2zip