[Python-ideas] PEP 4XX: Adding sys.implementation

Carl Meyer carl at oddbird.net
Thu May 3 06:30:28 CEST 2012


On 05/02/2012 09:49 PM, Steven D'Aprano wrote:
> On Wed, May 02, 2012 at 08:17:40PM -0600, Eric Snow wrote:
>> On Mon, Apr 30, 2012 at 3:04 PM, Barry Warsaw<barry at python.org>  wrote:
>>> On Apr 27, 2012, at 12:36 AM, Eric Snow wrote:
>>>> Version Format
>>>> --------------
>>>>
>>>> XXX same as sys.version_info?
>>>
>>> Why not? :)  It might be useful also to have something similar to
>>> sys.hexversion, which I often find convenient.
>>
>> Would it be worth mirroring all 3 (sys.version, sys.version_info,
>> sys.hexversion)?  Symmetry is nice, but it also makes sense if the
>> each would be as meaningful as they are in sys.
>
> I am still unclear what justification there is for having a separate
> sys.version (from PEP 421: "the version of the Python language") and
> sys.implementation.version ("the version of the Python implementation").
> Under what circumstances will one change but not the other?

I know at least PyPy has separate "PyPy version" and "Python language 
compatibility version" numbers. They might choose to do a release that 
increments the PyPy version (because they've made improvements to the 
JIT or any number of other implementation-quality issues) but doesn't 
change the bundled stdlib version or language-compatibility version at 
all. Seems pretty reasonable to me.

Carl



More information about the Python-ideas mailing list