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

Enforce Requires-Python when syncing #4068

Merged
merged 2 commits into from
Jun 5, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

Ensures that we raise if the user attempts to use a Python version that wasn't included in the locked range.

Closes #4052.

@charliermarsh charliermarsh added the preview Experimental behavior label Jun 5, 2024
@charliermarsh charliermarsh marked this pull request as ready for review June 5, 2024 20:01
return Err(ProjectError::RequiresPython(
venv.interpreter().python_version().clone(),
requires_python.clone(),
));
Copy link
Member Author

Choose a reason for hiding this comment

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

Should this be a warning?

Copy link
Member

Choose a reason for hiding this comment

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

Probably not, I feel like for a lockfile it makes sense to fail?

Base automatically changed from charlie/requires-python to main June 5, 2024 20:22
@charliermarsh charliermarsh merged commit 0b6d5b3 into main Jun 5, 2024
46 checks passed
@charliermarsh charliermarsh deleted the charlie/requires-python-ii branch June 5, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

universal-lock: include and verify Python version range in the lock file
2 participants