[Python-Dev] Breaking up the stdlib (Was: release cadence)

Paul Moore p.f.moore at gmail.com
Wed Jul 6 05:29:44 EDT 2016

On 6 July 2016 at 10:01, Petr Viktorin <encukou at gmail.com> wrote:
> 4) Adjust pip to ignore installed stdlib modules that are present, so
> distributions can depend on "statistics" and not "statistics if
> python_ver<3.4". (statistics is just an example, obviously this would
> only work for modules added after the PEP). For missing stdlib modules,
> pip should fail with the message from 1). (Unless the "pip upgrade
> asynciio" proposal goes through, in which case install the module if
> it's upgradable).

A couple of comments here.

1. Projects may still need to depend on "statistics from Python 3.6 or
later, but the one in 3.5 isn't good enough". Consider for example
unittest, where projects often need the backport unittest2 to get
access to features that aren't in older versions.

2. This is easy enough to do if we make stdlib modules publish version
metadata. But it does raise the question of what the version of a
stdlib module is - probably Python version plus a micro version for
interim updates. Also, I have a recollection of pip having problems
with some stdlib modules that publish version data right now
(wsgiref?) - that should be checked to make sure this approach would

> Looks like it's time for a PEP.

Probably - in principle, something like this proposal could be
workable, it'll be a matter of thrashing out the details (which is
something the PEP process is good at).


More information about the Python-Dev mailing list