A thread on python-ideas made me realised the migration guide is currently missing a section: migrating integrated applications. This needs to cover: - "caniusepython3" to check dependencies for compatibility - if dependencies are ready, and Python 2 compatibility can be dropped completely, the 2to3 based migration path - if dependencies aren't ready yet, the Python 2 -> 2/3 source on Python 2 -> 2/3 source on Python 3 -> Python 3 migration path - if dependencies are ready but Python 2 compatibility is still needed, the Python 2 only -> 2/3 source on Python 2 or 3 -> Python 3 only migration path
I'm not sure what your last two points are saying, but my take on both of them is the main codebase should move to shared source Python2/Python3 if possible. That's what I'm doing for my own projects. Testing the Python3 compatibility depends on whether or not you can write your tests to not depend on the non-ported components, but often that is possible.
Expanded version: ================ For developers of integrated applications that currently still have some dependencies on Python 2, the preferred migration path is to use tools like python-modernize or python-future to shift first into the large common subset of Python 2 and Python 3, and then only later switch fully to Python 3. This approach permits application developers to take the following path: 1. Python 2 only (status quo) 2. Python 2/3 compatible on Python 2 (waiting for dependencies) 3. Python 2/3 compatible on Python 3 (dependencies ported or replaced) 4. Python 3 only (drop Python 2 support) Brett Cannon's "caniusepython3" tool (https://pypi.python.org/pypi/caniusepython3/) is designed to automate the dependency analysis to see if all declared dependencies are Python 3 compatible (or have suitable alternatives available). However, if you're using system packages for dependency management, some data transformations will be needed to convert them to a form that the tool understands. ========================= From https://mail.python.org/pipermail/python-ideas/2014-March/026343.html
Something like this should go at the top almost as a tl;dr to get the point across that regardless of the state of your dependencies, start writing Python 3-compatible code **today** and if you must update old code piecemeal. I'll add something next time I have time (should be Friday).