Tox: dropping Python 2 support for tox host python

Created on 9 Jan 2019  路  12Comments  路  Source: tox-dev/tox

With the sunset of Python 2 fast approaching, and many projects already switched to Python 3, we'll do the switch ourselves (https://python3statement.org/). My suggestion is to let's enter into the last six month of Python 2 support. Starting with June 2019 our code base will be Python 3 only (tox 4). The last Python 2 support tox must include #998 (to allow python 2 tox system installations to provision Python 3). Anything else we should include in the last python 2 packaging?

PS. to clarify tox will support creating and running python 2 environments as long as virtualenv does (which is for the foreseeable future). We'll just no longer allow the tox host environment to be Python 2.

cc @RonnyPfannschmidt @nicoddemus

wanted

Most helpful comment

tox 4 alpha is out and made this happen, we're now 3.6 only.

All 12 comments

why do i keep getting CC's ^^ i'm no longer working actively on tox

@RonnyPfannschmidt my bad, I cc-d you here in case you have something to add related to our sister project pytest 馃槃

from the pytest as a consumer perspective i can say the plan is solid :+1: , we are going to track the implementation to ensure the ci setup will use the new versions when they get released

good job going forward

I'm all for it :+1:

Anything else we should include in the last python 2 packaging?

I am catching up on old issues atm anyway, so will add things here, if they come up.

Sounds like a good plan @gaborbernat! 馃憤

We don't have this luxury in pytest because we need to run the same Python as the code we are testing, hehehe.

@nicoddemus but we share the shedule :)

this potentially adds complication to projects which use tox to test things in CI. For instance a travis-ci configuration like this will no longer work if tox drops host-python-2 support:

language: python
matrix:
    include:
        -   env: TOXENV=py27
            python: 2.7
        -   env: TOXENV=py36
            python: 3.6
        -   env: TOXENV=pypy
            python: pypy2.7-5.10.0
install: pip install tox
script: tox

python: 2.7 makes pip install tox install with a python2 interpreter (same with python: pypy... fwiw)

well that would pull in the last working python 2 tox, it would only be problem if the tox.ini uses some tox 4 construct, not?

I guess that's true, if python_requires is respected -- but that requires new-enough pip which might require one to pip install --upgrade pip first. I'd have to check the various zips to see what version they ship with

Well I don't consider that upgrade an impediment, furthermore tox 4 is more like something for Q3 of this year so still some time to bump pip on those ancient CI zips.

tox 4 alpha is out and made this happen, we're now 3.6 only.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

obestwalter picture obestwalter  路  5Comments

obestwalter picture obestwalter  路  5Comments

jaraco picture jaraco  路  3Comments

ssbarnea picture ssbarnea  路  5Comments

Borda picture Borda  路  4Comments