[pytest-dev] Refactoring/fixing markers

Holger Krekel holger at merlinux.eu
Tue Mar 22 11:34:47 EDT 2016


I can see how maintaining backward compatibility makes the implementation more complex but breaking compatibility introduces social, communication complexities and surprises on the usage side because suddenly marker detection will silently not work anymore.  So it needs to be carefully weighed. 
Best holger 

On March 22, 2016 4:16:48 PM GMT+01:00, Ronny Pfannschmidt <rpfannsc at redhat.com> wrote:
>On 03/22/2016 03:58 PM, Holger Krekel wrote:
>> Iiuc you want to remove the setting of marker objects on function
>> objects, right? If so, Why is doing that necessary?
>correct, from my pov its very hard to make a consistent transfered view
>of them on the actual objects
>so we either make a mess that's complex and potentially inconsistent or
>take it out
>and expose it only via collection items where a consistent view based
>on
>the chain is simple and straightforward
>
>i strongly prefer taking unnecessary complexities out
>
>best Ronny
>> Best holger
>>
>> On March 22, 2016 12:25:46 PM GMT+01:00, Bruno Oliveira
>> <nicoddemus at gmail.com> wrote:
>>
>>     Hi Ronny,
>>
>>     That would be nice, I think it is OK to use a branch in the main
>>     repository. 
>>
>>     I wonder though if we can keep the same general interface though,
>>     but we can discuss this over the code once you have something in
>>     place. :)
>>
>>     Cheers,
>>
>>     On Tue, Mar 22, 2016 at 6:14 AM Ronny Pfannschmidt
>>     <rpfannsc at redhat.com <mailto:rpfannsc at redhat.com>> wrote:
>>
>>         Hi Everyone,
>>
>>         the current marker implementation has a massive bugs/issues
>>         wrt application of markers "smearning" across class
>boundaries
>>         due to marker transfer (which is basically completely
>broken).
>>
>>         In order to elevate the issue, i'd like to change how markers
>>         are viewed by test items,
>>
>>         the idea is to completely remove them from the actual
>objects,
>>         except for pytestmark collections on
>modules/classes/functions
>>
>>         items would then get a merged view of markers that apply to
>>         them without ever copying/changing the marker collections of
>>         the applying objects
>>
>>         this would change the external interface for markers, thus
>>         requiring a major version (pytest-3.0)
>>         so i#d like to request a branch on the main repo expressing
>>         that intent.
>>
>>
>>
>>         i'm planning to implement this in the next 1-2 weeks.
>>
>>         -- Ronny
>>         _______________________________________________
>>         pytest-dev mailing list
>>         pytest-dev at python.org <mailto:pytest-dev at python.org>
>>         https://mail.python.org/mailman/listinfo/pytest-dev
>>
>>    
>------------------------------------------------------------------------
>>
>>     pytest-dev mailing list
>>     pytest-dev at python.org
>>     https://mail.python.org/mailman/listinfo/pytest-dev
>>
>> -- Sent using mobile touch keys, increased chances for errors and
>> misunderstandings. Enjoy! 

-- 
Sent using mobile touch keys, increased chances for errors and misunderstandings. Enjoy! 


More information about the pytest-dev mailing list