Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Unbundle the decorator dependency, or at least upgrade it #1107

Copy link
Copy link
@Romain-Geissler-1A

Description

@Romain-Geissler-1A
Issue body actions

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.

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.