-
Notifications
You must be signed in to change notification settings - Fork 823
Description
Hi,
In #91 years ago, it was decided to add the decorator
to fix a problem. Back then choices was made to not add a new dependency, but really bundle the only decorar file needed. Distributions (in my case Fedora) usually prefer to rely on the actual package than bundled dependencies. Fedora does apply a patch to unbundle decorator
, maybe other distro do that too.
Do we still want to avoid dependencies in 2025 ? I have seen other discussions where it was discussed adding a protobuf
dependency, which pulls many more dependencies, so isn't ok now to depend on decorator
?
If not, would it make sense at least to upgrade it ? By doing so, you hit the issue that decorator.getargspec
has been removed years ago. In python 3 there is now inspect.getfullargspec
which is not strictly equivalent but does provide a similar feature. Fedora uses a minimal patch here: https://src.fedoraproject.org/rpms/python-prometheus_client/blob/rawhide/f/0001-Remove-the-bundled-decorator-package.patch#_506 but tries to avoid adding much code, most likely the "real" change is more verbose.