Fix pex3 lock sync for split universal locks.#3200
Merged
Conversation
jsirois
commented
Jul 3, 2026
| "--dry-run", | ||
| "check", | ||
| ) | ||
| result.assert_success() |
Member
Author
There was a problem hiding this comment.
N.B.: Before the fix, this failed with:
ERROR: Given the lock requirements:
cowsay<6; python_version < "3"
cowsay==6; python_version >= "3"
The following lock update constraints could not all be satisfied:
cowsay==6
Encountered 1 error updating /tmp/pytest-of-jsirois/test_sync_split_universal_lock0/lock.json:
1.) cp314-cp314-manylinux_2_43_x86_64: pid 160054 -> /tmp/pytest-of-jsirois/test_sync_split_universal_lock0/pex-root/venvs/3/8bd2f07c0ed6715bf11b8f6442a9a826ea7fcfd6/a96ab6db284dbfcf987e72d97602026d5f42ecb0/bin/python /tmp/pytest-of-jsirois/test_sync_split_universal_lock0/pex-root/venvs/3/8bd2f07c0ed6715bf11b8f6442a9a826ea7fcfd6/a96ab6db284dbfcf987e72d97602026d5f42ecb0/pex --disable-pip-version-check --exists-action a --no-input --no-python-version-warning --log /tmp/pex-pip-log.sb_rinnr/pip.log -q --cache-dir /tmp/pytest-of-jsirois/test_sync_split_universal_lock0/pex-root/pip/3/24.1/pip_cache install --no-clean --dry-run --ignore-installed --report /tmp/pytest-of-jsirois/test_sync_split_universal_lock0/pex-root/downloads/1/.tmp/resolver_report.rn6al2l6/universal-linux-and-mac-and-windows-84eb388031e26712b5bd51cbb3789f9c24c9a5d1/pip-report.json --constraint /tmp/lock_update.vcgmb9ae.constraints.txt cowsay<6; python_version < "3" cowsay==6; python_version >= "3" --retries 5 --timeout 15 exited with 1 and STDERR:
pip: ERROR: Cannot install cowsay<6 because these package versions have conflicting dependencies.
pip: ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
pip:
pip: The conflict is caused by:
pip: The user requested cowsay<6
pip: The user requested (constraint) cowsay==6
pip:
pip: To fix this you could try to:
pip: 1. loosen the range of package versions you've specified
pip: 2. remove package versions to allow pip to attempt to solve the dependency conflictThis is much as the OP in #3194. That OP case succeeds with the following post-fix:
:; python -mpex.cli lock sync \
"torch>=2.9.1,<3.0.0; sys_platform != 'darwin'" \
"torch>=2.9.1,<3.0.0; sys_platform == 'darwin'" \
--index "https://pypi.org/simple/" \
--index "pytorch=https://download.pytorch.org/whl/cpu" \
--source "pytorch=torch" \
--indent 2 \
--lock default.lock \
--style universal \
--interpreter-constraint "==3.12.*"
No updates for lock generated by universal (platform_system == "Linux" or platform_system == "Windows") and python_full_version == "3.12.*".
No updates for lock generated by universal platform_system == "Darwin" and python_full_version == "3.12.*".
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.
Fixes #3194