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

Relax registry type annotations for exposition#1149

Merged
csmarchbanks merged 2 commits intoprometheus:masterprometheus/client_python:masterfrom
cjwatson:exposition-relax-collector-typingcjwatson/client_python:exposition-relax-collector-typingCopy head branch name to clipboard
Nov 26, 2025
Merged

Relax registry type annotations for exposition#1149
csmarchbanks merged 2 commits intoprometheus:masterprometheus/client_python:masterfrom
cjwatson:exposition-relax-collector-typingcjwatson/client_python:exposition-relax-collector-typingCopy head branch name to clipboard

Conversation

@cjwatson
Copy link
Contributor

Anything with a suitable collect method will do: for instance, it's
sometimes useful to be able to define a class whose collect method
yields all metrics from a registry whose names have a given prefix, and
such a class doesn't need to inherit from CollectorRegistry.

We require Python >= 3.9 now, so there's no reason to avoid this any
more.

Signed-off-by: Colin Watson <cjwatson@debian.org>
Anything with a suitable `collect` method will do: for instance, it's
sometimes useful to be able to define a class whose `collect` method
yields all metrics from a registry whose names have a given prefix, and
such a class doesn't need to inherit from `CollectorRegistry`.

Signed-off-by: Colin Watson <cjwatson@debian.org>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see that old comment addressed.

@csmarchbanks csmarchbanks merged commit 13df124 into prometheus:master Nov 26, 2025
12 checks passed
@cjwatson cjwatson deleted the exposition-relax-collector-typing branch January 15, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

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