Remove py2 import remnants, sort imports, cleanup, move to pytest, enable python 3.10 #767
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
treewide: Use logger.warning, warn is deprecated
Fixes a pytest warning:
See: https://docs.python.org/3.9/library/logging.html?highlight=logging#logging.Logger.warning
Makefile: Run flakes explictly only inside isso/
This fixes an annoyance for people who have a virtualenv installed under e.g.
.venv/
where flake8 would try to verify every singlesite-packages
pip package inside.tox: Check TOX_ENV_NAME to skip build_py js step
The env variable name seems to have changed in recent tox versions, see https://tox.wiki/en/latest/config.html#injected-environment-variables
tox.ini: Add python 3.10 to test env list
.github: pythonpackage: Add py3.10 to matrix
Note: The quotes around "py3.10" are needed since without them, GH Actions will interpret everything after the dot as a single-digit integer, i.e. "Python 3.1".
actions/setup-python#249 (comment)
setup.py: Add tests_require for local testing
Explicitly list
pytest
andpytest-cov
deps as needed for local testing.Note that the infinitve is used, not
requires
as ininstall_requires
. That's just an oddity in setuptools.treewide: Replace nosetests with pytest
Nosetests has long been abandoned by its authors and will no longer run under Python 3.10.
Pytest seems to be its spiritual successor as a test runner and seems widely accepted in the community.
Makefile
accordingly and recommend installingpytest
,pytest-cov
pip packagestox.ini
accordinglyreleaser.conf
accordinglyreleasing.rst
accordinglytreewide: Remove py2 import remnants, sort
A lot of try/catch handling for discrepancy between py2/py3 module names as well as
__future__
imports is not needed since Isso does not support py2 any longer.