At the language summit, Alex and I volunteered to put together some recommendations on what changes could be made to Python (the language) in order to facilitate a smoother transition from Python 2 to Python 3. One of the things that motivated this was the (surprising, to us) consideration that features like ensurepip might be added to the future versions of the 2.7 installers from
python.org.
The specific motivations for writing this are:
- Library maintainers have a rapidly expanding matrix that requires an increasing number of branches to satisfy.
- People with large corporate codebases absolutely cannot port all at once.
If you don't have perfect test coverage then you can't make any progress. So these changes are intended to make porting from python 2 to python 3 more guided and incremental. We believe that these attributes are necessary.
We would like to stress that we don't believe anything on this list is as important as the continuing efforts that everyone in the broader ecosystem is making. If you just want to ease the transition by working on anything at all, the best use of your time right now is porting
https://warehouse.python.org/project/MySQL-python/ to Python 3. :)
Nevertheless there are some things that the language and CPython could do.
Unfortunately we had to reject any proposal that involved new __future__ imports, since unknown __future__ imports are un-catchable SyntaxErrors.
Here are some ideas for Python 2.7+.