pytest icon indicating copy to clipboard operation
pytest copied to clipboard

deprecate hook configuration via marks/attributes

Open RonnyPfannschmidt opened this issue 4 years ago • 2 comments

fixes #4562

must be merged after #8508

RonnyPfannschmidt avatar Sep 23 '21 07:09 RonnyPfannschmidt

damn, i dida git, will fix when backawake

RonnyPfannschmidt avatar Oct 01 '21 19:10 RonnyPfannschmidt

@nicoddemus i finally got around reiterating this, please have a look

RonnyPfannschmidt avatar Sep 20 '22 14:09 RonnyPfannschmidt

@nicoddemus as far as i can tell, the only blocker is https://github.com/pytest-dev/pytest-cov/pull/549

RonnyPfannschmidt avatar Sep 22 '22 20:09 RonnyPfannschmidt

That has just been merged. 👍

nicoddemus avatar Sep 22 '22 20:09 nicoddemus

I'm afraid the error messages this generates for hookimpls are almost unusable due to having way too little information where the culprit is: https://github.com/pytest-dev/pytest/issues/10342

The-Compiler avatar Oct 06 '22 07:10 The-Compiler

Quick analysis of the impact of this:

  • attributes (seems to be very rare)
  • marks (rather common!)

FWIW, I submitted PRs to the affected plugins I use:

  • https://github.com/ionelmc/pytest-benchmark/pull/224
  • https://github.com/pytest-dev/pytest-qt/pull/455
  • https://github.com/pytest-dev/pytest-instafail/pull/26

The-Compiler avatar Oct 07 '22 10:10 The-Compiler

The impact is not surprising, this was intended to be deprecate back when the new decorators came up

Instead the old way was cargo culted all the way till now

RonnyPfannschmidt avatar Oct 07 '22 10:10 RonnyPfannschmidt