datatracker icon indicating copy to clipboard operation
datatracker copied to clipboard

Refactor to drop dependency on decorator package

Open jennifer-richards opened this issue 1 year ago • 1 comments

Description

We have a few decorators defined in ietf/utils/decorator.py that use the "decorator" package. This provides the @decorator decorator and a decorate method. The built-in Python functools.wraps() method can fulfill the needs here without the additional dependency. As far as I can tell we're not making use of any of the features provided by the "decorator" package.

The @decorator mechanism also seems to interfere with Django's @method_decorator, which led to refactoring the requires_api_key decorator already.

Code of Conduct

jennifer-richards avatar May 18 '23 18:05 jennifer-richards

Reopening - there is still a dependency in debug.py as @microamp mentioned in his PR comment

jennifer-richards avatar Mar 17 '24 05:03 jennifer-richards

If I recall, this issue was resolved via two separate PRs as shown above - #7199 and #7219. Please let me know otherwise.

microamp avatar Jul 20 '24 10:07 microamp