Skip to content

Fix pex3 lock sync for split universal locks.#3200

Merged
jsirois merged 5 commits into
pex-tool:mainfrom
jsirois:issues/3194
Jul 4, 2026
Merged

Fix pex3 lock sync for split universal locks.#3200
jsirois merged 5 commits into
pex-tool:mainfrom
jsirois:issues/3194

Conversation

@jsirois

@jsirois jsirois commented Jul 3, 2026

Copy link
Copy Markdown
Member

Fixes #3194

"--dry-run",
"check",
)
result.assert_success()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 conflict

This 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.*".

@jsirois jsirois merged commit bd3eed0 into pex-tool:main Jul 4, 2026
96 of 108 checks passed
@jsirois jsirois deleted the issues/3194 branch July 4, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pex3 lock sync does not work with multi-resolve universal lockfile + pytorch

1 participant