Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeprecationWarning on Python 3.10 #105

Merged
merged 2 commits into from
Feb 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tabulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 35 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down