|Feature name||Start date||Pull request||Authors||Contributors|
Remove Python 2 (Legacy Python) support from scikit-bio in favor of Python 3 support only.
We propose removing Python 2 (Legacy Python) support from scikit-bio for the following reasons:
- The scientific Python community is in favor of dropping support for Python 2 as soon as possible (e.g., see recent discussion at DS4DS). Dropping Python 2 support in scikit-bio will force Python 2 and Python 2/3 packages depending on scikit-bio to also drop Python 2 support if they continue depending on scikit-bio, encouraging adoption of this critical change.
- Dropping Python 2 support will reduce development and maintenance burden on
scikit-bio developers. For example, we can remove the hacks in
skbio.ionecessary for Python 2 compatibility. These hacks were particularly time-consuming to put in place in order to support Python 2 and 3. For example, this hack was non-trivial and required reading CPython's source code.
- Supporting Python 3 only will allow us to start using new features of the language, ultimately making scikit-bio a better package. Python 3 contains new and useful features which are not backported to Python 2, including function annotations, type-hinting, the matrix multiplication operator, and asynchronous programming support.
- Given that scikit-bio is still in beta and has relatively few users (e.g., compared to a package like numpy), making this switch now would be better than waiting and could set a precedent for other scientific Python packages. Switching sooner is also less of a developer burden because the codebase is relatively small.
Changes to support Python 3-only include:
- Remove Python 2 tests from Travis-CI build matrix.
sixdependencies from scikit-bio.
- Update documentation to indicate Python 3-only, including (but not limited
CONTRIBUTING.md. Make it very clear on the scikit-bio front page that scikit-bio only supports Python 3 and link to resources describing why.
doc/source/development/py3.rstto be a guide for helping Python 2 developers become proficient Python 3 developers (e.g., documenting common gotchas or new language features that apply to scikit-bio).
- Update PyPI classifiers in
setup.pyto indicate Python 3-only.
- Search codebase for references to Python 2 and remove/update accordingly. This includes comments and actual code modifications.
- Removes hacks in
skbio.ionecessary for Python 2 compatibility.
- Test against latest release and nightly build of Python 3 on Travis-CI. Allow failure against nightly Python 3 build.
Note: scikit-bio's doctests are already Python 3-only, so no updates necessary there!
Packages/tools supporting Python 2 (including those supporting Python 2 and 3) will not be able to depend on scikit-bio.
Excludes Python 2 user and developer communities.
We could continue supporting Python 2 and 3 but this requires substantial
developer effort (see Motivation 2 above). Given our limited developer
bandwidth and free (as in
Python 3 has been available for 7 years. This transition must happen at some point because Python 3 is here to stay and Python 2 will eventually not be supported by other systems and tools. By not making the switch now (or soonish), we are delaying the inevitable and will affect more users as our userbase increases in size. It would be good form to make this change now while we are still in beta.