prometheus-client breaking changes
Updated December 4, 2026
On this page
Latest version 0.26.0, released July 24, 2026. Source repository
Its 0.22.0 release drops Python 3.8. Python end of life dates.
prometheus-client 0.26.0 breaking changes
- Behavior changed
A duplicate timeseries now raises a more specific exception type instead of the previous one. Code that catches the old exception type must be updated. github.com - Behavior changed
Exemplars are no longer accepted on every metric type, only on those that support them. Code attaching exemplars to other metric types will now fail. github.com - Behavior changed
clear
Calling clear() on a metric without labels no longer clears it. Code that relied on clear() resetting such a metric must change. github.com - Behavior changed
CollectorRegistry.unregister
Calling unregister now also removes collectors that have no name. Code that relied on those collectors staying registered must change. github.com - Behavior changed
floatToGoString
Exponents of 10 or more are no longer written with a leading zero. Code that parses this output as text may need updating. github.com - Signature changed
prometheus_client.metrics.MetricWrapperBase.labels
Was def labels(self: T, *labelvalues: Any, **labelkwargs: Any) -> T; now def labels(self: T, *labelvalues: object, **labelkwargs: object) -> T. pypi.org - Signature changed
prometheus_client.start_wsgi_server
Was def start_wsgi_server(port: int, addr: str = '0.0.0.0', registry: Collector = REGISTRY, certfile: Optional[str] = None, keyfile: Optional[str] = None, client_cafile: Optional[str] = None, client_capath: Optional[str] = None, protocol... pypi.org
prometheus-client 0.25.0 breaking changes
- Signature changed
prometheus_client.CollectorRegistry.__init__
Was def __init__(self, auto_describe: bool = False, target_info: Optional[Dict[str, str]] = None); now def __init__(self, auto_describe: bool = False, target_info: Optional[Dict[str, str]] = None, support_collectors_without_names: bool =... pypi.org
prometheus-client 0.24.1 breaking changes
- Removed
prometheus_client.django.exposition.registry
prometheus_client.django.exposition.registry was removed in prometheus-client 0.24.1 pypi.org
prometheus-client 0.24.0 breaking changes
- Removed
prometheus_client.asgi.CollectorRegistry
prometheus_client.asgi.CollectorRegistry was removed in prometheus-client 0.24.0 pypi.org - Removed
prometheus_client.bridge.graphite.CollectorRegistry
prometheus_client.bridge.graphite.CollectorRegistry was removed in prometheus-client 0.24.0 pypi.org - Signature changed
prometheus_client.bridge.graphite.GraphiteBridge.__init__
Was def __init__(self, address: Tuple[str, int], registry: CollectorRegistry = REGISTRY, timeout_seconds: float = 30, _timer: Callable[[], float] = time.time, tags: bool = False); now def __init__(self, address: Tuple[str, int], registry... pypi.org - Signature changed
prometheus_client.CollectorRegistry
Was class CollectorRegistry(Collector); now class CollectorRegistry. pypi.org - Signature changed
prometheus_client.gc_collector.Collector
Was class Collector(ABC); now class Collector(Protocol). pypi.org - Signature changed
prometheus_client.generate_latest
Was def generate_latest(registry: CollectorRegistry = REGISTRY, escaping: str = openmetrics.UNDERSCORES) -> bytes; now def generate_latest(registry: Collector = REGISTRY, escaping: str = openmetrics.UNDERSCORES) -> bytes. pypi.org - Signature changed
prometheus_client.make_asgi_app
Was def make_asgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: bool = False) -> Callable; now def make_asgi_app(registry: Collector = REGISTRY, disable_compression: bool = False) -> Callable. pypi.org - Signature changed
prometheus_client.make_wsgi_app
Was def make_wsgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: bool = False) -> Callable; now def make_wsgi_app(registry: Collector = REGISTRY, disable_compression: bool = False) -> Callable. pypi.org - Signature changed
prometheus_client.metrics.Collector
Was class Collector(ABC); now class Collector(Protocol). pypi.org - Signature changed
prometheus_client.MetricsHandler.factory
Was @classmethod def factory(cls, registry: CollectorRegistry) -> type; now @classmethod def factory(cls, registry: Collector) -> type. pypi.org
And 8 more in this version. Sign up to see every change
prometheus-client 0.23.1 breaking changes
- Signature changed
prometheus_client.exposition.generate_latest
Was def generate_latest(registry: CollectorRegistry = REGISTRY) -> bytes; now def generate_latest(registry: CollectorRegistry = REGISTRY, escaping: str = openmetrics.UNDERSCORES) -> bytes. pypi.org - Signature changed
prometheus_client.exposition.write_to_textfile
Was def write_to_textfile(path: str, registry: CollectorRegistry) -> None; now def write_to_textfile(path: str, registry: CollectorRegistry, escaping: str = openmetrics.ALLOWUTF8, tmpdir: Optional[str] = None) -> None. pypi.org - Signature changed
prometheus_client.generate_latest
Was def generate_latest(registry: CollectorRegistry = REGISTRY) -> bytes; now def generate_latest(registry: CollectorRegistry = REGISTRY, escaping: str = openmetrics.UNDERSCORES) -> bytes. pypi.org - Signature changed
prometheus_client.openmetrics.exposition.escape_label_name
Was def escape_label_name(s: str) -> str; now def escape_label_name(s: str, escaping: str = UNDERSCORES) -> str. pypi.org - Signature changed
prometheus_client.openmetrics.exposition.escape_metric_name
Was def escape_metric_name(s: str) -> str; now def escape_metric_name(s: str, escaping: str = UNDERSCORES) -> str. pypi.org - Signature changed
prometheus_client.openmetrics.exposition.generate_latest
Was def generate_latest(registry); now def generate_latest(registry, escaping=UNDERSCORES, version='1.0.0'). pypi.org - Signature changed
prometheus_client.write_to_textfile
Was def write_to_textfile(path: str, registry: CollectorRegistry) -> None; now def write_to_textfile(path: str, registry: CollectorRegistry, escaping: str = openmetrics.ALLOWUTF8, tmpdir: Optional[str] = None) -> None. pypi.org
prometheus-client 0.23.0 breaking changes
- Behavior changed
The OpenMetrics text output changed formatting by removing a space after commas. Code that parses or compares the exact exposition text may need updating. github.com - Behavior changed
Native histograms are now written only when the client requests OpenMetrics 2.0.0. Code relying on them appearing in other formats must request OpenMetrics 2.0.0. github.com
Older versions
9 older versions, each with its first changes. Sign up to see every change
Show 9 older versions
prometheus-client 0.22.0 breaking changes
- Removed
Python 3.8 is no longer supported, so code running on Python 3.8 must move to a newer Python version. github.com - Removed
prometheus_client.metrics_core.METRIC_LABEL_NAME_RE
prometheus_client.metrics_core.METRIC_LABEL_NAME_RE was removed in prometheus-client 0.22.0 pypi.org
And 11 more in this version.
prometheus-client 0.21.0 breaking changes
- Behavior changed
Passing None as a label value now raises an error instead of being accepted. Code that passes None label values must supply real strings. github.com - Behavior changed
Requests using HTTP methods other than GET or OPTION are now rejected. Code that relies on other methods reaching the metrics endpoint must change. github.com
prometheus-client 0.20.0 breaking changes
- Behavior changed
The OpenMetrics exposition content type now reports version 1.0.0 instead of the earlier version. Check that any scraper or consumer that matches on this content type accepts the new value. github.com - Signature changed
prometheus_client.exposition.start_wsgi_server
Was def start_wsgi_server(port: int, addr: str = '0.0.0.0', registry: CollectorRegistry = REGISTRY, certfile: Optional[str] = None, keyfile: Optional[str] = None, client_cafile: Optional[str] = None, client_capath: Optional[str] = None... pypi.org
And 1 more in this version.
prometheus-client 0.19.0 breaking changes
- Signature changed
prometheus_client.exposition.start_wsgi_server
Was def start_wsgi_server(port: int, addr: str = '0.0.0.0', registry: CollectorRegistry = REGISTRY) -> None; now def start_wsgi_server(port: int, addr: str = '0.0.0.0', registry: CollectorRegistry = REGISTRY, certfile: Optional[str] =... pypi.org - Signature changed
prometheus_client.start_wsgi_server
Was def start_wsgi_server(port: int, addr: str = '0.0.0.0', registry: CollectorRegistry = REGISTRY) -> None; now def start_wsgi_server(port: int, addr: str = '0.0.0.0', registry: CollectorRegistry = REGISTRY, certfile: Optional[str] =... pypi.org
prometheus-client 0.18.0 breaking changes
- Removed
Python versions below 3.8 are no longer supported; upgrade the interpreter to 3.8 or later before using this release. github.com - Signature changed
prometheus_client.Gauge.__init__
Was def __init__(self, name: str, documentation: str, labelnames: Iterable[str] = (), namespace: str = '', subsystem: str = '', unit: str = '', registry: Optional[CollectorRegistry] = REGISTRY, _labelvalues: Optional[Sequence[str]] = None... pypi.org
And 8 more in this version.
prometheus-client 0.16.0 breaking changes
- Removed
prometheus_client.multiprocess.MP_METRIC_HELP
prometheus_client.multiprocess.MP_METRIC_HELP was removed in prometheus-client 0.16.0 pypi.org - Signature changed
prometheus_client.context_managers.ExceptionCounter.__init__
Was def __init__(self, counter: Counter, exception: Type[BaseException]) -> None; now def __init__(self, counter: Counter, exception: Union[Type[BaseException], Tuple[Type[BaseException], ...]]) -> None. pypi.org
And 8 more in this version.
prometheus-client 0.15.0 breaking changes
- Removed
choose_formatter
choose_formatter only existed for v0.14.x and was deprecated in v0.14.1; code calling it must be updated because it is now gone. github.com
prometheus-client 0.14.0 breaking changes
- Behavior changed
Responses can now be gzip-encoded when the client accepts gzip, and this is on by default. Code that expects uncompressed responses may need to handle the change. github.com - Signature changed
prometheus_client.asgi.make_asgi_app
Was def make_asgi_app(registry=REGISTRY); now def make_asgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: bool = False) -> Callable. pypi.org
And 14 more in this version.
prometheus-client 0.13.0 breaking changes
- Removed
prometheus_client.exposition.PYTHON27_OR_OLDER
prometheus_client.exposition.PYTHON27_OR_OLDER was removed in prometheus-client 0.13.0 pypi.org - Removed
prometheus_client.metrics.create_bound_method
prometheus_client.metrics.create_bound_method was removed in prometheus-client 0.13.0 pypi.org
And 14 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.