[Python-ideas] More "ensure*" packages

Steve Dower steve.dower at python.org
Thu Aug 13 19:06:47 CEST 2015


I'd like to propose expanding the list of 3rd-party packages we bundle 
and install by default. (Obviously this does not apply to platforms that 
repackage Python and can do whatever they want, but on Windows and Mac 
we are fully responsible for these.)

Currently, we bundle pip (and some of its dependencies - let's avoid 
that particular discussion right now please, it's on python-dev) and 
install it by default in a way that lets users easily update to the 
latest version. Including pip in the standard library would lock users 
into a specific version for the lifetime of that Python version, which 
would be a bad thing.

 From my point-of-view, this has been very successful in Python 2.7, 3.4 
and will also be successful in 3.5. For Python 3.6, I'd like to do a 
similar thing with:

* requests
* tkinter (including tcl/tk, IDLE, and other dependencies)

Given the language summit discussion at PyCon this year, I think 
requests is easy to justify. (Quick summary for those who weren't there: 
we'd love to include requests in the stdlib, but it's too important and 
needs much more frequent updates.) Preinstalling a given version in a 
way that allows updates (and maybe attempting an update on installation) 
sounds great to me.

tkinter is worth more discussion :) For the remainder of this email, 
I'll use "tkinter" as shorthand to refer to Tcl, Tk, Tix, _tkinter, 
tkinter, idlelib/IDLE, PyDoc, turtledemo and any other dependencies or 
dependents that I missed.

In my experience, few Python scripts depend on or assume tkinter is 
available. tkinter is already an optional item in the Windows installer 
(maybe Mac too? I don't know) and there are certainly installations of 
Python out there that don't have it. From this side, nothing would 
actually change by installing tkinter into site-packages rather than Lib.

(One impact may be the start menu shortcuts for IDLE and PyDoc, but 
provided the entry points into those tools are kept stable we can 
continue adding shortcuts from the installer. People who omit tkinter 
and then install it later would not get shortcuts. But since they 
omitted it from the installer, they probably don't want them - they 
likely just got a package that has tkinter as a dependency.)

IDLE is already allowed to make enhancements in maintenance branches 
(https://www.python.org/dev/peps/pep-0434/), and we have recently 
received patches that are to be applied to *four* branches. The freedom 
to enhance IDLE is greatly improved by making it a PyPI installable 
package and disconnecting it from the stdlib's schedule.

How this would actually be structured is up for discussion. I believe 
the change can be made without sacrificing anything, and the resulting 
flexibility will be worth it.

Thoughts?

Cheers,
Steve


More information about the Python-ideas mailing list