From befce12693ddc36047d956387b2e8f3f67275e3d Mon Sep 17 00:00:00 2001 From: cirun Date: Fri, 24 Nov 2023 14:09:26 +0100 Subject: [PATCH] apply functools.wraps(fn) to preserve original func metadata --- ckan/lib/maintain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ckan/lib/maintain.py b/ckan/lib/maintain.py index a9b1e7fbe6f..41aa5968c28 100644 --- a/ckan/lib/maintain.py +++ b/ckan/lib/maintain.py @@ -3,6 +3,7 @@ ''' This module contains code that helps in maintaining the Ckan codebase. ''' from __future__ import annotations +import functools import inspect import time import logging @@ -41,6 +42,7 @@ def decorator(fn: Callable[P, RT]) -> Callable[P, RT]: 'It must include the word `deprecated`.' % (fn.__name__, fn.__module__)) + @functools.wraps(fn) def wrapped(*args: P.args, **kw: P.kwargs) -> RT: since_msg = f'since CKAN v{since}' if since else '' msg = (