pluggy icon indicating copy to clipboard operation
pluggy copied to clipboard

Allow for user specified key/values in marks?

Open goodboy opened this issue 7 years ago • 3 comments

Pertaining to the original request in #133 does it make sense to allow users to pass in custom key/val pairs to marks (via **kwargs or some other API) such that user defined collection and/or hook calling behaviour can be controlled/modified by the user based on their own inputs (maybe it's more relatable in the context of #151).

It would potentially look something like:

from pluggy import HookspecMarker

hookspec = HookspecMarker('blah')

@hookspec(historic=True, a_special_hook=True)
def my_special_hook(arg):
    """This hook is only collected in special cases."""
    pass

goodboy avatar May 22 '18 18:05 goodboy

lets wait for a real problem that needs this

i'd like to adopt a c4.2-ish approach where we only fix things that has a direct real world impact - abstract feature requests rarely yield a usable api in th first iteration

RonnyPfannschmidt avatar May 22 '18 19:05 RonnyPfannschmidt

@RonnyPfannschmidt agreed just thought I'd log it for future reference/discussion.

goodboy avatar May 23 '18 14:05 goodboy

i think we can close this one

RonnyPfannschmidt avatar Jun 09 '20 07:06 RonnyPfannschmidt