Skip to content

@Metric/@metricmethod break zope.interface validation of method signatures #15

@jamadden

Description

@jamadden

This surprised me today. I changed an interface signature and expected test failures to alert me that the implementations no longer correctly implemented the method (because I hadn't updated their signatures yet). But that didn't happen. It turns out that the call_with_metric wrapper that's being returned from the decorator takes *args, **kwargs and that's enough to break signature introspection as far as zope.interface is concerned.

Interestingly, it doesn't break signature display as far as IPython is concerned.

I'm not sure there's anything much we can do here other than document this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions