Sorry for the delay.
I have now updated the proposal based on the review comments on the PR, and have changed the wording to be both precise and succinct
Based on this discussion and Jelle’s findings I have restricted the version comparisons to >= <2-tuple> and < <2-tuple>
I also want to point out that in the initial edit I botched the proposed support for [sys.implementation.version]( sys — System-specific parameters and functions — Python 3.14.3 documentation)
that is quite fundamental to allow stubs to be implementation specific.
sys.implementation.version is a tuple, in the same format as sys.version_info. However it represents the version of the Python implementation rather than the version of the Python language. This has a distinct meaning from the specific version of the Python language to which the currently running interpreter conforms.
import sys
if sys.implementation.name == "pypy" and sys.implementation.version >= (7, 3):
# PyPy version 7.3 and above
if sys.implementation.name == "micropython" and sys.implementation.version >= (1, 24):
# MicroPython version 1.24 and above