Skip to content

gh-154377: Reject startup with mismatched python-version (PEP 838)#154381

Closed
konstin wants to merge 4 commits into
python:mainfrom
konstin:konsti/pep-838-error-on-version-mismatch
Closed

gh-154377: Reject startup with mismatched python-version (PEP 838)#154381
konstin wants to merge 4 commits into
python:mainfrom
konstin:konsti/pep-838-error-on-version-mismatch

Conversation

@konstin

@konstin konstin commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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 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 #154378.
Part of #154377.

konstin added 3 commits July 21, 2026 17:24
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.
@picnixz

picnixz commented Jul 21, 2026

Copy link
Copy Markdown
Member

See issue for the rationale of closing. This is premature.

@picnixz picnixz closed this Jul 21, 2026
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