Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lock downloads to use all lock info. #2396

Merged
merged 6 commits into from Apr 12, 2024
Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Apr 11, 2024

Previously, the lock target systems and requires python configuration
were left out, which could lead to critical Pip runtime patches being
left off; causing downloads to fail when they should not.

Fixes #2395

Previously, the lock target systems and requires python configuration
were left out, which could lead to critical Pip runtime patches being
left off; causing downloads to fail when they should not.

Fixes pex-tool#2395
complete_platform = data.path("platforms", "complete_platform_linux_x86-64_py11.json")
pex = os.path.join(str(tmpdir), "pex")
shutil.rmtree(pex_root)
run_pex_command(
Copy link
Member Author

@jsirois jsirois Apr 11, 2024

Choose a reason for hiding this comment

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

After the 1st commit this fails just like the reported repro case:

...
__________________________________________________________________________________ test_download_incompatible_python
...
E       pex: Building pex :: Resolving distributions for requirements: pbipy==2.8.2 :: Resolving requirements from lock file /tmp/pytest-of-jsirois/pytest-8/test_download_incompatible_pyt0/lock.json :: Categorizing 8 downloaded artifacts
E       There was 1 error downloading required artifacts:
E       1. pbipy 2.8.2 from http://0.0.0.0:41645/root/pypi/%2Bf/fc9/ff27ad81b2ee3/pbipy-2.8.2-py2.py3-none-any.whl
E           ERROR: Package 'pbipy' requires a different Python: 3.9.13 not in '>=3.10'

testing/__init__.py:380: AssertionError
======================================================================================= short test summary info =======================================================================================
FAILED tests/integration/test_issue_2395.py::test_download_incompatible_python - AssertionError: integration test failed: return_code=1, output=, error=pex: Parsing lock /tmp/pytest-of-jsirois/pytest-8/test_download_incompatible_pyt0/lock.json

Copy link
Collaborator

@zmanji zmanji left a comment

Choose a reason for hiding this comment

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

Integration test makes sense to me and the fix also makes sense to me. I actually think I may have run into this before once.

@jsirois jsirois merged commit fa0995b into pex-tool:main Apr 12, 2024
26 checks passed
@jsirois jsirois deleted the issues/2395 branch April 12, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants