mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-09 22:35:01 +00:00
![]() ## Summary This PR makes a few performance improvements: 1. Reduces the need to unpack and repack a `_GLibCVersion` tuple 2. Reduces the doubled call to `_is_compatible(arch, glibc_version)` 3. Moves the assignment of the `tag` variable directly into the yield, reducing memory allocation in case this is never used when `_is_compatible(arch, glibc_version)` is false 4. Combines the check of the `glibc_version` being in `_LEGACY_MANYLINUX_MAP` and the assignment to the variable together. I'm not sure if this is actually better, but using the assignment expression reduces this from 4 lines to 2 ## Test Plan I upstreamed these changes in https://github.com/pypa/packaging/pull/869. Otherwise, I'm pretty confident this is a minor change that works the same |
||
---|---|---|
.. | ||
__init__.py | ||
_elffile.py | ||
_manylinux.py | ||
_musllinux.py | ||
LICENSE.APACHE | ||
LICENSE.BSD | ||
README.md |
pypa/packaging
This directory contains vendored pypa/packaging modules as of cc938f984bbbe43c5734b9656c9837ab3a28191f.
The files are licensed under BSD-2-Clause OR Apache-2.0.