[pytest-dev] mark fix-up major milestone, please review

Ronny Pfannschmidt rpfannsc at redhat.com
Tue Mar 20 06:05:35 EDT 2018


2018-03-20 9:18 GMT+01:00 Floris Bruynooghe <flub at devork.be>:

> Hi Ronny,
>
> On Mon, Mar 19 2018, Ronny Pfannschmidt wrote:
>
> > Hi everyone,
> >
> > in https://github.com/pytest-dev/pytest/pull/3317 i introduced a new
> way to
> > store marks and aslo consistently use it (this fixed a few bugs pytest
> > dragged along since years)
>
> I've spent a while reading the PR but to be honest it's kind of hard to
> know how sane things are.  It looks ok, but I don't have a view of the
> larger picture.
>
> Are there somewhere some notes about where the marks come from, what the
> problems with them are and the vision of how the problems are going to
> be solved and what the end-state will look like?
>
> For example from the current PR it's not obvious how users are meant to
> be using marks.  You still apply them using @pytest.mark.name as before,
> but how are we supposed to access them?  How are we setting them
> pragmatically?
>

​the way for declaring them is still the same
the addmarker apis still work the same​




>
> > I also did deprecate markinfo attributes,
> > so everyone using them will get deprecation warnings.
>
> That's a lot of people probably.  How long are we giving users for this?
>>

​the support for accessing them can be kept for quite a while,
everyone using them will be told to use the new api
i would like to remove it at the beginning of 2019

​
>
>
> > as far as i'm concerned, markinfo attributes where never ever a correct
> way
> > to handle distinct marks and quite a few bugs in pytest came from using
> > combined marks in markinfo instead of distinct marks.
>
> A short summary of these issues would help loads :)
>
​basically MarkInfo objects are subject to marker transfer bugs, marker
smearing and everything wrong with marks these days
they are one of holgers infamous minimal changes that basically ensured we
never ever had correctly working marks
from the time we had support for more than one marker of the same name, and
it got worse by the addition of marker transfers
(for context - pytest marks started as thing to update test function
__dict__ with its keyword arguments,
they never got de-tangled from that messy legacy, and that was a major
source of really bad bugs)



also they are part of a inconsistent return value issues that previously
plaqued get_marker​,
now get_markers returns a reasonably correct MarkInfo and find_markers is
finally an api that provides basic correct values

cheers,
Ronny



>
>
> Cheers,
> Floris
>



-- 

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael Cunningham, Michael
O'Neill, Eric Shander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20180320/12273e2f/attachment-0001.html>


More information about the pytest-dev mailing list