gh-154377: Reject startup with mismatched python-version (PEP 838)#154381
Closed
konstin wants to merge 4 commits into
Closed
gh-154377: Reject startup with mismatched python-version (PEP 838)#154381konstin wants to merge 4 commits into
python-version (PEP 838)#154381konstin wants to merge 4 commits into
Conversation
Draft PR accompanying [PEP 838](https://peps.python.org/pep-0838/)
This is a stronger version of python#127727 / python#149715: Using the standardized `python-version`, we fail at startup with a helpful error message instead of running up until an unclear `ModuleNotFoundError` because the shared library has a tag for a different Python version. This change checks the major version, we shouldn't silently pass when encountering a potential Python 4 that mismatches. This is an optional part of the PEP and may equally be a warning as it currently is with `version`/`version_info`. Stacked on top of python#154378.
Member
|
See issue for the rationale of closing. This is premature. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a stronger version of #127727 / #149715: Using the standardized
python-version, we fail at startup with a helpful error message instead of running up until an unclearModuleNotFoundErrorbecause the shared library has a tag for a different Python version.This change checks the major version, we shouldn't silently pass when encountering a potential Python 4 that mismatches.
This is an optional part of the PEP and may equally be a warning as it currently is with
version/version_info.Stacked on top of #154378.
Part of #154377.
python-versiontopyvenv.cfg#154377