pytest icon indicating copy to clipboard operation
pytest copied to clipboard

`Node.get_closest_marker` default kwarg deprecation

Open azariiva opened this issue 8 months ago • 1 comments

I passed pytest.Mark as a default. Now we have deprecation warning and no alternative to pass default to Node.get_closest_marker.

I think that overload of Node.get_closest_marker with default kwarg should be deprecated or we should have alternative way to pass default.

commit, where deprecation warning of pytest.Mark.__init__ was added: https://github.com/pytest-dev/pytest/commit/2ec372df8b987207efc4ad0f33c2f82df5c9e2e5

azariiva avatar Apr 04 '25 17:04 azariiva

No, we should accept mark decorators and/or advise people to obtsin marks via pytest.mark.mymark(a=1).mark

RonnyPfannschmidt avatar Apr 05 '25 05:04 RonnyPfannschmidt