[Python-ideas] sys.implementation

Eric Snow ericsnowcurrently at gmail.com
Thu Apr 26 07:34:21 CEST 2012

On Tue, Apr 24, 2012 at 12:42 AM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> The premise is that sys.implementation would be a "namedtuple" (like
> sys.version_info).  It would contain (as much as is practical) the
> information that is specific to a particular implementation of Python.
>  "Required" attributes of sys.implementation would be those that the
> standard library makes use of.  For instance, importlib would make use
> of sys.implementation.name (or sys.implementation.cache_tag) if there
> were one.  The thread from 2009 covered a lot of this ground already.
> [1]
> Here are the "required" attributes of sys.implementation that I advocate:
> * name (mixed case; sys.implementation.name.lower() used as an identifier)
> * version (of the implementation, not of the targeted language
> version; structured like sys.version_info?)
> Here are other variables that _could_ go in sys.implementation:
> * cache_tag (e.g. 'cpython33' for CPython 3.3)
> * repository
> * repository_revision
> * build_toolchain
> * url (or website)
> * site_prefix
> * runtime
> Let's start with a minimum set of expected attributes, which would
> have an immediate purpose in the stdlib.  However, let's not disallow
> implementations from adding whatever other attributes are meaningful
> for them.

FYI, I've created a tracker ticket with a patch and moved this over to


[1] http://bugs.python.org/issue14673

More information about the Python-ideas mailing list