klen / pylama

Code audit tool for python.
MIT License
1.05k stars 99 forks source link

Warning after update pytest to 5.4 #177

Closed sirkonst closed 2 years ago

sirkonst commented 4 years ago

After update pytest to 5.4 I've got warning pytest.PytestDeprecationWarning: direct construction of PylamaItem has been deprecated, please use PylamaItem.from_parent:

45 .tox/py3.7/lib/python3.7/site-packages/pluggy/hooks.py:286: in __call__
46     return self._hookexec(self, self.get_hookimpls(), kwargs)
47 .tox/py3.7/lib/python3.7/site-packages/pluggy/manager.py:93: in _hookexec
48     return self._inner_hookexec(hook, methods, kwargs)
49 .tox/py3.7/lib/python3.7/site-packages/pluggy/manager.py:87: in <lambda>
50     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
51 .tox/py3.7/lib/python3.7/site-packages/pylama/pytest.py:43: in pytest_collect_file
52     return PylamaItem(path, parent)
53 .tox/py3.7/lib/python3.7/site-packages/_pytest/nodes.py:83: in __call__
54     warnings.warn(NODE_USE_FROM_PARENT.format(name=self.__name__), stacklevel=2)
55 E   pytest.PytestDeprecationWarning: direct construction of PylamaItem has been deprecated, please use PylamaItem.from_parent

Now I just configure to ignore this warning, but I think it should be fixed in a future.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/90478530-warning-after-update-pytest-to-5-4?utm_campaign=plugin&utm_content=tracker%2F394650&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F394650&utm_medium=issues&utm_source=github).
klen commented 2 years ago

Thank you for the feedback. The issue has been fixed.

sirkonst commented 2 years ago

@klen @ubaumann, you are my heroes of the day!