Skip to content

docs: Clarify order of decorating class methods #310

@injust

Description

@injust

https://wrapt.readthedocs.io/en/master/decorators.html#decorating-class-methods says that wrapt decorators need to be placed outside of @classmethod decorators, but only before Python 3.9.

https://wrapt.readthedocs.io/en/master/issues.html#classmethod-get says that this also applies to Python 3.13+. Seems like the first page needs to be updated to reflect this.

This was confusing when migrating from function closure decorators using functools.wraps, as the @classmethod decorator goes on the outside in that case. So I had to swap the order of the decorators when using @function_wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions