Am 29.08.2017 um 15:19 schrieb Bruno Oliveira:
> Hi Ronny,
> 
> On Tue, Aug 29, 2017 at 4:48 AM RonnyPfannschmidt
> <opensou...@ronnypfannschmidt.de
> <mailto:opensou...@ronnypfannschmidt.de>> wrote:
> 
>     Hi all,
> 
>     since quite a while now we have used magic constants for scope names,
>     while we have something perfectly fitting already at hand - namely the
>     Node classes we actually use and mean
> 
>     i believe its a disservice that we use magic strings one has to manually
>     map while we have very exact names for those already
> 
> 
> I like the idea in general of using specific constants instead of magic
> strings, but in this specific case we also have to take in account the
> problem of asking all users to change the API for very little gain in
> terms of internal code: just a few lines of trivial code which maps the
> strings. Also keep in mind that we will have to support the magic
> constants anyway for years to come, so the (small) code advantage won't
> happen for quite a long time, we will only add more cognitive burden to
> users to have two ways of doing the same thing.
> 
> In summary I'm all for improving the API and the internal code if this
> will bring us strong gains, I just don't think this is one of those
> cases so I'm -1 on the idea.
> 

as a starting point i'd like to be able to use objects to declare the
scope instead of strings

because in future we plan to have per request scopes, and multi scopes
as well, and at that point its not just a bunch of strings, but a bunch
of increasingly magical messy strings - so its not going to stay a
simple mapping

so i'd prefer to open the path to sanity before things get worse,
because in pytest we have a history of bad things getting worse
(see marks, collection tree, scoping of setup functions)


-- Ronny

> Cheers,
> Bruno. 
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to