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

revert(bzlmod)!: allow bzlmod pip.parse to implicitly use default python version #1341

Merged
merged 1 commit into from
Jul 26, 2023

Conversation

chrislovecnm
Copy link
Collaborator

@chrislovecnm chrislovecnm commented Jul 24, 2023

Reverts #1303

The main issue is that pip.parse() accepts a locked requirements file -- this means
the requirements are specific to a particular Python version[1]. Because the default Python
version can arbitrarily change, the lock file may not be valid for the Python version
that is used at runtime. The net result is a module will use dependencies for e.g. Python
3.8, but will use 3.9 at runtime. Additionally, the dependencies resolved for 3.8 will
be created under names such as @foo_39 (because that's the python_version pip.parse sees),
which is just more confusing.

BREAKING CHANGE:

  • pip.parse() must have python_version explicitly set. Set it to the Python version
    used to resolve the requirements file.

[1] Lock files aren't necessarily version specific, but we don't currently support the
environment markers in lock files to make them cross-python-version compatible.

… python toolchain and interpreter (#1303)"

This reverts commit e5d9f10.
@rickeylev
Copy link
Contributor

Mostly LGTM, but I want to rewrite the description to give more context. "causes bugs" and "we decided" doesn't give enough information for future readers. It's my EOD now, though, so I don't have the energy to the description and add to the merge queue.

@rickeylev rickeylev changed the title Revert "feat(bzlmod): Allow bzlmod pip.parse to reference the default python toolchain and interpreter" revert(bzlmod)!: require pip.parse to specify python version explicitly Jul 26, 2023
@rickeylev rickeylev changed the title revert(bzlmod)!: require pip.parse to specify python version explicitly revert(bzlmod)!: allow bzlmod pip.parse to implicitly default python version Jul 26, 2023
@rickeylev rickeylev changed the title revert(bzlmod)!: allow bzlmod pip.parse to implicitly default python version revert(bzlmod)!: allow bzlmod pip.parse to implicitly use default python version Jul 26, 2023
@rickeylev rickeylev added this pull request to the merge queue Jul 26, 2023
Merged via the queue into main with commit 0642390 Jul 26, 2023
@aignas aignas deleted the revert-1303-default-interpreter branch October 17, 2024 02:54
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.

2 participants