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 pex --only-binary X --lock .... #2433

Merged
merged 1 commit into from
Jun 22, 2024
Merged

Conversation

jsirois
Copy link
Member

@jsirois jsirois commented Jun 21, 2024

Since #2346, which was released in Pex 2.1.161, using --only-binary X
with a --lock would fail fast even if the lock itself was created with
--only-binary X, which should be compatible.

Fixes #2432

Since pex-tool#2346 which was released in Pex 2.1.161, using `--only-binary X`
with a `--lock` would fail fast even if the lock itself was created with
`--only-binary X`, which should be compatible.

Fixes pex-tool#2432
self._build_configuration = attr.evolve(
build_configuration, allow_wheels=False, allow_builds=True, prefer_older_binary=False
build_configuration, allow_builds=True, prefer_older_binary=False
Copy link
Collaborator

@huonw huonw Jun 22, 2024

Choose a reason for hiding this comment

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

I was initially confused why changes to VCSArtifactDownloadManager would improve the behaviour for what was tested. That test seems to only use PyPI requirements, not VCS ones.

My understanding is that this error happens eagerly, on construction of this BuildConfiguration object, and so when a VCSArtifactDownloadManager is constructed, it'll eagerly do the checking and throw the error here. And, at least one VCSArtifactDownloadManager is constructed for every resolve-from-lock (one for each subset), thus, failures even when no VCS requirements are involved.

Is that correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

@jsirois jsirois merged commit f628a95 into pex-tool:main Jun 22, 2024
26 checks passed
@jsirois jsirois deleted the issues/2432 branch June 22, 2024 07:33
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.

"Resolving wheels disallowed" error when using --lock and --only-binary
2 participants