sys.implementation.version should return PyPy version, not for Python language

Create issue
Issue #3129 new
Matheus Silva Santos created an issue

Output for sys.implementation.version SHOULD be equal to output of sys.pypy_version_info, as PEP 421 says that this must be the interpreter version, not the language version it implements.

matheus@MacBook-Pro-de-Matheus rdm % pypy3
Python 3.6.1 (784b254d669919c872a505b807db8462b6140973, Oct 06 2019, 23:25:05)
[PyPy 7.1.1-beta0 with GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``PyPy 1.3 released''
>>>> import sys
>>>> sys.implementation.version
(major=3, minor=6, micro=1, releaselevel='final', serial=0)
>>>> sys.pypy_version_info
(major=7, minor=1, micro=1, releaselevel='beta', serial=0)

Comments (1)

  1. Armin Rigo

    I'm more concerned about code that uses sys.implementation.version because the author didn't know about sys.version_info or what the difference was. But I'm not finding any code at all that uses sys.implementation.version anyway, so maybe this point is moot.

  2. Log in to comment