From 0ea80dce7c0368e4ba2d8ef05a193bc3581a8d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Tue, 3 Sep 2024 18:03:59 +0200 Subject: [PATCH] Fix TypeAlias non-supported with py38 and py39 --- .../sdk/metrics/_internal/exemplar/exemplar_reservoir.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py index d3fc4e900e..d5241fe5f3 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py @@ -14,7 +14,7 @@ from abc import ABC, abstractmethod from random import randrange -from typing import Any, Callable, Optional, Sequence, TypeAlias, Union +from typing import Any, Callable, Optional, Sequence, Union from opentelemetry import trace from opentelemetry.context import Context @@ -313,7 +313,7 @@ def _find_bucket_index( return len(self._boundaries) -ExemplarReservoirBuilder: TypeAlias = Callable[ +ExemplarReservoirBuilder = Callable[ [dict[str, Any]], ExemplarReservoir ] ExemplarReservoirBuilder.__doc__ = """ExemplarReservoir builder.