[Python-ideas] sys.implementation

Eric Snow ericsnowcurrently at gmail.com
Wed Mar 21 17:02:15 CET 2012


On Mon, Mar 19, 2012 at 10:41 PM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> In October 2009 there was a short flurry of interest in adding
> "sys.implementation" as an object to encapsulate some
> implementation-specific information [1].  Does anyone recollect where
> this proposal went?  Would anyone object to reviving it (or a
> variant)?

FYI, there are several reasons why sys.implementation is a good idea
when some of the same info is already in the platform module:

* The implementation in the platform module is essentially just
guessing [1].  With sys.implementation the various implementations
would explicitly set the values in their own version of the sys
module.
* The platform module is part of the stdlib, which ideally would
minimize implementation details such as would be in
sys.implementation.
* Any module used in the importlib bootstrap must be built-in or
frozen, neither of which apply to the platform module.  This is the
point that led to me finding the previous proposal.

I expect that any overlap between sys.implementation and the platform
module would simply defer to sys.implementation (with the same
interface in platform wrapping it).

I'd like to move this forward, so any objections or feedback at this
point would be helpful.  If Christian is interested it taking this I'd
gladly step back.  Regardless, feedback from the different Python
implementations will be especially important here.  Preferably,
sys.implementation (the object bundling the various info) would be
available on all implementations sooner rather than later...

-eric


[1] http://hg.python.org/cpython/file/default/Lib/platform.py#l1247

>
> -eric
>
>
> [1] http://mail.python.org/pipermail/python-dev/2009-October/092893.html



More information about the Python-ideas mailing list