Repository navigation
馃悰 fix(zipapp): restore one cross-platform pipx.pyz - #1990
Merged
Merged
Conversation
pip evaluates environment markers against the interpreter building the artifact, so colorama (win32-only) and tomli (py<3.11-only) never reached a pipx.pyz built on the release runner. Requesting both explicitly in the shiv invocation keeps one artifact valid on every supported platform and Python version, which lets the separate pipx-windows.pyz from pypa#1979 be rolled back. The Windows CI job now downloads the Linux-built pipx.pyz and runs it under Python 3.10, exercising both markers in the artifact that ships. Fixes pypa#1978, fixes pypa#1984.
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A release publishes one
pipx.pyzfor every platform and Python version, but shiv delegates dependency resolution to pip, and pip evaluates the environment markers independencieson the machine that builds the artifact. The release runner (Linux, Python 3.14) resolves awaycolorama(sys_platform == 'win32') andtomli(python_version < '3.11'), which breaks the zipapp on Windows (#1978) and on Python 3.10 on every platform (#1984). #1979 addressed the Windows half by shipping a secondpipx-windows.pyz, which split the download instructions per platform and left the Python 3.10 crash in place.This adopts the mechanism from #1985 by @marko1olo: naming
colorama>=0.4.4andtomliin theshivinvocation bundles them no matter where the build runs. 馃摝 Both are small pure-Python wheels and pipx imports them behind platform and version guards, so platforms that need them get a working artifact and the rest carry a few unused kilobytes. One artifact serves everyone again, so this rolls back the #1979 split: oneshivcommand intox.toml, one upload in the release workflow, and one download in the docs.CI now mirrors the release path. The Linux job builds through
tox run -e zipapp, keeping theshivcommand in a single place, and tests the artifact under Python 3.10. The Windows job stopped building its own zipapp: it downloads the Linux-builtpipx.pyzand runs--versionplusinstall blackunder Python 3.10 onwindows-2025, hitting both marker-gated imports in the exact bytes a release ships. 馃獰