diff --git a/tabulate.py b/tabulate.py index 5d57167..1965fcc 100755 --- a/tabulate.py +++ b/tabulate.py @@ -5,17 +5,17 @@ from __future__ import print_function from __future__ import unicode_literals from collections import namedtuple -from platform import python_version_tuple +import sys import re import math -if python_version_tuple() >= ("3", "3", "0"): +if sys.version_info >= (3, 3): from collections.abc import Iterable else: from collections import Iterable -if python_version_tuple()[0] < "3": +if sys.version_info[0] < 3: from itertools import izip_longest from functools import partial diff --git a/tox.ini b/tox.ini index c9f4e98..a20b325 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ # for testing and it is disabled by default. [tox] -envlist = lint, py27, py35, py36, py37, py38 +envlist = lint, py27, py35, py36, py37, py38, py39, py310 [testenv] commands = pytest -v --doctest-modules --ignore benchmark.py @@ -97,6 +97,40 @@ deps = pandas wcwidth + +[testenv:py39] +basepython = python3.9 +commands = pytest -v --doctest-modules --ignore benchmark.py +deps = + pytest + +[testenv:py39-extra] +basepython = python3.9 +commands = pytest -v --doctest-modules --ignore benchmark.py +deps = + pytest + numpy + pandas + wcwidth + + +[testenv:py310] +basepython = python3.10 +commands = pytest -v --doctest-modules --ignore benchmark.py +deps = + pytest + +[testenv:py310-extra] +basepython = python3.10 +setenv = PYTHONDEVMODE = 1 +commands = pytest -v --doctest-modules --ignore benchmark.py +deps = + pytest + numpy + pandas + wcwidth + + [flake8] max-complexity = 22 max-line-length = 99