Fix compatibility with old Python versions.
Update tox script.