---
title: "prometheus-client 0.26.0 Breaking Changes on PyPI"
description: "What each prometheus-client release removed, renamed or changed: 109 breaking changes in 15 versions on PyPI, each with its source."
canonical_url: https://since.dev/packages/pypi/prometheus-client
last_updated: 2026-12-04
---

# prometheus-client breaking changes

prometheus-client 0.26.0 (July 24, 2026) is its newest release with breaking changes, 7 of them. The first: Duplicate timeseries now raise a different exception in prometheus-client 0.26.0. Every breaking API change we have recorded in prometheus-client on PyPI: 109 breaking changes in 15 versions. Below, its 15 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `0.26.0`, released July 24, 2026. [Source repository](https://github.com/prometheus/client%5Fpython)

Its 0.22.0 release drops [Python 3.8](https://since.dev/calendar/python/3.8.md). [Python end of life dates](https://since.dev/calendar/python.md).

- From [0.13.0](#v-0-13-0) to [0.26.0](#v-0-26-0): 93 breaking changes in 14 versions.

## prometheus-client 0.26.0 breaking changes

prometheus-client 0.26.0, released July 24, 2026: 7 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.26.0)
- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.26.0)
- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.26.0)
- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.26.0)
- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.26.0)
- **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](https://pypi.org/project/prometheus-client/0.26.0/)
- **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](https://pypi.org/project/prometheus-client/0.26.0/)

## prometheus-client 0.25.0 breaking changes

prometheus-client 0.25.0, released April 9, 2026: 1 breaking change.

- **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](https://pypi.org/project/prometheus-client/0.25.0/)

## prometheus-client 0.24.1 breaking changes

prometheus-client 0.24.1, released January 14, 2026: 1 breaking change.

- **Removed** `prometheus_client.django.exposition.registry`  

prometheus_client.django.exposition.registry was removed in prometheus-client 0.24.1 [pypi.org](https://pypi.org/project/prometheus-client/0.24.1/)

## prometheus-client 0.24.0 breaking changes

prometheus-client 0.24.0, released January 12, 2026: 18 breaking changes.

- **Removed** `prometheus_client.asgi.CollectorRegistry`  

prometheus_client.asgi.CollectorRegistry was removed in prometheus-client 0.24.0 [pypi.org](https://pypi.org/project/prometheus-client/0.24.0/)
- **Removed** `prometheus_client.bridge.graphite.CollectorRegistry`  

prometheus_client.bridge.graphite.CollectorRegistry was removed in prometheus-client 0.24.0 [pypi.org](https://pypi.org/project/prometheus-client/0.24.0/)
- **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](https://pypi.org/project/prometheus-client/0.24.0/)
- **Signature changed** `prometheus_client.CollectorRegistry`  

Was class CollectorRegistry(Collector); now class CollectorRegistry. [pypi.org](https://pypi.org/project/prometheus-client/0.24.0/)
- **Signature changed** `prometheus_client.gc_collector.Collector`  

Was class Collector(ABC); now class Collector(Protocol). [pypi.org](https://pypi.org/project/prometheus-client/0.24.0/)
- **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](https://pypi.org/project/prometheus-client/0.24.0/)
- **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](https://pypi.org/project/prometheus-client/0.24.0/)
- **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](https://pypi.org/project/prometheus-client/0.24.0/)
- **Signature changed** `prometheus_client.metrics.Collector`  

Was class Collector(ABC); now class Collector(Protocol). [pypi.org](https://pypi.org/project/prometheus-client/0.24.0/)
- **Signature changed** `prometheus_client.MetricsHandler.factory`  

Was @classmethod def factory(cls, registry: CollectorRegistry) -> type; now @classmethod def factory(cls, registry: Collector) -> type. [pypi.org](https://pypi.org/project/prometheus-client/0.24.0/)

And 8 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## prometheus-client 0.23.1 breaking changes

prometheus-client 0.23.1, released September 18, 2025: 7 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](https://pypi.org/project/prometheus-client/0.23.1/)
- **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](https://pypi.org/project/prometheus-client/0.23.1/)
- **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](https://pypi.org/project/prometheus-client/0.23.1/)
- **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](https://pypi.org/project/prometheus-client/0.23.1/)
- **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](https://pypi.org/project/prometheus-client/0.23.1/)
- **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](https://pypi.org/project/prometheus-client/0.23.1/)
- **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](https://pypi.org/project/prometheus-client/0.23.1/)

## prometheus-client 0.23.0 breaking changes

prometheus-client 0.23.0, released September 18, 2025: 2 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.23.0)
- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.23.0)

## Older versions

9 older versions, each with its first changes. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

### prometheus-client 0.22.0 breaking changes

prometheus-client 0.22.0, released May 16, 2025: 13 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.22.0)
- **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](https://pypi.org/project/prometheus-client/0.22.0/)

And 11 more in this version.

### prometheus-client 0.21.0 breaking changes

prometheus-client 0.21.0, released September 20, 2024: 2 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.21.0)
- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.21.0)

### prometheus-client 0.20.0 breaking changes

prometheus-client 0.20.0, released February 14, 2024: 3 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.20.0)
- **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](https://pypi.org/project/prometheus-client/0.20.0/)

And 1 more in this version.

### prometheus-client 0.19.0 breaking changes

prometheus-client 0.19.0, released November 21, 2023: 2 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](https://pypi.org/project/prometheus-client/0.19.0/)
- **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](https://pypi.org/project/prometheus-client/0.19.0/)

### prometheus-client 0.18.0 breaking changes

prometheus-client 0.18.0, released October 30, 2023: 10 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.18.0)
- **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](https://pypi.org/project/prometheus-client/0.18.0/)

And 8 more in this version.

### prometheus-client 0.16.0 breaking changes

prometheus-client 0.16.0, released January 23, 2023: 10 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](https://pypi.org/project/prometheus-client/0.16.0/)
- **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](https://pypi.org/project/prometheus-client/0.16.0/)

And 8 more in this version.

### prometheus-client 0.15.0 breaking changes

prometheus-client 0.15.0, released October 13, 2022: 1 breaking change.

- **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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.15.0)

### prometheus-client 0.14.0 breaking changes

prometheus-client 0.14.0, released April 5, 2022: 16 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](https://github.com/prometheus/client%5Fpython/releases/tag/v0.14.0)
- **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](https://pypi.org/project/prometheus-client/0.14.0/)

And 14 more in this version.

### prometheus-client 0.13.0 breaking changes

prometheus-client 0.13.0, released January 25, 2022: 16 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](https://pypi.org/project/prometheus-client/0.13.0/)
- **Removed** `prometheus_client.metrics.create_bound_method`  

prometheus_client.metrics.create_bound_method was removed in prometheus-client 0.13.0 [pypi.org](https://pypi.org/project/prometheus-client/0.13.0/)

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](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#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.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
