Closed
Description
It sounds like pytest-pep8
is no longer compatible with the last version of pytest
(6.0.1) and is no longer maintain.
From the Travis job test https://travis-ci.org/github/larray-project/larray/jobs/721340978 of my last PR (PR #888), one can read the error message:
============================= test session starts ==============================
platform linux -- Python 3.6.11, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- /home/travis/miniconda/envs/travisci/bin/python
cachedir: .pytest_cache
rootdir: /home/travis/build/larray-project/larray, configfile: setup.cfg, testpaths: larray
plugins: pep8-1.0.6
collected 0 items / 1 error
==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
../../../miniconda/envs/travisci/lib/python3.6/site-packages/pluggy/hooks.py:286: in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
../../../miniconda/envs/travisci/lib/python3.6/site-packages/pluggy/manager.py:93: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../../miniconda/envs/travisci/lib/python3.6/site-packages/pluggy/manager.py:87: in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
../../../miniconda/envs/travisci/lib/python3.6/site-packages/pytest_pep8.py:38: in pytest_collect_file
return Pep8Item(path, parent, pep8ignore, config._max_line_length)
../../../miniconda/envs/travisci/lib/python3.6/site-packages/_pytest/nodes.py:95: in __call__
warnings.warn(NODE_USE_FROM_PARENT.format(name=self.__name__), stacklevel=2)
E pytest.PytestDeprecationWarning: Direct construction of Pep8Item has been deprecated, please use Pep8Item.from_parent.
E See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
=========================== short test summary info ============================
ERROR - pytest.PytestDeprecationWarning: Direct construction of Pep8Item has...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.10s ===============================
The command "pytest" exited with 2.
Since pytest-pep8
is no longer maintain, I don't think we do anything except force to downgrade the used version of pytest
but this workaround will not last forever and I don't like to get stuck with old stuff.
I suggest to replace pytest-pep8
by pytest-flake8
which provides an option flake8-ignore similar to the option pep8ignore
of pytest-pep8.
@gdementen What do you think?