From d6ebdae2af1200c9c1a93652153e541ff2a48e63 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Wed, 29 Jul 2026 14:08:21 +0000 Subject: [PATCH 01/11] Upgrade ruff --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 21 +++++++++++++++------ dev-requirements.txt | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34f0c6f29d2..a9ea20d9b52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.14.1 + rev: v0.16.0 hooks: # Run the linter. - id: ruff diff --git a/CHANGELOG.md b/CHANGELOG.md index 6070d799b9a..18ff74867fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -545,24 +545,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ```python # Before from opentelemetry.sdk._logs import LogData - def export(self, batch: Sequence[LogData]) -> LogRecordExportResult: - ... + + + def export(self, batch: Sequence[LogData]) -> LogRecordExportResult: ... + # After from opentelemetry.sdk._logs import ReadableLogRecord - def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: - ... + + + def export( + self, batch: Sequence[ReadableLogRecord] + ) -> LogRecordExportResult: ... ``` - **For Log Processors:** Use `ReadWriteLogRecord` for processing, `ReadableLogRecord` for exporting ```python # Before from opentelemetry.sdk._logs import LogData - def on_emit(self, log_data: LogData): - ... + + + def on_emit(self, log_data: LogData): ... + # After from opentelemetry.sdk._logs import ReadWriteLogRecord, ReadableLogRecord + + def on_emit(self, log_record: ReadWriteLogRecord): # Convert to ReadableLogRecord before exporting readable = ReadableLogRecord( diff --git a/dev-requirements.txt b/dev-requirements.txt index ae6d9ea63be..ece3667626e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -17,4 +17,4 @@ asgiref==3.7.2 psutil==7.2.2 GitPython==3.1.52 pre-commit==3.7.0 -ruff==0.14.1 +ruff==0.16.0 From 3ec55c3c9d844bbd8c7cb85c7a0ddcac7e401201 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Wed, 29 Jul 2026 20:25:55 +0000 Subject: [PATCH 02/11] Change ruff stuff --- .pre-commit-config.yaml | 5 ++ .../metrics/_internal/__init__.py | 81 +++++++++++++++---- .../src/opentelemetry/propagate/__init__.py | 12 +-- .../src/opentelemetry/trace/__init__.py | 8 +- .../opentelemetry/configuration/__init__.py | 6 +- .../src/opentelemetry/configuration/_sdk.py | 3 +- .../configuration/file/_env_substitution.py | 8 +- .../opentelemetry/sdk/resources/__init__.py | 22 ++--- pyproject.toml | 4 + 9 files changed, 107 insertions(+), 42 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9ea20d9b52..c3fa7b7795c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,6 +8,11 @@ repos: args: ["--fix", "--show-fixes"] # Run the formatter. - id: ruff-format + - id: ruff-format + name: ruff-format (markdown & towncrier) + types_or: [python, pyi, jupyter, markdown, text] + files: \.(md|added|changed|deprecated|removed|fixed)$ + args: ["--preview"] - repo: https://github.com/astral-sh/uv-pre-commit # uv version. rev: 0.6.0 diff --git a/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py index 9df55291fa5..c3333db7185 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py +++ b/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py @@ -332,43 +332,73 @@ def create_observable_counter( For example, an observable counter could be used to report system CPU time periodically. Here is a basic implementation:: - def cpu_time_callback(options: CallbackOptions) -> Iterable[Observation]: + def cpu_time_callback( + options: CallbackOptions, + ) -> Iterable[Observation]: observations = [] with open("/proc/stat") as procstat: procstat.readline() # skip the first line for line in procstat: - if not line.startswith("cpu"): break + if not line.startswith("cpu"): + break cpu, *states = line.split() - observations.append(Observation(int(states[0]) // 100, {"cpu": cpu, "state": "user"})) - observations.append(Observation(int(states[1]) // 100, {"cpu": cpu, "state": "nice"})) - observations.append(Observation(int(states[2]) // 100, {"cpu": cpu, "state": "system"})) + observations.append( + Observation( + int(states[0]) // 100, + {"cpu": cpu, "state": "user"}, + ) + ) + observations.append( + Observation( + int(states[1]) // 100, + {"cpu": cpu, "state": "nice"}, + ) + ) + observations.append( + Observation( + int(states[2]) // 100, + {"cpu": cpu, "state": "system"}, + ) + ) # ... other states return observations + meter.create_observable_counter( "system.cpu.time", callbacks=[cpu_time_callback], unit="s", - description="CPU time" + description="CPU time", ) To reduce memory usage, you can use generator callbacks instead of building the full list:: - def cpu_time_callback(options: CallbackOptions) -> Iterable[Observation]: + def cpu_time_callback( + options: CallbackOptions, + ) -> Iterable[Observation]: with open("/proc/stat") as procstat: procstat.readline() # skip the first line for line in procstat: - if not line.startswith("cpu"): break + if not line.startswith("cpu"): + break cpu, *states = line.split() - yield Observation(int(states[0]) // 100, {"cpu": cpu, "state": "user"}) - yield Observation(int(states[1]) // 100, {"cpu": cpu, "state": "nice"}) + yield Observation( + int(states[0]) // 100, + {"cpu": cpu, "state": "user"}, + ) + yield Observation( + int(states[1]) // 100, + {"cpu": cpu, "state": "nice"}, + ) # ... other states Alternatively, you can pass a sequence of generators directly instead of a sequence of callbacks, which each should return iterables of :class:`~opentelemetry.metrics.Observation`:: - def cpu_time_callback(states_to_include: set[str]) -> Iterable[Iterable[Observation]]: + def cpu_time_callback( + states_to_include: set[str], + ) -> Iterable[Iterable[Observation]]: # accept options sent in from OpenTelemetry options = yield while True: @@ -376,29 +406,46 @@ def cpu_time_callback(states_to_include: set[str]) -> Iterable[Iterable[Observat with open("/proc/stat") as procstat: procstat.readline() # skip the first line for line in procstat: - if not line.startswith("cpu"): break + if not line.startswith("cpu"): + break cpu, *states = line.split() if "user" in states_to_include: - observations.append(Observation(int(states[0]) // 100, {"cpu": cpu, "state": "user"})) + observations.append( + Observation( + int(states[0]) // 100, + {"cpu": cpu, "state": "user"}, + ) + ) if "nice" in states_to_include: - observations.append(Observation(int(states[1]) // 100, {"cpu": cpu, "state": "nice"})) + observations.append( + Observation( + int(states[1]) // 100, + {"cpu": cpu, "state": "nice"}, + ) + ) # ... other states # yield the observations and receive the options for next iteration options = yield observations + meter.create_observable_counter( "system.cpu.time", callbacks=[cpu_time_callback({"user", "system"})], unit="s", - description="CPU time" + description="CPU time", ) The :class:`~opentelemetry.metrics.CallbackOptions` contain a timeout which the callback should respect. For example if the callback does asynchronous work, like making HTTP requests, it should respect the timeout:: - def scrape_http_callback(options: CallbackOptions) -> Iterable[Observation]: - r = requests.get('http://scrapethis.com', timeout=options.timeout_millis / 10**3) + def scrape_http_callback( + options: CallbackOptions, + ) -> Iterable[Observation]: + r = requests.get( + "http://scrapethis.com", + timeout=options.timeout_millis / 10**3, + ) for value in r.json(): yield Observation(value) diff --git a/opentelemetry-api/src/opentelemetry/propagate/__init__.py b/opentelemetry-api/src/opentelemetry/propagate/__init__.py index d53a1b91d30..7ef176c2485 100644 --- a/opentelemetry-api/src/opentelemetry/propagate/__init__.py +++ b/opentelemetry-api/src/opentelemetry/propagate/__init__.py @@ -32,14 +32,16 @@ def get_header_from_flask_request(request, key): return request.headers.get_all(key) - def set_header_into_requests_request(request: requests.Request, - key: str, value: str): + + def set_header_into_requests_request( + request: requests.Request, key: str, value: str + ): request.headers[key] = value + def example_route(): context = PROPAGATOR.extract( - get_header_from_flask_request, - flask.request + get_header_from_flask_request, flask.request ) request_to_downstream = requests.Request( "GET", "http://httpbin.org/get" @@ -47,7 +49,7 @@ def example_route(): PROPAGATOR.inject( set_header_into_requests_request, request_to_downstream, - context=context + context=context, ) session = requests.Session() session.send(request_to_downstream.prepare()) diff --git a/opentelemetry-api/src/opentelemetry/trace/__init__.py b/opentelemetry-api/src/opentelemetry/trace/__init__.py index 996576c3ee0..aec4bf4fec5 100644 --- a/opentelemetry-api/src/opentelemetry/trace/__init__.py +++ b/opentelemetry-api/src/opentelemetry/trace/__init__.py @@ -355,8 +355,8 @@ def start_as_current_span( with tracer.start_as_current_span("two") as child: child.add_event("child's event") trace.get_current_span() # returns child - trace.get_current_span() # returns parent - trace.get_current_span() # returns previously active span + trace.get_current_span() # returns parent + trace.get_current_span() # returns previously active span This is a convenience method for creating spans attached to the tracer's context. Applications that need more control over the span @@ -374,8 +374,8 @@ def start_as_current_span( This can also be used as a decorator:: @tracer.start_as_current_span("name") - def function(): - ... + def function(): ... + function() diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/__init__.py b/opentelemetry-configuration/src/opentelemetry/configuration/__init__.py index 934987fb7bd..1d42963269f 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/__init__.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/__init__.py @@ -13,7 +13,8 @@ programmatic use: >>> from opentelemetry.configuration import ( -... load_config_file, configure_sdk, +... load_config_file, +... configure_sdk, ... ) >>> config = load_config_file("otel-config.yaml") >>> configure_sdk(config) @@ -21,7 +22,8 @@ Construct a configuration programmatically and apply it: >>> from opentelemetry.configuration import ( -... OpenTelemetryConfiguration, configure_sdk, +... OpenTelemetryConfiguration, +... configure_sdk, ... ) >>> configure_sdk(OpenTelemetryConfiguration(file_format="1.0-rc.1")) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py b/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py index 71295c9d80e..4bd9d9e7d5f 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py @@ -85,7 +85,8 @@ def configure_sdk(config: OpenTelemetryConfiguration) -> None: Example: >>> from opentelemetry.configuration.file import ( - ... load_config_file, configure_sdk, + ... load_config_file, + ... configure_sdk, ... ) >>> config = load_config_file("otel-config.yaml") >>> configure_sdk(config) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/file/_env_substitution.py b/opentelemetry-configuration/src/opentelemetry/configuration/file/_env_substitution.py index b5f02ea06be..8b5488233d8 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/file/_env_substitution.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/file/_env_substitution.py @@ -29,12 +29,12 @@ def substitute_env_vars(text: str) -> str: Text with environment variables substituted. Examples: - >>> os.environ['SERVICE_NAME'] = 'my-service' - >>> substitute_env_vars('name: ${SERVICE_NAME}') + >>> os.environ["SERVICE_NAME"] = "my-service" + >>> substitute_env_vars("name: ${SERVICE_NAME}") 'name: my-service' - >>> substitute_env_vars('name: ${MISSING:-default}') + >>> substitute_env_vars("name: ${MISSING:-default}") 'name: default' - >>> substitute_env_vars('price: $$100') + >>> substitute_env_vars("price: $$100") 'price: $100' """ # Pattern matches $$ (escape sequence) or ${VAR_NAME} / ${VAR_NAME:-default_value} diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py index 22e2c627560..b34cba70696 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py @@ -25,19 +25,23 @@ trace.set_tracer_provider( TracerProvider( - resource=Resource.create({ - "service.name": "shoppingcart", - "service.instance.id": "instance-12", - }), + resource=Resource.create( + { + "service.name": "shoppingcart", + "service.instance.id": "instance-12", + } + ), ), ) print(trace.get_tracer_provider().resource.attributes) - {'telemetry.sdk.language': 'python', - 'telemetry.sdk.name': 'opentelemetry', - 'telemetry.sdk.version': '0.13.dev0', - 'service.name': 'shoppingcart', - 'service.instance.id': 'instance-12'} + { + "telemetry.sdk.language": "python", + "telemetry.sdk.name": "opentelemetry", + "telemetry.sdk.version": "0.13.dev0", + "service.name": "shoppingcart", + "service.instance.id": "instance-12", + } Note that the OpenTelemetry project documents certain `"standard attributes" `_ diff --git a/pyproject.toml b/pyproject.toml index 51bc40983d7..c6a55373fc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,7 @@ extend-exclude = [ "opentelemetry-proto-json/src/*", ] output-format = "concise" +extension = { added = "markdown", changed = "markdown", deprecated = "markdown", removed = "markdown", fixed = "markdown" } [tool.ruff.lint] # https://docs.astral.sh/ruff/linter/#rule-selection @@ -117,6 +118,9 @@ known-third-party = [ ] known-first-party = ["opentelemetry", "opentelemetry_example_app"] +[tool.ruff.format] +docstring-code-format = true + [tool.pyright] typeCheckingMode = "standard" pythonVersion = "3.10" From 4fa2538c60ff22a1e7da836665ea42830e1bce07 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Thu, 30 Jul 2026 17:39:55 +0000 Subject: [PATCH 03/11] Upgrade ruff part 2 --- .../opentelemetry/codegen/json/generator.py | 3 +- .../codegen/json/runtime/json_codec.py | 6 +- .../tests/test_json_codec.py | 4 +- .../tests/test_protobuf_compatibility.py | 1 - .../tests/test_serde.py | 1 - docs/conf.py | 4 +- docs/examples/django/manage.py | 2 +- .../opencensus-exporter-tracer/collector.py | 7 +- docs/getting_started/tracing_example.py | 7 +- .../exporter/http/transport/__init__.py | 2 +- .../exporter/http/transport/_requests.py | 4 +- .../exporter/http/transport/_urllib3.py | 6 +- .../tests/test_otcollector_trace_exporter.py | 14 ++-- .../tests/test_aggregation.py | 12 +-- .../tests/test_common_encoder.py | 12 +-- .../exporter/otlp/proto/grpc/exporter.py | 1 - .../tests/test_otlp_exporter_mixin.py | 10 +-- .../tests/test_otlp_trace_exporter.py | 48 +++++------ .../proto/http/metric_exporter/__init__.py | 2 +- .../tests/test_proto_span_exporter.py | 8 +- .../exporter/prometheus/__init__.py | 2 +- .../tests/encoder/common_tests.py | 4 +- .../zipkin/proto/http/v2/gen/zipkin_pb2.py | 2 +- .../tests/encoder/common_tests.py | 4 +- .../src/opentelemetry/_logs/__init__.py | 4 +- .../src/opentelemetry/context/__init__.py | 4 +- .../src/opentelemetry/metrics/__init__.py | 34 ++++---- .../metrics/_internal/instrument.py | 24 +++--- .../metrics/_internal/observation.py | 2 +- .../src/opentelemetry/propagate/__init__.py | 6 +- .../src/opentelemetry/trace/__init__.py | 10 +-- .../opentelemetry/util/_importlib_metadata.py | 10 +-- .../src/opentelemetry/util/_providers.py | 2 +- .../tests/logs/test_logger_provider.py | 22 ++--- .../tests/metrics/test_meter_provider.py | 18 +++-- .../tests/propagators/test__envcarrier.py | 14 ++-- .../tests/propagators/test_propagators.py | 56 ++++--------- .../test_tracecontexthttptextformat.py | 10 +-- .../tests/util/test__providers.py | 18 ++--- .../configuration/_logger_provider.py | 10 +-- .../configuration/_meter_provider.py | 12 +-- .../configuration/_tracer_provider.py | 10 +-- .../configuration/file/__init__.py | 18 ++--- .../tests/test_common.py | 24 +++--- .../tests/test_logger_provider.py | 70 +++++++++------- .../tests/test_meter_provider.py | 52 ++++++------ .../tests/test_resource.py | 24 +++--- opentelemetry-configuration/tests/test_sdk.py | 2 +- .../tests/test_tracer_provider.py | 80 +++++++++++-------- .../opentelemetry/proto_json/_json_codec.py | 6 +- .../collector/logs/v1/logs_service.py | 6 +- .../collector/metrics/v1/metrics_service.py | 6 +- .../v1development/profiles_service.py | 6 +- .../collector/trace/v1/trace_service.py | 6 +- .../proto_json/common/v1/common.py | 12 +-- .../opentelemetry/proto_json/logs/v1/logs.py | 8 +- .../proto_json/metrics/v1/metrics.py | 32 ++++---- .../profiles/v1development/profiles.py | 28 +++---- .../proto_json/resource/v1/resource.py | 2 +- .../proto_json/trace/v1/trace.py | 14 ++-- .../collector/logs/v1/logs_service_pb2.py | 3 +- .../logs/v1/logs_service_pb2_grpc.py | 15 ++-- .../metrics/v1/metrics_service_pb2.py | 3 +- .../metrics/v1/metrics_service_pb2_grpc.py | 15 ++-- .../v1development/profiles_service_pb2.py | 3 +- .../profiles_service_pb2_grpc.py | 15 ++-- .../collector/trace/v1/trace_service_pb2.py | 3 +- .../trace/v1/trace_service_pb2_grpc.py | 15 ++-- .../proto/common/v1/common_pb2.py | 2 +- .../opentelemetry/proto/logs/v1/logs_pb2.py | 4 +- .../proto/metrics/v1/metrics_pb2.py | 4 +- .../profiles/v1development/profiles_pb2.py | 4 +- .../proto/resource/v1/resource_pb2.py | 3 +- .../opentelemetry/proto/trace/v1/trace_pb2.py | 4 +- .../sdk/_configuration/__init__.py | 6 +- .../src/opentelemetry/sdk/_logs/__init__.py | 12 +-- .../sdk/_logs/export/__init__.py | 8 +- .../sdk/error_handler/__init__.py | 1 - .../src/opentelemetry/sdk/metrics/__init__.py | 10 +-- .../sdk/metrics/_internal/__init__.py | 4 +- .../metrics/_internal/exemplar/__init__.py | 8 +- .../_internal/exemplar/exemplar_filter.py | 8 +- .../_internal/exemplar/exemplar_reservoir.py | 14 ++-- .../sdk/metrics/_internal/instrument.py | 8 +- .../sdk/metrics/export/__init__.py | 12 +-- .../opentelemetry/sdk/resources/__init__.py | 2 +- .../src/opentelemetry/sdk/trace/sampling.py | 2 +- .../opentelemetry/sdk/util/instrumentation.py | 4 +- .../tests/error_handler/test_error_handler.py | 26 +++--- ...xponential_bucket_histogram_aggregation.py | 4 +- .../tests/metrics/test_aggregation.py | 4 +- .../tests/metrics/test_import.py | 6 +- opentelemetry-sdk/tests/metrics/test_view.py | 4 +- opentelemetry-sdk/tests/test_configurator.py | 4 +- .../tests/trace/export/test_export.py | 7 +- .../tests/trace/test_span_processor.py | 16 ++-- opentelemetry-sdk/tests/trace/test_trace.py | 18 +++-- pyproject.toml | 72 ++++++++++++++--- .../tests/test_shim.py | 14 ++-- .../test_asyncio.py | 2 +- .../opentelemetry/test/_otlp_test_server.py | 8 +- .../src/opentelemetry/test/test_base.py | 4 +- .../opentelemetry/test/weaver_live_check.py | 2 +- .../tests/test_otlp_test_server.py | 10 ++- 104 files changed, 622 insertions(+), 599 deletions(-) diff --git a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py index b8be0355246..7bac6f56064 100644 --- a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py +++ b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py @@ -219,8 +219,7 @@ def _get_module_path(self, proto_file: str) -> str: Python module path (dot-separated) """ transformed = self._transform_proto_path(proto_file) - if transformed.endswith(".py"): - transformed = transformed[:-3] + transformed = transformed.removesuffix(".py") return transformed.replace("/", ".") def _generate_file(self, file_desc: descriptor.FileDescriptorProto) -> str: diff --git a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py index 72c315d1eaa..69f74ed657f 100644 --- a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py +++ b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py @@ -10,6 +10,8 @@ import math import typing +from typing_extensions import Self + T = typing.TypeVar("T") M = typing.TypeVar("M", bound="JsonMessage") @@ -39,7 +41,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls: type[M], data: str | bytes) -> M: + def from_json(cls, data: str | bytes) -> Self: """ Deserialize from a JSON string or bytes. """ @@ -179,7 +181,7 @@ def decode_int64(value: int | str | None, field_name: str) -> int: ) from None -def decode_float(value: float | int | str | None, field_name: str) -> float: +def decode_float(value: float | str | None, field_name: str) -> float: """ Parse float/double from number or string, handling special values. diff --git a/codegen/opentelemetry-codegen-json/tests/test_json_codec.py b/codegen/opentelemetry-codegen-json/tests/test_json_codec.py index aa24f838d51..debb8a07b7a 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_json_codec.py +++ b/codegen/opentelemetry-codegen-json/tests/test_json_codec.py @@ -140,9 +140,7 @@ def test_encode_float(value: float, expected: float | str) -> None: (None, 0.0), ], ) -def test_decode_float( - value: float | int | str | None, expected: float -) -> None: +def test_decode_float(value: float | str | None, expected: float) -> None: result = decode_float(value, "field") if math.isnan(expected): assert math.isnan(result) diff --git a/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py b/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py index 16c1852cfbf..75da3ff7fa9 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py +++ b/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # pylint: skip-file -# ruff: noqa: PLC0415 import base64 from typing import Any diff --git a/codegen/opentelemetry-codegen-json/tests/test_serde.py b/codegen/opentelemetry-codegen-json/tests/test_serde.py index e89453ea6a6..bb5dd460dbc 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_serde.py +++ b/codegen/opentelemetry-codegen-json/tests/test_serde.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # pylint: skip-file -# ruff: noqa: PLC0415 import json import math diff --git a/docs/conf.py b/docs/conf.py index 01b386beacc..7ec6f54ab2a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -30,8 +30,8 @@ # "AnyValue" forward reference in opentelemetry.util.types._ExtendedAttributes # resolves when sphinx_autodoc_typehints calls typing.get_type_hints() on # BoundedAttributes (whose __globals__ is the attributes module). Docs-only. -import opentelemetry.attributes # noqa: E402 -from opentelemetry.util.types import AnyValue as _AnyValue # noqa: E402 +import opentelemetry.attributes +from opentelemetry.util.types import AnyValue as _AnyValue opentelemetry.attributes.AnyValue = _AnyValue diff --git a/docs/examples/django/manage.py b/docs/examples/django/manage.py index 2ddd5e8eb93..535a99f0306 100755 --- a/docs/examples/django/manage.py +++ b/docs/examples/django/manage.py @@ -22,7 +22,7 @@ def main(): DjangoInstrumentor().instrument() try: - from django.core.management import ( # noqa: PLC0415 + from django.core.management import ( execute_from_command_line, ) except ImportError as exc: diff --git a/docs/examples/opencensus-exporter-tracer/collector.py b/docs/examples/opencensus-exporter-tracer/collector.py index f1d1025c404..05a712ebaf9 100644 --- a/docs/examples/opencensus-exporter-tracer/collector.py +++ b/docs/examples/opencensus-exporter-tracer/collector.py @@ -15,7 +15,6 @@ span_processor = BatchSpanProcessor(exporter) trace.get_tracer_provider().add_span_processor(span_processor) -with tracer.start_as_current_span("foo"): - with tracer.start_as_current_span("bar"): - with tracer.start_as_current_span("baz"): - print("Hello world from OpenTelemetry Python!") +with tracer.start_as_current_span("foo"), tracer.start_as_current_span("bar"): + with tracer.start_as_current_span("baz"): + print("Hello world from OpenTelemetry Python!") diff --git a/docs/getting_started/tracing_example.py b/docs/getting_started/tracing_example.py index 574b8f3fe7c..d7dc89cc813 100644 --- a/docs/getting_started/tracing_example.py +++ b/docs/getting_started/tracing_example.py @@ -17,7 +17,6 @@ tracer = trace.get_tracer(__name__) -with tracer.start_as_current_span("foo"): - with tracer.start_as_current_span("bar"): - with tracer.start_as_current_span("baz"): - print("Hello world from OpenTelemetry Python!") +with tracer.start_as_current_span("foo"), tracer.start_as_current_span("bar"): + with tracer.start_as_current_span("baz"): + print("Hello world from OpenTelemetry Python!") diff --git a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py index c8cfcc4ca2e..b8f7d7865fd 100644 --- a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py +++ b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py @@ -53,7 +53,7 @@ def _load_http_transport_factory(name: str) -> BaseHTTPTransportFactory: if name in _KNOWN_TRANSPORTS: return _KNOWN_TRANSPORTS[name] # pylint: disable-next=import-outside-toplevel,import-error - from opentelemetry.util._importlib_metadata import ( # noqa: PLC0415 + from opentelemetry.util._importlib_metadata import ( entry_points, ) diff --git a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_requests.py b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_requests.py index 9ad205e3f86..a25bad1bb8d 100644 --- a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_requests.py +++ b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_requests.py @@ -24,7 +24,7 @@ @functools.cache def _get_connection_error_types() -> tuple[type[Exception], ...]: # pylint: disable-next=import-outside-toplevel - import requests.exceptions # noqa: PLC0415 + import requests.exceptions return ( requests.exceptions.ConnectionError, @@ -71,7 +71,7 @@ def __init__( **kwargs: Any, ) -> None: # pylint: disable-next=import-outside-toplevel - import requests # noqa: PLC0415 + import requests self._session = session if session is not None else requests.Session() self._session.verify = verify diff --git a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py index 2f2fd72954f..92de7831a9b 100644 --- a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py +++ b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py @@ -24,7 +24,7 @@ @functools.cache def _get_connection_error_types() -> tuple[type[Exception], ...]: # pylint: disable-next=import-outside-toplevel - import urllib3.exceptions # noqa: PLC0415 + import urllib3.exceptions types: list[type[Exception]] = [ urllib3.exceptions.ConnectionError, @@ -75,7 +75,7 @@ def __init__( **kwargs: Any, ) -> None: # pylint: disable-next=import-outside-toplevel - import urllib3 # noqa: PLC0415 + import urllib3 pool_kwargs: dict[str, object] = { "retries": urllib3.Retry(0, redirect=False), @@ -104,7 +104,7 @@ def request( data: bytes | None = None, ) -> BaseHTTPResult: # pylint: disable-next=import-outside-toplevel - import urllib3 # noqa: PLC0415 + import urllib3 try: response = self._pool.request( diff --git a/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py b/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py index 077531ec9f8..8a8cd96e7fb 100644 --- a/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py +++ b/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py @@ -307,15 +307,13 @@ def test_export(self): # pylint: disable=unsubscriptable-object export_arg = mock_export.call_args[0] service_request = next(export_arg[0]) - output_spans = getattr(service_request, "spans") - output_node = getattr(service_request, "node") + output_spans = service_request.spans + output_node = service_request.node self.assertEqual(len(output_spans), 1) - self.assertIsNotNone(getattr(output_node, "library_info")) - self.assertIsNotNone(getattr(output_node, "service_info")) - output_identifier = getattr(output_node, "identifier") - self.assertEqual( - getattr(output_identifier, "host_name"), "testHostName" - ) + self.assertIsNotNone(output_node.library_info) + self.assertIsNotNone(output_node.service_info) + output_identifier = output_node.identifier + self.assertEqual(output_identifier.host_name, "testHostName") def test_export_service_name(self): trace_api.set_tracer_provider( diff --git a/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py b/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py index 4883eefb3e2..9706689b51f 100644 --- a/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py +++ b/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py @@ -84,12 +84,14 @@ def test_temporality_lowmemory_env(self): self.assertEqual(result[instrument_class], expected) def test_temporality_invalid_env_logs_warning(self): - with patch.dict( - "os.environ", - {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "INVALID"}, + with ( + patch.dict( + "os.environ", + {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "INVALID"}, + ), + self.assertLogs(_AGGREGATION_LOGGER_NAME, level="WARNING"), ): - with self.assertLogs(_AGGREGATION_LOGGER_NAME, level="WARNING"): - result = _get_temporality(None) + result = _get_temporality(None) self.assertEqual( result[Counter], AggregationTemporality.CUMULATIVE, diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py index 4eff30be6ff..aa6914c7339 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py @@ -408,12 +408,14 @@ def test_temporality_lowmemory_env(self): self.assertEqual(result[instrument_class], expected) def test_temporality_invalid_env_logs_warning(self): - with patch.dict( - "os.environ", - {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "INVALID"}, + with ( + patch.dict( + "os.environ", + {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "INVALID"}, + ), + self.assertLogs(_COMMON_LOGGER_NAME, level="WARNING"), ): - with self.assertLogs(_COMMON_LOGGER_NAME, level="WARNING"): - result = _get_temporality(None) + result = _get_temporality(None) self.assertEqual( result[Counter], AggregationTemporality.CUMULATIVE, diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py index f7fa0b8697d..9496e598ca3 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py @@ -560,7 +560,6 @@ def _exporting(self) -> str: Returns a string that describes the overall exporter, to be used in warning messages. """ - pass def _set_meter_provider(self, meter_provider: MeterProvider) -> None: self._metrics = create_exporter_metrics( diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py index 50996264a09..47764de5fd6 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py @@ -26,7 +26,7 @@ from opentelemetry.exporter.otlp.proto.common.trace_encoder import ( encode_spans, ) -from opentelemetry.exporter.otlp.proto.grpc.exporter import ( # noqa: F401 +from opentelemetry.exporter.otlp.proto.grpc.exporter import ( _RETRYABLE_ERROR_CODES, InvalidCompressionValueException, OTLPExporterMixin, @@ -184,11 +184,9 @@ def setUp(self): self.span = _Span( "a", context=Mock( - **{ - "trace_state": {"a": "b", "c": "d"}, - "span_id": 10217189687419569865, - "trace_id": 67545097771067222548457157018666467027, - } + trace_state={"a": "b", "c": "d"}, + span_id=10217189687419569865, + trace_id=67545097771067222548457157018666467027, ), ) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py index 64cd091a6c1..6fce8a0da97 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py @@ -73,12 +73,8 @@ def setUp(self): self.tracer = tracer_provider.get_tracer(__name__) event_mock = Mock( - **{ - "timestamp": 1591240820506462784, - "attributes": BoundedAttributes( - attributes={"a": 1, "b": False} - ), - } + timestamp=1591240820506462784, + attributes=BoundedAttributes(attributes={"a": 1, "b": False}), ) type(event_mock).name = PropertyMock(return_value="a") @@ -86,14 +82,12 @@ def setUp(self): self.span = _Span( "a", context=Mock( - **{ - "trace_state": {"a": "b", "c": "d"}, - "span_id": 10217189687419569865, - "trace_id": 67545097771067222548457157018666467027, - } + trace_state={"a": "b", "c": "d"}, + span_id=10217189687419569865, + trace_id=67545097771067222548457157018666467027, ), resource=SDKResource({"a": 1, "b": False}), - parent=Mock(**{"span_id": 12345}), + parent=Mock(span_id=12345), attributes=BoundedAttributes(attributes={"a": 1, "b": True}), events=[event_mock], links=[ @@ -117,14 +111,12 @@ def setUp(self): self.span2 = _Span( "b", context=Mock( - **{ - "trace_state": {"a": "b", "c": "d"}, - "span_id": 10217189687419569865, - "trace_id": 67545097771067222548457157018666467027, - } + trace_state={"a": "b", "c": "d"}, + span_id=10217189687419569865, + trace_id=67545097771067222548457157018666467027, ), resource=SDKResource({"a": 2, "b": False}), - parent=Mock(**{"span_id": 12345}), + parent=Mock(span_id=12345), instrumentation_scope=InstrumentationScope( name="name", version="version" ), @@ -133,14 +125,12 @@ def setUp(self): self.span3 = _Span( "c", context=Mock( - **{ - "trace_state": {"a": "b", "c": "d"}, - "span_id": 10217189687419569865, - "trace_id": 67545097771067222548457157018666467027, - } + trace_state={"a": "b", "c": "d"}, + span_id=10217189687419569865, + trace_id=67545097771067222548457157018666467027, ), resource=SDKResource({"a": 1, "b": False}), - parent=Mock(**{"span_id": 12345}), + parent=Mock(span_id=12345), instrumentation_scope=InstrumentationScope( name="name2", version="version2" ), @@ -784,13 +774,11 @@ def _create_span_with_status(status: SDKStatus): span = _Span( "a", context=Mock( - **{ - "trace_state": {"a": "b", "c": "d"}, - "span_id": 10217189687419569865, - "trace_id": 67545097771067222548457157018666467027, - } + trace_state={"a": "b", "c": "d"}, + span_id=10217189687419569865, + trace_id=67545097771067222548457157018666467027, ), - parent=Mock(**{"span_id": 12345}), + parent=Mock(span_id=12345), instrumentation_scope=InstrumentationScope( name="name", version="version" ), diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py index 7020beb7f32..728a5066b2f 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py @@ -46,7 +46,7 @@ _load_session_from_envvar, ) from opentelemetry.metrics import MeterProvider -from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ( # noqa: F401 +from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ( ExportMetricsServiceRequest, ) from opentelemetry.proto.common.v1.common_pb2 import ( # noqa: F401 diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py index fa8b5fc1f44..4e4918b37a5 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py @@ -59,11 +59,9 @@ BASIC_SPAN = _Span( "abc", context=Mock( - **{ - "trace_state": {"a": "b", "c": "d"}, - "span_id": 10217189687419569865, - "trace_id": 67545097771067222548457157018666467027, - } + trace_state={"a": "b", "c": "d"}, + span_id=10217189687419569865, + trace_id=67545097771067222548457157018666467027, ), ) diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py index 12a6755337f..a87100eb4e1 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py @@ -483,7 +483,7 @@ def _collect_data_points( return label_keys, label_rows, values # pylint: disable=no-self-use - def _check_value(self, value: int | float | str | Sequence) -> str: + def _check_value(self, value: float | str | Sequence) -> str: """Check the label value and return is appropriate representation""" if not isinstance(value, str): return dumps(value, default=str) diff --git a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py index ff5fe4d2a58..022bef03e6a 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py +++ b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py @@ -183,8 +183,8 @@ def get_data_for_max_tag_length_test( span.set_attribute("tuple4", (2,) * 10) span.set_attribute("tuple5", (True,) * 25) span.set_attribute("tuple6", (True,) * 10) - span.set_attribute("range1", range(0, 25)) - span.set_attribute("range2", range(0, 10)) + span.set_attribute("range1", range(25)) + span.set_attribute("range2", range(10)) span.set_attribute("empty_list", []) span.set_attribute("none_list", ["hello", None, "world"]) span.end(end_time=end_time) diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/gen/zipkin_pb2.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/gen/zipkin_pb2.py index 7b578febc10..2d12c20888c 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/gen/zipkin_pb2.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/gen/zipkin_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: zipkin.proto """Generated protocol buffer code.""" @@ -6,6 +5,7 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py index ff5fe4d2a58..022bef03e6a 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py @@ -183,8 +183,8 @@ def get_data_for_max_tag_length_test( span.set_attribute("tuple4", (2,) * 10) span.set_attribute("tuple5", (True,) * 25) span.set_attribute("tuple6", (True,) * 10) - span.set_attribute("range1", range(0, 25)) - span.set_attribute("range2", range(0, 10)) + span.set_attribute("range1", range(25)) + span.set_attribute("range2", range(10)) span.set_attribute("empty_list", []) span.set_attribute("none_list", ["hello", None, "world"]) span.end(end_time=end_time) diff --git a/opentelemetry-api/src/opentelemetry/_logs/__init__.py b/opentelemetry-api/src/opentelemetry/_logs/__init__.py index 1c4dfee1335..cff2b8ca609 100644 --- a/opentelemetry-api/src/opentelemetry/_logs/__init__.py +++ b/opentelemetry-api/src/opentelemetry/_logs/__init__.py @@ -35,13 +35,13 @@ from opentelemetry._logs.severity import SeverityNumber __all__ = [ + "LogRecord", "Logger", "LoggerProvider", - "LogRecord", "NoOpLogger", "NoOpLoggerProvider", + "SeverityNumber", "get_logger", "get_logger_provider", "set_logger_provider", - "SeverityNumber", ] diff --git a/opentelemetry-api/src/opentelemetry/context/__init__.py b/opentelemetry-api/src/opentelemetry/context/__init__.py index 80174f66b5e..1dfecd55cff 100644 --- a/opentelemetry-api/src/opentelemetry/context/__init__.py +++ b/opentelemetry-api/src/opentelemetry/context/__init__.py @@ -9,7 +9,7 @@ from uuid import uuid4 # pylint: disable=wrong-import-position -from opentelemetry.context.context import Context, _RuntimeContext # noqa +from opentelemetry.context.context import Context, _RuntimeContext from opentelemetry.context.contextvars_context import ContextVarsRuntimeContext from opentelemetry.environment_variables import OTEL_PYTHON_CONTEXT @@ -27,7 +27,7 @@ def _load_runtime_context() -> _RuntimeContext: return ContextVarsRuntimeContext() # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.util._importlib_metadata import ( # noqa: PLC0415 + from opentelemetry.util._importlib_metadata import ( entry_points, ) diff --git a/opentelemetry-api/src/opentelemetry/metrics/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/__init__.py index b39a3de15ff..b25a60e9177 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/__init__.py +++ b/opentelemetry-api/src/opentelemetry/metrics/__init__.py @@ -91,31 +91,31 @@ obj.__module__ = __name__ __all__ = [ + "Asynchronous", "CallbackOptions", - "MeterProvider", - "NoOpMeterProvider", - "Meter", + "CallbackT", "Counter", - "_Gauge", - "_NoOpGauge", - "NoOpCounter", - "UpDownCounter", - "NoOpUpDownCounter", "Histogram", + "Instrument", + "Meter", + "MeterProvider", + "NoOpCounter", "NoOpHistogram", - "ObservableCounter", + "NoOpMeter", + "NoOpMeterProvider", "NoOpObservableCounter", - "ObservableUpDownCounter", - "Instrument", - "Synchronous", - "Asynchronous", "NoOpObservableGauge", - "ObservableGauge", "NoOpObservableUpDownCounter", + "NoOpUpDownCounter", + "ObservableCounter", + "ObservableGauge", + "ObservableUpDownCounter", + "Observation", + "Synchronous", + "UpDownCounter", + "_Gauge", + "_NoOpGauge", "get_meter", "get_meter_provider", "set_meter_provider", - "Observation", - "CallbackT", - "NoOpMeter", ] diff --git a/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py b/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py index 79bdfa4e673..d60b8f7a4c9 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py +++ b/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py @@ -162,7 +162,7 @@ class Counter(Synchronous): @abstractmethod def add( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -189,7 +189,7 @@ def __init__( def add( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -199,7 +199,7 @@ def add( class _ProxyCounter(_ProxyInstrument[Counter], Counter): def add( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -220,7 +220,7 @@ class UpDownCounter(Synchronous): @abstractmethod def add( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -251,7 +251,7 @@ def __init__( def add( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -261,7 +261,7 @@ def add( class _ProxyUpDownCounter(_ProxyInstrument[UpDownCounter], UpDownCounter): def add( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -373,7 +373,7 @@ def __init__( @abstractmethod def record( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -412,7 +412,7 @@ def __init__( def record( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -434,7 +434,7 @@ def __init__( def record( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -496,7 +496,7 @@ class Gauge(Synchronous): @abstractmethod def set( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -527,7 +527,7 @@ def __init__( def set( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: @@ -540,7 +540,7 @@ class _ProxyGauge( ): def set( self, - amount: int | float, + amount: float, attributes: Attributes | None = None, context: Context | None = None, ) -> None: diff --git a/opentelemetry-api/src/opentelemetry/metrics/_internal/observation.py b/opentelemetry-api/src/opentelemetry/metrics/_internal/observation.py index 26f2e07914b..0ee7a311369 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/_internal/observation.py +++ b/opentelemetry-api/src/opentelemetry/metrics/_internal/observation.py @@ -19,7 +19,7 @@ class Observation: def __init__( self, - value: int | float, + value: float, attributes: Attributes = None, context: Context | None = None, ) -> None: diff --git a/opentelemetry-api/src/opentelemetry/propagate/__init__.py b/opentelemetry-api/src/opentelemetry/propagate/__init__.py index 7ef176c2485..ca0a1faffb6 100644 --- a/opentelemetry-api/src/opentelemetry/propagate/__init__.py +++ b/opentelemetry-api/src/opentelemetry/propagate/__init__.py @@ -114,12 +114,12 @@ def _load_propagators() -> textmap.TextMapPropagator: configured = environ.get(OTEL_PROPAGATORS) if not configured: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.baggage.propagation import ( # noqa: PLC0415 + from opentelemetry.baggage.propagation import ( W3CBaggagePropagator, ) # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.trace.propagation.tracecontext import ( # noqa: PLC0415 + from opentelemetry.trace.propagation.tracecontext import ( TraceContextTextMapPropagator, ) @@ -128,7 +128,7 @@ def _load_propagators() -> textmap.TextMapPropagator: ) # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.util._importlib_metadata import ( # noqa: PLC0415 + from opentelemetry.util._importlib_metadata import ( entry_points, ) diff --git a/opentelemetry-api/src/opentelemetry/trace/__init__.py b/opentelemetry-api/src/opentelemetry/trace/__init__.py index aec4bf4fec5..efddbaa66d3 100644 --- a/opentelemetry-api/src/opentelemetry/trace/__init__.py +++ b/opentelemetry-api/src/opentelemetry/trace/__init__.py @@ -645,23 +645,23 @@ def use_span( "INVALID_SPAN_CONTEXT", "INVALID_SPAN_ID", "INVALID_TRACE_ID", - "NonRecordingSpan", "Link", + "NonRecordingSpan", "Span", "SpanContext", "SpanKind", + "Status", + "StatusCode", "TraceFlags", "TraceState", - "TracerProvider", "Tracer", + "TracerProvider", "format_span_id", "format_trace_id", "get_current_span", "get_tracer", "get_tracer_provider", - "set_tracer_provider", "set_span_in_context", + "set_tracer_provider", "use_span", - "Status", - "StatusCode", ] diff --git a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py index 7e685f595d7..9822c2e74f7 100644 --- a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py +++ b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py @@ -52,12 +52,12 @@ def entry_points(**params) -> EntryPoints: __all__ = [ - "entry_points", - "version", + "Distribution", "EntryPoint", "EntryPoints", - "requires", - "Distribution", - "distributions", "PackageNotFoundError", + "distributions", + "entry_points", + "requires", + "version", ] diff --git a/opentelemetry-api/src/opentelemetry/util/_providers.py b/opentelemetry-api/src/opentelemetry/util/_providers.py index 37cc823e395..e77e5e45498 100644 --- a/opentelemetry-api/src/opentelemetry/util/_providers.py +++ b/opentelemetry-api/src/opentelemetry/util/_providers.py @@ -18,7 +18,7 @@ def _load_provider( provider_environment_variable: str, provider: str ) -> Provider: # type: ignore[type-var] # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.util._importlib_metadata import ( # noqa: PLC0415 + from opentelemetry.util._importlib_metadata import ( entry_points, ) diff --git a/opentelemetry-api/tests/logs/test_logger_provider.py b/opentelemetry-api/tests/logs/test_logger_provider.py index 71ba26a41e3..809c095113f 100644 --- a/opentelemetry-api/tests/logs/test_logger_provider.py +++ b/opentelemetry-api/tests/logs/test_logger_provider.py @@ -38,15 +38,15 @@ def test_get_logger_provider(self): logs_internal._LOGGER_PROVIDER = None - with patch.dict( - "os.environ", - {_OTEL_PYTHON_LOGGER_PROVIDER: "test_logger_provider"}, + with ( + patch.dict( + "os.environ", + {_OTEL_PYTHON_LOGGER_PROVIDER: "test_logger_provider"}, + ), + patch("opentelemetry._logs._internal._load_provider", Mock()), ): - with patch("opentelemetry._logs._internal._load_provider", Mock()): - with patch( - "opentelemetry._logs._internal.cast", - Mock(**{"return_value": "test_logger_provider"}), - ): - self.assertEqual( - get_logger_provider(), "test_logger_provider" - ) + with patch( + "opentelemetry._logs._internal.cast", + Mock(return_value="test_logger_provider"), + ): + self.assertEqual(get_logger_provider(), "test_logger_provider") diff --git a/opentelemetry-api/tests/metrics/test_meter_provider.py b/opentelemetry-api/tests/metrics/test_meter_provider.py index 3ea3e2041bc..02132b84181 100644 --- a/opentelemetry-api/tests/metrics/test_meter_provider.py +++ b/opentelemetry-api/tests/metrics/test_meter_provider.py @@ -88,15 +88,17 @@ def test_get_meter_provider(reset_meter_provider): metrics._METER_PROVIDER = None - with patch.dict( - "os.environ", {OTEL_PYTHON_METER_PROVIDER: "test_meter_provider"} + with ( + patch.dict( + "os.environ", {OTEL_PYTHON_METER_PROVIDER: "test_meter_provider"} + ), + patch("opentelemetry.metrics._internal._load_provider", Mock()), + patch( + "opentelemetry.metrics._internal.cast", + Mock(return_value="test_meter_provider"), + ), ): - with patch("opentelemetry.metrics._internal._load_provider", Mock()): - with patch( - "opentelemetry.metrics._internal.cast", - Mock(**{"return_value": "test_meter_provider"}), - ): - assert get_meter_provider() == "test_meter_provider" + assert get_meter_provider() == "test_meter_provider" class TestGetMeter(TestCase): diff --git a/opentelemetry-api/tests/propagators/test__envcarrier.py b/opentelemetry-api/tests/propagators/test__envcarrier.py index ca62bd5fd3a..900d8aebdd1 100644 --- a/opentelemetry-api/tests/propagators/test__envcarrier.py +++ b/opentelemetry-api/tests/propagators/test__envcarrier.py @@ -446,18 +446,16 @@ def test_case_handling(self): def test_fields(self, mock_get_current_span, mock_invalid_span_context): """Test that propagator.fields matches injected keys.""" # pylint: disable=import-outside-toplevel - from opentelemetry.trace.span import TraceState # noqa: PLC0415 + from opentelemetry.trace.span import TraceState mock_get_current_span.configure_mock( return_value=Mock( **{ "get_span_context.return_value": Mock( - **{ - "trace_id": 1, - "span_id": 2, - "trace_flags": 3, - "trace_state": TraceState([("a", "b")]), - } + trace_id=1, + span_id=2, + trace_flags=3, + trace_state=TraceState([("a", "b")]), ) } ) @@ -569,7 +567,7 @@ class TestEnvironmentCarrierWithCompositePropagator(unittest.TestCase): def setUp(self): # pylint: disable=import-outside-toplevel - from opentelemetry.propagators.composite import ( # noqa: PLC0415 + from opentelemetry.propagators.composite import ( CompositePropagator, ) diff --git a/opentelemetry-api/tests/propagators/test_propagators.py b/opentelemetry-api/tests/propagators/test_propagators.py index a4cc9739ee8..ce24cc16c0f 100644 --- a/opentelemetry-api/tests/propagators/test_propagators.py +++ b/opentelemetry-api/tests/propagators/test_propagators.py @@ -30,11 +30,11 @@ def test_propagators(propagators): ) mock_compositehttppropagator.configure_mock( - **{"side_effect": test_propagators} + side_effect=test_propagators ) # pylint: disable=import-outside-toplevel - import opentelemetry.propagate # noqa: PLC0415 + import opentelemetry.propagate reload(opentelemetry.propagate) @@ -51,11 +51,11 @@ def test_propagators(propagators): ) mock_compositehttppropagator.configure_mock( - **{"side_effect": test_propagators} + side_effect=test_propagators ) # pylint: disable=import-outside-toplevel - import opentelemetry.propagate # noqa: PLC0415 + import opentelemetry.propagate reload(opentelemetry.propagate) @@ -74,11 +74,11 @@ def test_propagators(propagators): ) mock_compositehttppropagator.configure_mock( - **{"side_effect": test_propagators} + side_effect=test_propagators ) # pylint: disable=import-outside-toplevel - import opentelemetry.propagate # noqa: PLC0415 + import opentelemetry.propagate reload(opentelemetry.propagate) @@ -89,48 +89,24 @@ def test_non_default_propagators( self, mock_entry_points, mock_compositehttppropagator ): mock_entry_points.configure_mock( - **{ - "side_effect": [ - [ - Mock( - **{ - "load.return_value": Mock( - **{"return_value": "a"} - ) - } - ), - ], - [ - Mock( - **{ - "load.return_value": Mock( - **{"return_value": "b"} - ) - } - ) - ], - [ - Mock( - **{ - "load.return_value": Mock( - **{"return_value": "c"} - ) - } - ) - ], - ] - } + side_effect=[ + [ + Mock(**{"load.return_value": Mock(return_value="a")}), + ], + [Mock(**{"load.return_value": Mock(return_value="b")})], + [Mock(**{"load.return_value": Mock(return_value="c")})], + ] ) def test_propagators(propagators): self.assertEqual(propagators, ["a", "b", "c"]) mock_compositehttppropagator.configure_mock( - **{"side_effect": test_propagators} + side_effect=test_propagators ) # pylint: disable=import-outside-toplevel - import opentelemetry.propagate # noqa: PLC0415 + import opentelemetry.propagate reload(opentelemetry.propagate) @@ -140,7 +116,7 @@ def test_propagators(propagators): def test_composite_propagators_error(self): with self.assertRaises(ValueError) as cm: # pylint: disable=import-outside-toplevel - import opentelemetry.propagate # noqa: PLC0415 + import opentelemetry.propagate reload(opentelemetry.propagate) diff --git a/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py b/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py index 87d410c5bee..7692860100f 100644 --- a/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py +++ b/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py @@ -237,12 +237,10 @@ def test_fields(self, mock_get_current_span, mock_invalid_span_context): return_value=Mock( **{ "get_span_context.return_value": Mock( - **{ - "trace_id": 1, - "span_id": 2, - "trace_flags": 3, - "trace_state": TraceState([("a", "b")]), - } + trace_id=1, + span_id=2, + trace_flags=3, + trace_state=TraceState([("a", "b")]), ) } ) diff --git a/opentelemetry-api/tests/util/test__providers.py b/opentelemetry-api/tests/util/test__providers.py index 73deea30484..c5c841fc81c 100644 --- a/opentelemetry-api/tests/util/test__providers.py +++ b/opentelemetry-api/tests/util/test__providers.py @@ -21,19 +21,11 @@ def test__providers(self, mock_entry_points): reload(_providers) mock_entry_points.configure_mock( - **{ - "side_effect": [ - [ - Mock( - **{ - "load.return_value": Mock( - **{"return_value": "a"} - ) - } - ), - ], - ] - } + side_effect=[ + [ + Mock(**{"load.return_value": Mock(return_value="a")}), + ], + ] ) self.assertEqual( diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py b/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py index 97deff88314..ba0118bba78 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py @@ -69,10 +69,10 @@ def _create_otlp_http_log_exporter( """Create an OTLP HTTP log exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.otlp.proto.http import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.http import ( # type: ignore[import-untyped] Compression, ) - from opentelemetry.exporter.otlp.proto.http._log_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.http._log_exporter import ( # type: ignore[import-untyped] OTLPLogExporter, ) except ImportError as exc: @@ -101,9 +101,9 @@ def _create_otlp_grpc_log_exporter( """Create an OTLP gRPC log exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - import grpc # type: ignore[import-untyped] # noqa: PLC0415 + import grpc # type: ignore[import-untyped] - from opentelemetry.exporter.otlp.proto.grpc._log_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.grpc._log_exporter import ( # type: ignore[import-untyped] OTLPLogExporter, ) except ImportError as exc: @@ -130,7 +130,7 @@ def _create_otlp_file_development_log_exporter( """Create an OTLP file (JSON Lines) log exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.otlp.json.file._log_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.json.file._log_exporter import ( # type: ignore[import-untyped] FileLogExporter, ) except ImportError as exc: diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py b/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py index 23db41f2078..7c13e19c5d7 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py @@ -286,10 +286,10 @@ def _create_otlp_http_metric_exporter( """Create an OTLP HTTP metric exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.otlp.proto.http import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.http import ( # type: ignore[import-untyped] Compression, ) - from opentelemetry.exporter.otlp.proto.http.metric_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.http.metric_exporter import ( # type: ignore[import-untyped] OTLPMetricExporter, ) except ImportError as exc: @@ -324,9 +324,9 @@ def _create_otlp_grpc_metric_exporter( """Create an OTLP gRPC metric exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - import grpc # type: ignore[import-untyped] # noqa: PLC0415 + import grpc # type: ignore[import-untyped] - from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import ( # type: ignore[import-untyped] OTLPMetricExporter, ) except ImportError as exc: @@ -359,7 +359,7 @@ def _create_otlp_file_development_metric_exporter( """Create an OTLP file (JSON Lines) metric exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.otlp.json.file.metric_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.json.file.metric_exporter import ( # type: ignore[import-untyped] FileMetricExporter, ) except ImportError as exc: @@ -456,7 +456,7 @@ def _create_prometheus_metric_reader( """ try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.prometheus import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.prometheus import ( # type: ignore[import-untyped] PrometheusMetricReader, start_http_server, ) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py b/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py index c65b659f4c2..5871f5b0bb0 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py @@ -112,10 +112,10 @@ def _create_otlp_http_span_exporter( """Create an OTLP HTTP span exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.otlp.proto.http import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.http import ( # type: ignore[import-untyped] Compression, ) - from opentelemetry.exporter.otlp.proto.http.trace_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.http.trace_exporter import ( # type: ignore[import-untyped] OTLPSpanExporter, ) except ImportError as exc: @@ -144,9 +144,9 @@ def _create_otlp_grpc_span_exporter( """Create an OTLP gRPC span exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - import grpc # type: ignore[import-untyped] # noqa: PLC0415 + import grpc # type: ignore[import-untyped] - from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( # type: ignore[import-untyped] OTLPSpanExporter, ) except ImportError as exc: @@ -173,7 +173,7 @@ def _create_otlp_file_development_span_exporter( """Create an OTLP file (JSON Lines) span exporter from config.""" try: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.exporter.otlp.json.file.trace_exporter import ( # type: ignore[import-untyped] # noqa: PLC0415 + from opentelemetry.exporter.otlp.json.file.trace_exporter import ( # type: ignore[import-untyped] FileSpanExporter, ) except ImportError as exc: diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/file/__init__.py b/opentelemetry-configuration/src/opentelemetry/configuration/file/__init__.py index 2c8c4ba48e6..abcda17e2b7 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/file/__init__.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/file/__init__.py @@ -41,18 +41,18 @@ from opentelemetry.configuration.file._loader import load_config_file __all__ = [ - "load_config_file", - "configure_sdk", - "substitute_env_vars", "ConfigurationError", "MissingDependencyError", - "create_resource", - "create_propagator", - "configure_propagator", - "create_logger_provider", "configure_logger_provider", - "create_tracer_provider", + "configure_meter_provider", + "configure_propagator", + "configure_sdk", "configure_tracer_provider", + "create_logger_provider", "create_meter_provider", - "configure_meter_provider", + "create_propagator", + "create_resource", + "create_tracer_provider", + "load_config_file", + "substitute_env_vars", ] diff --git a/opentelemetry-configuration/tests/test_common.py b/opentelemetry-configuration/tests/test_common.py index b4a9cc4745e..bebe875e3b7 100644 --- a/opentelemetry-configuration/tests/test_common.py +++ b/opentelemetry-configuration/tests/test_common.py @@ -103,24 +103,28 @@ def test_returns_loaded_class(self): self.assertIs(result, mock_class) def test_raises_when_not_found(self): - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[], + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - load_entry_point("some_group", "missing") + load_entry_point("some_group", "missing") self.assertIn("missing", str(ctx.exception)) self.assertIn("some_group", str(ctx.exception)) def test_wraps_load_exception_in_configuration_error(self): mock_ep = MagicMock() mock_ep.load.side_effect = ImportError("bad import") - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[mock_ep], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[mock_ep], + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - load_entry_point("some_group", "some_name") + load_entry_point("some_group", "some_name") self.assertIn("bad import", str(ctx.exception)) def test_instantiation_error_not_wrapped(self): diff --git a/opentelemetry-configuration/tests/test_logger_provider.py b/opentelemetry-configuration/tests/test_logger_provider.py index 4aadcd1a104..234c451baab 100644 --- a/opentelemetry-configuration/tests/test_logger_provider.py +++ b/opentelemetry-configuration/tests/test_logger_provider.py @@ -239,56 +239,64 @@ def test_plugin_log_exporter_loaded_via_entry_point(self): self.assertIs(result, mock_exporter) def test_unknown_log_exporter_raises_configuration_error(self): - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[], + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - # pylint: disable=unexpected-keyword-arg - _create_log_record_exporter( - LogRecordExporterConfig(no_such_exporter={}) - ) + # pylint: disable=unexpected-keyword-arg + _create_log_record_exporter( + LogRecordExporterConfig(no_such_exporter={}) + ) def test_otlp_http_missing_package_raises(self): config = LogRecordExporterConfig( otlp_http=OtlpHttpExporterConfig(endpoint="http://localhost:4318") ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.proto.http": None, - "opentelemetry.exporter.otlp.proto.http._log_exporter": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.proto.http": None, + "opentelemetry.exporter.otlp.proto.http._log_exporter": None, + }, + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - _create_log_record_exporter(config) + _create_log_record_exporter(config) def test_otlp_grpc_missing_package_raises(self): config = LogRecordExporterConfig( otlp_grpc=OtlpGrpcExporterConfig(endpoint="http://localhost:4317") ) - with patch.dict( - sys.modules, - { - "grpc": None, - "opentelemetry.exporter.otlp.proto.grpc._log_exporter": None, - }, + with ( + patch.dict( + sys.modules, + { + "grpc": None, + "opentelemetry.exporter.otlp.proto.grpc._log_exporter": None, + }, + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - _create_log_record_exporter(config) + _create_log_record_exporter(config) def test_otlp_file_development_missing_package_raises(self): config = LogRecordExporterConfig( otlp_file_development=ExperimentalOtlpFileExporterConfig() ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.json.file._log_exporter": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.json.file._log_exporter": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - _create_log_record_exporter(config) + _create_log_record_exporter(config) self.assertIn( "opentelemetry-exporter-otlp-json-file", str(ctx.exception) ) diff --git a/opentelemetry-configuration/tests/test_meter_provider.py b/opentelemetry-configuration/tests/test_meter_provider.py index 691df236377..778c20c6c24 100644 --- a/opentelemetry-configuration/tests/test_meter_provider.py +++ b/opentelemetry-configuration/tests/test_meter_provider.py @@ -242,15 +242,17 @@ def test_otlp_http_missing_package_raises(self): config = self._make_periodic_config( PushMetricExporterConfig(otlp_http=OtlpHttpMetricExporterConfig()) ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.proto.http.metric_exporter": None, - "opentelemetry.exporter.otlp.proto.http": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.proto.http.metric_exporter": None, + "opentelemetry.exporter.otlp.proto.http": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - create_meter_provider(config) + create_meter_provider(config) self.assertIn("otlp-proto-http", str(ctx.exception)) def test_otlp_http_created_with_endpoint(self): @@ -315,15 +317,17 @@ def test_otlp_grpc_missing_package_raises(self): config = self._make_periodic_config( PushMetricExporterConfig(otlp_grpc=OtlpGrpcMetricExporterConfig()) ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.proto.grpc.metric_exporter": None, - "grpc": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.proto.grpc.metric_exporter": None, + "grpc": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - create_meter_provider(config) + create_meter_provider(config) self.assertIn("otlp-proto-grpc", str(ctx.exception)) def test_otlp_file_development_missing_package_raises(self): @@ -332,14 +336,16 @@ def test_otlp_file_development_missing_package_raises(self): otlp_file_development=ExperimentalOtlpFileMetricExporterConfig() ) ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.json.file.metric_exporter": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.json.file.metric_exporter": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - create_meter_provider(config) + create_meter_provider(config) self.assertIn( "opentelemetry-exporter-otlp-json-file", str(ctx.exception) ) diff --git a/opentelemetry-configuration/tests/test_resource.py b/opentelemetry-configuration/tests/test_resource.py index c2147df09c8..b93b1a7b884 100644 --- a/opentelemetry-configuration/tests/test_resource.py +++ b/opentelemetry-configuration/tests/test_resource.py @@ -515,12 +515,14 @@ def test_container_detector_not_run_when_detectors_list_empty(self): def test_container_detector_raises_when_package_missing(self): """ConfigurationError is raised when the contrib entry point is not found.""" - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[], + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - create_resource(self._config_with_container()) + create_resource(self._config_with_container()) def test_container_detector_uses_contrib_when_available(self): """When the contrib entry point is registered, container.id is detected.""" @@ -659,9 +661,11 @@ def test_unknown_detector_raises_configuration_error(self): detectors=[ExperimentalResourceDetector(no_such_detector={})] ) ) - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[], + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - create_resource(config) + create_resource(config) diff --git a/opentelemetry-configuration/tests/test_sdk.py b/opentelemetry-configuration/tests/test_sdk.py index 58ea84d2c06..d435ea6edb4 100644 --- a/opentelemetry-configuration/tests/test_sdk.py +++ b/opentelemetry-configuration/tests/test_sdk.py @@ -109,7 +109,7 @@ def test_disabled_skips_everything( @patch("opentelemetry.configuration._sdk.create_resource") def test_absent_sections_pass_none( self, - mock_create_resource, # noqa: ARG002 + mock_create_resource, mock_tracer, mock_meter, mock_logger, diff --git a/opentelemetry-configuration/tests/test_tracer_provider.py b/opentelemetry-configuration/tests/test_tracer_provider.py index 492f0a83d0c..aa04f64d230 100644 --- a/opentelemetry-configuration/tests/test_tracer_provider.py +++ b/opentelemetry-configuration/tests/test_tracer_provider.py @@ -295,13 +295,15 @@ def test_user_defined_sampler_loaded_via_entry_point(self): self.assertIs(provider.sampler, mock_sampler) def test_user_defined_sampler_not_found_raises_configuration_error(self): - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[], + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - # pylint: disable=unexpected-keyword-arg - self._make_provider(SamplerConfig(no_such_sampler={})) + # pylint: disable=unexpected-keyword-arg + self._make_provider(SamplerConfig(no_such_sampler={})) class TestCreateCompositeRuleBasedSampler(unittest.TestCase): @@ -607,15 +609,17 @@ def test_otlp_http_missing_package_raises(self): config = self._make_batch_config( SpanExporterConfig(otlp_http=OtlpHttpExporterConfig()) ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.proto.http.trace_exporter": None, - "opentelemetry.exporter.otlp.proto.http": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.proto.http.trace_exporter": None, + "opentelemetry.exporter.otlp.proto.http": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - create_tracer_provider(config) + create_tracer_provider(config) self.assertIn("otlp-proto-http", str(ctx.exception)) def test_otlp_http_created_with_endpoint(self): @@ -709,14 +713,16 @@ def test_otlp_file_development_missing_package_raises(self): otlp_file_development=ExperimentalOtlpFileExporterConfig() ) ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.json.file.trace_exporter": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.json.file.trace_exporter": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - create_tracer_provider(config) + create_tracer_provider(config) self.assertIn( "opentelemetry-exporter-otlp-json-file", str(ctx.exception) ) @@ -790,15 +796,17 @@ def test_otlp_grpc_missing_package_raises(self): config = self._make_batch_config( SpanExporterConfig(otlp_grpc=OtlpGrpcExporterConfig()) ) - with patch.dict( - sys.modules, - { - "opentelemetry.exporter.otlp.proto.grpc.trace_exporter": None, - "grpc": None, - }, + with ( + patch.dict( + sys.modules, + { + "opentelemetry.exporter.otlp.proto.grpc.trace_exporter": None, + "grpc": None, + }, + ), + self.assertRaises(ConfigurationError) as ctx, ): - with self.assertRaises(ConfigurationError) as ctx: - create_tracer_provider(config) + create_tracer_provider(config) self.assertIn("otlp-proto-grpc", str(ctx.exception)) def test_no_processor_type_raises(self): @@ -929,13 +937,15 @@ def test_plugin_id_generator_loaded_via_entry_point(self): def test_unknown_id_generator_raises_configuration_error(self): """Unknown id_generator name with no matching entry point raises ConfigurationError.""" - with patch( - "opentelemetry.configuration._common.entry_points", - return_value=[], + with ( + patch( + "opentelemetry.configuration._common.entry_points", + return_value=[], + ), + self.assertRaises(ConfigurationError), ): - with self.assertRaises(ConfigurationError): - # pylint: disable=unexpected-keyword-arg - self._make_provider(IdGeneratorConfig(no_such_generator={})) + # pylint: disable=unexpected-keyword-arg + self._make_provider(IdGeneratorConfig(no_such_generator={})) def test_empty_id_generator_raises_configuration_error(self): """Empty IdGenerator config (no type specified) raises ConfigurationError.""" diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/_json_codec.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/_json_codec.py index 72c315d1eaa..69f74ed657f 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/_json_codec.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/_json_codec.py @@ -10,6 +10,8 @@ import math import typing +from typing_extensions import Self + T = typing.TypeVar("T") M = typing.TypeVar("M", bound="JsonMessage") @@ -39,7 +41,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls: type[M], data: str | bytes) -> M: + def from_json(cls, data: str | bytes) -> Self: """ Deserialize from a JSON string or bytes. """ @@ -179,7 +181,7 @@ def decode_int64(value: int | str | None, field_name: str) -> int: ) from None -def decode_float(value: float | int | str | None, field_name: str) -> float: +def decode_float(value: float | str | None, field_name: str) -> float: """ Parse float/double from number or string, handling special values. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/logs/v1/logs_service.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/logs/v1/logs_service.py index 899c965fa3c..eea5f8f5037 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/logs/v1/logs_service.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/logs/v1/logs_service.py @@ -39,7 +39,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportLogsServiceRequest": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportLogsServiceRequest: """ Create from a dictionary with lowerCamelCase keys. @@ -80,7 +80,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportLogsServiceResponse": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportLogsServiceResponse: """ Create from a dictionary with lowerCamelCase keys. @@ -124,7 +124,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportLogsPartialSuccess": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportLogsPartialSuccess: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/metrics/v1/metrics_service.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/metrics/v1/metrics_service.py index 6537d1031f4..462b85da818 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/metrics/v1/metrics_service.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/metrics/v1/metrics_service.py @@ -39,7 +39,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportMetricsServiceRequest": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportMetricsServiceRequest: """ Create from a dictionary with lowerCamelCase keys. @@ -80,7 +80,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportMetricsServiceResponse": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportMetricsServiceResponse: """ Create from a dictionary with lowerCamelCase keys. @@ -124,7 +124,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportMetricsPartialSuccess": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportMetricsPartialSuccess: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/profiles/v1development/profiles_service.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/profiles/v1development/profiles_service.py index faaaa6105c1..cdb76f5b812 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/profiles/v1development/profiles_service.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/profiles/v1development/profiles_service.py @@ -42,7 +42,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportProfilesServiceRequest": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportProfilesServiceRequest: """ Create from a dictionary with lowerCamelCase keys. @@ -85,7 +85,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportProfilesServiceResponse": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportProfilesServiceResponse: """ Create from a dictionary with lowerCamelCase keys. @@ -129,7 +129,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportProfilesPartialSuccess": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportProfilesPartialSuccess: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/trace/v1/trace_service.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/trace/v1/trace_service.py index 27d3a1a1e0a..3ee11dac0a0 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/trace/v1/trace_service.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/collector/trace/v1/trace_service.py @@ -39,7 +39,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportTraceServiceRequest": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportTraceServiceRequest: """ Create from a dictionary with lowerCamelCase keys. @@ -80,7 +80,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportTraceServiceResponse": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportTraceServiceResponse: """ Create from a dictionary with lowerCamelCase keys. @@ -124,7 +124,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExportTracePartialSuccess": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExportTracePartialSuccess: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/common/v1/common.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/common/v1/common.py index 6942227f98b..7f229be74c6 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/common/v1/common.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/common/v1/common.py @@ -59,7 +59,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "AnyValue": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> AnyValue: """ Create from a dictionary with lowerCamelCase keys. @@ -117,7 +117,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ArrayValue": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ArrayValue: """ Create from a dictionary with lowerCamelCase keys. @@ -158,7 +158,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "KeyValueList": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> KeyValueList: """ Create from a dictionary with lowerCamelCase keys. @@ -205,7 +205,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "KeyValue": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> KeyValue: """ Create from a dictionary with lowerCamelCase keys. @@ -261,7 +261,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "InstrumentationScope": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> InstrumentationScope: """ Create from a dictionary with lowerCamelCase keys. @@ -320,7 +320,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "EntityRef": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> EntityRef: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/logs/v1/logs.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/logs/v1/logs.py index e978df472f3..c0aa87b33d0 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/logs/v1/logs.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/logs/v1/logs.py @@ -82,7 +82,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "LogsData": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> LogsData: """ Create from a dictionary with lowerCamelCase keys. @@ -129,7 +129,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ResourceLogs": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ResourceLogs: """ Create from a dictionary with lowerCamelCase keys. @@ -181,7 +181,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ScopeLogs": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ScopeLogs: """ Create from a dictionary with lowerCamelCase keys. @@ -257,7 +257,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "LogRecord": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> LogRecord: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/metrics/v1/metrics.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/metrics/v1/metrics.py index a5f63651352..32a4267eb5b 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/metrics/v1/metrics.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/metrics/v1/metrics.py @@ -60,7 +60,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "MetricsData": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> MetricsData: """ Create from a dictionary with lowerCamelCase keys. @@ -107,7 +107,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ResourceMetrics": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ResourceMetrics: """ Create from a dictionary with lowerCamelCase keys. @@ -159,7 +159,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ScopeMetrics": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ScopeMetrics: """ Create from a dictionary with lowerCamelCase keys. @@ -229,7 +229,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Metric": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Metric: """ Create from a dictionary with lowerCamelCase keys. @@ -289,7 +289,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Gauge": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Gauge: """ Create from a dictionary with lowerCamelCase keys. @@ -336,7 +336,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Sum": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Sum: """ Create from a dictionary with lowerCamelCase keys. @@ -386,7 +386,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Histogram": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Histogram: """ Create from a dictionary with lowerCamelCase keys. @@ -433,7 +433,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExponentialHistogram": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExponentialHistogram: """ Create from a dictionary with lowerCamelCase keys. @@ -477,7 +477,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Summary": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Summary: """ Create from a dictionary with lowerCamelCase keys. @@ -536,7 +536,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "NumberDataPoint": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> NumberDataPoint: """ Create from a dictionary with lowerCamelCase keys. @@ -620,7 +620,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "HistogramDataPoint": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> HistogramDataPoint: """ Create from a dictionary with lowerCamelCase keys. @@ -692,7 +692,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExponentialHistogramDataPoint.Buckets": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExponentialHistogramDataPoint.Buckets: """ Create from a dictionary with lowerCamelCase keys. @@ -767,7 +767,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ExponentialHistogramDataPoint": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ExponentialHistogramDataPoint: """ Create from a dictionary with lowerCamelCase keys. @@ -846,7 +846,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "SummaryDataPoint.ValueAtQuantile": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> SummaryDataPoint.ValueAtQuantile: """ Create from a dictionary with lowerCamelCase keys. @@ -899,7 +899,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "SummaryDataPoint": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> SummaryDataPoint: """ Create from a dictionary with lowerCamelCase keys. @@ -968,7 +968,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Exemplar": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Exemplar: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/profiles/v1development/profiles.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/profiles/v1development/profiles.py index 3d3bd90d22f..6cc79192b6a 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/profiles/v1development/profiles.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/profiles/v1development/profiles.py @@ -58,7 +58,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ProfilesDictionary": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ProfilesDictionary: """ Create from a dictionary with lowerCamelCase keys. @@ -114,7 +114,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ProfilesData": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ProfilesData: """ Create from a dictionary with lowerCamelCase keys. @@ -163,7 +163,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ResourceProfiles": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ResourceProfiles: """ Create from a dictionary with lowerCamelCase keys. @@ -215,7 +215,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ScopeProfiles": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ScopeProfiles: """ Create from a dictionary with lowerCamelCase keys. @@ -291,7 +291,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Profile": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Profile: """ Create from a dictionary with lowerCamelCase keys. @@ -357,7 +357,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Link": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Link: """ Create from a dictionary with lowerCamelCase keys. @@ -403,7 +403,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ValueType": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ValueType: """ Create from a dictionary with lowerCamelCase keys. @@ -460,7 +460,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Sample": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Sample: """ Create from a dictionary with lowerCamelCase keys. @@ -523,7 +523,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Mapping": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Mapping: """ Create from a dictionary with lowerCamelCase keys. @@ -573,7 +573,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Stack": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Stack: """ Create from a dictionary with lowerCamelCase keys. @@ -623,7 +623,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Location": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Location: """ Create from a dictionary with lowerCamelCase keys. @@ -677,7 +677,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Line": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Line: """ Create from a dictionary with lowerCamelCase keys. @@ -732,7 +732,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Function": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Function: """ Create from a dictionary with lowerCamelCase keys. @@ -788,7 +788,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "KeyValueAndUnit": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> KeyValueAndUnit: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/resource/v1/resource.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/resource/v1/resource.py index 3c76082759f..4b0b764b768 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/resource/v1/resource.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/resource/v1/resource.py @@ -45,7 +45,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Resource": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Resource: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto-json/src/opentelemetry/proto_json/trace/v1/trace.py b/opentelemetry-proto-json/src/opentelemetry/proto_json/trace/v1/trace.py index 16112213715..ce6ec07138d 100644 --- a/opentelemetry-proto-json/src/opentelemetry/proto_json/trace/v1/trace.py +++ b/opentelemetry-proto-json/src/opentelemetry/proto_json/trace/v1/trace.py @@ -52,7 +52,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "TracesData": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> TracesData: """ Create from a dictionary with lowerCamelCase keys. @@ -99,7 +99,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ResourceSpans": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ResourceSpans: """ Create from a dictionary with lowerCamelCase keys. @@ -151,7 +151,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "ScopeSpans": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> ScopeSpans: """ Create from a dictionary with lowerCamelCase keys. @@ -226,7 +226,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Span.Event": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Span.Event: """ Create from a dictionary with lowerCamelCase keys. @@ -289,7 +289,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Span.Link": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Span.Link: """ Create from a dictionary with lowerCamelCase keys. @@ -380,7 +380,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Span": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Span: """ Create from a dictionary with lowerCamelCase keys. @@ -471,7 +471,7 @@ def to_dict(self) -> builtins.dict[builtins.str, typing.Any]: return _result @builtins.classmethod - def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> "Status": + def from_dict(cls, data: builtins.dict[builtins.str, typing.Any]) -> Status: """ Create from a dictionary with lowerCamelCase keys. diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py index 81f124f6303..c239b17c587 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/logs/v1/logs_service.proto # Protobuf Python Version: 5.26.1 @@ -7,12 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.logs.v1 import logs_pb2 as opentelemetry_dot_proto_dot_logs_dot_v1_dot_logs__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8opentelemetry/proto/collector/logs/v1/logs_service.proto\x12%opentelemetry.proto.collector.logs.v1\x1a&opentelemetry/proto/logs/v1/logs.proto\"\\\n\x18\x45xportLogsServiceRequest\x12@\n\rresource_logs\x18\x01 \x03(\x0b\x32).opentelemetry.proto.logs.v1.ResourceLogs\"u\n\x19\x45xportLogsServiceResponse\x12X\n\x0fpartial_success\x18\x01 \x01(\x0b\x32?.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\"O\n\x18\x45xportLogsPartialSuccess\x12\x1c\n\x14rejected_log_records\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\x9d\x01\n\x0bLogsService\x12\x8d\x01\n\x06\x45xport\x12?.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\x1a@.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\"\x00\x42\x98\x01\n(io.opentelemetry.proto.collector.logs.v1B\x10LogsServiceProtoP\x01Z0go.opentelemetry.io/proto/otlp/collector/logs/v1\xaa\x02%OpenTelemetry.Proto.Collector.Logs.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py index bb64c98fa25..f2c7982d46d 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py @@ -1,9 +1,12 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import grpc import warnings -from opentelemetry.proto.collector.logs.v1 import logs_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_logs_dot_v1_dot_logs__service__pb2 +import grpc + +from opentelemetry.proto.collector.logs.v1 import ( + logs_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_logs_dot_v1_dot_logs__service__pb2, +) GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -20,7 +23,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py depends on' + + ' but the generated code in opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -30,7 +33,7 @@ ) -class LogsServiceStub(object): +class LogsServiceStub: """Service that can be used to push logs between one Application instrumented with OpenTelemetry and an collector, or between an collector and a central collector (in this case logs are sent/received to/from multiple Applications). @@ -49,7 +52,7 @@ def __init__(self, channel): _registered_method=True) -class LogsServiceServicer(object): +class LogsServiceServicer: """Service that can be used to push logs between one Application instrumented with OpenTelemetry and an collector, or between an collector and a central collector (in this case logs are sent/received to/from multiple Applications). @@ -76,7 +79,7 @@ def add_LogsServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class LogsService(object): +class LogsService: """Service that can be used to push logs between one Application instrumented with OpenTelemetry and an collector, or between an collector and a central collector (in this case logs are sent/received to/from multiple Applications). diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py index 6083655c882..b89bf3b837c 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto # Protobuf Python Version: 5.26.1 @@ -7,12 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.metrics.v1 import metrics_pb2 as opentelemetry_dot_proto_dot_metrics_dot_v1_dot_metrics__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>opentelemetry/proto/collector/metrics/v1/metrics_service.proto\x12(opentelemetry.proto.collector.metrics.v1\x1a,opentelemetry/proto/metrics/v1/metrics.proto\"h\n\x1b\x45xportMetricsServiceRequest\x12I\n\x10resource_metrics\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetrics\"~\n\x1c\x45xportMetricsServiceResponse\x12^\n\x0fpartial_success\x18\x01 \x01(\x0b\x32\x45.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\"R\n\x1b\x45xportMetricsPartialSuccess\x12\x1c\n\x14rejected_data_points\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xac\x01\n\x0eMetricsService\x12\x99\x01\n\x06\x45xport\x12\x45.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\x1a\x46.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"\x00\x42\xa4\x01\n+io.opentelemetry.proto.collector.metrics.v1B\x13MetricsServiceProtoP\x01Z3go.opentelemetry.io/proto/otlp/collector/metrics/v1\xaa\x02(OpenTelemetry.Proto.Collector.Metrics.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py index f124bfe4adc..f822b797d90 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py @@ -1,9 +1,12 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import grpc import warnings -from opentelemetry.proto.collector.metrics.v1 import metrics_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_metrics_dot_v1_dot_metrics__service__pb2 +import grpc + +from opentelemetry.proto.collector.metrics.v1 import ( + metrics_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_metrics_dot_v1_dot_metrics__service__pb2, +) GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -20,7 +23,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py depends on' + + ' but the generated code in opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -30,7 +33,7 @@ ) -class MetricsServiceStub(object): +class MetricsServiceStub: """Service that can be used to push metrics between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. @@ -49,7 +52,7 @@ def __init__(self, channel): _registered_method=True) -class MetricsServiceServicer(object): +class MetricsServiceServicer: """Service that can be used to push metrics between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. @@ -76,7 +79,7 @@ def add_MetricsServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class MetricsService(object): +class MetricsService: """Service that can be used to push metrics between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py index 9e2f6198299..e91f599f2da 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/profiles/v1development/profiles_service.proto # Protobuf Python Version: 5.26.1 @@ -7,12 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.profiles.v1development import profiles_pb2 as opentelemetry_dot_proto_dot_profiles_dot_v1development_dot_profiles__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nKopentelemetry/proto/collector/profiles/v1development/profiles_service.proto\x12\x34opentelemetry.proto.collector.profiles.v1development\x1a\x39opentelemetry/proto/profiles/v1development/profiles.proto\"\xcb\x01\n\x1c\x45xportProfilesServiceRequest\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\x12R\n\ndictionary\x18\x02 \x01(\x0b\x32>.opentelemetry.proto.profiles.v1development.ProfilesDictionary\"\x8c\x01\n\x1d\x45xportProfilesServiceResponse\x12k\n\x0fpartial_success\x18\x01 \x01(\x0b\x32R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess\"P\n\x1c\x45xportProfilesPartialSuccess\x12\x19\n\x11rejected_profiles\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xc7\x01\n\x0fProfilesService\x12\xb3\x01\n\x06\x45xport\x12R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest\x1aS.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse\"\x00\x42\xc9\x01\n7io.opentelemetry.proto.collector.profiles.v1developmentB\x14ProfilesServiceProtoP\x01Z?go.opentelemetry.io/proto/otlp/collector/profiles/v1development\xaa\x02\x34OpenTelemetry.Proto.Collector.Profiles.V1Developmentb\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py index 3742ae591e3..054769d4923 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py @@ -1,9 +1,12 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import grpc import warnings -from opentelemetry.proto.collector.profiles.v1development import profiles_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_profiles_dot_v1development_dot_profiles__service__pb2 +import grpc + +from opentelemetry.proto.collector.profiles.v1development import ( + profiles_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_profiles_dot_v1development_dot_profiles__service__pb2, +) GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -20,7 +23,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py depends on' + + ' but the generated code in opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -30,7 +33,7 @@ ) -class ProfilesServiceStub(object): +class ProfilesServiceStub: """Service that can be used to push profiles between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. """ @@ -48,7 +51,7 @@ def __init__(self, channel): _registered_method=True) -class ProfilesServiceServicer(object): +class ProfilesServiceServicer: """Service that can be used to push profiles between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. """ @@ -74,7 +77,7 @@ def add_ProfilesServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class ProfilesService(object): +class ProfilesService: """Service that can be used to push profiles between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. """ diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py index c0ad62bfdbd..5e634713c01 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/trace/v1/trace_service.proto # Protobuf Python Version: 5.26.1 @@ -7,12 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.trace.v1 import trace_pb2 as opentelemetry_dot_proto_dot_trace_dot_v1_dot_trace__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:opentelemetry/proto/collector/trace/v1/trace_service.proto\x12&opentelemetry.proto.collector.trace.v1\x1a(opentelemetry/proto/trace/v1/trace.proto\"`\n\x19\x45xportTraceServiceRequest\x12\x43\n\x0eresource_spans\x18\x01 \x03(\x0b\x32+.opentelemetry.proto.trace.v1.ResourceSpans\"x\n\x1a\x45xportTraceServiceResponse\x12Z\n\x0fpartial_success\x18\x01 \x01(\x0b\x32\x41.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\"J\n\x19\x45xportTracePartialSuccess\x12\x16\n\x0erejected_spans\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xa2\x01\n\x0cTraceService\x12\x91\x01\n\x06\x45xport\x12\x41.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\x1a\x42.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\"\x00\x42\x9c\x01\n)io.opentelemetry.proto.collector.trace.v1B\x11TraceServiceProtoP\x01Z1go.opentelemetry.io/proto/otlp/collector/trace/v1\xaa\x02&OpenTelemetry.Proto.Collector.Trace.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py index f1cdf0355b4..0fb827a8e21 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py @@ -1,9 +1,12 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import grpc import warnings -from opentelemetry.proto.collector.trace.v1 import trace_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_trace_dot_v1_dot_trace__service__pb2 +import grpc + +from opentelemetry.proto.collector.trace.v1 import ( + trace_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_trace_dot_v1_dot_trace__service__pb2, +) GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -20,7 +23,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + f' but the generated code in opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py depends on' + + ' but the generated code in opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -30,7 +33,7 @@ ) -class TraceServiceStub(object): +class TraceServiceStub: """Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). @@ -49,7 +52,7 @@ def __init__(self, channel): _registered_method=True) -class TraceServiceServicer(object): +class TraceServiceServicer: """Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). @@ -76,7 +79,7 @@ def add_TraceServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class TraceService(object): +class TraceService: """Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). diff --git a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py index 1e816f201f8..dde38b5b445 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/common/v1/common.proto # Protobuf Python Version: 5.26.1 @@ -7,6 +6,7 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py index 3fe64e28961..d8a9a5c5a7c 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/logs/v1/logs.proto # Protobuf Python Version: 5.26.1 @@ -7,13 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 -from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&opentelemetry/proto/logs/v1/logs.proto\x12\x1bopentelemetry.proto.logs.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"L\n\x08LogsData\x12@\n\rresource_logs\x18\x01 \x03(\x0b\x32).opentelemetry.proto.logs.v1.ResourceLogs\"\xa3\x01\n\x0cResourceLogs\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12:\n\nscope_logs\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.logs.v1.ScopeLogs\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xa0\x01\n\tScopeLogs\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12;\n\x0blog_records\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.logs.v1.LogRecord\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\x83\x03\n\tLogRecord\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x1f\n\x17observed_time_unix_nano\x18\x0b \x01(\x06\x12\x44\n\x0fseverity_number\x18\x02 \x01(\x0e\x32+.opentelemetry.proto.logs.v1.SeverityNumber\x12\x15\n\rseverity_text\x18\x03 \x01(\t\x12\x35\n\x04\x62ody\x18\x05 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\x12;\n\nattributes\x18\x06 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x07 \x01(\r\x12\r\n\x05\x66lags\x18\x08 \x01(\x07\x12\x10\n\x08trace_id\x18\t \x01(\x0c\x12\x0f\n\x07span_id\x18\n \x01(\x0c\x12\x12\n\nevent_name\x18\x0c \x01(\tJ\x04\x08\x04\x10\x05*\xc3\x05\n\x0eSeverityNumber\x12\x1f\n\x1bSEVERITY_NUMBER_UNSPECIFIED\x10\x00\x12\x19\n\x15SEVERITY_NUMBER_TRACE\x10\x01\x12\x1a\n\x16SEVERITY_NUMBER_TRACE2\x10\x02\x12\x1a\n\x16SEVERITY_NUMBER_TRACE3\x10\x03\x12\x1a\n\x16SEVERITY_NUMBER_TRACE4\x10\x04\x12\x19\n\x15SEVERITY_NUMBER_DEBUG\x10\x05\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG2\x10\x06\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG3\x10\x07\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG4\x10\x08\x12\x18\n\x14SEVERITY_NUMBER_INFO\x10\t\x12\x19\n\x15SEVERITY_NUMBER_INFO2\x10\n\x12\x19\n\x15SEVERITY_NUMBER_INFO3\x10\x0b\x12\x19\n\x15SEVERITY_NUMBER_INFO4\x10\x0c\x12\x18\n\x14SEVERITY_NUMBER_WARN\x10\r\x12\x19\n\x15SEVERITY_NUMBER_WARN2\x10\x0e\x12\x19\n\x15SEVERITY_NUMBER_WARN3\x10\x0f\x12\x19\n\x15SEVERITY_NUMBER_WARN4\x10\x10\x12\x19\n\x15SEVERITY_NUMBER_ERROR\x10\x11\x12\x1a\n\x16SEVERITY_NUMBER_ERROR2\x10\x12\x12\x1a\n\x16SEVERITY_NUMBER_ERROR3\x10\x13\x12\x1a\n\x16SEVERITY_NUMBER_ERROR4\x10\x14\x12\x19\n\x15SEVERITY_NUMBER_FATAL\x10\x15\x12\x1a\n\x16SEVERITY_NUMBER_FATAL2\x10\x16\x12\x1a\n\x16SEVERITY_NUMBER_FATAL3\x10\x17\x12\x1a\n\x16SEVERITY_NUMBER_FATAL4\x10\x18*Y\n\x0eLogRecordFlags\x12\x1f\n\x1bLOG_RECORD_FLAGS_DO_NOT_USE\x10\x00\x12&\n!LOG_RECORD_FLAGS_TRACE_FLAGS_MASK\x10\xff\x01\x42s\n\x1eio.opentelemetry.proto.logs.v1B\tLogsProtoP\x01Z&go.opentelemetry.io/proto/otlp/logs/v1\xaa\x02\x1bOpenTelemetry.Proto.Logs.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py index a337a58476b..3dc3bdfad18 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/metrics/v1/metrics.proto # Protobuf Python Version: 5.26.1 @@ -7,13 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 -from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,opentelemetry/proto/metrics/v1/metrics.proto\x12\x1eopentelemetry.proto.metrics.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"X\n\x0bMetricsData\x12I\n\x10resource_metrics\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetrics\"\xaf\x01\n\x0fResourceMetrics\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12\x43\n\rscope_metrics\x18\x02 \x03(\x0b\x32,.opentelemetry.proto.metrics.v1.ScopeMetrics\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\x9f\x01\n\x0cScopeMetrics\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x37\n\x07metrics\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.metrics.v1.Metric\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xcd\x03\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04unit\x18\x03 \x01(\t\x12\x36\n\x05gauge\x18\x05 \x01(\x0b\x32%.opentelemetry.proto.metrics.v1.GaugeH\x00\x12\x32\n\x03sum\x18\x07 \x01(\x0b\x32#.opentelemetry.proto.metrics.v1.SumH\x00\x12>\n\thistogram\x18\t \x01(\x0b\x32).opentelemetry.proto.metrics.v1.HistogramH\x00\x12U\n\x15\x65xponential_histogram\x18\n \x01(\x0b\x32\x34.opentelemetry.proto.metrics.v1.ExponentialHistogramH\x00\x12:\n\x07summary\x18\x0b \x01(\x0b\x32\'.opentelemetry.proto.metrics.v1.SummaryH\x00\x12\x39\n\x08metadata\x18\x0c \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValueB\x06\n\x04\x64\x61taJ\x04\x08\x04\x10\x05J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\t\"M\n\x05Gauge\x12\x44\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.NumberDataPoint\"\xba\x01\n\x03Sum\x12\x44\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.NumberDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\x12\x14\n\x0cis_monotonic\x18\x03 \x01(\x08\"\xad\x01\n\tHistogram\x12G\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32\x32.opentelemetry.proto.metrics.v1.HistogramDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\"\xc3\x01\n\x14\x45xponentialHistogram\x12R\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32=.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\"P\n\x07Summary\x12\x45\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32\x30.opentelemetry.proto.metrics.v1.SummaryDataPoint\"\x86\x02\n\x0fNumberDataPoint\x12;\n\nattributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\x13\n\tas_double\x18\x04 \x01(\x01H\x00\x12\x10\n\x06\x61s_int\x18\x06 \x01(\x10H\x00\x12;\n\texemplars\x18\x05 \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\r\n\x05\x66lags\x18\x08 \x01(\rB\x07\n\x05valueJ\x04\x08\x01\x10\x02\"\xe6\x02\n\x12HistogramDataPoint\x12;\n\nattributes\x18\t \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x10\n\x03sum\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\rbucket_counts\x18\x06 \x03(\x06\x12\x17\n\x0f\x65xplicit_bounds\x18\x07 \x03(\x01\x12;\n\texemplars\x18\x08 \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\r\n\x05\x66lags\x18\n \x01(\r\x12\x10\n\x03min\x18\x0b \x01(\x01H\x01\x88\x01\x01\x12\x10\n\x03max\x18\x0c \x01(\x01H\x02\x88\x01\x01\x42\x06\n\x04_sumB\x06\n\x04_minB\x06\n\x04_maxJ\x04\x08\x01\x10\x02\"\xda\x04\n\x1d\x45xponentialHistogramDataPoint\x12;\n\nattributes\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x10\n\x03sum\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\r\n\x05scale\x18\x06 \x01(\x11\x12\x12\n\nzero_count\x18\x07 \x01(\x06\x12W\n\x08positive\x18\x08 \x01(\x0b\x32\x45.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\x12W\n\x08negative\x18\t \x01(\x0b\x32\x45.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\x12\r\n\x05\x66lags\x18\n \x01(\r\x12;\n\texemplars\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\x10\n\x03min\x18\x0c \x01(\x01H\x01\x88\x01\x01\x12\x10\n\x03max\x18\r \x01(\x01H\x02\x88\x01\x01\x12\x16\n\x0ezero_threshold\x18\x0e \x01(\x01\x1a\x30\n\x07\x42uckets\x12\x0e\n\x06offset\x18\x01 \x01(\x11\x12\x15\n\rbucket_counts\x18\x02 \x03(\x04\x42\x06\n\x04_sumB\x06\n\x04_minB\x06\n\x04_max\"\xc5\x02\n\x10SummaryDataPoint\x12;\n\nattributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12Y\n\x0fquantile_values\x18\x06 \x03(\x0b\x32@.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\x12\r\n\x05\x66lags\x18\x08 \x01(\r\x1a\x32\n\x0fValueAtQuantile\x12\x10\n\x08quantile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01J\x04\x08\x01\x10\x02\"\xc1\x01\n\x08\x45xemplar\x12\x44\n\x13\x66iltered_attributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x16\n\x0etime_unix_nano\x18\x02 \x01(\x06\x12\x13\n\tas_double\x18\x03 \x01(\x01H\x00\x12\x10\n\x06\x61s_int\x18\x06 \x01(\x10H\x00\x12\x0f\n\x07span_id\x18\x04 \x01(\x0c\x12\x10\n\x08trace_id\x18\x05 \x01(\x0c\x42\x07\n\x05valueJ\x04\x08\x01\x10\x02*\x8c\x01\n\x16\x41ggregationTemporality\x12\'\n#AGGREGATION_TEMPORALITY_UNSPECIFIED\x10\x00\x12!\n\x1d\x41GGREGATION_TEMPORALITY_DELTA\x10\x01\x12&\n\"AGGREGATION_TEMPORALITY_CUMULATIVE\x10\x02*^\n\x0e\x44\x61taPointFlags\x12\x1f\n\x1b\x44\x41TA_POINT_FLAGS_DO_NOT_USE\x10\x00\x12+\n\'DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK\x10\x01\x42\x7f\n!io.opentelemetry.proto.metrics.v1B\x0cMetricsProtoP\x01Z)go.opentelemetry.io/proto/otlp/metrics/v1\xaa\x02\x1eOpenTelemetry.Proto.Metrics.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py index f78c6abd713..a4106a12126 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/profiles/v1development/profiles.proto # Protobuf Python Version: 5.26.1 @@ -7,13 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 -from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n9opentelemetry/proto/profiles/v1development/profiles.proto\x12*opentelemetry.proto.profiles.v1development\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"\xf6\x03\n\x12ProfilesDictionary\x12J\n\rmapping_table\x18\x01 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Mapping\x12L\n\x0elocation_table\x18\x02 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Location\x12L\n\x0e\x66unction_table\x18\x03 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Function\x12\x44\n\nlink_table\x18\x04 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Link\x12\x14\n\x0cstring_table\x18\x05 \x03(\t\x12T\n\x0f\x61ttribute_table\x18\x06 \x03(\x0b\x32;.opentelemetry.proto.profiles.v1development.KeyValueAndUnit\x12\x46\n\x0bstack_table\x18\x07 \x03(\x0b\x32\x31.opentelemetry.proto.profiles.v1development.Stack\"\xbb\x01\n\x0cProfilesData\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\x12R\n\ndictionary\x18\x02 \x01(\x0b\x32>.opentelemetry.proto.profiles.v1development.ProfilesDictionary\"\xbe\x01\n\x10ResourceProfiles\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12Q\n\x0escope_profiles\x18\x02 \x03(\x0b\x32\x39.opentelemetry.proto.profiles.v1development.ScopeProfiles\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xae\x01\n\rScopeProfiles\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x45\n\x08profiles\x18\x02 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Profile\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xb1\x03\n\x07Profile\x12J\n\x0bsample_type\x18\x01 \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x43\n\x07samples\x18\x02 \x03(\x0b\x32\x32.opentelemetry.proto.profiles.v1development.Sample\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\x15\n\rduration_nano\x18\x04 \x01(\x04\x12J\n\x0bperiod_type\x18\x05 \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x0e\n\x06period\x18\x06 \x01(\x03\x12\x12\n\nprofile_id\x18\x07 \x01(\x0c\x12 \n\x18\x64ropped_attributes_count\x18\x08 \x01(\r\x12\x1f\n\x17original_payload_format\x18\t \x01(\t\x12\x18\n\x10original_payload\x18\n \x01(\x0c\x12\x19\n\x11\x61ttribute_indices\x18\x0b \x03(\x05\")\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\"9\n\tValueType\x12\x15\n\rtype_strindex\x18\x01 \x01(\x05\x12\x15\n\runit_strindex\x18\x02 \x01(\x05\"z\n\x06Sample\x12\x13\n\x0bstack_index\x18\x01 \x01(\x05\x12\x19\n\x11\x61ttribute_indices\x18\x02 \x03(\x05\x12\x12\n\nlink_index\x18\x03 \x01(\x05\x12\x0e\n\x06values\x18\x04 \x03(\x03\x12\x1c\n\x14timestamps_unix_nano\x18\x05 \x03(\x06\"\x80\x01\n\x07Mapping\x12\x14\n\x0cmemory_start\x18\x01 \x01(\x04\x12\x14\n\x0cmemory_limit\x18\x02 \x01(\x04\x12\x13\n\x0b\x66ile_offset\x18\x03 \x01(\x04\x12\x19\n\x11\x66ilename_strindex\x18\x04 \x01(\x05\x12\x19\n\x11\x61ttribute_indices\x18\x05 \x03(\x05\"!\n\x05Stack\x12\x18\n\x10location_indices\x18\x01 \x03(\x05\"\x8e\x01\n\x08Location\x12\x15\n\rmapping_index\x18\x01 \x01(\x05\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x04\x12?\n\x05lines\x18\x03 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Line\x12\x19\n\x11\x61ttribute_indices\x18\x04 \x03(\x05\"<\n\x04Line\x12\x16\n\x0e\x66unction_index\x18\x01 \x01(\x05\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\x03\"n\n\x08\x46unction\x12\x15\n\rname_strindex\x18\x01 \x01(\x05\x12\x1c\n\x14system_name_strindex\x18\x02 \x01(\x05\x12\x19\n\x11\x66ilename_strindex\x18\x03 \x01(\x05\x12\x12\n\nstart_line\x18\x04 \x01(\x03\"v\n\x0fKeyValueAndUnit\x12\x14\n\x0ckey_strindex\x18\x01 \x01(\x05\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\x12\x15\n\runit_strindex\x18\x03 \x01(\x05\x42\xa4\x01\n-io.opentelemetry.proto.profiles.v1developmentB\rProfilesProtoP\x01Z5go.opentelemetry.io/proto/otlp/profiles/v1development\xaa\x02*OpenTelemetry.Proto.Profiles.V1Developmentb\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py index f7066fcf7ac..93176487575 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/resource/v1/resource.proto # Protobuf Python Version: 5.26.1 @@ -7,12 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.opentelemetry/proto/resource/v1/resource.proto\x12\x1fopentelemetry.proto.resource.v1\x1a*opentelemetry/proto/common/v1/common.proto\"\xa8\x01\n\x08Resource\x12;\n\nattributes\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x02 \x01(\r\x12=\n\x0b\x65ntity_refs\x18\x03 \x03(\x0b\x32(.opentelemetry.proto.common.v1.EntityRefB\x83\x01\n\"io.opentelemetry.proto.resource.v1B\rResourceProtoP\x01Z*go.opentelemetry.io/proto/otlp/resource/v1\xaa\x02\x1fOpenTelemetry.Proto.Resource.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py index 61a2d0fadd1..aebff91d6a0 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/trace/v1/trace.proto # Protobuf Python Version: 5.26.1 @@ -7,13 +6,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 -from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(opentelemetry/proto/trace/v1/trace.proto\x12\x1copentelemetry.proto.trace.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"Q\n\nTracesData\x12\x43\n\x0eresource_spans\x18\x01 \x03(\x0b\x32+.opentelemetry.proto.trace.v1.ResourceSpans\"\xa7\x01\n\rResourceSpans\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12=\n\x0bscope_spans\x18\x02 \x03(\x0b\x32(.opentelemetry.proto.trace.v1.ScopeSpans\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\x97\x01\n\nScopeSpans\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x31\n\x05spans\x18\x02 \x03(\x0b\x32\".opentelemetry.proto.trace.v1.Span\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\x84\x08\n\x04Span\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12\x16\n\x0eparent_span_id\x18\x04 \x01(\x0c\x12\r\n\x05\x66lags\x18\x10 \x01(\x07\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x39\n\x04kind\x18\x06 \x01(\x0e\x32+.opentelemetry.proto.trace.v1.Span.SpanKind\x12\x1c\n\x14start_time_unix_nano\x18\x07 \x01(\x06\x12\x1a\n\x12\x65nd_time_unix_nano\x18\x08 \x01(\x06\x12;\n\nattributes\x18\t \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\n \x01(\r\x12\x38\n\x06\x65vents\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.trace.v1.Span.Event\x12\x1c\n\x14\x64ropped_events_count\x18\x0c \x01(\r\x12\x36\n\x05links\x18\r \x03(\x0b\x32\'.opentelemetry.proto.trace.v1.Span.Link\x12\x1b\n\x13\x64ropped_links_count\x18\x0e \x01(\r\x12\x34\n\x06status\x18\x0f \x01(\x0b\x32$.opentelemetry.proto.trace.v1.Status\x1a\x8c\x01\n\x05\x45vent\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x0c\n\x04name\x18\x02 \x01(\t\x12;\n\nattributes\x18\x03 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x04 \x01(\r\x1a\xac\x01\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12;\n\nattributes\x18\x04 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x05 \x01(\r\x12\r\n\x05\x66lags\x18\x06 \x01(\x07\"\x99\x01\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x16\n\x12SPAN_KIND_INTERNAL\x10\x01\x12\x14\n\x10SPAN_KIND_SERVER\x10\x02\x12\x14\n\x10SPAN_KIND_CLIENT\x10\x03\x12\x16\n\x12SPAN_KIND_PRODUCER\x10\x04\x12\x16\n\x12SPAN_KIND_CONSUMER\x10\x05\"\xae\x01\n\x06Status\x12\x0f\n\x07message\x18\x02 \x01(\t\x12=\n\x04\x63ode\x18\x03 \x01(\x0e\x32/.opentelemetry.proto.trace.v1.Status.StatusCode\"N\n\nStatusCode\x12\x15\n\x11STATUS_CODE_UNSET\x10\x00\x12\x12\n\x0eSTATUS_CODE_OK\x10\x01\x12\x15\n\x11STATUS_CODE_ERROR\x10\x02J\x04\x08\x01\x10\x02*\x9c\x01\n\tSpanFlags\x12\x19\n\x15SPAN_FLAGS_DO_NOT_USE\x10\x00\x12 \n\x1bSPAN_FLAGS_TRACE_FLAGS_MASK\x10\xff\x01\x12*\n%SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK\x10\x80\x02\x12&\n!SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK\x10\x80\x04\x42w\n\x1fio.opentelemetry.proto.trace.v1B\nTraceProtoP\x01Z\'go.opentelemetry.io/proto/otlp/trace/v1\xaa\x02\x1cOpenTelemetry.Proto.Trace.V1b\x06proto3') diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py index 128c1e22fe2..730b2bf93a3 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py @@ -261,7 +261,7 @@ def _init_tracing( def _init_metrics( - exporters_or_readers: dict[str, type[MetricExporter] | type[MetricReader]], + exporters_or_readers: dict[str, type[MetricExporter | MetricReader]], resource: Resource | None = None, exporter_args_map: ExporterArgsMap | None = None, meter_configurator: _MeterConfiguratorT | None = None, @@ -427,7 +427,7 @@ def _import_exporters( log_exporter_names: Sequence[str], ) -> tuple[ dict[str, type[SpanExporter]], - dict[str, type[MetricExporter] | type[MetricReader]], + dict[str, type[MetricExporter | MetricReader]], dict[str, type[LogRecordExporter]], ]: trace_exporters = {} @@ -718,7 +718,7 @@ def _configure(self, **kwargs): # silence the static-analysis no-name-in-module on the # conditional import. # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.configuration import ( # noqa: PLC0415 + from opentelemetry.configuration import ( configure_sdk, load_config_file, ) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py index c0798cc2cc6..36f218e1fb6 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py @@ -18,15 +18,15 @@ __all__ = [ "ConcurrentMultiLogRecordProcessor", - "Logger", - "LoggerProvider", - "LoggingHandler", + "LogDroppedAttributesWarning", "LogLimits", + "LogRecordDroppedAttributesWarning", "LogRecordLimits", "LogRecordProcessor", - "LogDroppedAttributesWarning", - "LogRecordDroppedAttributesWarning", - "ReadableLogRecord", + "Logger", + "LoggerProvider", + "LoggingHandler", "ReadWriteLogRecord", + "ReadableLogRecord", "SynchronousMultiLogRecordProcessor", ] diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py index 3925889bf6f..310a19425ab 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/export/__init__.py @@ -22,11 +22,11 @@ "BatchLogRecordProcessor", "ConsoleLogExporter", "ConsoleLogRecordExporter", - "LogExporter", - "LogRecordExporter", + "InMemoryLogExporter", + "InMemoryLogRecordExporter", "LogExportResult", + "LogExporter", "LogRecordExportResult", + "LogRecordExporter", "SimpleLogRecordProcessor", - "InMemoryLogExporter", - "InMemoryLogRecordExporter", ] diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py index 7506e8d5e49..911f4ac92de 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py @@ -74,7 +74,6 @@ class _DefaultErrorHandler(ErrorHandler): # pylint: disable=useless-return def _handle(self, error: Exception, *args, **kwargs): logger.exception("Error handled by default error handler: ") - return None class GlobalErrorHandler: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py index c40c740cc52..27a577ff68f 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py @@ -27,23 +27,23 @@ __all__ = [ "AlignedHistogramBucketExemplarReservoir", - "AlwaysOnExemplarFilter", "AlwaysOffExemplarFilter", + "AlwaysOnExemplarFilter", + "Counter", "Exemplar", "ExemplarFilter", "ExemplarReservoir", + "Histogram", "Meter", "MeterProvider", "MetricsTimeoutError", - "Counter", - "Histogram", - "_Gauge", "ObservableCounter", "ObservableGauge", "ObservableUpDownCounter", "SimpleFixedSizeExemplarReservoir", - "UpDownCounter", "TraceBasedExemplarFilter", + "UpDownCounter", + "_Gauge", "export", "view", ] diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py index 61db3dadd39..4e12aab7aad 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py @@ -604,7 +604,7 @@ def force_flush(self, timeout_millis: float = 10_000) -> bool: if metric_reader_error: metric_reader_error_string = "\n".join( [ - f"{metric_reader.__class__.__name__}: {repr(error)}" + f"{metric_reader.__class__.__name__}: {error!r}" for metric_reader, error in metric_reader_error.items() ] ) @@ -654,7 +654,7 @@ def _shutdown(): if metric_reader_error: metric_reader_error_string = "\n".join( [ - f"{metric_reader.__class__.__name__}: {repr(error)}" + f"{metric_reader.__class__.__name__}: {error!r}" for metric_reader, error in metric_reader_error.items() ] ) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/__init__.py index a00eb6ce5f0..8068406a280 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/__init__.py @@ -16,13 +16,13 @@ ) __all__ = [ - "Exemplar", - "ExemplarFilter", + "AlignedHistogramBucketExemplarReservoir", "AlwaysOffExemplarFilter", "AlwaysOnExemplarFilter", - "TraceBasedExemplarFilter", - "AlignedHistogramBucketExemplarReservoir", + "Exemplar", + "ExemplarFilter", "ExemplarReservoir", "ExemplarReservoirBuilder", "SimpleFixedSizeExemplarReservoir", + "TraceBasedExemplarFilter", ] diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py index 28f0adc7476..d204177de50 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py @@ -23,7 +23,7 @@ class ExemplarFilter(ABC): @abstractmethod def should_sample( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -50,7 +50,7 @@ class AlwaysOnExemplarFilter(ExemplarFilter): def should_sample( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -77,7 +77,7 @@ class AlwaysOffExemplarFilter(ExemplarFilter): def should_sample( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -103,7 +103,7 @@ class TraceBasedExemplarFilter(ExemplarFilter): def should_sample( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, 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 afe2dcba38a..9868afdb2e2 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 @@ -32,7 +32,7 @@ class ExemplarReservoir(ABC): @abstractmethod def offer( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -76,7 +76,7 @@ def __init__(self) -> None: def offer( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -177,7 +177,7 @@ def collect(self, point_attributes: Attributes) -> list[Exemplar]: def offer( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -205,7 +205,7 @@ def offer( @abstractmethod def _find_bucket_index( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -250,7 +250,7 @@ def _reset(self) -> None: def _find_bucket_index( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -281,7 +281,7 @@ def __init__(self, boundaries: Sequence[float], **kwargs) -> None: def offer( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, @@ -296,7 +296,7 @@ def offer( def _find_bucket_index( self, - value: int | float, + value: float, time_unix_nano: int, attributes: Attributes, context: Context, diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py index 548aa8ee1f3..8541655093e 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py @@ -192,7 +192,7 @@ def __new__(cls, *args, **kwargs): def add( self, - amount: int | float, + amount: float, attributes: dict[str, str] | None = None, context: Context | None = None, ): @@ -232,7 +232,7 @@ def __new__(cls, *args, **kwargs): def add( self, - amount: int | float, + amount: float, attributes: dict[str, str] | None = None, context: Context | None = None, ): @@ -308,7 +308,7 @@ def __new__(cls, *args, **kwargs): def record( self, - amount: int | float, + amount: float, attributes: dict[str, str] | None = None, context: Context | None = None, ): @@ -349,7 +349,7 @@ def __new__(cls, *args, **kwargs): def set( self, - amount: int | float, + amount: float, attributes: dict[str, str] | None = None, context: Context | None = None, ): diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/__init__.py index 56034c0e35c..3685e534699 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/__init__.py @@ -15,7 +15,7 @@ ) # The point module is not in the export directory to avoid a circular import. -from opentelemetry.sdk.metrics._internal.point import ( # noqa: F401 +from opentelemetry.sdk.metrics._internal.point import ( Buckets, DataPointT, DataT, @@ -36,11 +36,6 @@ "AggregationTemporality", "Buckets", "ConsoleMetricExporter", - "InMemoryMetricReader", - "MetricExporter", - "MetricExportResult", - "MetricReader", - "PeriodicExportingMetricReader", "DataPointT", "DataT", "ExponentialHistogram", @@ -48,9 +43,14 @@ "Gauge", "Histogram", "HistogramDataPoint", + "InMemoryMetricReader", "Metric", + "MetricExportResult", + "MetricExporter", + "MetricReader", "MetricsData", "NumberDataPoint", + "PeriodicExportingMetricReader", "ResourceMetrics", "ScopeMetrics", "Sum", diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py index b34cba70696..f624736d56f 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py @@ -572,7 +572,7 @@ def _build_resource_detectors() -> list["ResourceDetector"]: return [ServiceInstanceIdResourceDetector(), OTELResourceDetector()] # pylint: disable=import-outside-toplevel - from opentelemetry.util._importlib_metadata import ( # noqa: PLC0415 + from opentelemetry.util._importlib_metadata import ( entry_points, # type: ignore[reportUnknownVariableType] ) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py index 1652220dfc9..a16c9d4bfbc 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py @@ -171,7 +171,7 @@ class SamplingResult: """ def __repr__(self) -> str: - return f"{type(self).__name__}({str(self.decision)}, attributes={str(self.attributes)})" + return f"{type(self).__name__}({self.decision!s}, attributes={self.attributes!s})" def __init__( self, diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py index fc408e431e7..f932e9b8f19 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py @@ -21,7 +21,7 @@ class InstrumentationInfo: properties. """ - __slots__ = ("_name", "_version", "_schema_url") + __slots__ = ("_name", "_schema_url", "_version") @deprecated( "You should use InstrumentationScope. Deprecated since version 1.11.1." @@ -81,7 +81,7 @@ class InstrumentationScope: properties. """ - __slots__ = ("_name", "_version", "_schema_url", "_attributes") + __slots__ = ("_attributes", "_name", "_schema_url", "_version") def __init__( self, diff --git a/opentelemetry-sdk/tests/error_handler/test_error_handler.py b/opentelemetry-sdk/tests/error_handler/test_error_handler.py index fadd409d77c..f64757b104a 100644 --- a/opentelemetry-sdk/tests/error_handler/test_error_handler.py +++ b/opentelemetry-sdk/tests/error_handler/test_error_handler.py @@ -15,10 +15,9 @@ class TestErrorHandler(TestCase): @patch("opentelemetry.sdk.error_handler.entry_points") def test_default_error_handler(self, mock_entry_points): - with self.assertLogs(logger, ERROR): - with GlobalErrorHandler(): - # pylint: disable=broad-exception-raised - raise Exception("some exception") + with self.assertLogs(logger, ERROR), GlobalErrorHandler(): + # pylint: disable=broad-exception-raised + raise Exception("some exception") # pylint: disable=no-self-use @patch("opentelemetry.sdk.error_handler.entry_points") @@ -43,12 +42,10 @@ class AssertionErrorHandler(ErrorHandler, AssertionError): ) mock_entry_points.configure_mock( - **{ - "return_value": [ - mock_entry_point_zero_division_error_handler, - mock_entry_point_assertion_error_handler, - ] - } + return_value=[ + mock_entry_point_zero_division_error_handler, + mock_entry_point_assertion_error_handler, + ] ) error = ZeroDivisionError() @@ -80,14 +77,13 @@ def _handle(self, error: Exception): ) mock_entry_points.configure_mock( - **{"return_value": [mock_entry_point_error_error_handler]} + return_value=[mock_entry_point_error_error_handler] ) error = ZeroDivisionError() - with self.assertLogs(logger, ERROR): - with GlobalErrorHandler(): - raise error + with self.assertLogs(logger, ERROR), GlobalErrorHandler(): + raise error # pylint: disable=no-self-use @patch("opentelemetry.sdk.error_handler.entry_points") @@ -104,7 +100,7 @@ def __new__(cls): ) mock_entry_points.configure_mock( - **{"return_value": [mock_entry_point_error_handler]} + return_value=[mock_entry_point_error_handler] ) error = IndexError() diff --git a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py index 88d6923db73..d17aabe6f4c 100644 --- a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py @@ -557,7 +557,7 @@ def mock_increment(self, bucket_index: int) -> None: exponential_histogram_aggregation._value_positive.offset, ) - for index in range(0, 256): + for index in range(256): self.assertLessEqual( exponential_histogram_aggregation._value_positive[index], 6 * increment, @@ -626,7 +626,7 @@ def test_move_into(self): exponential_histogram_aggregation_1._value_positive.offset, ) - for index in range(0, 256): + for index in range(256): self.assertLessEqual( exponential_histogram_aggregation_1._value_positive[index], 6 ) diff --git a/opentelemetry-sdk/tests/metrics/test_aggregation.py b/opentelemetry-sdk/tests/metrics/test_aggregation.py index 12a42b31771..ba1d4757301 100644 --- a/opentelemetry-sdk/tests/metrics/test_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/test_aggregation.py @@ -42,9 +42,7 @@ from opentelemetry.util.types import Attributes -def measurement( - value: int | float, attributes: Attributes = None -) -> Measurement: +def measurement(value: float, attributes: Attributes = None) -> Measurement: return Measurement( value, time_ns(), diff --git a/opentelemetry-sdk/tests/metrics/test_import.py b/opentelemetry-sdk/tests/metrics/test_import.py index 83cbd8b3c1c..78b4645c6fd 100644 --- a/opentelemetry-sdk/tests/metrics/test_import.py +++ b/opentelemetry-sdk/tests/metrics/test_import.py @@ -13,7 +13,7 @@ def test_import_init(self): """ with self.assertNotRaises(Exception): - from opentelemetry.sdk.metrics import ( # noqa: F401, PLC0415 + from opentelemetry.sdk.metrics import ( # noqa: F401 Counter, Histogram, Meter, @@ -31,7 +31,7 @@ def test_import_export(self): """ with self.assertNotRaises(Exception): - from opentelemetry.sdk.metrics.export import ( # noqa: F401, PLC0415 + from opentelemetry.sdk.metrics.export import ( # noqa: F401 AggregationTemporality, ConsoleMetricExporter, DataPointT, @@ -58,7 +58,7 @@ def test_import_view(self): """ with self.assertNotRaises(Exception): - from opentelemetry.sdk.metrics.view import ( # noqa: F401, PLC0415 + from opentelemetry.sdk.metrics.view import ( # noqa: F401 Aggregation, DefaultAggregation, DropAggregation, diff --git a/opentelemetry-sdk/tests/metrics/test_view.py b/opentelemetry-sdk/tests/metrics/test_view.py index 03914c99c6f..a1c0ff4bdc7 100644 --- a/opentelemetry-sdk/tests/metrics/test_view.py +++ b/opentelemetry-sdk/tests/metrics/test_view.py @@ -19,7 +19,7 @@ def test_instrument_type(self): def test_instrument_name(self): mock_instrument = Mock() - mock_instrument.configure_mock(**{"name": "instrument_name"}) + mock_instrument.configure_mock(name="instrument_name") self.assertTrue( View(instrument_name="instrument_name")._match(mock_instrument) @@ -27,7 +27,7 @@ def test_instrument_name(self): def test_instrument_unit(self): mock_instrument = Mock() - mock_instrument.configure_mock(**{"unit": "instrument_unit"}) + mock_instrument.configure_mock(unit="instrument_unit") self.assertTrue( View(instrument_unit="instrument_unit")._match(mock_instrument) diff --git a/opentelemetry-sdk/tests/test_configurator.py b/opentelemetry-sdk/tests/test_configurator.py index 694ed3e9e7e..97d075d4ea1 100644 --- a/opentelemetry-sdk/tests/test_configurator.py +++ b/opentelemetry-sdk/tests/test_configurator.py @@ -1443,7 +1443,7 @@ def mock_entry_points_impl(group, name): class TestImportConfigComponents(TestCase): @patch( "opentelemetry.sdk._configuration.entry_points", - **{"side_effect": KeyError}, + side_effect=KeyError, ) def test__import_config_components_missing_entry_point( self, mock_entry_points @@ -1456,7 +1456,7 @@ def test__import_config_components_missing_entry_point( @patch( "opentelemetry.sdk._configuration.entry_points", - **{"side_effect": StopIteration}, + side_effect=StopIteration, ) def test__import_config_components_missing_component( self, mock_entry_points diff --git a/opentelemetry-sdk/tests/trace/export/test_export.py b/opentelemetry-sdk/tests/trace/export/test_export.py index d67aceb19f8..49ae36c15db 100644 --- a/opentelemetry-sdk/tests/trace/export/test_export.py +++ b/opentelemetry-sdk/tests/trace/export/test_export.py @@ -95,10 +95,9 @@ def test_simple_span_processor_no_context(self): span_processor = export.SimpleSpanProcessor(my_exporter) tracer_provider.add_span_processor(span_processor) - with tracer.start_span("foo"): - with tracer.start_span("bar"): - with tracer.start_span("xxx"): - pass + with tracer.start_span("foo"), tracer.start_span("bar"): + with tracer.start_span("xxx"): + pass self.assertListEqual(["xxx", "bar", "foo"], spans_names_list) diff --git a/opentelemetry-sdk/tests/trace/test_span_processor.py b/opentelemetry-sdk/tests/trace/test_span_processor.py index 4499427cc1a..f334ec05408 100644 --- a/opentelemetry-sdk/tests/trace/test_span_processor.py +++ b/opentelemetry-sdk/tests/trace/test_span_processor.py @@ -274,7 +274,7 @@ def create_default_span() -> trace_api.Span: def test_on_start(self): multi_processor = self.create_multi_span_processor() - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 5)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(5)] for mock_processor in mocks: multi_processor.add_span_processor(mock_processor) @@ -291,7 +291,7 @@ def test_on_start(self): def test_on_ending(self): multi_processor = self.create_multi_span_processor() - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 5)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(5)] for mock_processor in mocks: multi_processor.add_span_processor(mock_processor) @@ -307,7 +307,7 @@ def test_on_ending(self): def test_on_end(self): multi_processor = self.create_multi_span_processor() - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 5)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(5)] for mock_processor in mocks: multi_processor.add_span_processor(mock_processor) @@ -321,7 +321,7 @@ def test_on_end(self): def test_on_shutdown(self): multi_processor = self.create_multi_span_processor() - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 5)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(5)] for mock_processor in mocks: multi_processor.add_span_processor(mock_processor) @@ -333,7 +333,7 @@ def test_on_shutdown(self): def test_force_flush(self): multi_processor = self.create_multi_span_processor() - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 5)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(5)] for mock_processor in mocks: multi_processor.add_span_processor(mock_processor) timeout_millis = 100 @@ -471,7 +471,7 @@ def delayed_flush(_): late_mock = mock.Mock(spec=trace.SpanProcessor) late_mock.force_flush = mock.Mock(side_effect=delayed_flush) - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 4)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(4)] mocks.insert(0, late_mock) for mock_processor in mocks: @@ -491,7 +491,7 @@ def test_force_flush_late_by_span_processor(self): late_mock = mock.Mock(spec=trace.SpanProcessor) late_mock.force_flush = mock.Mock(return_value=False) - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 4)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(4)] mocks.insert(0, late_mock) for mock_processor in mocks: @@ -509,7 +509,7 @@ def test_force_flush_processor_returns_none(self): none_mock = mock.Mock(spec=trace.SpanProcessor) none_mock.force_flush = mock.Mock(return_value=None) - mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(0, 4)] + mocks = [mock.Mock(spec=trace.SpanProcessor) for _ in range(4)] mocks.insert(0, none_mock) for mock_processor in mocks: diff --git a/opentelemetry-sdk/tests/trace/test_trace.py b/opentelemetry-sdk/tests/trace/test_trace.py index 880b072945b..611e1302929 100644 --- a/opentelemetry-sdk/tests/trace/test_trace.py +++ b/opentelemetry-sdk/tests/trace/test_trace.py @@ -785,7 +785,7 @@ def test_surplus_span_links(self): max_links = trace.SpanLimits().max_links links = [ trace_api.Link(trace_api.SpanContext(0x1, idx, is_remote=False)) - for idx in range(0, 16 + max_links) + for idx in range(16 + max_links) ] tracer = new_tracer() with tracer.start_as_current_span("span", links=links) as root: @@ -794,7 +794,7 @@ def test_surplus_span_links(self): def test_surplus_span_attributes(self): # pylint: disable=protected-access max_attrs = trace.SpanLimits().max_span_attributes - attributes = {str(idx): idx for idx in range(0, 16 + max_attrs)} + attributes = {str(idx): idx for idx in range(16 + max_attrs)} tracer = new_tracer() with tracer.start_as_current_span( "span", attributes=attributes @@ -2339,15 +2339,17 @@ def test_parent_child_span_exception(self): child_span = None try: - with tracer.start_as_current_span( - "parent", - ) as parent_span: - with tracer.start_as_current_span( + with ( + tracer.start_as_current_span( + "parent", + ) as parent_span, + tracer.start_as_current_span( "child", record_exception=False, set_status_on_exception=False, - ) as child_span: - raise exception + ) as child_span, + ): + raise exception except Exception: # pylint: disable=broad-exception-caught pass diff --git a/pyproject.toml b/pyproject.toml index c6a55373fc2..7fd1ef95385 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,21 +86,69 @@ extension = { added = "markdown", changed = "markdown", deprecated = "markdown", [tool.ruff.lint] # https://docs.astral.sh/ruff/linter/#rule-selection # pylint: https://github.com/astral-sh/ruff/issues/970 +# These are all part of the default ruleset: +# https://docs.astral.sh/ruff/default-rules/ select = [ - "I", # https://docs.astral.sh/ruff/rules/#isort-i - "F", # https://docs.astral.sh/ruff/rules/#pyflakes-f - "E", # https://docs.astral.sh/ruff/rules/#error-e - "W", # https://docs.astral.sh/ruff/rules/#warning-w - "PLC", # https://docs.astral.sh/ruff/rules/#convention-plc - "PLE", # https://docs.astral.sh/ruff/rules/#error-ple - "Q", # https://docs.astral.sh/ruff/rules/#flake8-quotes-q - "G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g - "TID", # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid - "UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up + "YTT101", "YTT102", "YTT103", "YTT201", "YTT202", "YTT203", "YTT204", "YTT301", + "YTT302", "YTT303", "ASYNC100", "ASYNC105", "ASYNC115", "ASYNC116", "ASYNC210", "ASYNC220", + "ASYNC221", "ASYNC222", "ASYNC230", "ASYNC251", "S102", "S110", "S112", "BLE001", + "B002", "B003", "B004", "B005", "B006", "B008", "B009", "B010", + "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B019", + "B020", "B021", "B022", "B023", "B025", "B026", "B029", "B030", + "B031", "B032", "B033", "B035", "B039", "C400", "C401", "C402", + "C403", "C404", "C405", "C406", "C408", "C409", "C410", "C411", + "C413", "C414", "C415", "C417", "C418", "C419", "DTZ001", "DTZ002", + "DTZ003", "DTZ004", "DTZ005", "DTZ006", "DTZ007", "DTZ011", "DTZ012", "DTZ901", + "T100", "EXE001", "EXE002", "EXE004", "EXE005", "FA100", "FA102", "INT001", + "INT002", "INT003", "LOG001", "LOG002", "LOG009", "LOG014", "LOG015", "G010", + "G101", "G201", "G202", "PIE790", "PIE794", "PIE796", "PIE800", "PIE804", + "PIE807", "PIE808", "PIE810", "PYI001", "PYI002", "PYI003", "PYI004", "PYI005", + "PYI006", "PYI007", "PYI008", "PYI009", "PYI010", "PYI012", "PYI013", "PYI015", + "PYI016", "PYI017", "PYI018", "PYI019", "PYI020", "PYI025", "PYI026", "PYI029", + "PYI030", "PYI032", "PYI033", "PYI034", "PYI035", "PYI036", "PYI041", "PYI042", + "PYI043", "PYI044", "PYI045", "PYI046", "PYI047", "PYI048", "PYI049", "PYI050", + "PYI052", "PYI055", "PYI057", "PYI058", "PYI059", "PYI061", "PYI062", "PYI063", + "PYI064", "PYI066", "PT010", "PT014", "PT020", "PT025", "PT026", "PT031", + "RET501", "SIM101", "SIM102", "SIM103", "SIM107", "SIM113", "SIM114", "SIM115", + "SIM117", "SIM118", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM220", + "SIM221", "SIM222", "SIM223", "SIM401", "SIM905", "SIM911", "TC004", "TC005", + "TC007", "TC010", "PTH124", "PTH210", "FLY002", "I001", "N999", "PERF101", + "PERF102", "PERF402", "E722", "E902", "W605", "D419", "F401", "F402", + "F404", "F407", "F501", "F502", "F503", "F504", "F505", "F506", + "F507", "F508", "F509", "F521", "F522", "F523", "F524", "F525", + "F541", "F601", "F602", "F621", "F622", "F631", "F632", "F633", + "F634", "F701", "F702", "F704", "F706", "F707", "F811", "F821", + "F822", "F823", "F841", "F842", "F901", "PGH005", "PLC0105", "PLC0131", + "PLC0132", "PLC0205", "PLC0206", "PLC0208", "PLC0414", "PLC3002", "PLE0100", "PLE0101", + "PLE0115", "PLE0116", "PLE0117", "PLE0118", "PLE0303", "PLE0305", "PLE0307", "PLE0308", + "PLE0309", "PLE0604", "PLE0605", "PLE0643", "PLE0704", "PLE1132", "PLE1142", "PLE1205", + "PLE1206", "PLE1300", "PLE1307", "PLE1310", "PLE1507", "PLE1519", "PLE1520", "PLE1700", + "PLE2502", "PLE2510", "PLE2512", "PLE2513", "PLE2514", "PLE2515", "PLR0124", "PLR0133", + "PLR0206", "PLR0402", "PLR1704", "PLR1711", "PLR1716", "PLR1722", "PLR1730", "PLR1733", + "PLR1736", "PLR2044", "PLW0120", "PLW0127", "PLW0128", "PLW0129", "PLW0131", "PLW0133", + "PLW0177", "PLW0211", "PLW0245", "PLW0406", "PLW0602", "PLW0604", "PLW0642", "PLW0711", + "PLW1501", "PLW1507", "PLW1508", "PLW1509", "PLW1510", "PLW2101", "UP001", "UP003", + "UP004", "UP005", "UP006", "UP007", "UP008", "UP009", "UP010", "UP011", + "UP012", "UP014", "UP017", "UP018", "UP019", "UP020", "UP021", "UP022", + "UP023", "UP024", "UP025", "UP026", "UP028", "UP029", "UP030", "UP031", + "UP032", "UP033", "UP034", "UP035", "UP036", "UP037", "UP039", "UP040", + "UP041", "UP043", "UP044", "UP045", "UP046", "UP047", "UP049", "UP050", + "FURB105", "FURB122", "FURB129", "FURB132", "FURB136", "FURB157", "FURB161", "FURB162", + "FURB163", "FURB166", "FURB167", "FURB168", "FURB169", "FURB177", "FURB181", "FURB188", + "RUF007", "RUF008", "RUF009", "RUF010", "RUF012", "RUF013", "RUF015", "RUF016", + "RUF017", "RUF018", "RUF019", "RUF020", "RUF022", "RUF023", "RUF024", "RUF026", + "RUF028", "RUF030", "RUF032", "RUF033", "RUF034", "RUF040", "RUF041", "RUF046", + "RUF048", "RUF049", "RUF051", "RUF053", "RUF057", "RUF058", "RUF059", "RUF100", + "RUF101", "RUF200", "TRY002", "TRY004", "TRY201", "TRY203", "TRY401", ] - +# These are also part of the default but don't have fixes available, they need to be manually +# resolved, except E501 which is intentionally ignored. ignore = [ - "E501", # line-too-long + "B008", "B017", "B018", "B020", "B023", "B039", "BLE001", "C401", + "C408", "C417", "DTZ007", "E501", "FLY002", "LOG015", "PERF102", "PIE796", + "PLW0602", "PLW1508", "PT014", "PYI034", "PYI036", "RUF009", "RUF012", "RUF013", + "RUF015", "S110", "SIM102", "SIM103", "SIM115", "SIM117", "SIM118", "TRY002", + "TRY004", "TRY201", "TRY401", ] [tool.ruff.lint.per-file-ignores] diff --git a/shim/opentelemetry-opencensus-shim/tests/test_shim.py b/shim/opentelemetry-opencensus-shim/tests/test_shim.py index ef0ddc20afe..1b5051ab3ca 100644 --- a/shim/opentelemetry-opencensus-shim/tests/test_shim.py +++ b/shim/opentelemetry-opencensus-shim/tests/test_shim.py @@ -112,13 +112,15 @@ def test_shim_span_contextmanager_calls_does_not_call_end(self): oc_tracer = OcTracer() oc_span = oc_tracer.start_span("foo") - with patch.object( + with ( + patch.object( + oc_span, + "_self_otel_span", + wraps=oc_span._self_otel_span, + ) as spy_otel_span, oc_span, - "_self_otel_span", - wraps=oc_span._self_otel_span, - ) as spy_otel_span: - with oc_span: - pass + ): + pass spy_otel_span.end.assert_not_called() diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_subtask_span_propagation/test_asyncio.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_subtask_span_propagation/test_asyncio.py index 38bf77d5dd5..8526a7926fe 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_subtask_span_propagation/test_asyncio.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_subtask_span_propagation/test_asyncio.py @@ -27,7 +27,7 @@ def test_main(self): self.assertNamesEqual(spans, ["child", "parent"]) self.assertIsChildOf(spans[0], spans[1]) - async def parent_task(self, message): # noqa + async def parent_task(self, message): with self.tracer.start_active_span("parent"): res = await self.child_task(message) diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py index 146dd322be7..2cc63d9cb3b 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py @@ -51,15 +51,15 @@ def _make_handler( logs_path: str, ) -> type[BaseHTTPRequestHandler]: # pylint: disable=import-outside-toplevel,no-name-in-module - from opentelemetry.proto.collector.logs.v1.logs_service_pb2 import ( # noqa: PLC0415 + from opentelemetry.proto.collector.logs.v1.logs_service_pb2 import ( ExportLogsServiceRequest, ExportLogsServiceResponse, ) - from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ( # noqa: PLC0415 + from opentelemetry.proto.collector.metrics.v1.metrics_service_pb2 import ( ExportMetricsServiceRequest, ExportMetricsServiceResponse, ) - from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import ( # noqa: PLC0415 + from opentelemetry.proto.collector.trace.v1.trace_service_pb2 import ( ExportTraceServiceRequest, ExportTraceServiceResponse, ) @@ -152,7 +152,7 @@ def __init__( ) -> None: try: # pylint: disable-next=import-outside-toplevel,unused-import - import opentelemetry.proto # noqa: F401, PLC0415 + import opentelemetry.proto # noqa: F401 except ImportError: raise ImportError( "opentelemetry-proto is required to use OtlpProtoTestServer. " diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py index 3cd1b93837a..f2826a32e1d 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py @@ -183,9 +183,7 @@ def is_data_points_equal( data_point: DataPointT, est_value_delta: float | None = 0, ): - if type(expected_data_point) != type( # noqa: E721 - data_point - ) or not isinstance( + if type(expected_data_point) != type(data_point) or not isinstance( expected_data_point, (HistogramDataPoint, NumberDataPoint) ): return False diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py index 115fa1c282f..774cd011991 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py @@ -302,7 +302,7 @@ def __init__( def __enter__(self) -> "WeaverLiveCheck": return self.start() - def __exit__(self, exc_type: Any, *_: Any) -> None: + def __exit__(self, exc_type: Any, *_: object) -> None: if exc_type is not None: self._stopped = True self.close() diff --git a/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py b/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py index 6d6ae5e467d..fdd456c249c 100644 --- a/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py +++ b/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py @@ -360,9 +360,11 @@ def test_unknown_path_returns_404(self): self.assertEqual(resp.status_code, 404) def test_missing_proto_raises_import_error(self): - with unittest.mock.patch.dict( - "sys.modules", {"opentelemetry.proto": None} + with ( + unittest.mock.patch.dict( + "sys.modules", {"opentelemetry.proto": None} + ), + self.assertRaises(ImportError) as cm, ): - with self.assertRaises(ImportError) as cm: - OtlpProtoTestServer() + OtlpProtoTestServer() self.assertIn("opentelemetry-proto", str(cm.exception)) From d708f8ea16ea787fe4ce1ea69b485d491faaa918 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Thu, 30 Jul 2026 18:27:56 +0000 Subject: [PATCH 04/11] Fix failing CI --- .../proto/collector/logs/v1/logs_service_pb2.py | 3 ++- .../collector/logs/v1/logs_service_pb2_grpc.py | 15 ++++++--------- .../collector/metrics/v1/metrics_service_pb2.py | 3 ++- .../metrics/v1/metrics_service_pb2_grpc.py | 15 ++++++--------- .../v1development/profiles_service_pb2.py | 3 ++- .../v1development/profiles_service_pb2_grpc.py | 15 ++++++--------- .../proto/collector/trace/v1/trace_service_pb2.py | 3 ++- .../collector/trace/v1/trace_service_pb2_grpc.py | 15 ++++++--------- .../opentelemetry/proto/common/v1/common_pb2.py | 2 +- .../src/opentelemetry/proto/logs/v1/logs_pb2.py | 4 +++- .../opentelemetry/proto/metrics/v1/metrics_pb2.py | 4 +++- .../proto/profiles/v1development/profiles_pb2.py | 4 +++- .../proto/resource/v1/resource_pb2.py | 3 ++- .../src/opentelemetry/proto/trace/v1/trace_pb2.py | 4 +++- 14 files changed, 47 insertions(+), 46 deletions(-) diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py index c239b17c587..81f124f6303 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/logs/v1/logs_service.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.logs.v1 import logs_pb2 as opentelemetry_dot_proto_dot_logs_dot_v1_dot_logs__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8opentelemetry/proto/collector/logs/v1/logs_service.proto\x12%opentelemetry.proto.collector.logs.v1\x1a&opentelemetry/proto/logs/v1/logs.proto\"\\\n\x18\x45xportLogsServiceRequest\x12@\n\rresource_logs\x18\x01 \x03(\x0b\x32).opentelemetry.proto.logs.v1.ResourceLogs\"u\n\x19\x45xportLogsServiceResponse\x12X\n\x0fpartial_success\x18\x01 \x01(\x0b\x32?.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess\"O\n\x18\x45xportLogsPartialSuccess\x12\x1c\n\x14rejected_log_records\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\x9d\x01\n\x0bLogsService\x12\x8d\x01\n\x06\x45xport\x12?.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest\x1a@.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse\"\x00\x42\x98\x01\n(io.opentelemetry.proto.collector.logs.v1B\x10LogsServiceProtoP\x01Z0go.opentelemetry.io/proto/otlp/collector/logs/v1\xaa\x02%OpenTelemetry.Proto.Collector.Logs.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py index f2c7982d46d..bb64c98fa25 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py @@ -1,12 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import warnings - import grpc +import warnings -from opentelemetry.proto.collector.logs.v1 import ( - logs_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_logs_dot_v1_dot_logs__service__pb2, -) +from opentelemetry.proto.collector.logs.v1 import logs_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_logs_dot_v1_dot_logs__service__pb2 GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -23,7 +20,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + ' but the generated code in opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py depends on' + + f' but the generated code in opentelemetry/proto/collector/logs/v1/logs_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -33,7 +30,7 @@ ) -class LogsServiceStub: +class LogsServiceStub(object): """Service that can be used to push logs between one Application instrumented with OpenTelemetry and an collector, or between an collector and a central collector (in this case logs are sent/received to/from multiple Applications). @@ -52,7 +49,7 @@ def __init__(self, channel): _registered_method=True) -class LogsServiceServicer: +class LogsServiceServicer(object): """Service that can be used to push logs between one Application instrumented with OpenTelemetry and an collector, or between an collector and a central collector (in this case logs are sent/received to/from multiple Applications). @@ -79,7 +76,7 @@ def add_LogsServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class LogsService: +class LogsService(object): """Service that can be used to push logs between one Application instrumented with OpenTelemetry and an collector, or between an collector and a central collector (in this case logs are sent/received to/from multiple Applications). diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py index b89bf3b837c..6083655c882 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.metrics.v1 import metrics_pb2 as opentelemetry_dot_proto_dot_metrics_dot_v1_dot_metrics__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n>opentelemetry/proto/collector/metrics/v1/metrics_service.proto\x12(opentelemetry.proto.collector.metrics.v1\x1a,opentelemetry/proto/metrics/v1/metrics.proto\"h\n\x1b\x45xportMetricsServiceRequest\x12I\n\x10resource_metrics\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetrics\"~\n\x1c\x45xportMetricsServiceResponse\x12^\n\x0fpartial_success\x18\x01 \x01(\x0b\x32\x45.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess\"R\n\x1b\x45xportMetricsPartialSuccess\x12\x1c\n\x14rejected_data_points\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xac\x01\n\x0eMetricsService\x12\x99\x01\n\x06\x45xport\x12\x45.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest\x1a\x46.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse\"\x00\x42\xa4\x01\n+io.opentelemetry.proto.collector.metrics.v1B\x13MetricsServiceProtoP\x01Z3go.opentelemetry.io/proto/otlp/collector/metrics/v1\xaa\x02(OpenTelemetry.Proto.Collector.Metrics.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py index f822b797d90..f124bfe4adc 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py @@ -1,12 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import warnings - import grpc +import warnings -from opentelemetry.proto.collector.metrics.v1 import ( - metrics_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_metrics_dot_v1_dot_metrics__service__pb2, -) +from opentelemetry.proto.collector.metrics.v1 import metrics_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_metrics_dot_v1_dot_metrics__service__pb2 GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -23,7 +20,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + ' but the generated code in opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py depends on' + + f' but the generated code in opentelemetry/proto/collector/metrics/v1/metrics_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -33,7 +30,7 @@ ) -class MetricsServiceStub: +class MetricsServiceStub(object): """Service that can be used to push metrics between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. @@ -52,7 +49,7 @@ def __init__(self, channel): _registered_method=True) -class MetricsServiceServicer: +class MetricsServiceServicer(object): """Service that can be used to push metrics between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. @@ -79,7 +76,7 @@ def add_MetricsServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class MetricsService: +class MetricsService(object): """Service that can be used to push metrics between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py index e91f599f2da..9e2f6198299 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/profiles/v1development/profiles_service.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.profiles.v1development import profiles_pb2 as opentelemetry_dot_proto_dot_profiles_dot_v1development_dot_profiles__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nKopentelemetry/proto/collector/profiles/v1development/profiles_service.proto\x12\x34opentelemetry.proto.collector.profiles.v1development\x1a\x39opentelemetry/proto/profiles/v1development/profiles.proto\"\xcb\x01\n\x1c\x45xportProfilesServiceRequest\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\x12R\n\ndictionary\x18\x02 \x01(\x0b\x32>.opentelemetry.proto.profiles.v1development.ProfilesDictionary\"\x8c\x01\n\x1d\x45xportProfilesServiceResponse\x12k\n\x0fpartial_success\x18\x01 \x01(\x0b\x32R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess\"P\n\x1c\x45xportProfilesPartialSuccess\x12\x19\n\x11rejected_profiles\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xc7\x01\n\x0fProfilesService\x12\xb3\x01\n\x06\x45xport\x12R.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest\x1aS.opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse\"\x00\x42\xc9\x01\n7io.opentelemetry.proto.collector.profiles.v1developmentB\x14ProfilesServiceProtoP\x01Z?go.opentelemetry.io/proto/otlp/collector/profiles/v1development\xaa\x02\x34OpenTelemetry.Proto.Collector.Profiles.V1Developmentb\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py index 054769d4923..3742ae591e3 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py @@ -1,12 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import warnings - import grpc +import warnings -from opentelemetry.proto.collector.profiles.v1development import ( - profiles_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_profiles_dot_v1development_dot_profiles__service__pb2, -) +from opentelemetry.proto.collector.profiles.v1development import profiles_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_profiles_dot_v1development_dot_profiles__service__pb2 GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -23,7 +20,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + ' but the generated code in opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py depends on' + + f' but the generated code in opentelemetry/proto/collector/profiles/v1development/profiles_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -33,7 +30,7 @@ ) -class ProfilesServiceStub: +class ProfilesServiceStub(object): """Service that can be used to push profiles between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. """ @@ -51,7 +48,7 @@ def __init__(self, channel): _registered_method=True) -class ProfilesServiceServicer: +class ProfilesServiceServicer(object): """Service that can be used to push profiles between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. """ @@ -77,7 +74,7 @@ def add_ProfilesServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class ProfilesService: +class ProfilesService(object): """Service that can be used to push profiles between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector. """ diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py index 5e634713c01..c0ad62bfdbd 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/collector/trace/v1/trace_service.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.trace.v1 import trace_pb2 as opentelemetry_dot_proto_dot_trace_dot_v1_dot_trace__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n:opentelemetry/proto/collector/trace/v1/trace_service.proto\x12&opentelemetry.proto.collector.trace.v1\x1a(opentelemetry/proto/trace/v1/trace.proto\"`\n\x19\x45xportTraceServiceRequest\x12\x43\n\x0eresource_spans\x18\x01 \x03(\x0b\x32+.opentelemetry.proto.trace.v1.ResourceSpans\"x\n\x1a\x45xportTraceServiceResponse\x12Z\n\x0fpartial_success\x18\x01 \x01(\x0b\x32\x41.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess\"J\n\x19\x45xportTracePartialSuccess\x12\x16\n\x0erejected_spans\x18\x01 \x01(\x03\x12\x15\n\rerror_message\x18\x02 \x01(\t2\xa2\x01\n\x0cTraceService\x12\x91\x01\n\x06\x45xport\x12\x41.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest\x1a\x42.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse\"\x00\x42\x9c\x01\n)io.opentelemetry.proto.collector.trace.v1B\x11TraceServiceProtoP\x01Z1go.opentelemetry.io/proto/otlp/collector/trace/v1\xaa\x02&OpenTelemetry.Proto.Collector.Trace.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py index 0fb827a8e21..f1cdf0355b4 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py +++ b/opentelemetry-proto/src/opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py @@ -1,12 +1,9 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import warnings - import grpc +import warnings -from opentelemetry.proto.collector.trace.v1 import ( - trace_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_trace_dot_v1_dot_trace__service__pb2, -) +from opentelemetry.proto.collector.trace.v1 import trace_service_pb2 as opentelemetry_dot_proto_dot_collector_dot_trace_dot_v1_dot_trace__service__pb2 GRPC_GENERATED_VERSION = '1.63.2' GRPC_VERSION = grpc.__version__ @@ -23,7 +20,7 @@ if _version_not_supported: warnings.warn( f'The grpc package installed is at version {GRPC_VERSION},' - + ' but the generated code in opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py depends on' + + f' but the generated code in opentelemetry/proto/collector/trace/v1/trace_service_pb2_grpc.py depends on' + f' grpcio>={GRPC_GENERATED_VERSION}.' + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' @@ -33,7 +30,7 @@ ) -class TraceServiceStub: +class TraceServiceStub(object): """Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). @@ -52,7 +49,7 @@ def __init__(self, channel): _registered_method=True) -class TraceServiceServicer: +class TraceServiceServicer(object): """Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). @@ -79,7 +76,7 @@ def add_TraceServiceServicer_to_server(servicer, server): # This class is part of an EXPERIMENTAL API. -class TraceService: +class TraceService(object): """Service that can be used to push spans between one Application instrumented with OpenTelemetry and a collector, or between a collector and a central collector (in this case spans are sent/received to/from multiple Applications). diff --git a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py index dde38b5b445..1e816f201f8 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/common/v1/common_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/common/v1/common.proto # Protobuf Python Version: 5.26.1 @@ -6,7 +7,6 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py index d8a9a5c5a7c..3fe64e28961 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/logs/v1/logs_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/logs/v1/logs.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,13 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 +from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n&opentelemetry/proto/logs/v1/logs.proto\x12\x1bopentelemetry.proto.logs.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"L\n\x08LogsData\x12@\n\rresource_logs\x18\x01 \x03(\x0b\x32).opentelemetry.proto.logs.v1.ResourceLogs\"\xa3\x01\n\x0cResourceLogs\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12:\n\nscope_logs\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.logs.v1.ScopeLogs\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xa0\x01\n\tScopeLogs\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12;\n\x0blog_records\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.logs.v1.LogRecord\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\x83\x03\n\tLogRecord\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x1f\n\x17observed_time_unix_nano\x18\x0b \x01(\x06\x12\x44\n\x0fseverity_number\x18\x02 \x01(\x0e\x32+.opentelemetry.proto.logs.v1.SeverityNumber\x12\x15\n\rseverity_text\x18\x03 \x01(\t\x12\x35\n\x04\x62ody\x18\x05 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\x12;\n\nattributes\x18\x06 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x07 \x01(\r\x12\r\n\x05\x66lags\x18\x08 \x01(\x07\x12\x10\n\x08trace_id\x18\t \x01(\x0c\x12\x0f\n\x07span_id\x18\n \x01(\x0c\x12\x12\n\nevent_name\x18\x0c \x01(\tJ\x04\x08\x04\x10\x05*\xc3\x05\n\x0eSeverityNumber\x12\x1f\n\x1bSEVERITY_NUMBER_UNSPECIFIED\x10\x00\x12\x19\n\x15SEVERITY_NUMBER_TRACE\x10\x01\x12\x1a\n\x16SEVERITY_NUMBER_TRACE2\x10\x02\x12\x1a\n\x16SEVERITY_NUMBER_TRACE3\x10\x03\x12\x1a\n\x16SEVERITY_NUMBER_TRACE4\x10\x04\x12\x19\n\x15SEVERITY_NUMBER_DEBUG\x10\x05\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG2\x10\x06\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG3\x10\x07\x12\x1a\n\x16SEVERITY_NUMBER_DEBUG4\x10\x08\x12\x18\n\x14SEVERITY_NUMBER_INFO\x10\t\x12\x19\n\x15SEVERITY_NUMBER_INFO2\x10\n\x12\x19\n\x15SEVERITY_NUMBER_INFO3\x10\x0b\x12\x19\n\x15SEVERITY_NUMBER_INFO4\x10\x0c\x12\x18\n\x14SEVERITY_NUMBER_WARN\x10\r\x12\x19\n\x15SEVERITY_NUMBER_WARN2\x10\x0e\x12\x19\n\x15SEVERITY_NUMBER_WARN3\x10\x0f\x12\x19\n\x15SEVERITY_NUMBER_WARN4\x10\x10\x12\x19\n\x15SEVERITY_NUMBER_ERROR\x10\x11\x12\x1a\n\x16SEVERITY_NUMBER_ERROR2\x10\x12\x12\x1a\n\x16SEVERITY_NUMBER_ERROR3\x10\x13\x12\x1a\n\x16SEVERITY_NUMBER_ERROR4\x10\x14\x12\x19\n\x15SEVERITY_NUMBER_FATAL\x10\x15\x12\x1a\n\x16SEVERITY_NUMBER_FATAL2\x10\x16\x12\x1a\n\x16SEVERITY_NUMBER_FATAL3\x10\x17\x12\x1a\n\x16SEVERITY_NUMBER_FATAL4\x10\x18*Y\n\x0eLogRecordFlags\x12\x1f\n\x1bLOG_RECORD_FLAGS_DO_NOT_USE\x10\x00\x12&\n!LOG_RECORD_FLAGS_TRACE_FLAGS_MASK\x10\xff\x01\x42s\n\x1eio.opentelemetry.proto.logs.v1B\tLogsProtoP\x01Z&go.opentelemetry.io/proto/otlp/logs/v1\xaa\x02\x1bOpenTelemetry.Proto.Logs.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py index 3dc3bdfad18..a337a58476b 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/metrics/v1/metrics_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/metrics/v1/metrics.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,13 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 +from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,opentelemetry/proto/metrics/v1/metrics.proto\x12\x1eopentelemetry.proto.metrics.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"X\n\x0bMetricsData\x12I\n\x10resource_metrics\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.ResourceMetrics\"\xaf\x01\n\x0fResourceMetrics\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12\x43\n\rscope_metrics\x18\x02 \x03(\x0b\x32,.opentelemetry.proto.metrics.v1.ScopeMetrics\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\x9f\x01\n\x0cScopeMetrics\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x37\n\x07metrics\x18\x02 \x03(\x0b\x32&.opentelemetry.proto.metrics.v1.Metric\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xcd\x03\n\x06Metric\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04unit\x18\x03 \x01(\t\x12\x36\n\x05gauge\x18\x05 \x01(\x0b\x32%.opentelemetry.proto.metrics.v1.GaugeH\x00\x12\x32\n\x03sum\x18\x07 \x01(\x0b\x32#.opentelemetry.proto.metrics.v1.SumH\x00\x12>\n\thistogram\x18\t \x01(\x0b\x32).opentelemetry.proto.metrics.v1.HistogramH\x00\x12U\n\x15\x65xponential_histogram\x18\n \x01(\x0b\x32\x34.opentelemetry.proto.metrics.v1.ExponentialHistogramH\x00\x12:\n\x07summary\x18\x0b \x01(\x0b\x32\'.opentelemetry.proto.metrics.v1.SummaryH\x00\x12\x39\n\x08metadata\x18\x0c \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValueB\x06\n\x04\x64\x61taJ\x04\x08\x04\x10\x05J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\t\"M\n\x05Gauge\x12\x44\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.NumberDataPoint\"\xba\x01\n\x03Sum\x12\x44\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32/.opentelemetry.proto.metrics.v1.NumberDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\x12\x14\n\x0cis_monotonic\x18\x03 \x01(\x08\"\xad\x01\n\tHistogram\x12G\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32\x32.opentelemetry.proto.metrics.v1.HistogramDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\"\xc3\x01\n\x14\x45xponentialHistogram\x12R\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32=.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint\x12W\n\x17\x61ggregation_temporality\x18\x02 \x01(\x0e\x32\x36.opentelemetry.proto.metrics.v1.AggregationTemporality\"P\n\x07Summary\x12\x45\n\x0b\x64\x61ta_points\x18\x01 \x03(\x0b\x32\x30.opentelemetry.proto.metrics.v1.SummaryDataPoint\"\x86\x02\n\x0fNumberDataPoint\x12;\n\nattributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\x13\n\tas_double\x18\x04 \x01(\x01H\x00\x12\x10\n\x06\x61s_int\x18\x06 \x01(\x10H\x00\x12;\n\texemplars\x18\x05 \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\r\n\x05\x66lags\x18\x08 \x01(\rB\x07\n\x05valueJ\x04\x08\x01\x10\x02\"\xe6\x02\n\x12HistogramDataPoint\x12;\n\nattributes\x18\t \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x10\n\x03sum\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\rbucket_counts\x18\x06 \x03(\x06\x12\x17\n\x0f\x65xplicit_bounds\x18\x07 \x03(\x01\x12;\n\texemplars\x18\x08 \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\r\n\x05\x66lags\x18\n \x01(\r\x12\x10\n\x03min\x18\x0b \x01(\x01H\x01\x88\x01\x01\x12\x10\n\x03max\x18\x0c \x01(\x01H\x02\x88\x01\x01\x42\x06\n\x04_sumB\x06\n\x04_minB\x06\n\x04_maxJ\x04\x08\x01\x10\x02\"\xda\x04\n\x1d\x45xponentialHistogramDataPoint\x12;\n\nattributes\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x10\n\x03sum\x18\x05 \x01(\x01H\x00\x88\x01\x01\x12\r\n\x05scale\x18\x06 \x01(\x11\x12\x12\n\nzero_count\x18\x07 \x01(\x06\x12W\n\x08positive\x18\x08 \x01(\x0b\x32\x45.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\x12W\n\x08negative\x18\t \x01(\x0b\x32\x45.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets\x12\r\n\x05\x66lags\x18\n \x01(\r\x12;\n\texemplars\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.metrics.v1.Exemplar\x12\x10\n\x03min\x18\x0c \x01(\x01H\x01\x88\x01\x01\x12\x10\n\x03max\x18\r \x01(\x01H\x02\x88\x01\x01\x12\x16\n\x0ezero_threshold\x18\x0e \x01(\x01\x1a\x30\n\x07\x42uckets\x12\x0e\n\x06offset\x18\x01 \x01(\x11\x12\x15\n\rbucket_counts\x18\x02 \x03(\x04\x42\x06\n\x04_sumB\x06\n\x04_minB\x06\n\x04_max\"\xc5\x02\n\x10SummaryDataPoint\x12;\n\nattributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x1c\n\x14start_time_unix_nano\x18\x02 \x01(\x06\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\r\n\x05\x63ount\x18\x04 \x01(\x06\x12\x0b\n\x03sum\x18\x05 \x01(\x01\x12Y\n\x0fquantile_values\x18\x06 \x03(\x0b\x32@.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile\x12\r\n\x05\x66lags\x18\x08 \x01(\r\x1a\x32\n\x0fValueAtQuantile\x12\x10\n\x08quantile\x18\x01 \x01(\x01\x12\r\n\x05value\x18\x02 \x01(\x01J\x04\x08\x01\x10\x02\"\xc1\x01\n\x08\x45xemplar\x12\x44\n\x13\x66iltered_attributes\x18\x07 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12\x16\n\x0etime_unix_nano\x18\x02 \x01(\x06\x12\x13\n\tas_double\x18\x03 \x01(\x01H\x00\x12\x10\n\x06\x61s_int\x18\x06 \x01(\x10H\x00\x12\x0f\n\x07span_id\x18\x04 \x01(\x0c\x12\x10\n\x08trace_id\x18\x05 \x01(\x0c\x42\x07\n\x05valueJ\x04\x08\x01\x10\x02*\x8c\x01\n\x16\x41ggregationTemporality\x12\'\n#AGGREGATION_TEMPORALITY_UNSPECIFIED\x10\x00\x12!\n\x1d\x41GGREGATION_TEMPORALITY_DELTA\x10\x01\x12&\n\"AGGREGATION_TEMPORALITY_CUMULATIVE\x10\x02*^\n\x0e\x44\x61taPointFlags\x12\x1f\n\x1b\x44\x41TA_POINT_FLAGS_DO_NOT_USE\x10\x00\x12+\n\'DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK\x10\x01\x42\x7f\n!io.opentelemetry.proto.metrics.v1B\x0cMetricsProtoP\x01Z)go.opentelemetry.io/proto/otlp/metrics/v1\xaa\x02\x1eOpenTelemetry.Proto.Metrics.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py index a4106a12126..f78c6abd713 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/profiles/v1development/profiles_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/profiles/v1development/profiles.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,13 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 +from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n9opentelemetry/proto/profiles/v1development/profiles.proto\x12*opentelemetry.proto.profiles.v1development\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"\xf6\x03\n\x12ProfilesDictionary\x12J\n\rmapping_table\x18\x01 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Mapping\x12L\n\x0elocation_table\x18\x02 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Location\x12L\n\x0e\x66unction_table\x18\x03 \x03(\x0b\x32\x34.opentelemetry.proto.profiles.v1development.Function\x12\x44\n\nlink_table\x18\x04 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Link\x12\x14\n\x0cstring_table\x18\x05 \x03(\t\x12T\n\x0f\x61ttribute_table\x18\x06 \x03(\x0b\x32;.opentelemetry.proto.profiles.v1development.KeyValueAndUnit\x12\x46\n\x0bstack_table\x18\x07 \x03(\x0b\x32\x31.opentelemetry.proto.profiles.v1development.Stack\"\xbb\x01\n\x0cProfilesData\x12W\n\x11resource_profiles\x18\x01 \x03(\x0b\x32<.opentelemetry.proto.profiles.v1development.ResourceProfiles\x12R\n\ndictionary\x18\x02 \x01(\x0b\x32>.opentelemetry.proto.profiles.v1development.ProfilesDictionary\"\xbe\x01\n\x10ResourceProfiles\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12Q\n\x0escope_profiles\x18\x02 \x03(\x0b\x32\x39.opentelemetry.proto.profiles.v1development.ScopeProfiles\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\xae\x01\n\rScopeProfiles\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x45\n\x08profiles\x18\x02 \x03(\x0b\x32\x33.opentelemetry.proto.profiles.v1development.Profile\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\xb1\x03\n\x07Profile\x12J\n\x0bsample_type\x18\x01 \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x43\n\x07samples\x18\x02 \x03(\x0b\x32\x32.opentelemetry.proto.profiles.v1development.Sample\x12\x16\n\x0etime_unix_nano\x18\x03 \x01(\x06\x12\x15\n\rduration_nano\x18\x04 \x01(\x04\x12J\n\x0bperiod_type\x18\x05 \x01(\x0b\x32\x35.opentelemetry.proto.profiles.v1development.ValueType\x12\x0e\n\x06period\x18\x06 \x01(\x03\x12\x12\n\nprofile_id\x18\x07 \x01(\x0c\x12 \n\x18\x64ropped_attributes_count\x18\x08 \x01(\r\x12\x1f\n\x17original_payload_format\x18\t \x01(\t\x12\x18\n\x10original_payload\x18\n \x01(\x0c\x12\x19\n\x11\x61ttribute_indices\x18\x0b \x03(\x05\")\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\"9\n\tValueType\x12\x15\n\rtype_strindex\x18\x01 \x01(\x05\x12\x15\n\runit_strindex\x18\x02 \x01(\x05\"z\n\x06Sample\x12\x13\n\x0bstack_index\x18\x01 \x01(\x05\x12\x19\n\x11\x61ttribute_indices\x18\x02 \x03(\x05\x12\x12\n\nlink_index\x18\x03 \x01(\x05\x12\x0e\n\x06values\x18\x04 \x03(\x03\x12\x1c\n\x14timestamps_unix_nano\x18\x05 \x03(\x06\"\x80\x01\n\x07Mapping\x12\x14\n\x0cmemory_start\x18\x01 \x01(\x04\x12\x14\n\x0cmemory_limit\x18\x02 \x01(\x04\x12\x13\n\x0b\x66ile_offset\x18\x03 \x01(\x04\x12\x19\n\x11\x66ilename_strindex\x18\x04 \x01(\x05\x12\x19\n\x11\x61ttribute_indices\x18\x05 \x03(\x05\"!\n\x05Stack\x12\x18\n\x10location_indices\x18\x01 \x03(\x05\"\x8e\x01\n\x08Location\x12\x15\n\rmapping_index\x18\x01 \x01(\x05\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\x04\x12?\n\x05lines\x18\x03 \x03(\x0b\x32\x30.opentelemetry.proto.profiles.v1development.Line\x12\x19\n\x11\x61ttribute_indices\x18\x04 \x03(\x05\"<\n\x04Line\x12\x16\n\x0e\x66unction_index\x18\x01 \x01(\x05\x12\x0c\n\x04line\x18\x02 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\x03\"n\n\x08\x46unction\x12\x15\n\rname_strindex\x18\x01 \x01(\x05\x12\x1c\n\x14system_name_strindex\x18\x02 \x01(\x05\x12\x19\n\x11\x66ilename_strindex\x18\x03 \x01(\x05\x12\x12\n\nstart_line\x18\x04 \x01(\x03\"v\n\x0fKeyValueAndUnit\x12\x14\n\x0ckey_strindex\x18\x01 \x01(\x05\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.opentelemetry.proto.common.v1.AnyValue\x12\x15\n\runit_strindex\x18\x03 \x01(\x05\x42\xa4\x01\n-io.opentelemetry.proto.profiles.v1developmentB\rProfilesProtoP\x01Z5go.opentelemetry.io/proto/otlp/profiles/v1development\xaa\x02*OpenTelemetry.Proto.Profiles.V1Developmentb\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py index 93176487575..f7066fcf7ac 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/resource/v1/resource_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/resource/v1/resource.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,12 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.opentelemetry/proto/resource/v1/resource.proto\x12\x1fopentelemetry.proto.resource.v1\x1a*opentelemetry/proto/common/v1/common.proto\"\xa8\x01\n\x08Resource\x12;\n\nattributes\x18\x01 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x02 \x01(\r\x12=\n\x0b\x65ntity_refs\x18\x03 \x03(\x0b\x32(.opentelemetry.proto.common.v1.EntityRefB\x83\x01\n\"io.opentelemetry.proto.resource.v1B\rResourceProtoP\x01Z*go.opentelemetry.io/proto/otlp/resource/v1\xaa\x02\x1fOpenTelemetry.Proto.Resource.V1b\x06proto3') diff --git a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py index aebff91d6a0..61a2d0fadd1 100644 --- a/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py +++ b/opentelemetry-proto/src/opentelemetry/proto/trace/v1/trace_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: opentelemetry/proto/trace/v1/trace.proto # Protobuf Python Version: 5.26.1 @@ -6,12 +7,13 @@ from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() +from opentelemetry.proto.common.v1 import common_pb2 as opentelemetry_dot_proto_dot_common_dot_v1_dot_common__pb2 +from opentelemetry.proto.resource.v1 import resource_pb2 as opentelemetry_dot_proto_dot_resource_dot_v1_dot_resource__pb2 DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(opentelemetry/proto/trace/v1/trace.proto\x12\x1copentelemetry.proto.trace.v1\x1a*opentelemetry/proto/common/v1/common.proto\x1a.opentelemetry/proto/resource/v1/resource.proto\"Q\n\nTracesData\x12\x43\n\x0eresource_spans\x18\x01 \x03(\x0b\x32+.opentelemetry.proto.trace.v1.ResourceSpans\"\xa7\x01\n\rResourceSpans\x12;\n\x08resource\x18\x01 \x01(\x0b\x32).opentelemetry.proto.resource.v1.Resource\x12=\n\x0bscope_spans\x18\x02 \x03(\x0b\x32(.opentelemetry.proto.trace.v1.ScopeSpans\x12\x12\n\nschema_url\x18\x03 \x01(\tJ\x06\x08\xe8\x07\x10\xe9\x07\"\x97\x01\n\nScopeSpans\x12\x42\n\x05scope\x18\x01 \x01(\x0b\x32\x33.opentelemetry.proto.common.v1.InstrumentationScope\x12\x31\n\x05spans\x18\x02 \x03(\x0b\x32\".opentelemetry.proto.trace.v1.Span\x12\x12\n\nschema_url\x18\x03 \x01(\t\"\x84\x08\n\x04Span\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12\x16\n\x0eparent_span_id\x18\x04 \x01(\x0c\x12\r\n\x05\x66lags\x18\x10 \x01(\x07\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x39\n\x04kind\x18\x06 \x01(\x0e\x32+.opentelemetry.proto.trace.v1.Span.SpanKind\x12\x1c\n\x14start_time_unix_nano\x18\x07 \x01(\x06\x12\x1a\n\x12\x65nd_time_unix_nano\x18\x08 \x01(\x06\x12;\n\nattributes\x18\t \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\n \x01(\r\x12\x38\n\x06\x65vents\x18\x0b \x03(\x0b\x32(.opentelemetry.proto.trace.v1.Span.Event\x12\x1c\n\x14\x64ropped_events_count\x18\x0c \x01(\r\x12\x36\n\x05links\x18\r \x03(\x0b\x32\'.opentelemetry.proto.trace.v1.Span.Link\x12\x1b\n\x13\x64ropped_links_count\x18\x0e \x01(\r\x12\x34\n\x06status\x18\x0f \x01(\x0b\x32$.opentelemetry.proto.trace.v1.Status\x1a\x8c\x01\n\x05\x45vent\x12\x16\n\x0etime_unix_nano\x18\x01 \x01(\x06\x12\x0c\n\x04name\x18\x02 \x01(\t\x12;\n\nattributes\x18\x03 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x04 \x01(\r\x1a\xac\x01\n\x04Link\x12\x10\n\x08trace_id\x18\x01 \x01(\x0c\x12\x0f\n\x07span_id\x18\x02 \x01(\x0c\x12\x13\n\x0btrace_state\x18\x03 \x01(\t\x12;\n\nattributes\x18\x04 \x03(\x0b\x32\'.opentelemetry.proto.common.v1.KeyValue\x12 \n\x18\x64ropped_attributes_count\x18\x05 \x01(\r\x12\r\n\x05\x66lags\x18\x06 \x01(\x07\"\x99\x01\n\x08SpanKind\x12\x19\n\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x16\n\x12SPAN_KIND_INTERNAL\x10\x01\x12\x14\n\x10SPAN_KIND_SERVER\x10\x02\x12\x14\n\x10SPAN_KIND_CLIENT\x10\x03\x12\x16\n\x12SPAN_KIND_PRODUCER\x10\x04\x12\x16\n\x12SPAN_KIND_CONSUMER\x10\x05\"\xae\x01\n\x06Status\x12\x0f\n\x07message\x18\x02 \x01(\t\x12=\n\x04\x63ode\x18\x03 \x01(\x0e\x32/.opentelemetry.proto.trace.v1.Status.StatusCode\"N\n\nStatusCode\x12\x15\n\x11STATUS_CODE_UNSET\x10\x00\x12\x12\n\x0eSTATUS_CODE_OK\x10\x01\x12\x15\n\x11STATUS_CODE_ERROR\x10\x02J\x04\x08\x01\x10\x02*\x9c\x01\n\tSpanFlags\x12\x19\n\x15SPAN_FLAGS_DO_NOT_USE\x10\x00\x12 \n\x1bSPAN_FLAGS_TRACE_FLAGS_MASK\x10\xff\x01\x12*\n%SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK\x10\x80\x02\x12&\n!SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK\x10\x80\x04\x42w\n\x1fio.opentelemetry.proto.trace.v1B\nTraceProtoP\x01Z\'go.opentelemetry.io/proto/otlp/trace/v1\xaa\x02\x1cOpenTelemetry.Proto.Trace.V1b\x06proto3') From 4eb500857dcd240609de177da9b54cc38a74c483 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Thu, 30 Jul 2026 18:28:04 +0000 Subject: [PATCH 05/11] Force exclude --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 7fd1ef95385..96eaf918677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ log_cli = true # https://docs.astral.sh/ruff/configuration/ target-version = "py310" line-length = 79 +force-exclude = true extend-exclude = [ "*_pb2*.py*", "opentelemetry-proto-json/src/*", From 0d3635a49d3e38ea6acb07f56b1bed1ad97d3f8c Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Thu, 30 Jul 2026 18:39:21 +0000 Subject: [PATCH 06/11] Fix failing CI --- opentelemetry-configuration/tests/test_meter_provider.py | 2 +- .../src/opentelemetry/sdk/util/instrumentation.py | 9 +++++++-- pyproject.toml | 4 ++-- shim/opentelemetry-opencensus-shim/tests/test_shim.py | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/opentelemetry-configuration/tests/test_meter_provider.py b/opentelemetry-configuration/tests/test_meter_provider.py index 778c20c6c24..0bc98f025d2 100644 --- a/opentelemetry-configuration/tests/test_meter_provider.py +++ b/opentelemetry-configuration/tests/test_meter_provider.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 # Tests access private members of SDK classes to assert correct configuration. -# pylint: disable=protected-access +# pylint: disable=protected-access,too-many-lines import os import sys diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py index f932e9b8f19..a6a00cbfcbf 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py @@ -21,7 +21,7 @@ class InstrumentationInfo: properties. """ - __slots__ = ("_name", "_schema_url", "_version") + __slots__ = ("_name", "_version", "_schema_url") @deprecated( "You should use InstrumentationScope. Deprecated since version 1.11.1." @@ -81,7 +81,12 @@ class InstrumentationScope: properties. """ - __slots__ = ("_attributes", "_name", "_schema_url", "_version") + __slots__ = ( + "_name", + "_version", + "_schema_url", + "_attributes", + ) def __init__( self, diff --git a/pyproject.toml b/pyproject.toml index 96eaf918677..6c2763404ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -143,12 +143,12 @@ select = [ "RUF101", "RUF200", "TRY002", "TRY004", "TRY201", "TRY203", "TRY401", ] # These are also part of the default but don't have fixes available, they need to be manually -# resolved, except E501 which is intentionally ignored. +# resolved, except E501 and RUF023 which are intentionally ignored. ignore = [ "B008", "B017", "B018", "B020", "B023", "B039", "BLE001", "C401", "C408", "C417", "DTZ007", "E501", "FLY002", "LOG015", "PERF102", "PIE796", "PLW0602", "PLW1508", "PT014", "PYI034", "PYI036", "RUF009", "RUF012", "RUF013", - "RUF015", "S110", "SIM102", "SIM103", "SIM115", "SIM117", "SIM118", "TRY002", + "RUF015", "RUF023", "S110", "SIM102", "SIM103", "SIM115", "SIM117", "SIM118", "TRY002", "TRY004", "TRY201", "TRY401", ] diff --git a/shim/opentelemetry-opencensus-shim/tests/test_shim.py b/shim/opentelemetry-opencensus-shim/tests/test_shim.py index 1b5051ab3ca..255d423fa29 100644 --- a/shim/opentelemetry-opencensus-shim/tests/test_shim.py +++ b/shim/opentelemetry-opencensus-shim/tests/test_shim.py @@ -105,7 +105,7 @@ def test_set_span_kind_logs_a_warning(self): with self.assertLogs(level=logging.WARNING): span.span_kind = SpanKind.CLIENT - # pylint: disable=no-self-use,no-member,protected-access + # pylint: disable=no-self-use,no-member,protected-access,confusing-with-statement def test_shim_span_contextmanager_calls_does_not_call_end(self): # This was a bug in first implementation where the underlying OTel span.end() was # called after span.__exit__ which caused double-ending the span. From eceda6117f5d9295445227c22a84ceb4efb6d9fc Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Mon, 3 Aug 2026 18:33:58 +0000 Subject: [PATCH 07/11] Address comments --- dev-requirements.txt | 2 +- pyproject.toml | 68 ++++---------------------------------------- uv.lock | 44 ++++++++++++++-------------- 3 files changed, 29 insertions(+), 85 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index ece3667626e..fed059cae8a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -17,4 +17,4 @@ asgiref==3.7.2 psutil==7.2.2 GitPython==3.1.52 pre-commit==3.7.0 -ruff==0.16.0 +ruff==0.16.1 diff --git a/pyproject.toml b/pyproject.toml index 6c2763404ec..c1411f8e307 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,7 +74,6 @@ log_cli = true [tool.ruff] # https://docs.astral.sh/ruff/configuration/ -target-version = "py310" line-length = 79 force-exclude = true extend-exclude = [ @@ -87,69 +86,14 @@ extension = { added = "markdown", changed = "markdown", deprecated = "markdown", [tool.ruff.lint] # https://docs.astral.sh/ruff/linter/#rule-selection # pylint: https://github.com/astral-sh/ruff/issues/970 -# These are all part of the default ruleset: -# https://docs.astral.sh/ruff/default-rules/ -select = [ - "YTT101", "YTT102", "YTT103", "YTT201", "YTT202", "YTT203", "YTT204", "YTT301", - "YTT302", "YTT303", "ASYNC100", "ASYNC105", "ASYNC115", "ASYNC116", "ASYNC210", "ASYNC220", - "ASYNC221", "ASYNC222", "ASYNC230", "ASYNC251", "S102", "S110", "S112", "BLE001", - "B002", "B003", "B004", "B005", "B006", "B008", "B009", "B010", - "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B019", - "B020", "B021", "B022", "B023", "B025", "B026", "B029", "B030", - "B031", "B032", "B033", "B035", "B039", "C400", "C401", "C402", - "C403", "C404", "C405", "C406", "C408", "C409", "C410", "C411", - "C413", "C414", "C415", "C417", "C418", "C419", "DTZ001", "DTZ002", - "DTZ003", "DTZ004", "DTZ005", "DTZ006", "DTZ007", "DTZ011", "DTZ012", "DTZ901", - "T100", "EXE001", "EXE002", "EXE004", "EXE005", "FA100", "FA102", "INT001", - "INT002", "INT003", "LOG001", "LOG002", "LOG009", "LOG014", "LOG015", "G010", - "G101", "G201", "G202", "PIE790", "PIE794", "PIE796", "PIE800", "PIE804", - "PIE807", "PIE808", "PIE810", "PYI001", "PYI002", "PYI003", "PYI004", "PYI005", - "PYI006", "PYI007", "PYI008", "PYI009", "PYI010", "PYI012", "PYI013", "PYI015", - "PYI016", "PYI017", "PYI018", "PYI019", "PYI020", "PYI025", "PYI026", "PYI029", - "PYI030", "PYI032", "PYI033", "PYI034", "PYI035", "PYI036", "PYI041", "PYI042", - "PYI043", "PYI044", "PYI045", "PYI046", "PYI047", "PYI048", "PYI049", "PYI050", - "PYI052", "PYI055", "PYI057", "PYI058", "PYI059", "PYI061", "PYI062", "PYI063", - "PYI064", "PYI066", "PT010", "PT014", "PT020", "PT025", "PT026", "PT031", - "RET501", "SIM101", "SIM102", "SIM103", "SIM107", "SIM113", "SIM114", "SIM115", - "SIM117", "SIM118", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM220", - "SIM221", "SIM222", "SIM223", "SIM401", "SIM905", "SIM911", "TC004", "TC005", - "TC007", "TC010", "PTH124", "PTH210", "FLY002", "I001", "N999", "PERF101", - "PERF102", "PERF402", "E722", "E902", "W605", "D419", "F401", "F402", - "F404", "F407", "F501", "F502", "F503", "F504", "F505", "F506", - "F507", "F508", "F509", "F521", "F522", "F523", "F524", "F525", - "F541", "F601", "F602", "F621", "F622", "F631", "F632", "F633", - "F634", "F701", "F702", "F704", "F706", "F707", "F811", "F821", - "F822", "F823", "F841", "F842", "F901", "PGH005", "PLC0105", "PLC0131", - "PLC0132", "PLC0205", "PLC0206", "PLC0208", "PLC0414", "PLC3002", "PLE0100", "PLE0101", - "PLE0115", "PLE0116", "PLE0117", "PLE0118", "PLE0303", "PLE0305", "PLE0307", "PLE0308", - "PLE0309", "PLE0604", "PLE0605", "PLE0643", "PLE0704", "PLE1132", "PLE1142", "PLE1205", - "PLE1206", "PLE1300", "PLE1307", "PLE1310", "PLE1507", "PLE1519", "PLE1520", "PLE1700", - "PLE2502", "PLE2510", "PLE2512", "PLE2513", "PLE2514", "PLE2515", "PLR0124", "PLR0133", - "PLR0206", "PLR0402", "PLR1704", "PLR1711", "PLR1716", "PLR1722", "PLR1730", "PLR1733", - "PLR1736", "PLR2044", "PLW0120", "PLW0127", "PLW0128", "PLW0129", "PLW0131", "PLW0133", - "PLW0177", "PLW0211", "PLW0245", "PLW0406", "PLW0602", "PLW0604", "PLW0642", "PLW0711", - "PLW1501", "PLW1507", "PLW1508", "PLW1509", "PLW1510", "PLW2101", "UP001", "UP003", - "UP004", "UP005", "UP006", "UP007", "UP008", "UP009", "UP010", "UP011", - "UP012", "UP014", "UP017", "UP018", "UP019", "UP020", "UP021", "UP022", - "UP023", "UP024", "UP025", "UP026", "UP028", "UP029", "UP030", "UP031", - "UP032", "UP033", "UP034", "UP035", "UP036", "UP037", "UP039", "UP040", - "UP041", "UP043", "UP044", "UP045", "UP046", "UP047", "UP049", "UP050", - "FURB105", "FURB122", "FURB129", "FURB132", "FURB136", "FURB157", "FURB161", "FURB162", - "FURB163", "FURB166", "FURB167", "FURB168", "FURB169", "FURB177", "FURB181", "FURB188", - "RUF007", "RUF008", "RUF009", "RUF010", "RUF012", "RUF013", "RUF015", "RUF016", - "RUF017", "RUF018", "RUF019", "RUF020", "RUF022", "RUF023", "RUF024", "RUF026", - "RUF028", "RUF030", "RUF032", "RUF033", "RUF034", "RUF040", "RUF041", "RUF046", - "RUF048", "RUF049", "RUF051", "RUF053", "RUF057", "RUF058", "RUF059", "RUF100", - "RUF101", "RUF200", "TRY002", "TRY004", "TRY201", "TRY203", "TRY401", -] -# These are also part of the default but don't have fixes available, they need to be manually -# resolved, except E501 and RUF023 which are intentionally ignored. +# Ignore rules from the default ruleset that don't have auto-fixes available and need to be +# manually resolved, plus E501 and RUF023 which are intentionally ignored. ignore = [ "B008", "B017", "B018", "B020", "B023", "B039", "BLE001", "C401", - "C408", "C417", "DTZ007", "E501", "FLY002", "LOG015", "PERF102", "PIE796", - "PLW0602", "PLW1508", "PT014", "PYI034", "PYI036", "RUF009", "RUF012", "RUF013", - "RUF015", "RUF023", "S110", "SIM102", "SIM103", "SIM115", "SIM117", "SIM118", "TRY002", - "TRY004", "TRY201", "TRY401", + "C408", "C417", "DTZ007", "E501", "FLY002", "ISC004", "LOG015", "PERF102", + "PIE796", "PLW0602", "PLW1508", "PT014", "PYI034", "PYI036", "RUF009", "RUF012", + "RUF013", "RUF015", "RUF023", "S110", "SIM102", "SIM103", "SIM115", "SIM117", + "SIM118", "TRY002", "TRY004", "TRY201", "TRY401", ] [tool.ruff.lint.per-file-ignores] diff --git a/uv.lock b/uv.lock index d22135d7427..32d0a5b074a 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 3 +revision = 2 requires-python = ">=3.10" resolution-markers = [ "python_full_version >= '3.14'", @@ -1861,27 +1861,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, - { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, - { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, - { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, - { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, - { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, - { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, - { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, - { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, - { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, - { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, - { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, - { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, - { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, - { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, +version = "0.16.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/25/7113f6d5498888c5fb7db34081cba7d5971c4cb1bfb26819966eee68f003/ruff-0.16.1.tar.gz", hash = "sha256:fedad7c801dabd3fb9741d76aca39246e6ddd9ca446a015875207bf19f1e6bc7", size = 4877500, upload-time = "2026-07-30T19:37:01.379Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/bd/694da69368e0973de65df2ddc73ab18d43c469d5963d9b150911de6bc513/ruff-0.16.1-py3-none-linux_armv6l.whl", hash = "sha256:58edb313b88f0c5460a26adf5f39a37a3be789494a15e3e411e35fa78b89f9a0", size = 10839126, upload-time = "2026-07-30T19:36:13.697Z" }, + { url = "https://files.pythonhosted.org/packages/3f/f0/b626e5d5bd0dd9576263658ef12885e2288afd1029a48e26ffed65ec1ac1/ruff-0.16.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fde5a99e2f97479af66edd6622c6d5a2a7592c77cf4153d9e4428f5eeb55b60c", size = 11070253, upload-time = "2026-07-30T19:36:17.14Z" }, + { url = "https://files.pythonhosted.org/packages/83/63/f40acfb6b35b88623e71684942b552c3edd96035f5d98f313815f7b277de/ruff-0.16.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6", size = 10561425, upload-time = "2026-07-30T19:36:20.04Z" }, + { url = "https://files.pythonhosted.org/packages/aa/dd/14ec0e9c2b4d315547dd38765004b4863e354e1b52cb308272215d9f6f6d/ruff-0.16.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30affbcedf59ad5703d9c91f82266e02b47739f797e1a7b6e158e5526a6dae38", size = 10948879, upload-time = "2026-07-30T19:36:22.476Z" }, + { url = "https://files.pythonhosted.org/packages/33/e9/9d870cbae575030fdef595f04b4b97573c525b5497cce4f4498cf2f85446/ruff-0.16.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24e9c631573cbca9d20f1283f8f479b2afa4a8503504822bd71a293889f16743", size = 10643691, upload-time = "2026-07-30T19:36:24.914Z" }, + { url = "https://files.pythonhosted.org/packages/c4/09/12743d544e2173f53ecd27217c65f90d2bc0f8424a66a60339e56bbc0457/ruff-0.16.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b41bdd48fb420987a9b5212e4957c26ad4abce401fa9ea9d4d85843727945f4f", size = 11435354, upload-time = "2026-07-30T19:36:28.447Z" }, + { url = "https://files.pythonhosted.org/packages/7f/89/a1652b2daee52083c9554a6333b678a8b01d0400f976827bb87857f9449a/ruff-0.16.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0d1e1393b7648079e13669de1c1f4fde06d4583e84d8fd5c1551e0a77a2aa75", size = 12259033, upload-time = "2026-07-30T19:36:31.326Z" }, + { url = "https://files.pythonhosted.org/packages/16/96/ecdcb8c54ee7b123b487f807eb014e6e019155a0b81dfb669acd52f28ce3/ruff-0.16.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07bf434b1c95f4e093be4532068ef4fcf00924eb2ade8796075980902d6fd54a", size = 11667981, upload-time = "2026-07-30T19:36:34.394Z" }, + { url = "https://files.pythonhosted.org/packages/cd/90/c52e12e0d862e9572f2a33aa227409143520abe53111e9a6babbac7b4af8/ruff-0.16.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c", size = 11468183, upload-time = "2026-07-30T19:36:37.339Z" }, + { url = "https://files.pythonhosted.org/packages/2c/6b/4ffb7ad1d83eb16cf8cbb3c8815d3f11c88460fd162d4b372a2059be1c2a/ruff-0.16.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:82ae3c0c0d74daf17b968a10b7b3bb3ef297ab7de0c1f749646b25e690ccb150", size = 11470071, upload-time = "2026-07-30T19:36:39.91Z" }, + { url = "https://files.pythonhosted.org/packages/9c/72/32ae7db4c0b5e32ab611787caa19d1546800676d79f7483b7100a3561bf4/ruff-0.16.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4d5f2ed10f8242d83fc08d521301089364e3375375705356f20c0e31606ef3ef", size = 10919503, upload-time = "2026-07-30T19:36:42.65Z" }, + { url = "https://files.pythonhosted.org/packages/f7/ca/3d901ba6ad6fc38da39c3448fc6c59ac945679293a17c3ceb6d6c1cba13e/ruff-0.16.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a4665b309891f83f3e3c25447935f1213e9abbd4b5640af7a1f2def9f8d413c1", size = 10649861, upload-time = "2026-07-30T19:36:45.18Z" }, + { url = "https://files.pythonhosted.org/packages/92/79/894ef1ced26552d5f8c9cf6d85b0687840e1128c55aeab7b9c2d54a0d880/ruff-0.16.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26e9ca5c9bc3971f20d3cf18a957f52ffd6a5f6564ff15c4912a144dcac22494", size = 11148137, upload-time = "2026-07-30T19:36:47.936Z" }, + { url = "https://files.pythonhosted.org/packages/2d/69/3609a09fa1cb46cc28b762363e440a354204e5dff01bd0c8d7437874d6b9/ruff-0.16.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:67e1e1e3fa4f0c82f0e36d4cd61e661f6e7a6196cb1aa92fe0828fa7b8f257cd", size = 11559211, upload-time = "2026-07-30T19:36:50.448Z" }, + { url = "https://files.pythonhosted.org/packages/fc/8a/fb22af2fd78a736e241fabf67e30ce1799a64244026377a49e133af90762/ruff-0.16.1-py3-none-win32.whl", hash = "sha256:d31765e131295b8445caf301e3e8a85b34d1b9b211b4109b7ba457888b051806", size = 10838258, upload-time = "2026-07-30T19:36:53.298Z" }, + { url = "https://files.pythonhosted.org/packages/d4/35/e57fd9fb5d423961df087a00b12d42c0a830288dc2f3b45ecca299158b4f/ruff-0.16.1-py3-none-win_amd64.whl", hash = "sha256:09b05e8b90c2cb06ad63464350e7a45e8e44a2dfe52072ebfba6666ca8d3f596", size = 11961111, upload-time = "2026-07-30T19:36:56.107Z" }, + { url = "https://files.pythonhosted.org/packages/cb/46/240ea004bf6dc4feb40e9832f2205a476a47dd5b8a3f8211a5fc5f95e20e/ruff-0.16.1-py3-none-win_arm64.whl", hash = "sha256:dbaadaac38c70239f056d306b7476f246b0bf000fa6b3876402acbf5b227eaf8", size = 11309414, upload-time = "2026-07-30T19:36:58.79Z" }, ] [[package]] From 600e38fb3d9e980b4c977262e6b5ffa04640916f Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Mon, 3 Aug 2026 18:52:35 +0000 Subject: [PATCH 08/11] Change ruff --- uv.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/uv.lock b/uv.lock index c495c3e31f0..6c5760cf630 100644 --- a/uv.lock +++ b/uv.lock @@ -465,7 +465,7 @@ name = "exceptiongroup" version = "1.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ @@ -1886,27 +1886,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, - { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, - { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, - { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, - { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, - { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, - { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, - { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, - { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, - { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, - { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, - { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, - { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, - { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, - { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, +version = "0.16.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/25/7113f6d5498888c5fb7db34081cba7d5971c4cb1bfb26819966eee68f003/ruff-0.16.1.tar.gz", hash = "sha256:fedad7c801dabd3fb9741d76aca39246e6ddd9ca446a015875207bf19f1e6bc7", size = 4877500, upload-time = "2026-07-30T19:37:01.379Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/bd/694da69368e0973de65df2ddc73ab18d43c469d5963d9b150911de6bc513/ruff-0.16.1-py3-none-linux_armv6l.whl", hash = "sha256:58edb313b88f0c5460a26adf5f39a37a3be789494a15e3e411e35fa78b89f9a0", size = 10839126, upload-time = "2026-07-30T19:36:13.697Z" }, + { url = "https://files.pythonhosted.org/packages/3f/f0/b626e5d5bd0dd9576263658ef12885e2288afd1029a48e26ffed65ec1ac1/ruff-0.16.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fde5a99e2f97479af66edd6622c6d5a2a7592c77cf4153d9e4428f5eeb55b60c", size = 11070253, upload-time = "2026-07-30T19:36:17.14Z" }, + { url = "https://files.pythonhosted.org/packages/83/63/f40acfb6b35b88623e71684942b552c3edd96035f5d98f313815f7b277de/ruff-0.16.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6", size = 10561425, upload-time = "2026-07-30T19:36:20.04Z" }, + { url = "https://files.pythonhosted.org/packages/aa/dd/14ec0e9c2b4d315547dd38765004b4863e354e1b52cb308272215d9f6f6d/ruff-0.16.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30affbcedf59ad5703d9c91f82266e02b47739f797e1a7b6e158e5526a6dae38", size = 10948879, upload-time = "2026-07-30T19:36:22.476Z" }, + { url = "https://files.pythonhosted.org/packages/33/e9/9d870cbae575030fdef595f04b4b97573c525b5497cce4f4498cf2f85446/ruff-0.16.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24e9c631573cbca9d20f1283f8f479b2afa4a8503504822bd71a293889f16743", size = 10643691, upload-time = "2026-07-30T19:36:24.914Z" }, + { url = "https://files.pythonhosted.org/packages/c4/09/12743d544e2173f53ecd27217c65f90d2bc0f8424a66a60339e56bbc0457/ruff-0.16.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b41bdd48fb420987a9b5212e4957c26ad4abce401fa9ea9d4d85843727945f4f", size = 11435354, upload-time = "2026-07-30T19:36:28.447Z" }, + { url = "https://files.pythonhosted.org/packages/7f/89/a1652b2daee52083c9554a6333b678a8b01d0400f976827bb87857f9449a/ruff-0.16.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0d1e1393b7648079e13669de1c1f4fde06d4583e84d8fd5c1551e0a77a2aa75", size = 12259033, upload-time = "2026-07-30T19:36:31.326Z" }, + { url = "https://files.pythonhosted.org/packages/16/96/ecdcb8c54ee7b123b487f807eb014e6e019155a0b81dfb669acd52f28ce3/ruff-0.16.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07bf434b1c95f4e093be4532068ef4fcf00924eb2ade8796075980902d6fd54a", size = 11667981, upload-time = "2026-07-30T19:36:34.394Z" }, + { url = "https://files.pythonhosted.org/packages/cd/90/c52e12e0d862e9572f2a33aa227409143520abe53111e9a6babbac7b4af8/ruff-0.16.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c", size = 11468183, upload-time = "2026-07-30T19:36:37.339Z" }, + { url = "https://files.pythonhosted.org/packages/2c/6b/4ffb7ad1d83eb16cf8cbb3c8815d3f11c88460fd162d4b372a2059be1c2a/ruff-0.16.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:82ae3c0c0d74daf17b968a10b7b3bb3ef297ab7de0c1f749646b25e690ccb150", size = 11470071, upload-time = "2026-07-30T19:36:39.91Z" }, + { url = "https://files.pythonhosted.org/packages/9c/72/32ae7db4c0b5e32ab611787caa19d1546800676d79f7483b7100a3561bf4/ruff-0.16.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4d5f2ed10f8242d83fc08d521301089364e3375375705356f20c0e31606ef3ef", size = 10919503, upload-time = "2026-07-30T19:36:42.65Z" }, + { url = "https://files.pythonhosted.org/packages/f7/ca/3d901ba6ad6fc38da39c3448fc6c59ac945679293a17c3ceb6d6c1cba13e/ruff-0.16.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a4665b309891f83f3e3c25447935f1213e9abbd4b5640af7a1f2def9f8d413c1", size = 10649861, upload-time = "2026-07-30T19:36:45.18Z" }, + { url = "https://files.pythonhosted.org/packages/92/79/894ef1ced26552d5f8c9cf6d85b0687840e1128c55aeab7b9c2d54a0d880/ruff-0.16.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26e9ca5c9bc3971f20d3cf18a957f52ffd6a5f6564ff15c4912a144dcac22494", size = 11148137, upload-time = "2026-07-30T19:36:47.936Z" }, + { url = "https://files.pythonhosted.org/packages/2d/69/3609a09fa1cb46cc28b762363e440a354204e5dff01bd0c8d7437874d6b9/ruff-0.16.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:67e1e1e3fa4f0c82f0e36d4cd61e661f6e7a6196cb1aa92fe0828fa7b8f257cd", size = 11559211, upload-time = "2026-07-30T19:36:50.448Z" }, + { url = "https://files.pythonhosted.org/packages/fc/8a/fb22af2fd78a736e241fabf67e30ce1799a64244026377a49e133af90762/ruff-0.16.1-py3-none-win32.whl", hash = "sha256:d31765e131295b8445caf301e3e8a85b34d1b9b211b4109b7ba457888b051806", size = 10838258, upload-time = "2026-07-30T19:36:53.298Z" }, + { url = "https://files.pythonhosted.org/packages/d4/35/e57fd9fb5d423961df087a00b12d42c0a830288dc2f3b45ecca299158b4f/ruff-0.16.1-py3-none-win_amd64.whl", hash = "sha256:09b05e8b90c2cb06ad63464350e7a45e8e44a2dfe52072ebfba6666ca8d3f596", size = 11961111, upload-time = "2026-07-30T19:36:56.107Z" }, + { url = "https://files.pythonhosted.org/packages/cb/46/240ea004bf6dc4feb40e9832f2205a476a47dd5b8a3f8211a5fc5f95e20e/ruff-0.16.1-py3-none-win_arm64.whl", hash = "sha256:dbaadaac38c70239f056d306b7476f246b0bf000fa6b3876402acbf5b227eaf8", size = 11309414, upload-time = "2026-07-30T19:36:58.79Z" }, ] [[package]] From 103f4276d15b4cd503c87693aaef4386bfe1dd30 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Mon, 3 Aug 2026 18:54:32 +0000 Subject: [PATCH 09/11] Add changelog fragment for PR #5491 Assisted-by: Antigravity --- .changelog/5491.changed | 1 + uv.lock | 44 ++++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 .changelog/5491.changed diff --git a/.changelog/5491.changed b/.changelog/5491.changed new file mode 100644 index 00000000000..c0ea2bd01fd --- /dev/null +++ b/.changelog/5491.changed @@ -0,0 +1 @@ +`opentelemetry-python`: enable Ruff default ruleset and fix auto-fixable lint issues diff --git a/uv.lock b/uv.lock index 6c5760cf630..c495c3e31f0 100644 --- a/uv.lock +++ b/uv.lock @@ -465,7 +465,7 @@ name = "exceptiongroup" version = "1.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ @@ -1886,27 +1886,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.16.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/70/25/7113f6d5498888c5fb7db34081cba7d5971c4cb1bfb26819966eee68f003/ruff-0.16.1.tar.gz", hash = "sha256:fedad7c801dabd3fb9741d76aca39246e6ddd9ca446a015875207bf19f1e6bc7", size = 4877500, upload-time = "2026-07-30T19:37:01.379Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1b/bd/694da69368e0973de65df2ddc73ab18d43c469d5963d9b150911de6bc513/ruff-0.16.1-py3-none-linux_armv6l.whl", hash = "sha256:58edb313b88f0c5460a26adf5f39a37a3be789494a15e3e411e35fa78b89f9a0", size = 10839126, upload-time = "2026-07-30T19:36:13.697Z" }, - { url = "https://files.pythonhosted.org/packages/3f/f0/b626e5d5bd0dd9576263658ef12885e2288afd1029a48e26ffed65ec1ac1/ruff-0.16.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fde5a99e2f97479af66edd6622c6d5a2a7592c77cf4153d9e4428f5eeb55b60c", size = 11070253, upload-time = "2026-07-30T19:36:17.14Z" }, - { url = "https://files.pythonhosted.org/packages/83/63/f40acfb6b35b88623e71684942b552c3edd96035f5d98f313815f7b277de/ruff-0.16.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6", size = 10561425, upload-time = "2026-07-30T19:36:20.04Z" }, - { url = "https://files.pythonhosted.org/packages/aa/dd/14ec0e9c2b4d315547dd38765004b4863e354e1b52cb308272215d9f6f6d/ruff-0.16.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30affbcedf59ad5703d9c91f82266e02b47739f797e1a7b6e158e5526a6dae38", size = 10948879, upload-time = "2026-07-30T19:36:22.476Z" }, - { url = "https://files.pythonhosted.org/packages/33/e9/9d870cbae575030fdef595f04b4b97573c525b5497cce4f4498cf2f85446/ruff-0.16.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24e9c631573cbca9d20f1283f8f479b2afa4a8503504822bd71a293889f16743", size = 10643691, upload-time = "2026-07-30T19:36:24.914Z" }, - { url = "https://files.pythonhosted.org/packages/c4/09/12743d544e2173f53ecd27217c65f90d2bc0f8424a66a60339e56bbc0457/ruff-0.16.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b41bdd48fb420987a9b5212e4957c26ad4abce401fa9ea9d4d85843727945f4f", size = 11435354, upload-time = "2026-07-30T19:36:28.447Z" }, - { url = "https://files.pythonhosted.org/packages/7f/89/a1652b2daee52083c9554a6333b678a8b01d0400f976827bb87857f9449a/ruff-0.16.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0d1e1393b7648079e13669de1c1f4fde06d4583e84d8fd5c1551e0a77a2aa75", size = 12259033, upload-time = "2026-07-30T19:36:31.326Z" }, - { url = "https://files.pythonhosted.org/packages/16/96/ecdcb8c54ee7b123b487f807eb014e6e019155a0b81dfb669acd52f28ce3/ruff-0.16.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07bf434b1c95f4e093be4532068ef4fcf00924eb2ade8796075980902d6fd54a", size = 11667981, upload-time = "2026-07-30T19:36:34.394Z" }, - { url = "https://files.pythonhosted.org/packages/cd/90/c52e12e0d862e9572f2a33aa227409143520abe53111e9a6babbac7b4af8/ruff-0.16.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c", size = 11468183, upload-time = "2026-07-30T19:36:37.339Z" }, - { url = "https://files.pythonhosted.org/packages/2c/6b/4ffb7ad1d83eb16cf8cbb3c8815d3f11c88460fd162d4b372a2059be1c2a/ruff-0.16.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:82ae3c0c0d74daf17b968a10b7b3bb3ef297ab7de0c1f749646b25e690ccb150", size = 11470071, upload-time = "2026-07-30T19:36:39.91Z" }, - { url = "https://files.pythonhosted.org/packages/9c/72/32ae7db4c0b5e32ab611787caa19d1546800676d79f7483b7100a3561bf4/ruff-0.16.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4d5f2ed10f8242d83fc08d521301089364e3375375705356f20c0e31606ef3ef", size = 10919503, upload-time = "2026-07-30T19:36:42.65Z" }, - { url = "https://files.pythonhosted.org/packages/f7/ca/3d901ba6ad6fc38da39c3448fc6c59ac945679293a17c3ceb6d6c1cba13e/ruff-0.16.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a4665b309891f83f3e3c25447935f1213e9abbd4b5640af7a1f2def9f8d413c1", size = 10649861, upload-time = "2026-07-30T19:36:45.18Z" }, - { url = "https://files.pythonhosted.org/packages/92/79/894ef1ced26552d5f8c9cf6d85b0687840e1128c55aeab7b9c2d54a0d880/ruff-0.16.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26e9ca5c9bc3971f20d3cf18a957f52ffd6a5f6564ff15c4912a144dcac22494", size = 11148137, upload-time = "2026-07-30T19:36:47.936Z" }, - { url = "https://files.pythonhosted.org/packages/2d/69/3609a09fa1cb46cc28b762363e440a354204e5dff01bd0c8d7437874d6b9/ruff-0.16.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:67e1e1e3fa4f0c82f0e36d4cd61e661f6e7a6196cb1aa92fe0828fa7b8f257cd", size = 11559211, upload-time = "2026-07-30T19:36:50.448Z" }, - { url = "https://files.pythonhosted.org/packages/fc/8a/fb22af2fd78a736e241fabf67e30ce1799a64244026377a49e133af90762/ruff-0.16.1-py3-none-win32.whl", hash = "sha256:d31765e131295b8445caf301e3e8a85b34d1b9b211b4109b7ba457888b051806", size = 10838258, upload-time = "2026-07-30T19:36:53.298Z" }, - { url = "https://files.pythonhosted.org/packages/d4/35/e57fd9fb5d423961df087a00b12d42c0a830288dc2f3b45ecca299158b4f/ruff-0.16.1-py3-none-win_amd64.whl", hash = "sha256:09b05e8b90c2cb06ad63464350e7a45e8e44a2dfe52072ebfba6666ca8d3f596", size = 11961111, upload-time = "2026-07-30T19:36:56.107Z" }, - { url = "https://files.pythonhosted.org/packages/cb/46/240ea004bf6dc4feb40e9832f2205a476a47dd5b8a3f8211a5fc5f95e20e/ruff-0.16.1-py3-none-win_arm64.whl", hash = "sha256:dbaadaac38c70239f056d306b7476f246b0bf000fa6b3876402acbf5b227eaf8", size = 11309414, upload-time = "2026-07-30T19:36:58.79Z" }, +version = "0.15.20" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, + { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, + { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, + { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, + { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, + { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, + { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, + { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, + { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, + { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, + { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, + { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, + { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, + { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, + { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, + { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, + { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, ] [[package]] From f899e95f9af7ee8f860c7ee4bd301eaf081658ef Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Mon, 3 Aug 2026 19:06:51 +0000 Subject: [PATCH 10/11] Update lock file --- uv.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/uv.lock b/uv.lock index c495c3e31f0..6c5760cf630 100644 --- a/uv.lock +++ b/uv.lock @@ -465,7 +465,7 @@ name = "exceptiongroup" version = "1.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ @@ -1886,27 +1886,27 @@ wheels = [ [[package]] name = "ruff" -version = "0.15.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/dc/35b341fc554ba02f217fc10da57d1a75168cfbcf75b0ef2202176d4c4f2d/ruff-0.15.20.tar.gz", hash = "sha256:1416eb04349192646b54de98f146c4f59afe37d0decfc02c3cbbf396f3a28566", size = 4755489, upload-time = "2026-06-25T17:20:37.578Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/d9/2d5014f0253ba541d2061d9fa7193f48e941c8b21bb88a7ff9bbe0bd0596/ruff-0.15.20-py3-none-linux_armv6l.whl", hash = "sha256:00e188c53e499c3c1637f73c91dcf2fb56d576cab76ce1be50a27c4e80e37078", size = 10839665, upload-time = "2026-06-25T17:19:44.702Z" }, - { url = "https://files.pythonhosted.org/packages/c6/d3/ac1798ba64f670698867fcfc591d50e7e421bef137db564858f619a30fcf/ruff-0.15.20-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:9ebd1fd9b9c95fc0bd7b2761aebec1f030013d2e193a2901b224af68fe47251b", size = 11208649, upload-time = "2026-06-25T17:19:48.787Z" }, - { url = "https://files.pythonhosted.org/packages/47/47/d3ac899991202095dfcf3d5176be4272642be3cf981a2f1a30f72a2afb95/ruff-0.15.20-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c5b16cdd67ca108185cd36dce98c576350c03b1660a751de725fb049193a0632", size = 10622638, upload-time = "2026-06-25T17:19:51.354Z" }, - { url = "https://files.pythonhosted.org/packages/33/13/4e043fe30aa94d4ff5213a9881fc296d12960f5971b234a5263fdc225312/ruff-0.15.20-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3413bb3c3d2ca6a8208f1f4809cd2dca3c6de6d0b491c0e70847672bde6e6efd", size = 10984227, upload-time = "2026-06-25T17:19:54.044Z" }, - { url = "https://files.pythonhosted.org/packages/76/e6/92e7bf40388bc5800073b96564f56264f7e48bfd1a498f5ced6ae6d5a769/ruff-0.15.20-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bd7ec42b3bb3da066488db093308a69c4ac5ee6d2af333a86ba6e2eb2e7dd44b", size = 10622882, upload-time = "2026-06-25T17:19:57.037Z" }, - { url = "https://files.pythonhosted.org/packages/13/7a/43460be3f24495a3aa46d4b16873e2c4941b3b5f0b00cf88c03b7b94b339/ruff-0.15.20-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1a36ad0eb77fba9aabfb69ede54de6f376d04ac18ebea022847046d340a8267", size = 11474808, upload-time = "2026-06-25T17:20:00.357Z" }, - { url = "https://files.pythonhosted.org/packages/27/a0/f37077884873221c6b33b4ab49eb18f9f88e54a16a25a5bca59bef46dd66/ruff-0.15.20-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b6df3b1e4610432f0386dba04d853b5f08cbbc903410c6fcc02f620f05aff53c", size = 12293094, upload-time = "2026-06-25T17:20:03.446Z" }, - { url = "https://files.pythonhosted.org/packages/a6/74/165545b60256a9704c21ac0ec4a0d07933b320812f9584836c9f4aca4292/ruff-0.15.20-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e89f198a1ea6ef0d727c1cf16088bc91a6cb0ab947dedc966715691647186eae", size = 11526176, upload-time = "2026-06-25T17:20:06.301Z" }, - { url = "https://files.pythonhosted.org/packages/86/b1/a976a136d40ade83ce743578399865f57001003a409acadc0ecbb3051082/ruff-0.15.20-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:309809086c2acb67624950a3c8133e80f32d0d3e27106c0cd60ff26657c9f24b", size = 11520767, upload-time = "2026-06-25T17:20:09.191Z" }, - { url = "https://files.pythonhosted.org/packages/19/0f/f032696cb01c9b54c0263fa393474d7758f1cdc021a01b04e3cbc2500999/ruff-0.15.20-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:2d2374caa2f2c2f9e2b7da0a50802cfb8b79f55a9b5e49379f564544fbf56487", size = 11500132, upload-time = "2026-06-25T17:20:13.602Z" }, - { url = "https://files.pythonhosted.org/packages/4b/f4/51b1a14bc69e8c224b15dab9cce8e99b425e0455d462caa2b3c9be2b6a8e/ruff-0.15.20-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:a1ed17b65293e0c2f22fc387bc13198a5de94bf4429589b0ff6946b0feaf21a3", size = 10943828, upload-time = "2026-06-25T17:20:16.635Z" }, - { url = "https://files.pythonhosted.org/packages/71/4b/fe267640783cd02bf6c5cc290b1df1051be2ec294c678b5c15fe19e52343/ruff-0.15.20-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:f701305e66b38ea6c91882490eb73459796808e4c6362a1b765255e0cdcd4053", size = 10645418, upload-time = "2026-06-25T17:20:19.4Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c0/a65aa4ec2f5e87a1df32dc3ec1fede434fe3dfd5cbcf3b503cafc676ab54/ruff-0.15.20-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5b9c0c367ad8e5d0d5b5b8537864c469a0a0e55417aadfbeca41fa61333be9f4", size = 11211770, upload-time = "2026-06-25T17:20:22.033Z" }, - { url = "https://files.pythonhosted.org/packages/5a/a4/0caa331d954ae2723d729d351c989cb4ca8b6077d5c6c2cb6de75e98c041/ruff-0.15.20-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:01cc00dd58f0df339d0e902219dd53990ea99996a0344e5d9cc8d45d5307e460", size = 11618698, upload-time = "2026-06-25T17:20:25.259Z" }, - { url = "https://files.pythonhosted.org/packages/10/9b/5f14927848d2fd4aa891fd88d883788c5a7baba561c7874732364045708c/ruff-0.15.20-py3-none-win32.whl", hash = "sha256:ed65ef510e43a137207e0f01cfcf998aeddb1aeeda5c9d35023e910284d7cf21", size = 10857322, upload-time = "2026-06-25T17:20:28.612Z" }, - { url = "https://files.pythonhosted.org/packages/fa/f0/fe47c501f9dea92a26d788ff98bb5d92ed4cb4c88792c5c88af6b697dc8e/ruff-0.15.20-py3-none-win_amd64.whl", hash = "sha256:a525c81c70fb0380344dd1d8745d8cc1c890b7fc94a58d5a07bd8eb9557b8415", size = 11993274, upload-time = "2026-06-25T17:20:31.871Z" }, - { url = "https://files.pythonhosted.org/packages/d7/2b/9555445e1201d92b3195f45cdb153a0b68f24e0a4273f6e3d5ab46e212bb/ruff-0.15.20-py3-none-win_arm64.whl", hash = "sha256:2f5b2a6d614e8700388806a14996c40fab2c47b819ef57d790a34878858ed9ca", size = 11343498, upload-time = "2026-06-25T17:20:35.03Z" }, +version = "0.16.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/25/7113f6d5498888c5fb7db34081cba7d5971c4cb1bfb26819966eee68f003/ruff-0.16.1.tar.gz", hash = "sha256:fedad7c801dabd3fb9741d76aca39246e6ddd9ca446a015875207bf19f1e6bc7", size = 4877500, upload-time = "2026-07-30T19:37:01.379Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/bd/694da69368e0973de65df2ddc73ab18d43c469d5963d9b150911de6bc513/ruff-0.16.1-py3-none-linux_armv6l.whl", hash = "sha256:58edb313b88f0c5460a26adf5f39a37a3be789494a15e3e411e35fa78b89f9a0", size = 10839126, upload-time = "2026-07-30T19:36:13.697Z" }, + { url = "https://files.pythonhosted.org/packages/3f/f0/b626e5d5bd0dd9576263658ef12885e2288afd1029a48e26ffed65ec1ac1/ruff-0.16.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fde5a99e2f97479af66edd6622c6d5a2a7592c77cf4153d9e4428f5eeb55b60c", size = 11070253, upload-time = "2026-07-30T19:36:17.14Z" }, + { url = "https://files.pythonhosted.org/packages/83/63/f40acfb6b35b88623e71684942b552c3edd96035f5d98f313815f7b277de/ruff-0.16.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6", size = 10561425, upload-time = "2026-07-30T19:36:20.04Z" }, + { url = "https://files.pythonhosted.org/packages/aa/dd/14ec0e9c2b4d315547dd38765004b4863e354e1b52cb308272215d9f6f6d/ruff-0.16.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30affbcedf59ad5703d9c91f82266e02b47739f797e1a7b6e158e5526a6dae38", size = 10948879, upload-time = "2026-07-30T19:36:22.476Z" }, + { url = "https://files.pythonhosted.org/packages/33/e9/9d870cbae575030fdef595f04b4b97573c525b5497cce4f4498cf2f85446/ruff-0.16.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24e9c631573cbca9d20f1283f8f479b2afa4a8503504822bd71a293889f16743", size = 10643691, upload-time = "2026-07-30T19:36:24.914Z" }, + { url = "https://files.pythonhosted.org/packages/c4/09/12743d544e2173f53ecd27217c65f90d2bc0f8424a66a60339e56bbc0457/ruff-0.16.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b41bdd48fb420987a9b5212e4957c26ad4abce401fa9ea9d4d85843727945f4f", size = 11435354, upload-time = "2026-07-30T19:36:28.447Z" }, + { url = "https://files.pythonhosted.org/packages/7f/89/a1652b2daee52083c9554a6333b678a8b01d0400f976827bb87857f9449a/ruff-0.16.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0d1e1393b7648079e13669de1c1f4fde06d4583e84d8fd5c1551e0a77a2aa75", size = 12259033, upload-time = "2026-07-30T19:36:31.326Z" }, + { url = "https://files.pythonhosted.org/packages/16/96/ecdcb8c54ee7b123b487f807eb014e6e019155a0b81dfb669acd52f28ce3/ruff-0.16.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07bf434b1c95f4e093be4532068ef4fcf00924eb2ade8796075980902d6fd54a", size = 11667981, upload-time = "2026-07-30T19:36:34.394Z" }, + { url = "https://files.pythonhosted.org/packages/cd/90/c52e12e0d862e9572f2a33aa227409143520abe53111e9a6babbac7b4af8/ruff-0.16.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c", size = 11468183, upload-time = "2026-07-30T19:36:37.339Z" }, + { url = "https://files.pythonhosted.org/packages/2c/6b/4ffb7ad1d83eb16cf8cbb3c8815d3f11c88460fd162d4b372a2059be1c2a/ruff-0.16.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:82ae3c0c0d74daf17b968a10b7b3bb3ef297ab7de0c1f749646b25e690ccb150", size = 11470071, upload-time = "2026-07-30T19:36:39.91Z" }, + { url = "https://files.pythonhosted.org/packages/9c/72/32ae7db4c0b5e32ab611787caa19d1546800676d79f7483b7100a3561bf4/ruff-0.16.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4d5f2ed10f8242d83fc08d521301089364e3375375705356f20c0e31606ef3ef", size = 10919503, upload-time = "2026-07-30T19:36:42.65Z" }, + { url = "https://files.pythonhosted.org/packages/f7/ca/3d901ba6ad6fc38da39c3448fc6c59ac945679293a17c3ceb6d6c1cba13e/ruff-0.16.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a4665b309891f83f3e3c25447935f1213e9abbd4b5640af7a1f2def9f8d413c1", size = 10649861, upload-time = "2026-07-30T19:36:45.18Z" }, + { url = "https://files.pythonhosted.org/packages/92/79/894ef1ced26552d5f8c9cf6d85b0687840e1128c55aeab7b9c2d54a0d880/ruff-0.16.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26e9ca5c9bc3971f20d3cf18a957f52ffd6a5f6564ff15c4912a144dcac22494", size = 11148137, upload-time = "2026-07-30T19:36:47.936Z" }, + { url = "https://files.pythonhosted.org/packages/2d/69/3609a09fa1cb46cc28b762363e440a354204e5dff01bd0c8d7437874d6b9/ruff-0.16.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:67e1e1e3fa4f0c82f0e36d4cd61e661f6e7a6196cb1aa92fe0828fa7b8f257cd", size = 11559211, upload-time = "2026-07-30T19:36:50.448Z" }, + { url = "https://files.pythonhosted.org/packages/fc/8a/fb22af2fd78a736e241fabf67e30ce1799a64244026377a49e133af90762/ruff-0.16.1-py3-none-win32.whl", hash = "sha256:d31765e131295b8445caf301e3e8a85b34d1b9b211b4109b7ba457888b051806", size = 10838258, upload-time = "2026-07-30T19:36:53.298Z" }, + { url = "https://files.pythonhosted.org/packages/d4/35/e57fd9fb5d423961df087a00b12d42c0a830288dc2f3b45ecca299158b4f/ruff-0.16.1-py3-none-win_amd64.whl", hash = "sha256:09b05e8b90c2cb06ad63464350e7a45e8e44a2dfe52072ebfba6666ca8d3f596", size = 11961111, upload-time = "2026-07-30T19:36:56.107Z" }, + { url = "https://files.pythonhosted.org/packages/cb/46/240ea004bf6dc4feb40e9832f2205a476a47dd5b8a3f8211a5fc5f95e20e/ruff-0.16.1-py3-none-win_arm64.whl", hash = "sha256:dbaadaac38c70239f056d306b7476f246b0bf000fa6b3876402acbf5b227eaf8", size = 11309414, upload-time = "2026-07-30T19:36:58.79Z" }, ] [[package]] From bc05d86bf48fb910a6b2570e0572602d825fd094 Mon Sep 17 00:00:00 2001 From: Dylan Russell Date: Wed, 5 Aug 2026 18:31:08 +0000 Subject: [PATCH 11/11] Add line length 120 --- .github/workflows/generate_workflows.py | 41 +- .pylintrc | 2 +- CHANGELOG.md | 4 +- .../opentelemetry/codegen/json/generator.py | 222 +- .../src/opentelemetry/codegen/json/plugin.py | 4 +- .../codegen/json/runtime/json_codec.py | 21 +- .../src/opentelemetry/codegen/json/writer.py | 22 +- .../tests/conftest.py | 4 +- .../tests/test_json_codec.py | 4 +- .../tests/test_protobuf_compatibility.py | 11 +- .../tests/test_serde.py | 8 +- .../tests/test_types.py | 4 +- .../tests/test_writer.py | 4 +- docs/conf.py | 12 +- docs/examples/auto-instrumentation/client.py | 4 +- .../auto-instrumentation/server_manual.py | 4 +- .../server_programmatic.py | 4 +- docs/examples/basic_context/child_context.py | 4 +- docs/examples/basic_tracer/basic_trace.py | 4 +- docs/examples/basic_tracer/resources.py | 4 +- docs/examples/django/client.py | 4 +- .../django/instrumentation_example/asgi.py | 4 +- .../django/instrumentation_example/wsgi.py | 4 +- docs/examples/django/manage.py | 4 +- docs/examples/django/pages/views.py | 4 +- .../flask-gunicorn/gunicorn.conf.py | 12 +- .../fork-process-model/flask-uwsgi/app.py | 4 +- docs/examples/logs/example.py | 4 +- .../metrics/views/change_aggregation.py | 4 +- .../views/disable_default_aggregation.py | 8 +- .../multi_destination_logs.py | 16 +- .../multi_destination_metrics.py | 16 +- .../multi_destination_traces.py | 4 +- docs/examples/opentracing/main.py | 4 +- docs/examples/opentracing/rediscache.py | 8 +- .../sqlcommenter/instrumented_query.py | 4 +- docs/getting_started/flask_example.py | 4 +- docs/getting_started/metrics_example.py | 8 +- docs/getting_started/tests/test_metrics.py | 48 +- docs/getting_started/tests/test_tracing.py | 4 +- .../exporter/http/transport/__init__.py | 5 +- .../exporter/http/transport/_urllib3.py | 12 +- .../tests/test_load_transport.py | 12 +- .../tests/test_requests_transport.py | 24 +- .../tests/test_urllib3_transport.py | 32 +- .../opencensus/trace_exporter/__init__.py | 41 +- .../tests/test_otcollector_trace_exporter.py | 107 +- .../exporter/otlp/common/_aggregation.py | 10 +- .../exporter/otlp/common/http.py | 25 +- .../tests/test_aggregation.py | 12 +- .../tests/test_http_client.py | 47 +- .../test_benchmark_metrics_encoder.py | 8 +- .../test_benchmark_trace_encoder.py | 10 +- .../otlp/json/common/_internal/__init__.py | 10 +- .../common/_internal/_log_encoder/__init__.py | 16 +- .../_internal/metrics_encoder/__init__.py | 102 +- .../_internal/trace_encoder/__init__.py | 26 +- .../tests/__init__.py | 21 +- .../tests/test_common_encoder.py | 32 +- .../tests/test_log_encoder.py | 97 +- .../tests/test_metrics_encoder.py | 30 +- .../tests/test_metrics_split.py | 119 +- .../tests/test_proto_json_compatibility.py | 8 +- .../tests/test_trace_encoder.py | 29 +- .../exporter/otlp/json/file/_internal.py | 4 +- .../exporter/otlp/json/file/_log_exporter.py | 24 +- .../otlp/json/file/metric_exporter.py | 18 +- .../exporter/otlp/json/file/trace_exporter.py | 6 +- .../tests/test_log_exporter.py | 25 +- .../tests/test_metric_exporter.py | 20 +- .../tests/test_trace_exporter.py | 9 +- .../exporter/otlp/json/http/_internal.py | 13 +- .../exporter/otlp/json/http/_log_exporter.py | 19 +- .../otlp/json/http/metric_exporter.py | 21 +- .../exporter/otlp/json/http/trace_exporter.py | 19 +- .../tests/test_internal.py | 20 +- .../tests/test_log_exporter.py | 84 +- .../tests/test_metric_exporter.py | 77 +- .../tests/test_trace_exporter.py | 64 +- .../otlp/proto/common/_exporter_metrics.py | 26 +- .../otlp/proto/common/_internal/__init__.py | 12 +- .../common/_internal/_log_encoder/__init__.py | 16 +- .../_internal/metrics_encoder/__init__.py | 54 +- .../_internal/trace_encoder/__init__.py | 12 +- .../tests/test_attribute_encoder.py | 8 +- .../tests/test_exporter_metrics.py | 3 +- .../tests/test_log_encoder.py | 97 +- .../tests/test_metrics_encoder.py | 196 +- .../tests/test_trace_encoder.py | 128 +- .../otlp/proto/grpc/_log_exporter/__init__.py | 22 +- .../exporter/otlp/proto/grpc/exporter.py | 90 +- .../proto/grpc/metric_exporter/__init__.py | 32 +- .../proto/grpc/trace_exporter/__init__.py | 25 +- .../tests/logs/test_otlp_logs_exporter.py | 153 +- .../tests/test_otlp_exporter_mixin.py | 216 +- .../tests/test_otlp_metrics_exporter.py | 100 +- .../tests/test_otlp_trace_exporter.py | 227 +- .../otlp/proto/http/_common/__init__.py | 8 +- .../otlp/proto/http/_log_exporter/__init__.py | 61 +- .../proto/http/metric_exporter/__init__.py | 131 +- .../proto/http/trace_exporter/__init__.py | 57 +- .../metrics/test_otlp_metrics_exporter.py | 388 +-- .../tests/test_proto_log_exporter.py | 146 +- .../tests/test_proto_span_exporter.py | 152 +- .../exporter/prometheus/__init__.py | 47 +- .../tests/test_entrypoints.py | 20 +- .../tests/test_mapping.py | 48 +- .../tests/test_prometheus_exporter.py | 80 +- .../exporter/zipkin/encoder/__init__.py | 60 +- .../exporter/zipkin/json/__init__.py | 16 +- .../exporter/zipkin/json/v1/__init__.py | 16 +- .../exporter/zipkin/json/v2/__init__.py | 4 +- .../exporter/zipkin/node_endpoint.py | 8 +- .../tests/encoder/common_tests.py | 42 +- .../tests/encoder/test_v1_json.py | 68 +- .../tests/encoder/test_v2_json.py | 59 +- .../tests/test_zipkin_exporter.py | 18 +- .../exporter/zipkin/proto/http/__init__.py | 16 +- .../exporter/zipkin/proto/http/v2/__init__.py | 16 +- .../tests/encoder/common_tests.py | 42 +- .../tests/encoder/test_v2_protobuf.py | 110 +- .../tests/test_zipkin_exporter.py | 18 +- .../opentelemetry/_logs/_internal/__init__.py | 4 +- .../src/opentelemetry/attributes/__init__.py | 36 +- .../src/opentelemetry/baggage/__init__.py | 4 +- .../baggage/propagation/__init__.py | 20 +- .../src/opentelemetry/context/__init__.py | 16 +- .../context/contextvars_context.py | 4 +- .../metrics/_internal/__init__.py | 64 +- .../metrics/_internal/instrument.py | 29 +- .../src/opentelemetry/propagate/__init__.py | 24 +- .../opentelemetry/propagators/_envcarrier.py | 8 +- .../opentelemetry/propagators/composite.py | 8 +- .../src/opentelemetry/propagators/textmap.py | 4 +- .../src/opentelemetry/trace/__init__.py | 12 +- .../trace/propagation/tracecontext.py | 13 +- .../src/opentelemetry/trace/span.py | 36 +- .../src/opentelemetry/trace/status.py | 4 +- .../opentelemetry/util/_importlib_metadata.py | 4 +- .../src/opentelemetry/util/_providers.py | 4 +- .../src/opentelemetry/util/re.py | 24 +- .../src/opentelemetry/util/types.py | 22 +- .../tests/attributes/test_attributes.py | 24 +- .../baggage/propagation/test_propagation.py | 8 +- .../tests/logs/test_logger_provider.py | 4 +- opentelemetry-api/tests/logs/test_proxy.py | 4 +- .../tests/metrics/test_instruments.py | 312 +-- opentelemetry-api/tests/metrics/test_meter.py | 44 +- .../tests/metrics/test_meter_provider.py | 112 +- .../tests/metrics/test_observation.py | 4 +- .../metrics/test_subclass_instantiation.py | 44 +- .../tests/propagators/test__envcarrier.py | 44 +- .../tests/propagators/test_composite.py | 24 +- .../propagators/test_global_httptextformat.py | 5 +- .../tests/propagators/test_propagators.py | 28 +- .../propagators/test_w3cbaggagepropagator.py | 92 +- .../test_tracecontexthttptextformat.py | 51 +- opentelemetry-api/tests/trace/test_globals.py | 22 +- .../tests/trace/test_span_context.py | 4 +- opentelemetry-api/tests/trace/test_status.py | 12 +- .../tests/util/test__importlib_metadata.py | 8 +- .../tests/util/test_contextmanager.py | 4 +- opentelemetry-api/tests/util/test_re.py | 14 +- .../opentelemetry/configuration/_common.py | 20 +- .../configuration/_conversion.py | 18 +- .../configuration/_exceptions.py | 10 +- .../configuration/_logger_provider.py | 37 +- .../configuration/_meter_provider.py | 108 +- .../configuration/_propagator.py | 6 +- .../opentelemetry/configuration/_resource.py | 24 +- .../src/opentelemetry/configuration/_sdk.py | 4 +- .../configuration/_tracer_provider.py | 95 +- .../configuration/file/_loader.py | 60 +- .../configuration/instrumentation.py | 11 +- .../src/opentelemetry/configuration/models.py | 64 +- .../tests/file/test_env_substitution.py | 8 +- .../tests/file/test_loader.py | 83 +- .../tests/test_common.py | 67 +- .../tests/test_conversion.py | 24 +- .../tests/test_exceptions.py | 12 +- .../tests/test_instrumentation.py | 92 +- .../tests/test_logger_provider.py | 118 +- .../tests/test_meter_provider.py | 242 +- .../test_meter_provider_exemplar_filter.py | 28 +- .../tests/test_propagator.py | 40 +- .../tests/test_resource.py | 162 +- opentelemetry-configuration/tests/test_sdk.py | 26 +- .../tests/test_tracer_provider.py | 199 +- .../logs/test_benchmark_logging_handler.py | 4 +- .../benchmarks/logs/test_benchmark_logs.py | 8 +- .../metrics/test_benchmark_metrics.py | 16 +- .../benchmarks/trace/test_benchmark_trace.py | 20 +- .../sdk/_configuration/__init__.py | 120 +- .../sdk/_logs/_internal/__init__.py | 123 +- .../sdk/_logs/_internal/_exceptions.py | 10 +- .../sdk/_logs/_internal/export/__init__.py | 88 +- .../export/in_memory_log_exporter.py | 8 +- .../sdk/_shared_internal/__init__.py | 18 +- .../_shared_internal/_processor_metrics.py | 12 +- .../sdk/environment_variables/__init__.py | 72 +- .../sdk/environment_variables/_internal.py | 4 +- .../sdk/error_handler/__init__.py | 4 +- .../sdk/metrics/_internal/__init__.py | 233 +- .../_internal/_view_instrument_match.py | 39 +- .../sdk/metrics/_internal/aggregation.py | 308 +-- .../_internal/exemplar/exemplar_filter.py | 4 +- .../_internal/exemplar/exemplar_reservoir.py | 29 +- .../exponential_histogram/buckets.py | 4 +- .../mapping/exponent_mapping.py | 4 +- .../mapping/logarithm_mapping.py | 16 +- .../sdk/metrics/_internal/export/__init__.py | 123 +- .../export/_metric_reader_metrics.py | 8 +- .../sdk/metrics/_internal/instrument.py | 32 +- .../metrics/_internal/measurement_consumer.py | 64 +- .../_internal/metric_reader_storage.py | 99 +- .../sdk/metrics/_internal/point.py | 49 +- .../sdk/metrics/_internal/view.py | 30 +- .../opentelemetry/sdk/resources/__init__.py | 57 +- .../src/opentelemetry/sdk/trace/__init__.py | 154 +- .../_sampling_experimental/_composable.py | 4 +- .../_parent_threshold.py | 10 +- .../_sampling_experimental/_rule_based.py | 35 +- .../trace/_sampling_experimental/_sampler.py | 4 +- .../_sampling_experimental/_trace_state.py | 19 +- .../_sampling_experimental/_traceid_ratio.py | 4 +- .../sdk/trace/_sampling_experimental/_util.py | 4 +- .../sdk/trace/export/__init__.py | 76 +- .../trace/export/in_memory_span_exporter.py | 4 +- .../src/opentelemetry/sdk/trace/sampling.py | 8 +- .../src/opentelemetry/sdk/util/__init__.py | 17 +- .../src/opentelemetry/sdk/util/__init__.pyi | 8 +- .../opentelemetry/sdk/util/instrumentation.py | 8 +- .../test_configurator_file_routing.py | 33 +- .../tests/context/test_asyncio.py | 8 +- .../tests/error_handler/test_error_handler.py | 24 +- .../logger_provider_resource_after_fork.py | 33 +- opentelemetry-sdk/tests/logs/test_export.py | 327 +-- opentelemetry-sdk/tests/logs/test_handler.py | 114 +- .../tests/logs/test_log_limits.py | 18 +- .../tests/logs/test_log_record.py | 26 +- opentelemetry-sdk/tests/logs/test_logs.py | 134 +- .../tests/logs/test_multi_log_processor.py | 8 +- .../tests/logs/test_sdk_metrics.py | 12 +- .../test_exponent_mapping.py | 172 +- ...xponential_bucket_histogram_aggregation.py | 766 ++---- .../test_logarithm_mapping.py | 95 +- .../integration_test/test_console_exporter.py | 24 +- .../metrics/integration_test/test_cpu_time.py | 54 +- .../test_disable_default_views.py | 4 +- .../integration_test/test_exemplars.py | 8 +- ...t_explicit_bucket_histogram_aggregation.py | 105 +- .../test_exponential_bucket_histogram.py | 101 +- .../test_exporter_concurrency.py | 8 +- ...est_histogram_advisory_explicit_buckets.py | 74 +- .../integration_test/test_histogram_export.py | 112 +- .../test_provider_shutdown.py | 4 +- .../integration_test/test_sum_aggregation.py | 188 +- .../integration_test/test_time_align.py | 64 +- .../meter_provider_resource_after_fork.py | 21 +- .../tests/metrics/test_aggregation.py | 220 +- .../tests/metrics/test_backward_compat.py | 12 +- .../tests/metrics/test_exemplarreservoir.py | 34 +- .../metrics/test_in_memory_metric_reader.py | 48 +- .../tests/metrics/test_instrument.py | 36 +- .../metrics/test_measurement_consumer.py | 59 +- .../tests/metrics/test_metric_reader.py | 20 +- .../metrics/test_metric_reader_storage.py | 368 +-- .../tests/metrics/test_metrics.py | 308 +-- .../test_periodic_exporting_metric_reader.py | 46 +- opentelemetry-sdk/tests/metrics/test_point.py | 52 +- opentelemetry-sdk/tests/metrics/test_view.py | 32 +- .../metrics/test_view_instrument_match.py | 86 +- .../tests/resources/test_resources.py | 243 +- .../shared_internal/test_batch_processor.py | 28 +- opentelemetry-sdk/tests/test_configurator.py | 285 +-- .../test_environment_variables_internal.py | 8 +- .../composite_sampler/test_always_off.py | 7 +- .../trace/composite_sampler/test_always_on.py | 7 +- .../composite_sampler/test_rule_based.py | 79 +- .../trace/composite_sampler/test_sampler.py | 18 +- .../tests/trace/export/test_export.py | 189 +- .../tracer_provider_resource_after_fork.py | 20 +- opentelemetry-sdk/tests/trace/test_globals.py | 7 +- .../tests/trace/test_implementation.py | 4 +- .../tests/trace/test_sampling.py | 78 +- .../tests/trace/test_sdk_metrics.py | 48 +- .../tests/trace/test_span_processor.py | 51 +- opentelemetry-sdk/tests/trace/test_trace.py | 518 +--- opentelemetry-semantic-conventions/.pylintrc | 2 +- .../_incubating/attributes/aws_attributes.py | 36 +- .../attributes/azure_attributes.py | 12 +- .../attributes/cassandra_attributes.py | 4 +- .../attributes/container_attributes.py | 4 +- .../_incubating/attributes/db_attributes.py | 28 +- .../attributes/feature_flag_attributes.py | 8 +- .../_incubating/attributes/gcp_attributes.py | 60 +- .../attributes/gen_ai_attributes.py | 32 +- .../_incubating/attributes/http_attributes.py | 8 +- .../_incubating/attributes/k8s_attributes.py | 36 +- .../attributes/linux_attributes.py | 4 +- .../_incubating/attributes/mcp_attributes.py | 4 +- .../attributes/message_attributes.py | 4 +- .../attributes/messaging_attributes.py | 80 +- .../_incubating/attributes/net_attributes.py | 8 +- .../attributes/openai_attributes.py | 4 +- .../_incubating/attributes/otel_attributes.py | 4 +- .../attributes/other_attributes.py | 4 +- .../attributes/process_attributes.py | 16 +- .../_incubating/attributes/rpc_attributes.py | 20 +- .../attributes/system_attributes.py | 24 +- .../_incubating/attributes/vcs_attributes.py | 4 +- .../_incubating/metrics/azure_metrics.py | 8 +- .../_incubating/metrics/container_metrics.py | 13 +- .../_incubating/metrics/cpu_metrics.py | 13 +- .../semconv/_incubating/metrics/db_metrics.py | 16 +- .../_incubating/metrics/gen_ai_metrics.py | 12 +- .../semconv/_incubating/metrics/hw_metrics.py | 101 +- .../_incubating/metrics/k8s_metrics.py | 245 +- .../_incubating/metrics/messaging_metrics.py | 12 +- .../_incubating/metrics/nfs_metrics.py | 8 +- .../_incubating/metrics/openshift_metrics.py | 72 +- .../_incubating/metrics/otel_metrics.py | 40 +- .../_incubating/metrics/process_metrics.py | 21 +- .../_incubating/metrics/system_metrics.py | 53 +- .../_incubating/metrics/vcs_metrics.py | 33 +- .../opentelemetry/semconv/metrics/__init__.py | 28 +- .../opentelemetry/semconv/trace/__init__.py | 64 +- .../propagation/test_benchmark_b3_format.py | 4 +- .../opentelemetry/propagators/b3/__init__.py | 28 +- .../tests/test_b3_format.py | 36 +- .../propagators/jaeger/__init__.py | 15 +- .../tests/test_jaeger_propagator.py | 9 +- pyproject.toml | 2 +- scripts/add_required_checks.py | 14 +- scripts/check_for_valid_readme.py | 8 +- scripts/check_license_header.py | 5 +- scripts/eachdist.py | 84 +- scripts/griffe_check.py | 4 +- scripts/public_symbols_checker.py | 14 +- scripts/tests/test_eachdist.py | 27 +- .../shim/opencensus/_shim_span.py | 36 +- .../shim/opencensus/_shim_tracer.py | 16 +- .../tests/test_shim.py | 8 +- .../tests/test_shim_with_sdk.py | 46 +- .../shim/opentracing_shim/__init__.py | 17 +- .../tests/test_shim.py | 126 +- .../test_client_server/test_asyncio.py | 12 +- .../test_client_server/test_threads.py | 12 +- .../request_handler.py | 4 +- .../test_multiple_callbacks/test_threads.py | 8 +- .../test_nested_callbacks/test_asyncio.py | 4 +- .../test_nested_callbacks/test_threads.py | 8 +- .../tests/testbed/testcase.py | 4 +- .../test_opencensusexporter_functional.py | 4 +- .../otlpexporter/test_otlp_logs_functional.py | 40 +- .../test_otlp_metrics_functional.py | 37 +- .../test_otlp_traces_functional.py | 41 +- .../src/opentelemetry/test/__init__.py | 6 +- .../opentelemetry/test/_otlp_test_server.py | 74 +- .../src/opentelemetry/test/asgitestutil.py | 16 +- .../opentelemetry/test/concurrency_test.py | 5 +- .../src/opentelemetry/test/httptest.py | 4 +- .../src/opentelemetry/test/metrictestutil.py | 12 +- .../src/opentelemetry/test/mock_textmap.py | 8 +- .../src/opentelemetry/test/spantestutil.py | 4 +- .../src/opentelemetry/test/test_base.py | 39 +- .../opentelemetry/test/weaver_live_check.py | 66 +- .../tests/test_otlp_test_server.py | 118 +- .../tests/test_weaver_live_check.py | 52 +- uv.lock | 2180 ++++++++--------- 370 files changed, 5283 insertions(+), 14151 deletions(-) diff --git a/.github/workflows/generate_workflows.py b/.github/workflows/generate_workflows.py index 5b53c211ebf..8e4ccd3c87c 100644 --- a/.github/workflows/generate_workflows.py +++ b/.github/workflows/generate_workflows.py @@ -13,9 +13,7 @@ r"(?P[-\w]+\w)-?(?P\d+)?" ) _tox_lint_env_regex = re_compile(r"lint-(?P[-\w]+)") -_tox_contrib_env_regex = re_compile( - r"py310-test-(?P[-\w]+\w)-?(?P\d+)?" -) +_tox_contrib_env_regex = re_compile(r"py310-test-(?P[-\w]+\w)-?(?P\d+)?") def get_tox_envs(tox_ini_path: Path) -> list: @@ -25,9 +23,7 @@ def get_tox_envs(tox_ini_path: Path) -> list: tox_section = next(tox_ini.sections()) - core_config_set = CoreConfigSet( - conf, tox_section, tox_ini_path.parent, tox_ini_path - ) + core_config_set = CoreConfigSet(conf, tox_section, tox_ini_path.parent, tox_ini_path) ( core_config_set.loaders.extend( @@ -67,9 +63,7 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list: groups = tox_test_env_match.groupdict() - aliased_python_version = python_version_alias[ - groups["python_version"] - ] + aliased_python_version = python_version_alias[groups["python_version"]] tox_env = tox_test_env_match.string test_requirements = groups["test_requirements"] @@ -84,10 +78,7 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list: { "name": f"{tox_env}_{operating_system}", "ui_name": ( - f"{groups['name']}" - f"{test_requirements}" - f"{aliased_python_version} " - f"{os_alias[operating_system]}" + f"{groups['name']}{test_requirements}{aliased_python_version} {os_alias[operating_system]}" ), "python_version": aliased_python_version, "tox_env": tox_env, @@ -128,11 +119,7 @@ def get_misc_job_datas(tox_envs: list) -> list: re_compile(r"benchmark.+"), ] - return [ - tox_env - for tox_env in tox_envs - if not any(pattern.match(tox_env) for pattern in regex_patterns) - ] + return [tox_env for tox_env in tox_envs if not any(pattern.match(tox_env) for pattern in regex_patterns)] def _generate_workflow( @@ -140,9 +127,7 @@ def _generate_workflow( template_name: str, output_dir: Path, ) -> None: - env = Environment( - loader=FileSystemLoader(Path(__file__).parent.joinpath("templates")) - ) + env = Environment(loader=FileSystemLoader(Path(__file__).parent.joinpath("templates"))) with open(output_dir.joinpath(f"{template_name}.yml"), "w") as yml_file: yml_file.write( env.get_template(f"{template_name}.yml.j2").render( @@ -152,9 +137,7 @@ def _generate_workflow( yml_file.write("\n") -def generate_test_workflow( - tox_ini_path: Path, workflow_directory_path: Path, operating_systems -) -> None: +def generate_test_workflow(tox_ini_path: Path, workflow_directory_path: Path, operating_systems) -> None: _generate_workflow( get_test_job_datas(get_tox_envs(tox_ini_path), operating_systems), "test", @@ -189,11 +172,7 @@ def generate_ci_workflow( ) -> None: with open(output_dir.joinpath("ci.yml"), "w") as ci_yml_file: ci_yml_file.write( - Environment( - loader=FileSystemLoader( - Path(__file__).parent.joinpath("templates") - ) - ) + Environment(loader=FileSystemLoader(Path(__file__).parent.joinpath("templates"))) .get_template("ci.yml.j2") .render() ) @@ -203,9 +182,7 @@ def generate_ci_workflow( if __name__ == "__main__": tox_ini_path = Path(__file__).parent.parent.parent.joinpath("tox.ini") output_dir = Path(__file__).parent - generate_test_workflow( - tox_ini_path, output_dir, ["ubuntu-latest", "windows-latest"] - ) + generate_test_workflow(tox_ini_path, output_dir, ["ubuntu-latest", "windows-latest"]) generate_lint_workflow(tox_ini_path, output_dir) generate_misc_workflow(tox_ini_path, output_dir) generate_ci_workflow(output_dir) diff --git a/.pylintrc b/.pylintrc index a6980c45b7c..bda4148beb5 100644 --- a/.pylintrc +++ b/.pylintrc @@ -262,7 +262,7 @@ indent-after-paren=4 indent-string=' ' # Maximum number of characters on a single line. -max-line-length=79 +max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 diff --git a/CHANGELOG.md b/CHANGELOG.md index 18ff74867fc..2fe434ff456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -554,9 +554,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 from opentelemetry.sdk._logs import ReadableLogRecord - def export( - self, batch: Sequence[ReadableLogRecord] - ) -> LogRecordExportResult: ... + def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: ... ``` - **For Log Processors:** Use `ReadWriteLogRecord` for processing, `ReadableLogRecord` for exporting diff --git a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py index 7bac6f56064..fc4089313fe 100644 --- a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py +++ b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/generator.py @@ -55,14 +55,10 @@ def __init__( self._version = version self._generated_files: dict[str, str] = {} self._common_root: str = "" - self._file_to_proto: dict[str, descriptor.FileDescriptorProto] = { - f.name: f for f in request.proto_file - } + self._file_to_proto: dict[str, descriptor.FileDescriptorProto] = {f.name: f for f in request.proto_file} self._fqn_to_file: dict[str, str] = {} self._fqn_to_class_path: dict[str, str] = {} - self._file_dependencies: dict[str, list[str]] = { - f.name: list(f.dependency) for f in request.proto_file - } + self._file_dependencies: dict[str, list[str]] = {f.name: list(f.dependency) for f in request.proto_file} for proto_file in request.proto_file: self._index_file(proto_file) @@ -75,10 +71,7 @@ def generate_all(self) -> dict[str, str]: Dictionary mapping output file paths to generated code """ files_to_generate = self._request.file_to_generate - file_to_output = { - proto_file: self._transform_proto_path(proto_file) - for proto_file in files_to_generate - } + file_to_output = {proto_file: self._transform_proto_path(proto_file) for proto_file in files_to_generate} if not file_to_output: return {} @@ -135,9 +128,7 @@ def _index_message( file_name: Proto file where the message is defined parent_path: Full parent class path for nested messages """ - current_path = ( - f"{parent_path}.{msg_desc.name}" if parent_path else msg_desc.name - ) + current_path = f"{parent_path}.{msg_desc.name}" if parent_path else msg_desc.name fqn = f"{package}.{current_path}" if package else current_path self._fqn_to_file[fqn] = file_name self._fqn_to_class_path[fqn] = current_path @@ -145,15 +136,11 @@ def _index_message( for enum_desc in msg_desc.enum_type: enum_fqn = f"{fqn}.{enum_desc.name}" self._fqn_to_file[enum_fqn] = file_name - self._fqn_to_class_path[enum_fqn] = ( - f"{current_path}.{enum_desc.name}" - ) + self._fqn_to_class_path[enum_fqn] = f"{current_path}.{enum_desc.name}" for nested_msg in msg_desc.nested_type: if not nested_msg.options.map_entry: - self._index_message( - nested_msg, package, file_name, current_path - ) + self._index_message(nested_msg, package, file_name, current_path) def _ensure_init_files(self) -> None: """ @@ -181,11 +168,7 @@ def _get_codec_module_path(self) -> str: Returns: Absolute module path as a string """ - return ( - f"{self._common_root.replace('/', '.')}.{CODEC_MODULE_NAME}" - if self._common_root - else CODEC_MODULE_NAME - ) + return f"{self._common_root.replace('/', '.')}.{CODEC_MODULE_NAME}" if self._common_root else CODEC_MODULE_NAME def _transform_proto_path(self, proto_path: str) -> str: """ @@ -236,20 +219,14 @@ def _generate_file(self, file_desc: descriptor.FileDescriptorProto) -> str: proto_file = file_desc.name self._generate_header(writer, proto_file) - self._generate_imports( - writer, proto_file, self._file_has_enums(file_desc) - ) + self._generate_imports(writer, proto_file, self._file_has_enums(file_desc)) self._generate_enums_for_file(writer, file_desc.enum_type) - self._generate_messages_for_file( - writer, proto_file, file_desc.message_type - ) + self._generate_messages_for_file(writer, proto_file, file_desc.message_type) writer.blank_line() return writer.to_string() - def _file_has_enums( - self, file_desc: descriptor.FileDescriptorProto - ) -> bool: + def _file_has_enums(self, file_desc: descriptor.FileDescriptorProto) -> bool: """ Check if the file or any of its messages (recursively) contain enums. @@ -282,9 +259,7 @@ def _msg_has_enums(self, msg_desc: descriptor.DescriptorProto) -> bool: return False @classmethod - def _generate_header( - cls, writer: CodeWriter, proto_file: str = "" - ) -> None: + def _generate_header(cls, writer: CodeWriter, proto_file: str = "") -> None: """ Generate file header with license and metadata. @@ -363,8 +338,7 @@ def _collect_imports(self, proto_file: str) -> set[str]: Set of import statement strings """ return set( - "import " + self._get_module_path(dep_file) - for dep_file in self._file_dependencies.get(proto_file, []) + "import " + self._get_module_path(dep_file) for dep_file in self._file_dependencies.get(proto_file, []) ) def _generate_enums_for_file( @@ -419,9 +393,7 @@ def _generate_message_class( msg_desc: Message descriptor parent_path: Full parent class path for nested messages """ - current_path = ( - f"{parent_path}.{msg_desc.name}" if parent_path else msg_desc.name - ) + current_path = f"{parent_path}.{msg_desc.name}" if parent_path else msg_desc.name codec = self._get_codec_module_path() with writer.dataclass( msg_desc.name, @@ -430,9 +402,7 @@ def _generate_message_class( decorator_name="_dataclass", ): if msg_desc.field or msg_desc.nested_type or msg_desc.enum_type: - writer.docstring( - [f"Generated from protobuf message {msg_desc.name}"] - ) + writer.docstring([f"Generated from protobuf message {msg_desc.name}"]) writer.blank_line() for enum_desc in msg_desc.enum_type: @@ -441,9 +411,7 @@ def _generate_message_class( for nested_desc in msg_desc.nested_type: if not nested_desc.options.map_entry: - self._generate_message_class( - writer, proto_file, nested_desc, current_path - ) + self._generate_message_class(writer, proto_file, nested_desc, current_path) writer.blank_line() if msg_desc.field: @@ -455,14 +423,10 @@ def _generate_message_class( writer.blank_line() self._generate_to_dict(writer, msg_desc) writer.blank_line() - self._generate_from_dict( - writer, proto_file, msg_desc, current_path - ) + self._generate_from_dict(writer, proto_file, msg_desc, current_path) @classmethod - def _generate_enum_class( - cls, writer: CodeWriter, enum_desc: descriptor.EnumDescriptorProto - ) -> None: + def _generate_enum_class(cls, writer: CodeWriter, enum_desc: descriptor.EnumDescriptorProto) -> None: """ Generate an IntEnum class for a protobuf enum. @@ -475,9 +439,7 @@ def _generate_enum_class( enum_type="enum.IntEnum", decorators=("typing.final",), ): - writer.docstring( - [f"Generated from protobuf enum {enum_desc.name}"] - ) + writer.docstring([f"Generated from protobuf enum {enum_desc.name}"]) writer.blank_line() if enum_desc.value: @@ -535,9 +497,7 @@ def _generate_to_dict( writer.assignment("_result", "{}") # Separate fields into oneof groups and standalone fields - oneof_groups: dict[int, list[descriptor.FieldDescriptorProto]] = ( - defaultdict(list) - ) + oneof_groups: dict[int, list[descriptor.FieldDescriptorProto]] = defaultdict(list) standalone_fields: list[descriptor.FieldDescriptorProto] = [] for field in msg_desc.field: @@ -547,27 +507,17 @@ def _generate_to_dict( standalone_fields.append(field) for field in standalone_fields: - with writer.if_( - f"self.{field.name} is not None" - if field.proto3_optional - else f"self.{field.name}" - ): - self._generate_serialization_statements( - writer, field, "_result" - ) + with writer.if_(f"self.{field.name} is not None" if field.proto3_optional else f"self.{field.name}"): + self._generate_serialization_statements(writer, field, "_result") for group_index in sorted(oneof_groups.keys()): group_fields = oneof_groups[group_index] for i, field in enumerate(reversed(group_fields)): condition = f"self.{field.name} is not None" - context = ( - writer.elif_(condition) if i else writer.if_(condition) - ) + context = writer.elif_(condition) if i else writer.if_(condition) with context: - self._generate_serialization_statements( - writer, field, "_result" - ) + self._generate_serialization_statements(writer, field, "_result") writer.return_("_result") @@ -605,16 +555,12 @@ def _generate_from_dict( ] ) codec = self._get_codec_module_path() - writer.writeln( - f'{codec}.validate_type(data, builtins.dict, "data")' - ) + writer.writeln(f'{codec}.validate_type(data, builtins.dict, "data")') writer.assignment("_args", "{}") writer.blank_line() # Separate fields into oneof groups and standalone fields - oneof_groups: dict[int, list[descriptor.FieldDescriptorProto]] = ( - defaultdict(list) - ) + oneof_groups: dict[int, list[descriptor.FieldDescriptorProto]] = defaultdict(list) standalone_fields: list[descriptor.FieldDescriptorProto] = [] for field in msg_desc.field: @@ -625,38 +571,20 @@ def _generate_from_dict( # Handle standalone fields for field in standalone_fields: - json_name = ( - field.json_name - if field.json_name - else to_json_field_name(field.name) - ) - with writer.if_( - f'(_value := data.get("{json_name}")) is not None' - ): - self._generate_deserialization_statements( - writer, proto_file, field, "_value", "_args" - ) + json_name = field.json_name if field.json_name else to_json_field_name(field.name) + with writer.if_(f'(_value := data.get("{json_name}")) is not None'): + self._generate_deserialization_statements(writer, proto_file, field, "_value", "_args") # Handle oneof groups for group_index in sorted(oneof_groups.keys()): group_fields = oneof_groups[group_index] for i, field in enumerate(reversed(group_fields)): - json_name = ( - field.json_name - if field.json_name - else to_json_field_name(field.name) - ) - condition = ( - f'(_value := data.get("{json_name}")) is not None' - ) - context = ( - writer.elif_(condition) if i else writer.if_(condition) - ) + json_name = field.json_name if field.json_name else to_json_field_name(field.name) + condition = f'(_value := data.get("{json_name}")) is not None' + context = writer.elif_(condition) if i else writer.if_(condition) with context: - self._generate_deserialization_statements( - writer, proto_file, field, "_value", "_args" - ) + self._generate_deserialization_statements(writer, proto_file, field, "_value", "_args") writer.blank_line() writer.return_("cls(**_args)") @@ -675,17 +603,11 @@ def _generate_serialization_statements( field_desc: Field descriptor for the field being serialized target_dict: Name of the dictionary variable to assign the serialized value to """ - json_name = ( - field_desc.json_name - if field_desc.json_name - else to_json_field_name(field_desc.name) - ) + json_name = field_desc.json_name if field_desc.json_name else to_json_field_name(field_desc.name) if field_desc.label == descriptor.FieldDescriptorProto.LABEL_REPEATED: item_expr = self._get_serialization_expr(field_desc, "_v") if item_expr == "_v": - writer.assignment( - f'{target_dict}["{json_name}"]', f"self.{field_desc.name}" - ) + writer.assignment(f'{target_dict}["{json_name}"]', f"self.{field_desc.name}") else: codec = self._get_codec_module_path() writer.assignment( @@ -693,15 +615,11 @@ def _generate_serialization_statements( f"{codec}.encode_repeated(self.{field_desc.name}, lambda _v: {item_expr})", ) else: - val_expr = self._get_serialization_expr( - field_desc, f"self.{field_desc.name}" - ) + val_expr = self._get_serialization_expr(field_desc, f"self.{field_desc.name}") writer.assignment(f'{target_dict}["{json_name}"]', val_expr) # pylint: disable-next=too-many-return-statements - def _get_serialization_expr( - self, field_desc: descriptor.FieldDescriptorProto, var_name: str - ) -> str: + def _get_serialization_expr(self, field_desc: descriptor.FieldDescriptorProto, var_name: str) -> str: """ Get the Python expression to serialize a value of a given type for JSON output. @@ -748,9 +666,7 @@ def _generate_deserialization_statements( """ codec = self._get_codec_module_path() if field_desc.label == descriptor.FieldDescriptorProto.LABEL_REPEATED: - item_expr = self._get_deserialization_expr( - proto_file, field_desc, "_v" - ) + item_expr = self._get_deserialization_expr(proto_file, field_desc, "_v") writer.assignment( f'{target_dict}["{field_desc.name}"]', f'{codec}.decode_repeated({var_name}, lambda _v: {item_expr}, "{field_desc.name}")', @@ -758,20 +674,14 @@ def _generate_deserialization_statements( return if field_desc.type == descriptor.FieldDescriptorProto.TYPE_MESSAGE: - msg_type = self._resolve_message_type( - field_desc.type_name, proto_file - ) + msg_type = self._resolve_message_type(field_desc.type_name, proto_file) writer.assignment( f'{target_dict}["{field_desc.name}"]', f"{msg_type}.from_dict({var_name})", ) elif field_desc.type == descriptor.FieldDescriptorProto.TYPE_ENUM: - enum_type = self._resolve_enum_type( - field_desc.type_name, proto_file - ) - writer.writeln( - f'{codec}.validate_type({var_name}, builtins.int, "{field_desc.name}")' - ) + enum_type = self._resolve_enum_type(field_desc.type_name, proto_file) + writer.writeln(f'{codec}.validate_type({var_name}, builtins.int, "{field_desc.name}")') writer.assignment( f'{target_dict}["{field_desc.name}"]', f"{enum_type}({var_name})", @@ -800,12 +710,8 @@ def _generate_deserialization_statements( f'{codec}.decode_float({var_name}, "{field_desc.name}")', ) else: - allowed_types = get_json_allowed_types( - field_desc.type, field_desc.name - ) - writer.writeln( - f'{codec}.validate_type({var_name}, {allowed_types}, "{field_desc.name}")' - ) + allowed_types = get_json_allowed_types(field_desc.type, field_desc.name) + writer.writeln(f'{codec}.validate_type({var_name}, {allowed_types}, "{field_desc.name}")') writer.assignment(f'{target_dict}["{field_desc.name}"]', var_name) # pylint: disable-next=too-many-return-statements @@ -828,14 +734,10 @@ def _get_deserialization_expr( """ codec = self._get_codec_module_path() if field_desc.type == descriptor.FieldDescriptorProto.TYPE_MESSAGE: - msg_type = self._resolve_message_type( - field_desc.type_name, proto_file - ) + msg_type = self._resolve_message_type(field_desc.type_name, proto_file) return f"{msg_type}.from_dict({var_name})" if field_desc.type == descriptor.FieldDescriptorProto.TYPE_ENUM: - enum_type = self._resolve_enum_type( - field_desc.type_name, proto_file - ) + enum_type = self._resolve_enum_type(field_desc.type_name, proto_file) return f"{enum_type}({var_name})" if is_hex_encoded_field(field_desc.name): return f'{codec}.decode_hex({var_name}, "{field_desc.name}")' @@ -851,9 +753,7 @@ def _get_deserialization_expr( return var_name - def _get_field_type_hint( - self, proto_file: str, field_desc: descriptor.FieldDescriptorProto - ) -> str: + def _get_field_type_hint(self, proto_file: str, field_desc: descriptor.FieldDescriptorProto) -> str: """ Get the Python type hint for a field. @@ -865,13 +765,9 @@ def _get_field_type_hint( Python type hint string """ if field_desc.type == descriptor.FieldDescriptorProto.TYPE_MESSAGE: - base_type = self._resolve_message_type( - field_desc.type_name, proto_file - ) + base_type = self._resolve_message_type(field_desc.type_name, proto_file) elif field_desc.type == descriptor.FieldDescriptorProto.TYPE_ENUM: - base_type = self._resolve_enum_type( - field_desc.type_name, proto_file - ) + base_type = self._resolve_enum_type(field_desc.type_name, proto_file) else: base_type = get_python_type(field_desc.type) @@ -936,9 +832,7 @@ def _resolve_enum_type(self, type_name: str, proto_file: str) -> str: return f"{module_path}.{class_path}" @classmethod - def _get_field_default( - cls, field_desc: descriptor.FieldDescriptorProto - ) -> str | None: + def _get_field_default(cls, field_desc: descriptor.FieldDescriptorProto) -> str | None: """ Get the default value for a field. @@ -984,9 +878,7 @@ def _load_codec_source() -> str: codec_src_path, e, ) - raise RuntimeError( - f"Failed to load codec module source from {codec_src_path}" - ) from e + raise RuntimeError(f"Failed to load codec module source from {codec_src_path}") from e def _find_common_root(paths: Iterable[str]) -> str: @@ -1019,9 +911,7 @@ def _find_common_root(paths: Iterable[str]) -> str: def generate_code( request: plugin.CodeGeneratorRequest, - package_transform: Callable[[str], str] = lambda p: p.replace( - "opentelemetry/proto/", "opentelemetry/proto_json/" - ), + package_transform: Callable[[str], str] = lambda p: p.replace("opentelemetry/proto/", "opentelemetry/proto_json/"), ) -> dict[str, str]: """ Main entry point for code generation. @@ -1039,9 +929,7 @@ def generate_code( def generate_plugin_response( request: plugin.CodeGeneratorRequest, - package_transform: Callable[[str], str] = lambda p: p.replace( - "opentelemetry/proto/", "opentelemetry/proto_json/" - ), + package_transform: Callable[[str], str] = lambda p: p.replace("opentelemetry/proto/", "opentelemetry/proto_json/"), ) -> plugin.CodeGeneratorResponse: """ Generate plugin response with all generated files. @@ -1056,12 +944,8 @@ def generate_plugin_response( response = plugin.CodeGeneratorResponse() # Declare support for optional proto3 fields - response.supported_features |= ( - plugin.CodeGeneratorResponse.FEATURE_PROTO3_OPTIONAL - ) - response.supported_features |= ( - plugin.CodeGeneratorResponse.FEATURE_SUPPORTS_EDITIONS - ) + response.supported_features |= plugin.CodeGeneratorResponse.FEATURE_PROTO3_OPTIONAL + response.supported_features |= plugin.CodeGeneratorResponse.FEATURE_SUPPORTS_EDITIONS response.minimum_edition = descriptor.EDITION_LEGACY response.maximum_edition = descriptor.EDITION_2024 diff --git a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/plugin.py b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/plugin.py index 1662500b895..7cd2466c22a 100644 --- a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/plugin.py +++ b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/plugin.py @@ -16,9 +16,7 @@ @contextmanager -def code_generation() -> Iterator[ - tuple[plugin.CodeGeneratorRequest, plugin.CodeGeneratorResponse], -]: +def code_generation() -> Iterator[tuple[plugin.CodeGeneratorRequest, plugin.CodeGeneratorResponse],]: """ Context manager for handling the code generation process. """ diff --git a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py index 69f74ed657f..2be8afead76 100644 --- a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py +++ b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/runtime/json_codec.py @@ -134,9 +134,7 @@ def decode_hex(value: str | None, field_name: str) -> bytes: try: return bytes.fromhex(value) except ValueError as error: - raise ValueError( - f"Invalid hex string for field '{field_name}': {error}" - ) from None + raise ValueError(f"Invalid hex string for field '{field_name}': {error}") from None def decode_base64(value: str | None, field_name: str) -> bytes: @@ -155,9 +153,7 @@ def decode_base64(value: str | None, field_name: str) -> bytes: try: return base64.b64decode(value) except Exception as error: - raise ValueError( - f"Invalid base64 string for field '{field_name}': {error}" - ) from None + raise ValueError(f"Invalid base64 string for field '{field_name}': {error}") from None def decode_int64(value: int | str | None, field_name: str) -> int: @@ -176,9 +172,7 @@ def decode_int64(value: int | str | None, field_name: str) -> int: try: return int(value) except (ValueError, TypeError): - raise ValueError( - f"Invalid int64 value for field '{field_name}': {value}" - ) from None + raise ValueError(f"Invalid int64 value for field '{field_name}': {value}") from None def decode_float(value: float | str | None, field_name: str) -> float: @@ -203,9 +197,7 @@ def decode_float(value: float | str | None, field_name: str) -> float: try: return float(value) except (ValueError, TypeError): - raise ValueError( - f"Invalid float value for field '{field_name}': {value}" - ) from None + raise ValueError(f"Invalid float value for field '{field_name}': {value}") from None def decode_repeated( @@ -244,7 +236,4 @@ def validate_type( field_name: The name of the field being validated (for error messages). """ if not isinstance(value, expected_types): - raise TypeError( - f"Field '{field_name}' expected {expected_types}, " - f"got {type(value).__name__}" - ) + raise TypeError(f"Field '{field_name}' expected {expected_types}, got {type(value).__name__}") diff --git a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/writer.py b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/writer.py index 310aa6cf76c..65a3cb5ebc4 100644 --- a/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/writer.py +++ b/codegen/opentelemetry-codegen-json/src/opentelemetry/codegen/json/writer.py @@ -176,11 +176,7 @@ def dataclass( if slots: dc_params.append("slots=True") - dc_decorator = ( - f"{decorator_name}({', '.join(dc_params)})" - if dc_params - else decorator_name - ) + dc_decorator = f"{decorator_name}({', '.join(dc_params)})" if dc_params else decorator_name all_decorators = [] if decorators is not None: @@ -244,9 +240,7 @@ def field( default_factory: Optional default factory for the field """ if default_factory: - self.writeln( - f"{name}: {type_hint} = dataclasses.field(default_factory={default_factory})" - ) + self.writeln(f"{name}: {type_hint} = dataclasses.field(default_factory={default_factory})") elif default is not None: self.writeln(f"{name}: {type_hint} = {default}") else: @@ -309,9 +303,7 @@ def method( decorators: Optional iterable of decorator names return_type: Optional return type hint for the method """ - with self.function( - name, params, decorators=decorators, return_type=return_type - ): + with self.function(name, params, decorators=decorators, return_type=return_type): yield self @contextmanager @@ -348,9 +340,7 @@ def else_(self) -> Generator[CodeWriter, None, None]: yield self @contextmanager - def for_( - self, var: str, iterable: str - ) -> Generator[CodeWriter, None, None]: + def for_(self, var: str, iterable: str) -> Generator[CodeWriter, None, None]: """ Create a for loop @@ -374,9 +364,7 @@ def while_(self, condition: str) -> Generator[CodeWriter, None, None]: with self.indent(): yield self - def assignment( - self, var: str, value: str, type_hint: str | None = None - ) -> CodeWriter: + def assignment(self, var: str, value: str, type_hint: str | None = None) -> CodeWriter: """ Write a variable assignment with optional type hint diff --git a/codegen/opentelemetry-codegen-json/tests/conftest.py b/codegen/opentelemetry-codegen-json/tests/conftest.py index 888ff11bcd7..632645934e1 100644 --- a/codegen/opentelemetry-codegen-json/tests/conftest.py +++ b/codegen/opentelemetry-codegen-json/tests/conftest.py @@ -22,9 +22,7 @@ def monkeysession(): @pytest.fixture(scope="session", autouse=True) -def generate_code( - tmp_path_factory: pytest.TempPathFactory, monkeysession: MonkeyPatch -) -> None: +def generate_code(tmp_path_factory: pytest.TempPathFactory, monkeysession: MonkeyPatch) -> None: gen_path = tmp_path_factory.mktemp("generated") protos = list(PROTO_PATH.glob("**/*.proto")) diff --git a/codegen/opentelemetry-codegen-json/tests/test_json_codec.py b/codegen/opentelemetry-codegen-json/tests/test_json_codec.py index debb8a07b7a..9c888026c0a 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_json_codec.py +++ b/codegen/opentelemetry-codegen-json/tests/test_json_codec.py @@ -177,9 +177,7 @@ def test_validate_type() -> None: validate_type(1, (int, str), "field") validate_type("s", (int, str), "field") - with pytest.raises( - TypeError, match="Field 'field' expected , got str" - ): + with pytest.raises(TypeError, match="Field 'field' expected , got str"): validate_type("s", int, "field") with pytest.raises( diff --git a/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py b/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py index 75da3ff7fa9..bc89cf8c8a0 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py +++ b/codegen/opentelemetry-codegen-json/tests/test_protobuf_compatibility.py @@ -17,8 +17,7 @@ def normalize_otlp_json(data: Any) -> Any: return { key: ( base64.b64decode(value).hex() - if key in {"traceId", "spanId", "parentSpanId"} - and isinstance(value, str) + if key in {"traceId", "spanId", "parentSpanId"} and isinstance(value, str) else normalize_otlp_json(value) ) for key, value in data.items() @@ -134,9 +133,7 @@ def test_parity_test_message( {"f64_val": 9223372036854775807}, ], ) -def test_parity_numeric_test( - numeric_msg_classes: tuple[type[Any], type[Any]], values: dict[str, Any] -) -> None: +def test_parity_numeric_test(numeric_msg_classes: tuple[type[Any], type[Any]], values: dict[str, Any]) -> None: JSONNumericTest, ProtoNumericTest = numeric_msg_classes json_msg = JSONNumericTest(**values) @@ -202,9 +199,7 @@ def test_parity_oneof_suite( {"opt_string": "", "opt_int": 0, "opt_bool": False}, ], ) -def test_parity_optional_scalars( - optional_msg_classes: tuple[type[Any], type[Any]], kwargs: dict[str, Any] -) -> None: +def test_parity_optional_scalars(optional_msg_classes: tuple[type[Any], type[Any]], kwargs: dict[str, Any]) -> None: JSONOptionalScalar, ProtoOptionalScalar = optional_msg_classes json_msg = JSONOptionalScalar(**kwargs) diff --git a/codegen/opentelemetry-codegen-json/tests/test_serde.py b/codegen/opentelemetry-codegen-json/tests/test_serde.py index bb5dd460dbc..4c34122a101 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_serde.py +++ b/codegen/opentelemetry-codegen-json/tests/test_serde.py @@ -37,9 +37,7 @@ def trace_v1_types() -> type[Any]: @pytest.fixture -def complex_v1_types() -> tuple[ - type[Any], type[Any], type[Any], type[Any], type[Any] -]: +def complex_v1_types() -> tuple[type[Any], type[Any], type[Any], type[Any], type[Any]]: from otel_test_json.test.v1.complex import ( # type: ignore DeeplyNested, NestedEnumSuite, @@ -104,9 +102,7 @@ def test_generated_message_roundtrip( assert new_msg == msg -def test_cross_reference( - common_v1_types: type[Any], trace_v1_types: type[Any] -) -> None: +def test_cross_reference(common_v1_types: type[Any], trace_v1_types: type[Any]) -> None: InstrumentationScope = common_v1_types Span = trace_v1_types diff --git a/codegen/opentelemetry-codegen-json/tests/test_types.py b/codegen/opentelemetry-codegen-json/tests/test_types.py index 178fcae861d..a9d8a4eee5e 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_types.py +++ b/codegen/opentelemetry-codegen-json/tests/test_types.py @@ -138,7 +138,5 @@ def test_is_numeric_type(proto_type: int, expected: bool) -> None: (descriptor.FieldDescriptorProto.TYPE_INT32, "id", "builtins.int"), ], ) -def test_get_json_allowed_types( - proto_type: int, field_name: str, expected: str -) -> None: +def test_get_json_allowed_types(proto_type: int, field_name: str, expected: str) -> None: assert get_json_allowed_types(proto_type, field_name) == expected diff --git a/codegen/opentelemetry-codegen-json/tests/test_writer.py b/codegen/opentelemetry-codegen-json/tests/test_writer.py index f931c2b9a15..ca851344a1a 100644 --- a/codegen/opentelemetry-codegen-json/tests/test_writer.py +++ b/codegen/opentelemetry-codegen-json/tests/test_writer.py @@ -169,9 +169,7 @@ def test_field( expected: list[str], ) -> None: writer = CodeWriter() - writer.field( - name, type_hint, default=default, default_factory=default_factory - ) + writer.field(name, type_hint, default=default, default_factory=default_factory) assert writer.to_lines() == expected diff --git a/docs/conf.py b/docs/conf.py index 68c8143f1b0..2826925ab73 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -41,18 +41,10 @@ ] exp = "../exporter" -exp_dirs = [ - os.path.abspath("/".join(["../exporter", f, "src"])) - for f in listdir(exp) - if isdir(join(exp, f)) -] +exp_dirs = [os.path.abspath("/".join(["../exporter", f, "src"])) for f in listdir(exp) if isdir(join(exp, f))] shim = "../shim" -shim_dirs = [ - os.path.abspath("/".join(["../shim", f, "src"])) - for f in listdir(shim) - if isdir(join(shim, f)) -] +shim_dirs = [os.path.abspath("/".join(["../shim", f, "src"])) for f in listdir(shim) if isdir(join(shim, f))] sys.path[:0] = source_dirs + exp_dirs + shim_dirs diff --git a/docs/examples/auto-instrumentation/client.py b/docs/examples/auto-instrumentation/client.py index 337a0d66c54..6caefdc5261 100644 --- a/docs/examples/auto-instrumentation/client.py +++ b/docs/examples/auto-instrumentation/client.py @@ -16,9 +16,7 @@ trace.set_tracer_provider(TracerProvider()) tracer = trace.get_tracer_provider().get_tracer(__name__) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) # Get parameter from command line argument or use default value "testing" param_value = sys.argv[1] if len(sys.argv) > 1 else "testing" diff --git a/docs/examples/auto-instrumentation/server_manual.py b/docs/examples/auto-instrumentation/server_manual.py index 8e17c757936..78272e062f5 100644 --- a/docs/examples/auto-instrumentation/server_manual.py +++ b/docs/examples/auto-instrumentation/server_manual.py @@ -21,9 +21,7 @@ set_tracer_provider(TracerProvider()) tracer = get_tracer_provider().get_tracer(__name__) -get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) @app.route("/server_request") diff --git a/docs/examples/auto-instrumentation/server_programmatic.py b/docs/examples/auto-instrumentation/server_programmatic.py index 23c03bcad9f..88e95b573fc 100644 --- a/docs/examples/auto-instrumentation/server_programmatic.py +++ b/docs/examples/auto-instrumentation/server_programmatic.py @@ -12,9 +12,7 @@ from opentelemetry.trace import get_tracer_provider, set_tracer_provider set_tracer_provider(TracerProvider()) -get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) instrumentor = FlaskInstrumentor() diff --git a/docs/examples/basic_context/child_context.py b/docs/examples/basic_context/child_context.py index 757763fbdb5..99131d9a48a 100644 --- a/docs/examples/basic_context/child_context.py +++ b/docs/examples/basic_context/child_context.py @@ -8,9 +8,7 @@ global_ctx = baggage.set_baggage("context", "global") with tracer.start_as_current_span(name="root span") as root_span: parent_ctx = baggage.set_baggage("context", "parent") - with tracer.start_as_current_span( - name="child span", context=parent_ctx - ) as child_span: + with tracer.start_as_current_span(name="child span", context=parent_ctx) as child_span: child_ctx = baggage.set_baggage("context", "child") print(baggage.get_baggage("context", global_ctx)) diff --git a/docs/examples/basic_tracer/basic_trace.py b/docs/examples/basic_tracer/basic_trace.py index b5cdab68c98..3028dcd7e12 100644 --- a/docs/examples/basic_tracer/basic_trace.py +++ b/docs/examples/basic_tracer/basic_trace.py @@ -9,9 +9,7 @@ ) trace.set_tracer_provider(TracerProvider()) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) tracer = trace.get_tracer(__name__) with tracer.start_as_current_span("foo"): print("Hello world!") diff --git a/docs/examples/basic_tracer/resources.py b/docs/examples/basic_tracer/resources.py index 305ccedc940..a6b4ec64e35 100644 --- a/docs/examples/basic_tracer/resources.py +++ b/docs/examples/basic_tracer/resources.py @@ -14,9 +14,7 @@ trace.set_tracer_provider(TracerProvider(resource=resource)) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) tracer = trace.get_tracer(__name__) with tracer.start_as_current_span("foo"): print("Hello world!") diff --git a/docs/examples/django/client.py b/docs/examples/django/client.py index 707004c87ae..bc509d74611 100644 --- a/docs/examples/django/client.py +++ b/docs/examples/django/client.py @@ -16,9 +16,7 @@ trace.set_tracer_provider(TracerProvider()) tracer = trace.get_tracer_provider().get_tracer(__name__) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) with tracer.start_as_current_span("client"): diff --git a/docs/examples/django/instrumentation_example/asgi.py b/docs/examples/django/instrumentation_example/asgi.py index 5f6487b1e8f..6957d1b428c 100644 --- a/docs/examples/django/instrumentation_example/asgi.py +++ b/docs/examples/django/instrumentation_example/asgi.py @@ -13,8 +13,6 @@ from django.core.asgi import get_asgi_application -os.environ.setdefault( - "DJANGO_SETTINGS_MODULE", "instrumentation_example.settings" -) +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "instrumentation_example.settings") application = get_asgi_application() diff --git a/docs/examples/django/instrumentation_example/wsgi.py b/docs/examples/django/instrumentation_example/wsgi.py index 46c0c26f3f6..fac9e0bc9f9 100644 --- a/docs/examples/django/instrumentation_example/wsgi.py +++ b/docs/examples/django/instrumentation_example/wsgi.py @@ -13,8 +13,6 @@ from django.core.wsgi import get_wsgi_application -os.environ.setdefault( - "DJANGO_SETTINGS_MODULE", "instrumentation_example.settings" -) +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "instrumentation_example.settings") application = get_wsgi_application() diff --git a/docs/examples/django/manage.py b/docs/examples/django/manage.py index 535a99f0306..eded52ee2a1 100755 --- a/docs/examples/django/manage.py +++ b/docs/examples/django/manage.py @@ -14,9 +14,7 @@ def main(): - os.environ.setdefault( - "DJANGO_SETTINGS_MODULE", "instrumentation_example.settings" - ) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "instrumentation_example.settings") # This call is what makes the Django application be instrumented DjangoInstrumentor().instrument() diff --git a/docs/examples/django/pages/views.py b/docs/examples/django/pages/views.py index 83d532dda72..57471b7d944 100644 --- a/docs/examples/django/pages/views.py +++ b/docs/examples/django/pages/views.py @@ -11,9 +11,7 @@ trace.set_tracer_provider(TracerProvider()) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) def home_page_view(request): diff --git a/docs/examples/fork-process-model/flask-gunicorn/gunicorn.conf.py b/docs/examples/fork-process-model/flask-gunicorn/gunicorn.conf.py index 51f852d6bc4..39c469c8101 100644 --- a/docs/examples/fork-process-model/flask-gunicorn/gunicorn.conf.py +++ b/docs/examples/fork-process-model/flask-gunicorn/gunicorn.conf.py @@ -27,9 +27,7 @@ errorlog = "-" loglevel = "info" accesslog = "-" -access_log_format = ( - '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"' -) +access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"' def post_fork(server, worker): @@ -52,14 +50,10 @@ def post_fork(server, worker): trace.set_tracer_provider(TracerProvider(resource=resource)) # This uses insecure connection for the purpose of example. Please see the # OTLP Exporter documentation for other options. - span_processor = BatchSpanProcessor( - OTLPSpanExporter(endpoint="http://localhost:4317", insecure=True) - ) + span_processor = BatchSpanProcessor(OTLPSpanExporter(endpoint="http://localhost:4317", insecure=True)) trace.get_tracer_provider().add_span_processor(span_processor) - reader = PeriodicExportingMetricReader( - OTLPMetricExporter(endpoint="http://localhost:4317") - ) + reader = PeriodicExportingMetricReader(OTLPMetricExporter(endpoint="http://localhost:4317")) metrics.set_meter_provider( MeterProvider( resource=resource, diff --git a/docs/examples/fork-process-model/flask-uwsgi/app.py b/docs/examples/fork-process-model/flask-uwsgi/app.py index d822bc7f9b3..8ee4b07173f 100644 --- a/docs/examples/fork-process-model/flask-uwsgi/app.py +++ b/docs/examples/fork-process-model/flask-uwsgi/app.py @@ -28,9 +28,7 @@ def init_tracing(): trace.set_tracer_provider(TracerProvider(resource=resource)) # This uses insecure connection for the purpose of example. Please see the # OTLP Exporter documentation for other options. - span_processor = BatchSpanProcessor( - OTLPSpanExporter(endpoint="http://localhost:4317", insecure=True) - ) + span_processor = BatchSpanProcessor(OTLPSpanExporter(endpoint="http://localhost:4317", insecure=True)) trace.get_tracer_provider().add_span_processor(span_processor) diff --git a/docs/examples/logs/example.py b/docs/examples/logs/example.py index 0c8b1dd06bb..069107be7c8 100644 --- a/docs/examples/logs/example.py +++ b/docs/examples/logs/example.py @@ -21,9 +21,7 @@ ) trace.set_tracer_provider(TracerProvider()) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) logger_provider = LoggerProvider( resource=Resource.create( diff --git a/docs/examples/metrics/views/change_aggregation.py b/docs/examples/metrics/views/change_aggregation.py index 3bdc33a4f97..a0c6c92ddb2 100644 --- a/docs/examples/metrics/views/change_aggregation.py +++ b/docs/examples/metrics/views/change_aggregation.py @@ -14,9 +14,7 @@ # Create a view matching the histogram instrument name `http.client.request.latency` # and configure the `SumAggregation` for the result metrics stream -hist_to_sum_view = View( - instrument_name="http.client.request.latency", aggregation=SumAggregation() -) +hist_to_sum_view = View(instrument_name="http.client.request.latency", aggregation=SumAggregation()) # Use console exporter for the example exporter = ConsoleMetricExporter() diff --git a/docs/examples/metrics/views/disable_default_aggregation.py b/docs/examples/metrics/views/disable_default_aggregation.py index e0e5bad9cc8..ec79ede8e3b 100644 --- a/docs/examples/metrics/views/disable_default_aggregation.py +++ b/docs/examples/metrics/views/disable_default_aggregation.py @@ -17,9 +17,7 @@ ) # disable_default_aggregation. -disable_default_aggregation = View( - instrument_name="*", aggregation=DropAggregation() -) +disable_default_aggregation = View(instrument_name="*", aggregation=DropAggregation()) exporter = ConsoleMetricExporter() @@ -35,9 +33,7 @@ ) set_meter_provider(provider) -meter = get_meter_provider().get_meter( - "view-disable-default-aggregation", "0.1.2" -) +meter = get_meter_provider().get_meter("view-disable-default-aggregation", "0.1.2") # Create a view to configure aggregation specific for this counter. my_counter = meter.create_counter("mycounter") diff --git a/docs/examples/multi-destination-exporting/multi_destination_logs.py b/docs/examples/multi-destination-exporting/multi_destination_logs.py index 4236afff81d..708577e0754 100644 --- a/docs/examples/multi-destination-exporting/multi_destination_logs.py +++ b/docs/examples/multi-destination-exporting/multi_destination_logs.py @@ -29,23 +29,15 @@ set_logger_provider(logger_provider) # Destination 1: OTLP over gRPC -grpc_exporter = GrpcLogExporter( - endpoint="http://localhost:4317", insecure=True -) -logger_provider.add_log_record_processor( - BatchLogRecordProcessor(grpc_exporter) -) +grpc_exporter = GrpcLogExporter(endpoint="http://localhost:4317", insecure=True) +logger_provider.add_log_record_processor(BatchLogRecordProcessor(grpc_exporter)) # Destination 2: OTLP over HTTP http_exporter = HttpLogExporter(endpoint="http://localhost:4318/v1/logs") -logger_provider.add_log_record_processor( - BatchLogRecordProcessor(http_exporter) -) +logger_provider.add_log_record_processor(BatchLogRecordProcessor(http_exporter)) # Destination 3: Console (for debugging) -logger_provider.add_log_record_processor( - BatchLogRecordProcessor(ConsoleLogRecordExporter()) -) +logger_provider.add_log_record_processor(BatchLogRecordProcessor(ConsoleLogRecordExporter())) # Bridge Python's logging to OpenTelemetry handler = LoggingHandler(level=logging.NOTSET, logger_provider=logger_provider) diff --git a/docs/examples/multi-destination-exporting/multi_destination_metrics.py b/docs/examples/multi-destination-exporting/multi_destination_metrics.py index 8f6ca5e50f2..eb916900bcf 100644 --- a/docs/examples/multi-destination-exporting/multi_destination_metrics.py +++ b/docs/examples/multi-destination-exporting/multi_destination_metrics.py @@ -21,28 +21,20 @@ ) # Destination 1: OTLP over gRPC -grpc_reader = PeriodicExportingMetricReader( - GrpcMetricExporter(endpoint="http://localhost:4317", insecure=True) -) +grpc_reader = PeriodicExportingMetricReader(GrpcMetricExporter(endpoint="http://localhost:4317", insecure=True)) # Destination 2: OTLP over HTTP -http_reader = PeriodicExportingMetricReader( - HttpMetricExporter(endpoint="http://localhost:4318/v1/metrics") -) +http_reader = PeriodicExportingMetricReader(HttpMetricExporter(endpoint="http://localhost:4318/v1/metrics")) # Destination 3: Console (for debugging) console_reader = PeriodicExportingMetricReader(ConsoleMetricExporter()) # Pass all readers to the MeterProvider -provider = MeterProvider( - metric_readers=[grpc_reader, http_reader, console_reader] -) +provider = MeterProvider(metric_readers=[grpc_reader, http_reader, console_reader]) metrics.set_meter_provider(provider) meter = metrics.get_meter(__name__) -counter = meter.create_counter( - "request.count", description="Number of requests" -) +counter = meter.create_counter("request.count", description="Number of requests") counter.add(1, {"endpoint": "/api/users"}) counter.add(1, {"endpoint": "/api/orders"}) diff --git a/docs/examples/multi-destination-exporting/multi_destination_traces.py b/docs/examples/multi-destination-exporting/multi_destination_traces.py index ea4a73773cd..12518f754cd 100644 --- a/docs/examples/multi-destination-exporting/multi_destination_traces.py +++ b/docs/examples/multi-destination-exporting/multi_destination_traces.py @@ -24,9 +24,7 @@ trace.set_tracer_provider(provider) # Destination 1: OTLP over gRPC -grpc_exporter = GrpcSpanExporter( - endpoint="http://localhost:4317", insecure=True -) +grpc_exporter = GrpcSpanExporter(endpoint="http://localhost:4317", insecure=True) provider.add_span_processor(BatchSpanProcessor(grpc_exporter)) # Destination 2: OTLP over HTTP diff --git a/docs/examples/opentracing/main.py b/docs/examples/opentracing/main.py index 3bbbb1b1a0c..75292d44130 100755 --- a/docs/examples/opentracing/main.py +++ b/docs/examples/opentracing/main.py @@ -23,9 +23,7 @@ insecure=True, ) # Add the exporter to the tracer provider -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(otlp_exporter) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(otlp_exporter)) # Create an OpenTracing shim. This implements the OpenTracing tracer API, but # forwards calls to the underlying OpenTelemetry tracer. diff --git a/docs/examples/opentracing/rediscache.py b/docs/examples/opentracing/rediscache.py index 107bdeb37a8..adbd88c0757 100644 --- a/docs/examples/opentracing/rediscache.py +++ b/docs/examples/opentracing/rediscache.py @@ -40,15 +40,11 @@ def inner(*args, **kwargs): pval = self.client.get(key) if pval is not None: val = pickle.loads(pval) - scope1.span.log_kv( - {"msg": "Found cached value", "val": val} - ) + scope1.span.log_kv({"msg": "Found cached value", "val": val}) return val scope1.span.log_kv({"msg": "Cache miss, calling function"}) - with self.tracer.start_active_span( - f'Call "{func.__name__}"' - ) as scope2: + with self.tracer.start_active_span(f'Call "{func.__name__}"') as scope2: scope2.span.set_tag("func", func.__name__) scope2.span.set_tag("args", str(args)) scope2.span.set_tag("kwargs", str(kwargs)) diff --git a/docs/examples/sqlcommenter/instrumented_query.py b/docs/examples/sqlcommenter/instrumented_query.py index 6f7f06ced82..9b5be350994 100644 --- a/docs/examples/sqlcommenter/instrumented_query.py +++ b/docs/examples/sqlcommenter/instrumented_query.py @@ -18,9 +18,7 @@ } ) trace.set_tracer_provider(TracerProvider(resource=resource)) -span_processor = BatchSpanProcessor( - OTLPSpanExporter(endpoint="http://localhost:4317") -) +span_processor = BatchSpanProcessor(OTLPSpanExporter(endpoint="http://localhost:4317")) trace.get_tracer_provider().add_span_processor(span_processor) cnx = connect( diff --git a/docs/getting_started/flask_example.py b/docs/getting_started/flask_example.py index 62502faf089..def3a5176e5 100644 --- a/docs/getting_started/flask_example.py +++ b/docs/getting_started/flask_example.py @@ -15,9 +15,7 @@ ) trace.set_tracer_provider(TracerProvider()) -trace.get_tracer_provider().add_span_processor( - BatchSpanProcessor(ConsoleSpanExporter()) -) +trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(ConsoleSpanExporter())) app = flask.Flask(__name__) FlaskInstrumentor().instrument_app(app) diff --git a/docs/getting_started/metrics_example.py b/docs/getting_started/metrics_example.py index 7d83d04e88c..ea93a5548d7 100644 --- a/docs/getting_started/metrics_example.py +++ b/docs/getting_started/metrics_example.py @@ -45,9 +45,7 @@ def observable_gauge_func(options: CallbackOptions) -> Iterable[Observation]: counter.add(1) # Async Counter -observable_counter = meter.create_observable_counter( - "observable_counter", [observable_counter_func] -) +observable_counter = meter.create_observable_counter("observable_counter", [observable_counter_func]) # UpDownCounter updown_counter = meter.create_up_down_counter("updown_counter") @@ -64,9 +62,7 @@ def observable_gauge_func(options: CallbackOptions) -> Iterable[Observation]: histogram.record(99.9) # Async Gauge -observable_gauge = meter.create_observable_gauge( - "observable_gauge", [observable_gauge_func] -) +observable_gauge = meter.create_observable_gauge("observable_gauge", [observable_gauge_func]) # Sync Gauge gauge = meter.create_gauge("gauge") diff --git a/docs/getting_started/tests/test_metrics.py b/docs/getting_started/tests/test_metrics.py index 7b156919693..d102582dcab 100644 --- a/docs/getting_started/tests/test_metrics.py +++ b/docs/getting_started/tests/test_metrics.py @@ -29,54 +29,34 @@ def test_metrics(self): output_data = json.loads(result.stdout) # Get the metrics from the JSON structure - metrics = output_data["resource_metrics"][0]["scope_metrics"][0][ - "metrics" - ] + metrics = output_data["resource_metrics"][0]["scope_metrics"][0]["metrics"] # Create a lookup dict for easier testing metrics_by_name = {metric["name"]: metric for metric in metrics} # Test Counter: should be 1 (called counter.add(1)) - counter_value = metrics_by_name["counter"]["data"]["data_points"][0][ - "value" - ] + counter_value = metrics_by_name["counter"]["data"]["data_points"][0]["value"] self.assertEqual(counter_value, 1, "Counter should have value 1") # Test UpDownCounter: should be -4 (1 + (-5) = -4) - updown_value = metrics_by_name["updown_counter"]["data"][ - "data_points" - ][0]["value"] - self.assertEqual( - updown_value, -4, "UpDownCounter should have value -4" - ) + updown_value = metrics_by_name["updown_counter"]["data"]["data_points"][0]["value"] + self.assertEqual(updown_value, -4, "UpDownCounter should have value -4") # Test Histogram: should have count=1, sum=99.9 histogram_data = metrics_by_name["histogram"]["data"]["data_points"][0] - self.assertEqual( - histogram_data["count"], 1, "Histogram should have count 1" - ) - self.assertEqual( - histogram_data["sum"], 99.9, "Histogram should have sum 99.9" - ) + self.assertEqual(histogram_data["count"], 1, "Histogram should have count 1") + self.assertEqual(histogram_data["sum"], 99.9, "Histogram should have sum 99.9") # Test Gauge: should be 1 (last value set) - gauge_value = metrics_by_name["gauge"]["data"]["data_points"][0][ - "value" - ] + gauge_value = metrics_by_name["gauge"]["data"]["data_points"][0]["value"] self.assertEqual(gauge_value, 1, "Gauge should have value 1") # Test Observable Counter: should be 1 (from callback) - obs_counter_value = metrics_by_name["observable_counter"]["data"][ - "data_points" - ][0]["value"] - self.assertEqual( - obs_counter_value, 1, "Observable counter should have value 1" - ) + obs_counter_value = metrics_by_name["observable_counter"]["data"]["data_points"][0]["value"] + self.assertEqual(obs_counter_value, 1, "Observable counter should have value 1") # Test Observable UpDownCounter: should be -10 (from callback) - obs_updown_value = metrics_by_name["observable_updown_counter"][ - "data" - ]["data_points"][0]["value"] + obs_updown_value = metrics_by_name["observable_updown_counter"]["data"]["data_points"][0]["value"] self.assertEqual( obs_updown_value, -10, @@ -84,9 +64,5 @@ def test_metrics(self): ) # Test Observable Gauge: should be 9 (from callback) - obs_gauge_value = metrics_by_name["observable_gauge"]["data"][ - "data_points" - ][0]["value"] - self.assertEqual( - obs_gauge_value, 9, "Observable gauge should have value 9" - ) + obs_gauge_value = metrics_by_name["observable_gauge"]["data"]["data_points"][0]["value"] + self.assertEqual(obs_gauge_value, 9, "Observable gauge should have value 9") diff --git a/docs/getting_started/tests/test_tracing.py b/docs/getting_started/tests/test_tracing.py index 27f180a2566..b1638db7ecc 100644 --- a/docs/getting_started/tests/test_tracing.py +++ b/docs/getting_started/tests/test_tracing.py @@ -10,9 +10,7 @@ class TestBasicTracerExample(unittest.TestCase): def test_basic_tracer(self): dirpath = os.path.dirname(os.path.realpath(__file__)) test_script = f"{dirpath}/../tracing_example.py" - output = subprocess.check_output( - (sys.executable, test_script) - ).decode() + output = subprocess.check_output((sys.executable, test_script)).decode() self.assertIn('"name": "foo"', output) self.assertIn('"name": "bar"', output) diff --git a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py index b8f7d7865fd..b7e13f5f13e 100644 --- a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py +++ b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py @@ -69,8 +69,5 @@ def _load_http_transport_factory(name: str) -> BaseHTTPTransportFactory: ) factory = ep.load() if not callable(factory): - raise TypeError( - f"Transport {name!r} loaded from entry point is not callable " - f"(got {factory!r})." - ) + raise TypeError(f"Transport {name!r} loaded from entry point is not callable (got {factory!r}).") return cast("BaseHTTPTransportFactory", factory) diff --git a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py index 92de7831a9b..1af5f5f62a2 100644 --- a/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py +++ b/exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py @@ -35,9 +35,7 @@ def _get_connection_error_types() -> tuple[type[Exception], ...]: ] # NameResolutionError was added in urllib3 2.0 - name_resolution_error = getattr( - urllib3.exceptions, "NameResolutionError", None - ) + name_resolution_error = getattr(urllib3.exceptions, "NameResolutionError", None) if name_resolution_error is not None: types.append(name_resolution_error) @@ -46,9 +44,7 @@ def _get_connection_error_types() -> tuple[type[Exception], ...]: @dataclass(frozen=True, slots=True) class Urllib3HTTPResult(BaseHTTPResult): - response: BaseHTTPResponse | None = field( - default=None, hash=False, compare=False - ) + response: BaseHTTPResponse | None = field(default=None, hash=False, compare=False) def content(self) -> bytes: if self.response is None: @@ -112,9 +108,7 @@ def request( url=url, headers=headers, body=data, - timeout=urllib3.Timeout(total=timeout) - if timeout is not None - else None, + timeout=urllib3.Timeout(total=timeout) if timeout is not None else None, preload_content=True, ) # pylint: disable-next=broad-exception-caught diff --git a/exporter/opentelemetry-exporter-http-transport/tests/test_load_transport.py b/exporter/opentelemetry-exporter-http-transport/tests/test_load_transport.py index dcc253c2033..d4471bcf6dc 100644 --- a/exporter/opentelemetry-exporter-http-transport/tests/test_load_transport.py +++ b/exporter/opentelemetry-exporter-http-transport/tests/test_load_transport.py @@ -19,14 +19,10 @@ # pylint: disable=no-self-use class TestLoadHTTPTransportFactory(unittest.TestCase): def test_returns_requests_transport(self): - self.assertIs( - _load_http_transport_factory("requests"), RequestsHTTPTransport - ) + self.assertIs(_load_http_transport_factory("requests"), RequestsHTTPTransport) def test_returns_urllib3_transport(self): - self.assertIs( - _load_http_transport_factory("urllib3"), Urllib3HTTPTransport - ) + self.assertIs(_load_http_transport_factory("urllib3"), Urllib3HTTPTransport) def test_known_transport_does_not_call_entry_points(self): with patch(_ENTRY_POINTS_TARGET) as mock_ep: @@ -56,6 +52,4 @@ def test_entry_point_non_callable_raises_type_error(self): def test_unknown_transport_raises_value_error(self): with patch(_ENTRY_POINTS_TARGET, return_value=[]): - self.assertRaises( - ValueError, _load_http_transport_factory, "nonexistent" - ) + self.assertRaises(ValueError, _load_http_transport_factory, "nonexistent") diff --git a/exporter/opentelemetry-exporter-http-transport/tests/test_requests_transport.py b/exporter/opentelemetry-exporter-http-transport/tests/test_requests_transport.py index 3d0b11ecc70..716ee4fb4ec 100644 --- a/exporter/opentelemetry-exporter-http-transport/tests/test_requests_transport.py +++ b/exporter/opentelemetry-exporter-http-transport/tests/test_requests_transport.py @@ -127,9 +127,7 @@ def test_request_returns_status_code_and_reason(self): for status_code, reason in cases: with self.subTest(status_code=status_code): with Mocketizer(): - Entry.single_register( - Entry.POST, _TEST_URL, status=status_code - ) + Entry.single_register(Entry.POST, _TEST_URL, status=status_code) transport = RequestsHTTPTransport() result = transport.request("POST", _TEST_URL) self.assertEqual(result.status_code, status_code) @@ -166,14 +164,10 @@ def test_request_passes_timeout(self): for timeout in cases: with self.subTest(timeout=timeout): mock_session = MagicMock(spec=requests.Session) - mock_session.request.return_value = MagicMock( - status_code=200, reason="OK" - ) + mock_session.request.return_value = MagicMock(status_code=200, reason="OK") transport = RequestsHTTPTransport(session=mock_session) transport.request("POST", _TEST_URL, timeout=timeout) - timeout_kwarg = mock_session.request.call_args.kwargs[ - "timeout" - ] + timeout_kwarg = mock_session.request.call_args.kwargs["timeout"] self.assertEqual(timeout_kwarg, timeout) def test_request_catches_exception(self): @@ -208,14 +202,10 @@ def test_is_connection_error(self): (ValueError("error"), False), (None, False), ] - transport = RequestsHTTPTransport( - session=MagicMock(spec=requests.Session) - ) + transport = RequestsHTTPTransport(session=MagicMock(spec=requests.Session)) for exception, expected in cases: with self.subTest(error_type=type(exception).__name__): - self.assertEqual( - transport.is_connection_error(exception), expected - ) + self.assertEqual(transport.is_connection_error(exception), expected) def test_verify_sets_session_verify(self): cases = [ @@ -247,9 +237,7 @@ def test_cert_sets_session_cert(self): def test_custom_session_is_used(self): mock_session = MagicMock(spec=requests.Session) - mock_session.request.return_value = MagicMock( - status_code=200, reason="OK" - ) + mock_session.request.return_value = MagicMock(status_code=200, reason="OK") transport = RequestsHTTPTransport(session=mock_session) result = transport.request("POST", _TEST_URL) mock_session.request.assert_called_once() diff --git a/exporter/opentelemetry-exporter-http-transport/tests/test_urllib3_transport.py b/exporter/opentelemetry-exporter-http-transport/tests/test_urllib3_transport.py index 03e4171ea75..9c0fa7b6e97 100644 --- a/exporter/opentelemetry-exporter-http-transport/tests/test_urllib3_transport.py +++ b/exporter/opentelemetry-exporter-http-transport/tests/test_urllib3_transport.py @@ -56,9 +56,7 @@ def test_text_returns_empty_string_for_empty_body(self): def test_text_raises_for_non_utf8_content(self): mock_response = MagicMock() mock_response.data = b"\xff\xfe" - result = Urllib3HTTPResult( - status_code=200, reason="OK", response=mock_response - ) + result = Urllib3HTTPResult(status_code=200, reason="OK", response=mock_response) self.assertRaises(UnicodeDecodeError, result.text) @mocketize @@ -124,9 +122,7 @@ def test_headers_returns_multiple_values_as_comma_separated(self): headers.add("X-Multi", "value1") headers.add("X-Multi", "value2") mock_response.headers = headers - result = Urllib3HTTPResult( - status_code=200, reason="OK", response=mock_response - ) + result = Urllib3HTTPResult(status_code=200, reason="OK", response=mock_response) self.assertEqual(result.headers()["X-Multi"], "value1, value2") @@ -141,9 +137,7 @@ def test_request_returns_status_code_and_reason(self): for status_code, reason in cases: with self.subTest(status_code=status_code): with Mocketizer(): - Entry.single_register( - Entry.POST, _TEST_URL, status=status_code - ) + Entry.single_register(Entry.POST, _TEST_URL, status=status_code) transport = Urllib3HTTPTransport() result = transport.request("POST", _TEST_URL) self.assertEqual(result.status_code, status_code) @@ -187,9 +181,7 @@ def test_request_catches_exception(self): for error, expected_is_connection_error in cases: with self.subTest(error_type=type(error).__name__): transport = Urllib3HTTPTransport() - with patch.object( - transport._pool, "request", side_effect=error - ): + with patch.object(transport._pool, "request", side_effect=error): result = transport.request("POST", _TEST_URL) self.assertIsNone(result.status_code) self.assertIsNone(result.reason) @@ -207,26 +199,20 @@ def test_is_connection_error(self): (urllib3.exceptions.MaxRetryError(None, "http://x"), True), (urllib3.exceptions.HTTPError("error"), False), ( - urllib3.exceptions.ReadTimeoutError( - None, "http://x", "timeout" - ), + urllib3.exceptions.ReadTimeoutError(None, "http://x", "timeout"), False, ), (RuntimeError("error"), False), (ValueError("error"), False), (None, False), ] - name_resolution_error = getattr( - urllib3.exceptions, "NameResolutionError", None - ) + name_resolution_error = getattr(urllib3.exceptions, "NameResolutionError", None) if name_resolution_error is not None: cases.append((name_resolution_error("host", None, "error"), True)) transport = Urllib3HTTPTransport() for exception, expected in cases: with self.subTest(error_type=type(exception).__name__): - self.assertEqual( - transport.is_connection_error(exception), expected - ) + self.assertEqual(transport.is_connection_error(exception), expected) def test_request_passes_timeout(self): cases = [ @@ -237,9 +223,7 @@ def test_request_passes_timeout(self): with self.subTest(timeout=timeout): transport = Urllib3HTTPTransport() with patch.object(transport._pool, "request") as mock_request: - mock_request.return_value = MagicMock( - status=200, reason="OK" - ) + mock_request.return_value = MagicMock(status=200, reason="OK") transport.request("POST", _TEST_URL, timeout=timeout) timeout_kwarg = mock_request.call_args.kwargs["timeout"] if timeout is not None: diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py index 831d4b830d9..d9b5711254c 100644 --- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/trace_exporter/__init__.py @@ -49,9 +49,7 @@ def __init__( self.endpoint = endpoint if client is None: self.channel = grpc.insecure_channel(self.endpoint) - self.client = trace_service_pb2_grpc.TraceServiceStub( - channel=self.channel - ) + self.client = trace_service_pb2_grpc.TraceServiceStub(channel=self.channel) else: self.client = client @@ -85,9 +83,7 @@ def shutdown(self) -> None: def generate_span_requests(self, spans): collector_spans = translate_to_collector(spans) - service_request = trace_service_pb2.ExportTraceServiceRequest( - node=self.node, spans=collector_spans - ) + service_request = trace_service_pb2.ExportTraceServiceRequest(node=self.node, spans=collector_spans) yield service_request def force_flush(self, timeout_millis: int = 30000) -> bool: @@ -127,9 +123,7 @@ def translate_to_collector(spans: Sequence[ReadableSpan]): if span.attributes: for key, value in span.attributes.items(): - utils.add_proto_attribute_value( - collector_span.attributes, key, value - ) + utils.add_proto_attribute_value(collector_span.attributes, key, value) if span.events: for event in span.events: @@ -139,9 +133,7 @@ def translate_to_collector(spans: Sequence[ReadableSpan]): if event.attributes: for key, value in event.attributes.items(): - utils.add_proto_attribute_value( - collector_annotation.attributes, key, value - ) + utils.add_proto_attribute_value(collector_annotation.attributes, key, value) collector_span.time_events.time_event.add( time=utils.proto_timestamp_from_time_ns(event.timestamp), @@ -151,30 +143,17 @@ def translate_to_collector(spans: Sequence[ReadableSpan]): if span.links: for link in span.links: collector_span_link = collector_span.links.link.add() - collector_span_link.trace_id = link.context.trace_id.to_bytes( - 16, "big" - ) - collector_span_link.span_id = link.context.span_id.to_bytes( - 8, "big" - ) + collector_span_link.trace_id = link.context.trace_id.to_bytes(16, "big") + collector_span_link.span_id = link.context.span_id.to_bytes(8, "big") - collector_span_link.type = ( - trace_pb2.Span.Link.Type.TYPE_UNSPECIFIED - ) + collector_span_link.type = trace_pb2.Span.Link.Type.TYPE_UNSPECIFIED if span.parent is not None: - if ( - link.context.span_id == span.parent.span_id - and link.context.trace_id == span.parent.trace_id - ): - collector_span_link.type = ( - trace_pb2.Span.Link.Type.PARENT_LINKED_SPAN - ) + if link.context.span_id == span.parent.span_id and link.context.trace_id == span.parent.trace_id: + collector_span_link.type = trace_pb2.Span.Link.Type.PARENT_LINKED_SPAN if link.attributes: for key, value in link.attributes.items(): - utils.add_proto_attribute_value( - collector_span_link.attributes, key, value - ) + utils.add_proto_attribute_value(collector_span_link.attributes, key, value) collector_spans.append(collector_span) return collector_spans diff --git a/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py b/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py index 8a8cd96e7fb..64997073283 100644 --- a/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py +++ b/exporter/opentelemetry-exporter-opencensus/tests/test_otcollector_trace_exporter.py @@ -32,11 +32,7 @@ def test_constructor(self): "opentelemetry.exporter.opencensus.util.get_node", side_effect=mock_get_node, ) - trace_api.set_tracer_provider( - TracerProvider( - resource=Resource.create({SERVICE_NAME: "testServiceName"}) - ) - ) + trace_api.set_tracer_provider(TracerProvider(resource=Resource.create({SERVICE_NAME: "testServiceName"}))) host_name = "testHostName" client = grpc.insecure_channel("") @@ -94,12 +90,8 @@ def test_translate_to_collector(self): trace_flags=TraceFlags(TraceFlags.SAMPLED), trace_state=trace_api.TraceState([("testkey", "testvalue")]), ) - parent_span_context = trace_api.SpanContext( - trace_id, parent_id, is_remote=False - ) - other_context = trace_api.SpanContext( - trace_id, span_id, is_remote=False - ) + parent_span_context = trace_api.SpanContext(trace_id, parent_id, is_remote=False) + other_context = trace_api.SpanContext(trace_id, span_id, is_remote=False) event_attributes = { "annotation_bool": True, "annotation_string": "annotation_test", @@ -112,12 +104,8 @@ def test_translate_to_collector(self): attributes=event_attributes, ) link_attributes = {"key_bool": True} - link_1 = trace_api.Link( - context=other_context, attributes=link_attributes - ) - link_2 = trace_api.Link( - context=parent_span_context, attributes=link_attributes - ) + link_1 = trace_api.Link(context=other_context, attributes=link_attributes) + link_2 = trace_api.Link(context=parent_span_context, attributes=link_attributes) span_1 = trace._Span( name="test1", context=span_context, @@ -159,79 +147,50 @@ def test_translate_to_collector(self): output_spans = translate_to_collector(otel_spans) self.assertEqual(len(output_spans), 3) - self.assertEqual( - output_spans[0].trace_id, b"n\x0cc%}\xe3L\x92o\x9e\xfc\xd09''." - ) - self.assertEqual( - output_spans[0].span_id, b"4\xbf\x92\xde\xef\xc5\x8c\x92" - ) - self.assertEqual( - output_spans[0].name, trace_pb2.TruncatableString(value="test1") - ) - self.assertEqual( - output_spans[1].name, trace_pb2.TruncatableString(value="test2") - ) - self.assertEqual( - output_spans[2].name, trace_pb2.TruncatableString(value="test3") - ) + self.assertEqual(output_spans[0].trace_id, b"n\x0cc%}\xe3L\x92o\x9e\xfc\xd09''.") + self.assertEqual(output_spans[0].span_id, b"4\xbf\x92\xde\xef\xc5\x8c\x92") + self.assertEqual(output_spans[0].name, trace_pb2.TruncatableString(value="test1")) + self.assertEqual(output_spans[1].name, trace_pb2.TruncatableString(value="test2")) + self.assertEqual(output_spans[2].name, trace_pb2.TruncatableString(value="test3")) self.assertEqual( output_spans[0].start_time.seconds, int(start_times[0] / 1000000000), ) - self.assertEqual( - output_spans[0].end_time.seconds, int(end_times[0] / 1000000000) - ) + self.assertEqual(output_spans[0].end_time.seconds, int(end_times[0] / 1000000000)) self.assertEqual(output_spans[0].kind, trace_api.SpanKind.CLIENT.value) self.assertEqual(output_spans[1].kind, trace_api.SpanKind.SERVER.value) - self.assertEqual( - output_spans[0].parent_span_id, b"\x11\x11\x11\x11\x11\x11\x11\x11" - ) - self.assertEqual( - output_spans[2].parent_span_id, b"\x11\x11\x11\x11\x11\x11\x11\x11" - ) + self.assertEqual(output_spans[0].parent_span_id, b"\x11\x11\x11\x11\x11\x11\x11\x11") + self.assertEqual(output_spans[2].parent_span_id, b"\x11\x11\x11\x11\x11\x11\x11\x11") self.assertEqual( output_spans[0].status.code, trace_api.StatusCode.OK.value, ) self.assertEqual(len(output_spans[0].tracestate.entries), 1) self.assertEqual(output_spans[0].tracestate.entries[0].key, "testkey") - self.assertEqual( - output_spans[0].tracestate.entries[0].value, "testvalue" - ) + self.assertEqual(output_spans[0].tracestate.entries[0].value, "testvalue") self.assertEqual( output_spans[0].attributes.attribute_map["key_bool"].bool_value, False, ) self.assertEqual( - output_spans[0] - .attributes.attribute_map["key_string"] - .string_value.value, + output_spans[0].attributes.attribute_map["key_string"].string_value.value, "hello_world", ) self.assertEqual( output_spans[0].attributes.attribute_map["key_float"].double_value, 111.22, ) - self.assertEqual( - output_spans[0].attributes.attribute_map["key_int"].int_value, 333 - ) + self.assertEqual(output_spans[0].attributes.attribute_map["key_int"].int_value, 333) + self.assertEqual(output_spans[0].time_events.time_event[0].time.seconds, 683647322) self.assertEqual( - output_spans[0].time_events.time_event[0].time.seconds, 683647322 - ) - self.assertEqual( - output_spans[0] - .time_events.time_event[0] - .annotation.description.value, + output_spans[0].time_events.time_event[0].annotation.description.value, "event0", ) self.assertEqual( - output_spans[0] - .time_events.time_event[0] - .annotation.attributes.attribute_map["annotation_bool"] - .bool_value, + output_spans[0].time_events.time_event[0].annotation.attributes.attribute_map["annotation_bool"].bool_value, True, ) self.assertEqual( @@ -242,10 +201,7 @@ def test_translate_to_collector(self): "annotation_test", ) self.assertEqual( - output_spans[0] - .time_events.time_event[0] - .annotation.attributes.attribute_map["key_float"] - .double_value, + output_spans[0].time_events.time_event[0].annotation.attributes.attribute_map["key_float"].double_value, 0.3, ) @@ -270,10 +226,7 @@ def test_translate_to_collector(self): trace_pb2.Span.Link.Type.PARENT_LINKED_SPAN, ) self.assertEqual( - output_spans[0] - .links.link[0] - .attributes.attribute_map["key_bool"] - .bool_value, + output_spans[0].links.link[0].attributes.attribute_map["key_bool"].bool_value, True, ) @@ -282,9 +235,7 @@ def test_export(self): mock_export = mock.MagicMock() mock_client.Export = mock_export host_name = "testHostName" - collector_exporter = OpenCensusSpanExporter( - client=mock_client, host_name=host_name - ) + collector_exporter = OpenCensusSpanExporter(client=mock_client, host_name=host_name) trace_id = 0x6E0C63257DE34C926F9EFCD03927272E span_id = 0x34BF92DEEFC58C92 @@ -316,21 +267,13 @@ def test_export(self): self.assertEqual(output_identifier.host_name, "testHostName") def test_export_service_name(self): - trace_api.set_tracer_provider( - TracerProvider( - resource=Resource.create({SERVICE_NAME: "testServiceName"}) - ) - ) + trace_api.set_tracer_provider(TracerProvider(resource=Resource.create({SERVICE_NAME: "testServiceName"}))) mock_client = mock.MagicMock() mock_export = mock.MagicMock() mock_client.Export = mock_export host_name = "testHostName" - collector_exporter = OpenCensusSpanExporter( - client=mock_client, host_name=host_name - ) - self.assertEqual( - collector_exporter.node.service_info.name, "testServiceName" - ) + collector_exporter = OpenCensusSpanExporter(client=mock_client, host_name=host_name) + self.assertEqual(collector_exporter.node.service_info.name, "testServiceName") trace_id = 0x6E0C63257DE34C926F9EFCD03927272E span_id = 0x34BF92DEEFC58C92 diff --git a/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/_aggregation.py b/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/_aggregation.py index 93259d1d116..a7caef0761f 100644 --- a/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/_aggregation.py +++ b/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/_aggregation.py @@ -63,10 +63,7 @@ def _get_temporality( case _: if temporality_preference != "CUMULATIVE": _logger.warning( - ( - "Invalid value for %s: %s, using cumulative " - "temporality aggregation" - ), + ("Invalid value for %s: %s, using cumulative temporality aggregation"), OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE, temporality_preference, ) @@ -103,10 +100,7 @@ def _get_aggregation( case _: if default_histogram_aggregation != "EXPLICIT_BUCKET_HISTOGRAM": _logger.warning( - ( - "Invalid value for %s: %s, using explicit bucket " - "histogram aggregation" - ), + ("Invalid value for %s: %s, using explicit bucket histogram aggregation"), OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION, default_histogram_aggregation, ) diff --git a/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py b/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py index 0163d2ee743..aadfb24eb10 100644 --- a/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py +++ b/exporter/opentelemetry-exporter-otlp-common/src/opentelemetry/exporter/otlp/common/http.py @@ -90,10 +90,7 @@ def from_str(value: str) -> Compression: case "gzip": return Compression.GZIP case _: - raise ValueError( - f"Invalid compression type: {value!r}. " - "Expected one of: 'none', 'deflate', 'gzip'." - ) + raise ValueError(f"Invalid compression type: {value!r}. Expected one of: 'none', 'deflate', 'gzip'.") @dataclass(slots=True, frozen=True) @@ -207,16 +204,9 @@ def export(self, data: bytes) -> _ExportResult: return _ExportResult(True, status_code, reason, None) export_error = result.error retryable = ( - _is_retryable(status_code) - if status_code - else self._transport.is_connection_error(result.error) + _is_retryable(status_code) if status_code else self._transport.is_connection_error(result.error) ) - if ( - retryable - and status_code is not None - and (retry_after := _extract_retry_after(result)) - is not None - ): + if retryable and status_code is not None and (retry_after := _extract_retry_after(result)) is not None: backoff = retry_after if not retryable: @@ -228,14 +218,9 @@ def export(self, data: bytes) -> _ExportResult: ) return _ExportResult(False, status_code, reason, export_error) - if ( - retry + 1 == _MAX_RETRIES - or backoff > (deadline - time.time()) - or self._shutdown_event.is_set() - ): + if retry + 1 == _MAX_RETRIES or backoff > (deadline - time.time()) or self._shutdown_event.is_set(): self._logger.error( - "Failed to export %s batch due to timeout, " - "max retries or shutdown.", + "Failed to export %s batch due to timeout, max retries or shutdown.", self._kind, ) return _ExportResult(False, status_code, reason, export_error) diff --git a/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py b/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py index 9706689b51f..0ac79d1047e 100644 --- a/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py +++ b/exporter/opentelemetry-exporter-otlp-common/tests/test_aggregation.py @@ -117,9 +117,7 @@ def test_aggregation_default_is_explicit_bucket(self): def test_aggregation_exponential_env(self): with patch.dict( "os.environ", - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "base2_exponential_bucket_histogram" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "base2_exponential_bucket_histogram"}, ): result = _get_aggregation(None) self.assertIsInstance( @@ -130,9 +128,7 @@ def test_aggregation_exponential_env(self): def test_aggregation_invalid_env_logs_warning(self): with patch.dict( "os.environ", - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "unknown_aggregation" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "unknown_aggregation"}, ): with self.assertLogs(_AGGREGATION_LOGGER_NAME, level="WARNING"): result = _get_aggregation(None) @@ -145,9 +141,7 @@ def test_aggregation_override_takes_precedence(self): custom_aggregation = ExponentialBucketHistogramAggregation() with patch.dict( "os.environ", - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "explicit_bucket_histogram" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "explicit_bucket_histogram"}, ): result = _get_aggregation({Histogram: custom_aggregation}) self.assertIs(result[Histogram], custom_aggregation) diff --git a/exporter/opentelemetry-exporter-otlp-common/tests/test_http_client.py b/exporter/opentelemetry-exporter-otlp-common/tests/test_http_client.py index 638636c1bcc..76d79b29fcb 100644 --- a/exporter/opentelemetry-exporter-otlp-common/tests/test_http_client.py +++ b/exporter/opentelemetry-exporter-otlp-common/tests/test_http_client.py @@ -134,9 +134,7 @@ def test_export_success_status_codes(self): for status_code, reason in cases: with self.subTest(status_code=status_code): - transport = _TestHTTPTransport( - _TestHTTPResult(status_code=status_code, reason=reason) - ) + transport = _TestHTTPTransport(_TestHTTPResult(status_code=status_code, reason=reason)) client = self._client(transport) result = client.export(b"payload") @@ -151,9 +149,7 @@ def test_export_success_status_codes(self): side_effect=(100.0, 100.0, 100.0), ) def test_export_request_arguments(self, mock_time): - transport = _TestHTTPTransport( - _TestHTTPResult(status_code=200, reason="OK") - ) + transport = _TestHTTPTransport(_TestHTTPResult(status_code=200, reason="OK")) client = self._client(transport, timeout=3.0) client.export(b"payload") @@ -180,24 +176,18 @@ def test_export_compresses_payload(self): for compression, decompress, expected_encoding in cases: with self.subTest(compression=compression): - transport = _TestHTTPTransport( - _TestHTTPResult(status_code=200, reason="OK") - ) + transport = _TestHTTPTransport(_TestHTTPResult(status_code=200, reason="OK")) client = self._client(transport, compression=compression) result = client.export(b"payload") self.assertTrue(result.success) - self.assertEqual( - decompress(transport.requests[0]["data"]), b"payload" - ) + self.assertEqual(decompress(transport.requests[0]["data"]), b"payload") headers = transport.requests[0]["headers"] if expected_encoding is None: self.assertNotIn("Content-Encoding", headers) else: - self.assertEqual( - headers["Content-Encoding"], expected_encoding - ) + self.assertEqual(headers["Content-Encoding"], expected_encoding) def test_export_retryable_status_codes(self): cases = ( @@ -265,9 +255,7 @@ def test_export_non_retryable_errors(self): None, ), ( - _TestHTTPResult( - status_code=500, reason="Internal Server Error" - ), + _TestHTTPResult(status_code=500, reason="Internal Server Error"), 500, "Internal Server Error", None, @@ -306,9 +294,7 @@ def test_export_non_retryable_errors(self): def test_export_with_shutdown(self): shutdown_event = Mock(spec=threading.Event) shutdown_event.is_set.return_value = True - transport = _TestHTTPTransport( - _TestHTTPResult(status_code=503, reason="Service Unavailable") - ) + transport = _TestHTTPTransport(_TestHTTPResult(status_code=503, reason="Service Unavailable")) client = self._client(transport) # pylint: disable-next=protected-access client._shutdown_event = shutdown_event @@ -373,10 +359,7 @@ def test_export_backoff_exhausts_remaining_timeout(self): def test_export_exhausts_max_retries(self): shutdown_event = Mock(spec=threading.Event) shutdown_event.is_set.return_value = False - transport = _TestHTTPTransport( - *[_TestHTTPResult(status_code=503, reason="Service Unavailable")] - * 6 - ) + transport = _TestHTTPTransport(*[_TestHTTPResult(status_code=503, reason="Service Unavailable")] * 6) client = self._client(transport, timeout=1000.0, jitter=0.0) # pylint: disable-next=protected-access client._shutdown_event = shutdown_event @@ -463,9 +446,7 @@ def test_export_retry_after_http_date(self): shutdown_event = Mock(spec=threading.Event) shutdown_event.is_set.return_value = False shutdown_event.wait.return_value = False - retry_at = format_datetime( - datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True - ) + retry_at = format_datetime(datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True) transport = _TestHTTPTransport( _TestHTTPResult( status_code=503, @@ -493,9 +474,7 @@ def test_export_retry_after_http_date_in_past(self): shutdown_event = Mock(spec=threading.Event) shutdown_event.is_set.return_value = False shutdown_event.wait.return_value = False - retry_at = format_datetime( - datetime.fromtimestamp(base - 30, timezone.utc), usegmt=True - ) + retry_at = format_datetime(datetime.fromtimestamp(base - 30, timezone.utc), usegmt=True) transport = _TestHTTPTransport( _TestHTTPResult( status_code=429, @@ -553,11 +532,7 @@ def test_extract_retry_after_edge_cases(self): for value, expected in cases: with self.subTest(value=value): self.assertEqual( - _extract_retry_after( - _TestHTTPResult( - response_headers={"retry-after": value} - ) - ), + _extract_retry_after(_TestHTTPResult(response_headers={"retry-after": value})), expected, ) diff --git a/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_metrics_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_metrics_encoder.py index d6a3f846b30..959ed5dcfe2 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_metrics_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_metrics_encoder.py @@ -32,9 +32,7 @@ def test_benchmark_encode_histogram(benchmark): [ make_histogram( exemplars=[ - Exemplar( - {"sampled": "true"}, 298.0, TIME, SPAN_ID, TRACE_ID - ), + Exemplar({"sampled": "true"}, 298.0, TIME, SPAN_ID, TRACE_ID), ], ) ] @@ -55,9 +53,7 @@ def test_benchmark_encode_mixed_metrics(benchmark): make_histogram( name="histogram", exemplars=[ - Exemplar( - {"sampled": "true"}, 298.0, TIME, SPAN_ID, TRACE_ID - ), + Exemplar({"sampled": "true"}, 298.0, TIME, SPAN_ID, TRACE_ID), ], ), make_exponential_histogram(name="exp_histogram"), diff --git a/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_trace_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_trace_encoder.py index be51ba41efd..fccbacaf37c 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_trace_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/benchmarks/test_benchmark_trace_encoder.py @@ -25,10 +25,7 @@ def test_benchmark_encode_span_with_events_and_links(benchmark): ) for i in range(5) ), - links=tuple( - Link(context=link_ctx, attributes={"link_key": True}) - for _ in range(3) - ), + links=tuple(Link(context=link_ctx, attributes={"link_key": True}) for _ in range(3)), resource=Resource({"service.name": "bench-svc"}), instrumentation_scope=InstrumentationScope("bench_lib", "1.0"), ) @@ -39,9 +36,6 @@ def test_benchmark_encode_span_with_events_and_links(benchmark): @pytest.mark.parametrize("batch_size", [1, 10, 100]) def test_benchmark_encode_spans(benchmark, batch_size): - spans = [ - make_span(name=f"span-{i}", span_id=0x1000 + i) - for i in range(batch_size) - ] + spans = [make_span(name=f"span-{i}", span_id=0x1000 + i) for i in range(batch_size)] benchmark(encode_spans, spans) diff --git a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/__init__.py b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/__init__.py index 310c399cdcb..f293ae99caa 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/__init__.py @@ -63,16 +63,10 @@ def _encode_value(value: Any) -> JSONAnyValue: if isinstance(value, bytes): return JSONAnyValue(bytes_value=value) if isinstance(value, Sequence): - return JSONAnyValue( - array_value=JSONArrayValue( - values=[_encode_value(v) for v in value] - ) - ) + return JSONAnyValue(array_value=JSONArrayValue(values=[_encode_value(v) for v in value])) if isinstance(value, Mapping): return JSONAnyValue( - kvlist_value=JSONKeyValueList( - values=[_encode_key_value(str(k), v) for k, v in value.items()] - ) + kvlist_value=JSONKeyValueList(values=[_encode_key_value(str(k), v) for k, v in value.items()]) ) raise TypeError(f"Invalid type {type(value)} of value {value}") diff --git a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/_log_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/_log_encoder/__init__.py index 104d17dbc8f..6b3ab3566b0 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/_log_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/_log_encoder/__init__.py @@ -34,9 +34,7 @@ def encode_logs( batch: Collection[ReadableLogRecord], ) -> JSONExportLogsServiceRequest: - return JSONExportLogsServiceRequest( - resource_logs=_encode_resource_logs(batch) - ) + return JSONExportLogsServiceRequest(resource_logs=_encode_resource_logs(batch)) def _encode_log(readable_log_record: ReadableLogRecord) -> JSONLogRecord: @@ -56,9 +54,7 @@ def _encode_log(readable_log_record: ReadableLogRecord) -> JSONLogRecord: cast(Attributes, readable_log_record.log_record.attributes), ), dropped_attributes_count=readable_log_record.dropped_attributes, - severity_number=getattr( - readable_log_record.log_record.severity_number, "value", None - ), + severity_number=getattr(readable_log_record.log_record.severity_number, "value", None), event_name=readable_log_record.log_record.event_name, ) @@ -71,9 +67,7 @@ def _encode_resource_logs( for readable_log in batch: sdk_resource = readable_log.resource sdk_instrumentation = readable_log.instrumentation_scope or None - sdk_resource_logs[sdk_resource][sdk_instrumentation].append( - _encode_log(readable_log) - ) + sdk_resource_logs[sdk_resource][sdk_instrumentation].append(_encode_log(readable_log)) json_resource_logs = [] for sdk_resource, sdk_instrumentations in sdk_resource_logs.items(): @@ -83,9 +77,7 @@ def _encode_resource_logs( JSONScopeLogs( scope=(_encode_instrumentation_scope(sdk_instrumentation)), log_records=json_logs, - schema_url=sdk_instrumentation.schema_url - if sdk_instrumentation - else None, + schema_url=sdk_instrumentation.schema_url if sdk_instrumentation else None, ) ) json_resource_logs.append( diff --git a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/metrics_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/metrics_encoder/__init__.py index a46fb6e66b0..ff1389a4adb 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/metrics_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/metrics_encoder/__init__.py @@ -85,9 +85,7 @@ def encode_metrics(data: MetricsData) -> JSONExportMetricsServiceRequest: return JSONExportMetricsServiceRequest( - resource_metrics=[ - _encode_resource_metrics(rm) for rm in data.resource_metrics - ] + resource_metrics=[_encode_resource_metrics(rm) for rm in data.resource_metrics] ) @@ -115,48 +113,29 @@ def split_metrics_data( field_name, data_points, ) in _iter_metric_data_points(metrics_data): - if ( - not resource_metrics_batch - or resource_metrics_batch[-1].resource - is not resource_metrics.resource - ): + if not resource_metrics_batch or resource_metrics_batch[-1].resource is not resource_metrics.resource: scope_metrics_batch = [] - resource_metrics_batch.append( - replace(resource_metrics, scope_metrics=scope_metrics_batch) - ) + resource_metrics_batch.append(replace(resource_metrics, scope_metrics=scope_metrics_batch)) - if ( - not scope_metrics_batch - or scope_metrics_batch[-1].scope is not scope_metrics.scope - ): + if not scope_metrics_batch or scope_metrics_batch[-1].scope is not scope_metrics.scope: metrics_batch = [] - scope_metrics_batch.append( - replace(scope_metrics, metrics=metrics_batch) - ) + scope_metrics_batch.append(replace(scope_metrics, metrics=metrics_batch)) data_points_batch: list = [] - metrics_batch.append( - _build_metric_with_data_points( - metric, field_name, data_points_batch - ) - ) + metrics_batch.append(_build_metric_with_data_points(metric, field_name, data_points_batch)) for data_point in data_points: data_points_batch.append(data_point) batch_size += 1 if batch_size >= max_export_batch_size: - yield JSONExportMetricsServiceRequest( - resource_metrics=resource_metrics_batch - ) + yield JSONExportMetricsServiceRequest(resource_metrics=resource_metrics_batch) ( resource_metrics_batch, scope_metrics_batch, metrics_batch, data_points_batch, - ) = _build_empty_metric_batches( - resource_metrics, scope_metrics, metric, field_name - ) + ) = _build_empty_metric_batches(resource_metrics, scope_metrics, metric, field_name) batch_size = 0 if not batch_size: @@ -165,9 +144,7 @@ def split_metrics_data( metrics_batch = [] if batch_size: - yield JSONExportMetricsServiceRequest( - resource_metrics=resource_metrics_batch - ) + yield JSONExportMetricsServiceRequest(resource_metrics=resource_metrics_batch) def _get_metric_data_field_name(metric: JSONMetric) -> str | None: @@ -179,23 +156,17 @@ def _get_metric_data_field_name(metric: JSONMetric) -> str | None: def _iter_metric_data_points( metrics_data: JSONExportMetricsServiceRequest, -) -> Iterable[ - tuple[JSONResourceMetrics, JSONScopeMetrics, JSONMetric, str, list] -]: +) -> Iterable[tuple[JSONResourceMetrics, JSONScopeMetrics, JSONMetric, str, list]]: for resource_metrics in metrics_data.resource_metrics: for scope_metrics in resource_metrics.scope_metrics: for metric in scope_metrics.metrics: field_name = _get_metric_data_field_name(metric) if field_name is None: - _logger.warning( - "Tried to split and export an unsupported metric type. Skipping." - ) + _logger.warning("Tried to split and export an unsupported metric type. Skipping.") continue dps = getattr(metric, field_name).data_points if not dps: - _logger.warning( - "Unexpected empty metric datapoints. Skipping." - ) + _logger.warning("Unexpected empty metric datapoints. Skipping.") continue yield ( resource_metrics, @@ -220,17 +191,11 @@ def _build_empty_metric_batches( scope_metrics: JSONScopeMetrics, metric: JSONMetric, field_name: str, -) -> tuple[ - list[JSONResourceMetrics], list[JSONScopeMetrics], list[JSONMetric], list -]: +) -> tuple[list[JSONResourceMetrics], list[JSONScopeMetrics], list[JSONMetric], list]: data_points_batch = [] - metrics_batch = [ - _build_metric_with_data_points(metric, field_name, data_points_batch) - ] + metrics_batch = [_build_metric_with_data_points(metric, field_name, data_points_batch)] scope_metrics_batch = [replace(scope_metrics, metrics=metrics_batch)] - resource_metrics_batch = [ - replace(resource_metrics, scope_metrics=scope_metrics_batch) - ] + resource_metrics_batch = [replace(resource_metrics, scope_metrics=scope_metrics_batch)] return ( resource_metrics_batch, scope_metrics_batch, @@ -243,9 +208,7 @@ def _encode_resource_metrics( rm: ResourceMetrics, ) -> JSONResourceMetrics: return JSONResourceMetrics( - resource=JSONResource( - attributes=_encode_attributes(rm.resource.attributes) - ), + resource=JSONResource(attributes=_encode_attributes(rm.resource.attributes)), scope_metrics=[_encode_scope_metrics(sm) for sm in rm.scope_metrics], schema_url=rm.resource.schema_url, ) @@ -268,33 +231,21 @@ def _encode_metric(metric: Metric) -> JSONMetric: unit=metric.unit, ) if isinstance(metric.data, Gauge): - json_metric.gauge = JSONGauge( - data_points=[ - _encode_gauge_data_point(pt) for pt in metric.data.data_points - ] - ) + json_metric.gauge = JSONGauge(data_points=[_encode_gauge_data_point(pt) for pt in metric.data.data_points]) elif isinstance(metric.data, Histogram): json_metric.histogram = JSONHistogram( - data_points=[ - _encode_histogram_data_point(pt) - for pt in metric.data.data_points - ], + data_points=[_encode_histogram_data_point(pt) for pt in metric.data.data_points], aggregation_temporality=metric.data.aggregation_temporality, ) elif isinstance(metric.data, Sum): json_metric.sum = JSONSum( - data_points=[ - _encode_sum_data_point(pt) for pt in metric.data.data_points - ], + data_points=[_encode_sum_data_point(pt) for pt in metric.data.data_points], aggregation_temporality=metric.data.aggregation_temporality, is_monotonic=metric.data.is_monotonic, ) elif isinstance(metric.data, ExponentialHistogram): json_metric.exponential_histogram = JSONExponentialHistogram( - data_points=[ - _encode_exponential_histogram_data_point(pt) - for pt in metric.data.data_points - ], + data_points=[_encode_exponential_histogram_data_point(pt) for pt in metric.data.data_points], aggregation_temporality=metric.data.aggregation_temporality, ) else: @@ -394,24 +345,17 @@ def _encode_exemplars( ) -> list[JSONExemplar]: json_exemplars = [] for sdk_exemplar in sdk_exemplars: - if ( - sdk_exemplar.span_id is not None - and sdk_exemplar.trace_id is not None - ): + if sdk_exemplar.span_id is not None and sdk_exemplar.trace_id is not None: json_exemplar = JSONExemplar( time_unix_nano=sdk_exemplar.time_unix_nano, span_id=_encode_span_id(sdk_exemplar.span_id), trace_id=_encode_trace_id(sdk_exemplar.trace_id), - filtered_attributes=_encode_attributes( - sdk_exemplar.filtered_attributes - ), + filtered_attributes=_encode_attributes(sdk_exemplar.filtered_attributes), ) else: json_exemplar = JSONExemplar( time_unix_nano=sdk_exemplar.time_unix_nano, - filtered_attributes=_encode_attributes( - sdk_exemplar.filtered_attributes - ), + filtered_attributes=_encode_attributes(sdk_exemplar.filtered_attributes), ) # Assign the value based on its type in the SDK exemplar diff --git a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/trace_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/trace_encoder/__init__.py index 6542c56b3a9..3655839bf63 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/trace_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/src/opentelemetry/exporter/otlp/json/common/_internal/trace_encoder/__init__.py @@ -49,9 +49,7 @@ def encode_spans( sdk_spans: Collection[ReadableSpan], ) -> JSONExportTraceServiceRequest: - return JSONExportTraceServiceRequest( - resource_spans=_encode_resource_spans(sdk_spans) - ) + return JSONExportTraceServiceRequest(resource_spans=_encode_resource_spans(sdk_spans)) def _encode_resource_spans( @@ -62,9 +60,7 @@ def _encode_resource_spans( for sdk_span in sdk_spans: sdk_resource = sdk_span.resource sdk_instrumentation = sdk_span.instrumentation_scope or None - sdk_resource_spans[sdk_resource][sdk_instrumentation].append( - _encode_span(sdk_span) - ) + sdk_resource_spans[sdk_resource][sdk_instrumentation].append(_encode_span(sdk_span)) json_resource_spans = [] for sdk_resource, sdk_instrumentations in sdk_resource_spans.items(): @@ -74,9 +70,7 @@ def _encode_resource_spans( JSONScopeSpans( scope=(_encode_instrumentation_scope(sdk_instrumentation)), spans=json_spans, - schema_url=sdk_instrumentation.schema_url - if sdk_instrumentation - else None, + schema_url=sdk_instrumentation.schema_url if sdk_instrumentation else None, ) ) json_resource_spans.append( @@ -100,13 +94,9 @@ def _span_flags(parent_span_context: SpanContext | None) -> int: def _encode_span(sdk_span: ReadableSpan) -> JSONSpan: span_context = sdk_span.get_span_context() return JSONSpan( - trace_id=_encode_trace_id( - span_context.trace_id if span_context else 0 - ), + trace_id=_encode_trace_id(span_context.trace_id if span_context else 0), span_id=_encode_span_id(span_context.span_id if span_context else 0), - trace_state=_encode_trace_state( - span_context.trace_state if span_context else None - ), + trace_state=_encode_trace_state(span_context.trace_state if span_context else None), parent_span_id=_encode_context_span_id(sdk_span.parent), name=sdk_span.name, kind=_SPAN_KIND_MAP[sdk_span.kind], @@ -162,11 +152,7 @@ def _encode_status(status: Status | None) -> JSONStatus | None: def _encode_trace_state(trace_state: TraceState | None) -> str | None: - return ( - ",".join([f"{key}={value}" for key, value in (trace_state.items())]) - if trace_state is not None - else None - ) + return ",".join([f"{key}={value}" for key, value in (trace_state.items())]) if trace_state is not None else None def _encode_context_span_id(context: SpanContext | None) -> bytes | None: diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/__init__.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/__init__.py index f11d0a55784..b757d5e91c5 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/__init__.py @@ -60,9 +60,7 @@ def _is_none_equivalent(val_a, val_b): return False -def assert_proto_json_equal( - test_case: unittest.TestCase, obj_a, obj_b, path: str = "" -): +def assert_proto_json_equal(test_case: unittest.TestCase, obj_a, obj_b, path: str = ""): """Recursively compare two proto_json dataclass objects, treating None as equivalent to the type's empty default ([], "", b"", 0, 0.0).""" if dataclasses.is_dataclass(obj_a) and dataclasses.is_dataclass(obj_b): @@ -78,15 +76,11 @@ def assert_proto_json_equal( f"List length mismatch at {path}: {len(obj_a)} != {len(obj_b)}", ) for idx, (item_a, item_b) in enumerate(zip(obj_a, obj_b)): - assert_proto_json_equal( - test_case, item_a, item_b, f"{path}[{idx}]" - ) + assert_proto_json_equal(test_case, item_a, item_b, f"{path}[{idx}]") elif _is_none_equivalent(obj_a, obj_b): pass else: - test_case.assertEqual( - obj_a, obj_b, f"Mismatch at {path}: {obj_a!r} != {obj_b!r}" - ) + test_case.assertEqual(obj_a, obj_b, f"Mismatch at {path}: {obj_a!r} != {obj_b!r}") def make_span_unended( @@ -148,11 +142,7 @@ def make_span( def make_log_context(trace_id=TRACE_ID, span_id=SPAN_ID): - return set_span_in_context( - NonRecordingSpan( - SpanContext(trace_id, span_id, False, TraceFlags(0x01)) - ) - ) + return set_span_in_context(NonRecordingSpan(SpanContext(trace_id, span_id, False, TraceFlags(0x01)))) def make_log( @@ -345,8 +335,7 @@ def make_exponential_histogram( sum=sum_value, scale=scale, zero_count=zero_count, - positive=positive - or Buckets(offset=0, bucket_counts=[1, 2, 3]), + positive=positive or Buckets(offset=0, bucket_counts=[1, 2, 3]), negative=negative or Buckets(offset=1, bucket_counts=[1]), flags=flags, min=min_value, diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py index 4720ac56ba4..bcdce8f4466 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_common_encoder.py @@ -90,11 +90,7 @@ def test_encode_value(self): "bytes", b"\x01\x02\x03", JSONAnyValue(bytes_value=b"\x01\x02\x03"), - { - "bytesValue": base64.b64encode(b"\x01\x02\x03").decode( - "utf-8" - ) - }, + {"bytesValue": base64.b64encode(b"\x01\x02\x03").decode("utf-8")}, ), ] for name, value, expected_obj, expected_dict in cases: @@ -124,9 +120,7 @@ def test_encode_value_mapping(self): expected = JSONAnyValue( kvlist_value=JSONKeyValueList( values=[ - JSONKeyValue( - key="key", value=JSONAnyValue(string_value="val") - ), + JSONKeyValue(key="key", value=JSONAnyValue(string_value="val")), JSONKeyValue(key="num", value=JSONAnyValue(int_value=1)), ] ) @@ -155,9 +149,7 @@ def test_encode_array_with_nulls(self): def test_encode_key_value(self): result = _encode_key_value("mykey", "myval") - expected = JSONKeyValue( - key="mykey", value=JSONAnyValue(string_value="myval") - ) + expected = JSONKeyValue(key="mykey", value=JSONAnyValue(string_value="myval")) self.assertEqual(result, expected) self.assertEqual( result.to_dict(), @@ -183,9 +175,7 @@ def test_encode_attributes_all_types(self): JSONKeyValue(key="a", value=JSONAnyValue(int_value=1)), JSONKeyValue(key="b", value=JSONAnyValue(double_value=3.14)), JSONKeyValue(key="c", value=JSONAnyValue(bool_value=False)), - JSONKeyValue( - key="hello", value=JSONAnyValue(string_value="world") - ), + JSONKeyValue(key="hello", value=JSONAnyValue(string_value="world")), JSONKeyValue( key="greet", value=JSONAnyValue( @@ -232,9 +222,7 @@ def test_encode_attributes_empty(self): def test_encode_attributes_error_skips_bad_key(self): with self.assertLogs(level=ERROR) as error: - result = _encode_attributes( - {"a": 1, "bad_key": CallingStrRaisesException(), "b": 2} - ) + result = _encode_attributes({"a": 1, "bad_key": CallingStrRaisesException(), "b": 2}) self.assertEqual(len(error.records), 1) self.assertEqual(error.records[0].msg, "Failed to encode key %s: %s") @@ -288,11 +276,7 @@ def test_encode_trace_id(self): def test_encode_resource(self): resource = Resource({"key": "val"}) result = _encode_resource(resource) - expected = JSONResource( - attributes=[ - JSONKeyValue(key="key", value=JSONAnyValue(string_value="val")) - ] - ) + expected = JSONResource(attributes=[JSONKeyValue(key="key", value=JSONAnyValue(string_value="val"))]) self.assertEqual(result, expected) result_dict = result.to_dict() self.assertIn("attributes", result_dict) @@ -318,9 +302,7 @@ def test_encode_instrumentation_scope(self): expected = JSONInstrumentationScope( name="my_lib", version="1.0.0", - attributes=[ - JSONKeyValue(key="k", value=JSONAnyValue(int_value=1)) - ], + attributes=[JSONKeyValue(key="k", value=JSONAnyValue(int_value=1))], ) self.assertEqual(result, expected) result_dict = result.to_dict() diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_log_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_log_encoder.py index 6a4e2faa2b6..2ed56850077 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_log_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_log_encoder.py @@ -65,9 +65,7 @@ def test_encode_basic_log_record(self): {"first_resource": "value"}, "resource_schema_url", ), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) pb2_service_request = ExportLogsServiceRequest( resource_logs=[ @@ -82,28 +80,20 @@ def test_encode_basic_log_record(self): ), scope_logs=[ PB2ScopeLogs( - scope=PB2InstrumentationScope( - name="first_name", version="first_version" - ), + scope=PB2InstrumentationScope(name="first_name", version="first_version"), log_records=[ PB2LogRecord( time_unix_nano=1644650195189786880, observed_time_unix_nano=1644650195189786881, - trace_id=_encode_trace_id( - 89564621134313219400156819398935297684 - ), - span_id=_encode_span_id( - 1312458408527513268 - ), + trace_id=_encode_trace_id(89564621134313219400156819398935297684), + span_id=_encode_span_id(1312458408527513268), flags=int(TraceFlags(0x01)), severity_text="WARN", severity_number=SeverityNumber.WARN.value, body=_encode_value( "Do not go gentle into that good night. Rage, rage against the dying of the light" ), - attributes=_encode_attributes( - {"a": 1, "b": "c"} - ), + attributes=_encode_attributes({"a": 1, "b": "c"}), ) ], ), @@ -117,20 +107,18 @@ def test_encode_basic_log_record(self): def test_encode_log_record_with_no_instrumentation_scope_and_dict_body( self, ): - log_record_with_no_instrumentation_scope_and_dict_body = ( - ReadWriteLogRecord( - LogRecord( - timestamp=1644650427658989056, - observed_timestamp=1644650427658989057, - context=_CONTEXT_LOG, - severity_text="DEBUG", - severity_number=SeverityNumber.DEBUG, - body={"error": None, "array_with_nones": [1, None, 2]}, - attributes={"a": 1, "b": "c"}, - ), - resource=SDKResource({"second_resource": "CASE"}), - instrumentation_scope=None, - ) + log_record_with_no_instrumentation_scope_and_dict_body = ReadWriteLogRecord( + LogRecord( + timestamp=1644650427658989056, + observed_timestamp=1644650427658989057, + context=_CONTEXT_LOG, + severity_text="DEBUG", + severity_number=SeverityNumber.DEBUG, + body={"error": None, "array_with_nones": [1, None, 2]}, + attributes={"a": 1, "b": "c"}, + ), + resource=SDKResource({"second_resource": "CASE"}), + instrumentation_scope=None, ) pb2_resource_logs = PB2ResourceLogs( resource=PB2Resource( @@ -148,9 +136,7 @@ def test_encode_log_record_with_no_instrumentation_scope_and_dict_body( PB2LogRecord( time_unix_nano=1644650427658989056, observed_time_unix_nano=1644650427658989057, - trace_id=_encode_trace_id( - 89564621134313219400156819398935297684 - ), + trace_id=_encode_trace_id(89564621134313219400156819398935297684), span_id=_encode_span_id(1312458408527513268), flags=int(TraceFlags(0x01)), severity_text="DEBUG", @@ -168,9 +154,7 @@ def test_encode_log_record_with_no_instrumentation_scope_and_dict_body( ], ) self.assertEqual( - encode_logs( - [log_record_with_no_instrumentation_scope_and_dict_body] - ), + encode_logs([log_record_with_no_instrumentation_scope_and_dict_body]), ExportLogsServiceRequest(resource_logs=[pb2_resource_logs]), ) @@ -185,11 +169,7 @@ def test_encode_log_record_with_empty_resource_and_dict_attribute_value( severity_text="FATAL", severity_number=SeverityNumber.FATAL, body="This instrumentation scope has a schema url and attributes", - attributes={ - "extended": { - "sequence": [{"inner": "mapping", "none": None}] - } - }, + attributes={"extended": {"sequence": [{"inner": "mapping", "none": None}]}}, ), resource=SDKResource({}), instrumentation_scope=InstrumentationScope( @@ -212,24 +192,14 @@ def test_encode_log_record_with_empty_resource_and_dict_attribute_value( PB2LogRecord( time_unix_nano=1644650584292683033, observed_time_unix_nano=1644650584292683033, - trace_id=_encode_trace_id( - 89564621134313219400156819398935297684 - ), + trace_id=_encode_trace_id(89564621134313219400156819398935297684), span_id=_encode_span_id(1312458408527513268), flags=int(TraceFlags(0x01)), severity_text="FATAL", severity_number=SeverityNumber.FATAL.value, - body=_encode_value( - "This instrumentation scope has a schema url and attributes" - ), + body=_encode_value("This instrumentation scope has a schema url and attributes"), attributes=_encode_attributes( - { - "extended": { - "sequence": [ - {"inner": "mapping", "none": None} - ] - } - } + {"extended": {"sequence": [{"inner": "mapping", "none": None}]}} ), ) ], @@ -238,9 +208,7 @@ def test_encode_log_record_with_empty_resource_and_dict_attribute_value( ], ) self.assertEqual( - encode_logs( - [log_record_with_empty_resource_and_dict_attribute_value] - ), + encode_logs([log_record_with_empty_resource_and_dict_attribute_value]), ExportLogsServiceRequest(resource_logs=[pb2_resource_logs]), ) @@ -250,10 +218,7 @@ def test_dropped_attributes_count(self): self.assertTrue(hasattr(sdk_logs[0], "dropped_attributes")) self.assertEqual( # pylint:disable=no-member - encoded_logs.resource_logs[0] - .scope_logs[0] - .log_records[0] - .dropped_attributes_count, + encoded_logs.resource_logs[0].scope_logs[0].log_records[0].dropped_attributes_count, 2, ) @@ -280,13 +245,9 @@ def _get_test_logs_dropped_attributes() -> list[ReadWriteLogRecord]: ), resource=SDKResource({"first_resource": "value"}), limits=LogRecordLimits(max_attributes=1), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), - ) - ctx_log2 = set_span_in_context( - NonRecordingSpan(SpanContext(0, 0, False)) + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) + ctx_log2 = set_span_in_context(NonRecordingSpan(SpanContext(0, 0, False))) log2 = ReadWriteLogRecord( LogRecord( timestamp=1644650249738562048, @@ -297,9 +258,7 @@ def _get_test_logs_dropped_attributes() -> list[ReadWriteLogRecord]: attributes={}, ), resource=SDKResource({"second_resource": "CASE"}), - instrumentation_scope=InstrumentationScope( - "second_name", "second_version" - ), + instrumentation_scope=InstrumentationScope("second_name", "second_version"), ) return [log1, log2] diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_encoder.py index 9a7e398db50..b59f47d28e4 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_encoder.py @@ -44,9 +44,7 @@ def test_encode_sum(self): ] for name, value, is_int in cases: with self.subTest(name=name): - result = encode_metrics( - make_metrics_data([make_sum(value=value)]) - ) + result = encode_metrics(make_metrics_data([make_sum(value=value)])) encoded = _get_first_metric(result) self.assertIsNotNone(encoded.sum) @@ -74,9 +72,7 @@ def test_encode_gauge(self): ] for name, value, is_int in cases: with self.subTest(name=name): - result = encode_metrics( - make_metrics_data([make_gauge(value=value)]) - ) + result = encode_metrics(make_metrics_data([make_gauge(value=value)])) encoded = _get_first_metric(result) self.assertIsNotNone(encoded.gauge) @@ -92,9 +88,7 @@ def test_encode_gauge(self): def test_encode_histogram(self): metric = make_histogram( exemplars=[ - Exemplar( - {"filtered": "banana"}, 298.0, TIME, SPAN_ID, TRACE_ID - ), + Exemplar({"filtered": "banana"}, 298.0, TIME, SPAN_ID, TRACE_ID), ], ) result = encode_metrics(make_metrics_data([metric])) @@ -116,9 +110,7 @@ def test_encode_histogram(self): self.assertEqual(len(dp.exemplars), 1) def test_encode_exponential_histogram(self): - result = encode_metrics( - make_metrics_data([make_exponential_histogram()]) - ) + result = encode_metrics(make_metrics_data([make_exponential_histogram()])) encoded = _get_first_metric(result) self.assertIsNotNone(encoded.exponential_histogram) @@ -184,11 +176,7 @@ def test_encode_exemplars(self): exemplars=[exemplar], ) result = encode_metrics(make_metrics_data([metric])) - enc_ex = ( - _get_first_metric(result) - .histogram.data_points[0] - .exemplars[0] - ) + enc_ex = _get_first_metric(result).histogram.data_points[0].exemplars[0] if has_ids: self.assertTrue(enc_ex.span_id) self.assertTrue(enc_ex.trace_id) @@ -221,9 +209,7 @@ def test_encode_metrics_resource_and_scope(self): self.assertEqual(sm.scope.version, "2.0") def test_encode_metrics_to_dict(self): - result = encode_metrics( - make_metrics_data([make_sum(name="sum_int", value=33)]) - ) + result = encode_metrics(make_metrics_data([make_sum(name="sum_int", value=33)])) result_dict = result.to_dict() self.assertIn("resourceMetrics", result_dict) @@ -250,9 +236,7 @@ def test_encode_metrics_json_roundtrip(self): ] result = encode_metrics(make_metrics_data(metrics)) json_str = result.to_json() - roundtripped = JSONExportMetricsServiceRequest.from_dict( - json.loads(json_str) - ) + roundtripped = JSONExportMetricsServiceRequest.from_dict(json.loads(json_str)) assert_proto_json_equal(self, result, roundtripped) def test_unsupported_metric_type(self): diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_split.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_split.py index 295b155c55d..80fc09c203e 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_split.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_metrics_split.py @@ -93,9 +93,7 @@ def _exponential_histogram_dp(count: int) -> ExponentialHistogramDataPoint: ) -def _metric_of_type( - field_name: str, values: list[int], name: str | None = None -) -> Metric: +def _metric_of_type(field_name: str, values: list[int], name: str | None = None) -> Metric: match field_name: case "gauge": data = Gauge(data_points=[_number_dp(v) for v in values]) @@ -115,39 +113,27 @@ def _metric_of_type( data_points=[_exponential_histogram_dp(v) for v in values], aggregation_temporality=AggregationTemporality.CUMULATIVE, ) - return Metric( - name=name or field_name, description="desc", unit="u", data=data - ) + return Metric(name=name or field_name, description="desc", unit="u", data=data) def _scope_metrics(name: str, metrics: list[Metric]) -> ScopeMetrics: return ScopeMetrics( - scope=InstrumentationScope( - name=name, version="1.0", schema_url="scope_url" - ), + scope=InstrumentationScope(name=name, version="1.0", schema_url="scope_url"), metrics=metrics, schema_url="scope_url", ) -def _resource_metrics( - index: int, scope_metrics_list: list[ScopeMetrics] -) -> ResourceMetrics: +def _resource_metrics(index: int, scope_metrics_list: list[ScopeMetrics]) -> ResourceMetrics: return ResourceMetrics( - resource=Resource( - attributes={"r": index}, schema_url=f"res_url_{index}" - ), + resource=Resource(attributes={"r": index}, schema_url=f"res_url_{index}"), scope_metrics=scope_metrics_list, schema_url=f"res_url_{index}", ) def _data_point_value(data_point: JSONNumberDataPoint) -> int | float: - return ( - data_point.as_int - if data_point.as_int is not None - else data_point.as_double - ) + return data_point.as_int if data_point.as_int is not None else data_point.as_double def _data_point_values( @@ -205,9 +191,7 @@ def _assert_no_empty_metrics( for metric in scope_metrics.metrics: field_name = _get_metric_data_field_name(metric) data_points = getattr(metric, field_name).data_points - assert data_points, ( - f"metric {metric.name!r} has no data points" - ) + assert data_points, f"metric {metric.name!r} has no data points" class TestSplitMetricsData(unittest.TestCase): @@ -226,9 +210,7 @@ def test_split_batch_sizes(self): ] for label, values, batch_size, expected_batches in cases: with self.subTest(case=label): - request = encode_metrics( - make_metrics_data([_metric_of_type("sum", values, "s")]) - ) + request = encode_metrics(make_metrics_data([_metric_of_type("sum", values, "s")])) batches = list(split_metrics_data(request, batch_size)) self.assertEqual(len(batches), len(expected_batches)) self.assertEqual( @@ -237,9 +219,7 @@ def test_split_batch_sizes(self): ) def test_split_preserves_metadata(self): - request = encode_metrics( - make_metrics_data([_metric_of_type("sum", [0, 1, 2, 3, 4], "s")]) - ) + request = encode_metrics(make_metrics_data([_metric_of_type("sum", [0, 1, 2, 3, 4], "s")])) for batch in split_metrics_data(request, 2): metric = _get_first_metric(batch) self.assertEqual(metric.name, "s") @@ -275,12 +255,7 @@ def test_split_with_empty_metric(self): batches = list(split_metrics_data(request, 100)) self.assertEqual(len(batches), 1) _assert_no_empty_metrics(batches[0]) - names = [ - m.name - for rm in batches[0].resource_metrics - for sm in rm.scope_metrics - for m in sm.metrics - ] + names = [m.name for rm in batches[0].resource_metrics for sm in rm.scope_metrics for m in sm.metrics] self.assertEqual(names, ["a", "b"]) self.assertEqual(_data_point_values(batches[0]), [0, 1, 2, 3]) @@ -300,9 +275,7 @@ def test_split_across_metrics(self): self.assertEqual([m.name for m in first_metrics], ["a", "b"]) self.assertEqual(_data_point_values(batches[0]), [0, 1, 2]) - second_metrics = ( - batches[1].resource_metrics[0].scope_metrics[0].metrics - ) + second_metrics = batches[1].resource_metrics[0].scope_metrics[0].metrics self.assertEqual([m.name for m in second_metrics], ["b"]) self.assertEqual(_data_point_values(batches[1]), [3]) @@ -333,9 +306,7 @@ def test_split_across_scopes(self): self.assertEqual(_data_point_values(batches[0]), [0, 1, 2]) self.assertEqual(len(batches[1].resource_metrics[0].scope_metrics), 1) - self.assertEqual( - batches[1].resource_metrics[0].scope_metrics[0].scope.name, "s1" - ) + self.assertEqual(batches[1].resource_metrics[0].scope_metrics[0].scope.name, "s1") self.assertEqual(_data_point_values(batches[1]), [3]) def test_split_across_resources(self): @@ -376,18 +347,14 @@ def test_split_all_metric_types(self): if field_name == "summary": continue with self.subTest(field_name=field_name): - request = encode_metrics( - make_metrics_data([_metric_of_type(field_name, [1, 2, 3])]) - ) + request = encode_metrics(make_metrics_data([_metric_of_type(field_name, [1, 2, 3])])) batches = list(split_metrics_data(request, 2)) self.assertEqual(len(batches), 2) self.assertEqual(_count_data_points(batches[0]), 2) self.assertEqual(_count_data_points(batches[1]), 1) for batch in batches: metric = _get_first_metric(batch) - self.assertEqual( - _get_metric_data_field_name(metric), field_name - ) + self.assertEqual(_get_metric_data_field_name(metric), field_name) def test_split_preserves_data_points(self): request = encode_metrics( @@ -428,9 +395,7 @@ def test_split_preserves_data_points(self): batches = list(split_metrics_data(request, batch_size)) flattened = [v for b in batches for v in _data_point_values(b)] self.assertEqual(flattened, expected) - self.assertEqual( - sum(_count_data_points(b) for b in batches), len(expected) - ) + self.assertEqual(sum(_count_data_points(b) for b in batches), len(expected)) for batch in batches: self.assertLessEqual(_count_data_points(batch), batch_size) _assert_no_empty_metrics(batch) @@ -439,11 +404,7 @@ def test_split_preserves_hierarchy_and_attributes(self): cases = [ ( "single_metric", - encode_metrics( - make_metrics_data( - [_metric_of_type("sum", [0, 1, 2, 3, 4], "only")] - ) - ), + encode_metrics(make_metrics_data([_metric_of_type("sum", [0, 1, 2, 3, 4], "only")])), 5, ), ( @@ -480,12 +441,8 @@ def test_split_preserves_hierarchy_and_attributes(self): _scope_metrics( "s0", [ - _metric_of_type( - "sum", [0, 1, 2], "a" - ), - _metric_of_type( - "histogram", [1, 2] - ), + _metric_of_type("sum", [0, 1, 2], "a"), + _metric_of_type("histogram", [1, 2]), ], ), _scope_metrics( @@ -525,9 +482,7 @@ def test_split_preserves_hierarchy_and_attributes(self): unit="u", data=Sum( data_points=[], - aggregation_temporality=( - AggregationTemporality.CUMULATIVE - ), + aggregation_temporality=(AggregationTemporality.CUMULATIVE), is_monotonic=True, ), ), @@ -561,36 +516,24 @@ def test_split_preserves_hierarchy_and_attributes(self): self.assertEqual(set(seen), set(ground_truth)) for dp_id, ctx in seen.items(): expected = ground_truth[dp_id] - self.assertIs( - ctx["data_point"], expected["data_point"] - ) - assert_proto_json_equal( - self, ctx["resource"], expected["resource"] - ) + self.assertIs(ctx["data_point"], expected["data_point"]) + assert_proto_json_equal(self, ctx["resource"], expected["resource"]) self.assertEqual( ctx["resource_schema_url"], expected["resource_schema_url"], ) - assert_proto_json_equal( - self, ctx["scope"], expected["scope"] - ) + assert_proto_json_equal(self, ctx["scope"], expected["scope"]) self.assertEqual( ctx["scope_schema_url"], expected["scope_schema_url"], ) - self.assertEqual( - ctx["metric_name"], expected["metric_name"] - ) - self.assertEqual( - ctx["metric_unit"], expected["metric_unit"] - ) + self.assertEqual(ctx["metric_name"], expected["metric_name"]) + self.assertEqual(ctx["metric_unit"], expected["metric_unit"]) self.assertEqual( ctx["metric_description"], expected["metric_description"], ) - self.assertEqual( - ctx["field_name"], expected["field_name"] - ) + self.assertEqual(ctx["field_name"], expected["field_name"]) def test_split_skips_unsupported_metric(self): request = encode_metrics( @@ -603,18 +546,10 @@ def test_split_skips_unsupported_metric(self): ) with self.assertLogs(level=WARNING) as log_ctx: batches = list(split_metrics_data(request, 5)) - self.assertTrue( - any("unsupported metric type" in m for m in log_ctx.output) - ) + self.assertTrue(any("unsupported metric type" in m for m in log_ctx.output)) self.assertEqual(len(batches), 1) self.assertEqual(_data_point_values(batches[0]), [0, 1]) - names = [ - m.name - for b in batches - for rm in b.resource_metrics - for sm in rm.scope_metrics - for m in sm.metrics - ] + names = [m.name for b in batches for rm in b.resource_metrics for sm in rm.scope_metrics for m in sm.metrics] self.assertEqual(names, ["good"]) def test_split_empty_request(self): diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_proto_json_compatibility.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_proto_json_compatibility.py index fb10138bdeb..51f70d3ed2f 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_proto_json_compatibility.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_proto_json_compatibility.py @@ -207,9 +207,7 @@ def _make_logs(): attributes={"error.code": 500, "path": "/api"}, context=ctx, resource=Resource({"service.name": "log-svc"}, "resource_schema"), - instrumentation_scope=InstrumentationScope( - "log_lib", "1.0", "scope_schema" - ), + instrumentation_scope=InstrumentationScope("log_lib", "1.0", "scope_schema"), ), make_log( body="healthy", @@ -275,9 +273,7 @@ def test_metrics_parse_compatibility(self): proto_expected = proto_encode_metrics(data) denormalized = _denormalize_otlp_json(json_dict) - proto_parsed = ParseDict( - denormalized, PB2ExportMetricsServiceRequest() - ) + proto_parsed = ParseDict(denormalized, PB2ExportMetricsServiceRequest()) self.assertEqual(proto_parsed, proto_expected) def test_log_parse_compatibility(self): diff --git a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_trace_encoder.py b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_trace_encoder.py index f28e9b98ac8..40a677b9dd0 100644 --- a/exporter/opentelemetry-exporter-otlp-json-common/tests/test_trace_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-json-common/tests/test_trace_encoder.py @@ -75,9 +75,7 @@ def test_encode_span_attributes(self): attr_dict = {kv.key: kv.value for kv in encoded.attributes} self.assertEqual(attr_dict["key_bool"], JSONAnyValue(bool_value=False)) - self.assertEqual( - attr_dict["key_str"], JSONAnyValue(string_value="hello") - ) + self.assertEqual(attr_dict["key_str"], JSONAnyValue(string_value="hello")) def test_encode_span_events(self): event = Event( @@ -91,9 +89,7 @@ def test_encode_span_events(self): self.assertEqual(len(encoded.events), 1) self.assertEqual(encoded.events[0].name, "my-event") - self.assertEqual( - encoded.events[0].time_unix_nano, BASE_TIME + 10 * 10**6 - ) + self.assertEqual(encoded.events[0].time_unix_nano, BASE_TIME + 10 * 10**6) self.assertEqual(encoded.events[0].attributes[0].key, "event_key") def test_encode_span_links(self): @@ -145,10 +141,7 @@ def test_encode_span_parent(self): ) self.assertEqual( encoded.flags, - int( - JSONSpanFlags.SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK - | JSONSpanFlags.SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK - ), + int(JSONSpanFlags.SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK | JSONSpanFlags.SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK), ) def test_encode_span_no_parent(self): @@ -203,9 +196,7 @@ def test_encode_span_grouping_by_scope(self): scope_spans = result.resource_spans[0].scope_spans self.assertEqual(len(scope_spans), 2) - groups = { - ss.scope.name: [s.name for s in ss.spans] for ss in scope_spans - } + groups = {ss.scope.name: [s.name for s in ss.spans] for ss in scope_spans} self.assertEqual(groups["lib1"], ["s1"]) self.assertEqual(groups["lib2"], ["s2"]) self.assertEqual(scope_spans[0].scope.version, "1.0") @@ -221,9 +212,7 @@ def test_encode_span_schema_urls(self): span = make_span(resource=resource, instrumentation_scope=scope) result = encode_spans([span]) - self.assertEqual( - result.resource_spans[0].schema_url, "resource_schema" - ) + self.assertEqual(result.resource_spans[0].schema_url, "resource_schema") self.assertEqual( result.resource_spans[0].scope_spans[0].schema_url, "scope_schema", @@ -346,14 +335,10 @@ def test_encode_spans_json_roundtrip(self): name="span2", span_id=0xBBBB, resource=Resource({"r": "v"}), - instrumentation_scope=InstrumentationScope( - "lib", "1.0", attributes={"sk": 1} - ), + instrumentation_scope=InstrumentationScope("lib", "1.0", attributes={"sk": 1}), ), ] result = encode_spans(spans) json_str = result.to_json() - roundtripped = JSONExportTraceServiceRequest.from_dict( - json.loads(json_str) - ) + roundtripped = JSONExportTraceServiceRequest.from_dict(json.loads(json_str)) assert_proto_json_equal(self, result, roundtripped) diff --git a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_internal.py b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_internal.py index fcd9f9f7dc6..34222944cf1 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_internal.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_internal.py @@ -50,9 +50,7 @@ def export(self, data: T) -> bool: encoded = self._encode(data) with self._lock: if self._stream.closed: - self._logger.warning( - "Stream is closed, ignoring %s export call", self._kind - ) + self._logger.warning("Stream is closed, ignoring %s export call", self._kind) return False if encoded is not None: self._stream.write(_format_line(encoded)) diff --git a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_log_exporter.py b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_log_exporter.py index f0535291a5a..9614c3a6908 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_log_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/_log_exporter.py @@ -51,24 +51,16 @@ def __init__( *, stream: IO[str] | None = None, ) -> None: - self._exporter: _FileExporter[Sequence[ReadableLogRecord]] = ( - _FileExporter( - encode=_encode_logs_to_dict, - kind="logs", - logger=_logger, - path=path, - stream=stream, - ) + self._exporter: _FileExporter[Sequence[ReadableLogRecord]] = _FileExporter( + encode=_encode_logs_to_dict, + kind="logs", + logger=_logger, + path=path, + stream=stream, ) - def export( - self, batch: Sequence[ReadableLogRecord] - ) -> LogRecordExportResult: - return ( - LogRecordExportResult.SUCCESS - if self._exporter.export(batch) - else LogRecordExportResult.FAILURE - ) + def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: + return LogRecordExportResult.SUCCESS if self._exporter.export(batch) else LogRecordExportResult.FAILURE def shutdown(self) -> None: self._exporter.shutdown() diff --git a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/metric_exporter.py b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/metric_exporter.py index 0df0328d73f..934bb663f19 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/metric_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/metric_exporter.py @@ -37,8 +37,7 @@ def __init__( self, path: str | os.PathLike[str], *, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, ) -> None: ... @@ -47,8 +46,7 @@ def __init__( self, *, stream: IO[str], - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, ) -> None: ... @@ -56,8 +54,7 @@ def __init__( def __init__( self, *, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, ) -> None: ... @@ -66,8 +63,7 @@ def __init__( path: str | os.PathLike[str] | None = None, *, stream: IO[str] | None = None, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, ) -> None: MetricExporter.__init__( @@ -89,11 +85,7 @@ def export( timeout_millis: float = 10_000, **kwargs, ) -> MetricExportResult: - return ( - MetricExportResult.SUCCESS - if self._exporter.export(metrics_data) - else MetricExportResult.FAILURE - ) + return MetricExportResult.SUCCESS if self._exporter.export(metrics_data) else MetricExportResult.FAILURE def shutdown(self, timeout_millis: float = 30_000, **kwargs) -> None: self._exporter.shutdown() diff --git a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/trace_exporter.py b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/trace_exporter.py index 3609e46fcc0..874d6ffca2f 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/trace_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/src/opentelemetry/exporter/otlp/json/file/trace_exporter.py @@ -55,11 +55,7 @@ def __init__( ) def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: - return ( - SpanExportResult.SUCCESS - if self._exporter.export(spans) - else SpanExportResult.FAILURE - ) + return SpanExportResult.SUCCESS if self._exporter.export(spans) else SpanExportResult.FAILURE def shutdown(self, timeout_millis: float = 30_000, **kwargs) -> None: self._exporter.shutdown() diff --git a/exporter/opentelemetry-exporter-otlp-json-file/tests/test_log_exporter.py b/exporter/opentelemetry-exporter-otlp-json-file/tests/test_log_exporter.py index 41b30d290a4..b717a0aa593 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/tests/test_log_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/tests/test_log_exporter.py @@ -169,19 +169,12 @@ def setUp(self): self._file_exporter = FileLogExporter(stream=self._stream) self._in_memory = InMemoryLogRecordExporter() provider = LoggerProvider() - provider.add_log_record_processor( - SimpleLogRecordProcessor(self._file_exporter) - ) - provider.add_log_record_processor( - SimpleLogRecordProcessor(self._in_memory) - ) + provider.add_log_record_processor(SimpleLogRecordProcessor(self._file_exporter)) + provider.add_log_record_processor(SimpleLogRecordProcessor(self._in_memory)) self._logger = provider.get_logger("test.integration") def _expected(self) -> str: - return "".join( - _format_line(encode_logs([record]).to_dict()) - for record in self._in_memory.get_finished_logs() - ) + return "".join(_format_line(encode_logs([record]).to_dict()) for record in self._in_memory.get_finished_logs()) def test_single_log_matches_in_memory(self): self._logger.emit( @@ -193,14 +186,6 @@ def test_single_log_matches_in_memory(self): self.assertEqual(self._stream.getvalue(), self._expected()) def test_multiple_logs_match_in_memory(self): - self._logger.emit( - LogRecord( - body="first message", severity_number=SeverityNumber.INFO - ) - ) - self._logger.emit( - LogRecord( - body="second message", severity_number=SeverityNumber.WARN - ) - ) + self._logger.emit(LogRecord(body="first message", severity_number=SeverityNumber.INFO)) + self._logger.emit(LogRecord(body="second message", severity_number=SeverityNumber.WARN)) self.assertEqual(self._stream.getvalue(), self._expected()) diff --git a/exporter/opentelemetry-exporter-otlp-json-file/tests/test_metric_exporter.py b/exporter/opentelemetry-exporter-otlp-json-file/tests/test_metric_exporter.py index 8b3910253c7..03bb64f3595 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/tests/test_metric_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/tests/test_metric_exporter.py @@ -51,9 +51,7 @@ def export( **kwargs, ) -> MetricExportResult: self.last_metrics_data = metrics_data - return super().export( - metrics_data, timeout_millis=timeout_millis, **kwargs - ) + return super().export(metrics_data, timeout_millis=timeout_millis, **kwargs) def _make_metrics_data() -> MetricsData: @@ -195,9 +193,7 @@ def setUp(self): self._exporter = _CapturingMetricExporter(stream=self._stream) self._provider = MeterProvider( metric_readers=[ - PeriodicExportingMetricReader( - self._exporter, export_interval_millis=100_000 - ), + PeriodicExportingMetricReader(self._exporter, export_interval_millis=100_000), ] ) self._meter = self._provider.get_meter(__name__) @@ -219,14 +215,8 @@ def test_synchronous_instruments_match_in_memory(self): self.assertEqual(self._stream.getvalue(), self._expected()) def test_observable_instruments_match_in_memory(self): - self._meter.create_observable_counter( - "obs.req.count", callbacks=[lambda _: [Observation(20)]] - ) - self._meter.create_observable_up_down_counter( - "obs.queue.depth", callbacks=[lambda _: [Observation(-7)]] - ) - self._meter.create_observable_gauge( - "obs.cpu.temp", callbacks=[lambda _: [Observation(55.5)]] - ) + self._meter.create_observable_counter("obs.req.count", callbacks=[lambda _: [Observation(20)]]) + self._meter.create_observable_up_down_counter("obs.queue.depth", callbacks=[lambda _: [Observation(-7)]]) + self._meter.create_observable_gauge("obs.cpu.temp", callbacks=[lambda _: [Observation(55.5)]]) self._provider.force_flush() self.assertEqual(self._stream.getvalue(), self._expected()) diff --git a/exporter/opentelemetry-exporter-otlp-json-file/tests/test_trace_exporter.py b/exporter/opentelemetry-exporter-otlp-json-file/tests/test_trace_exporter.py index 4ae7e44483d..3cf2d0e4d06 100644 --- a/exporter/opentelemetry-exporter-otlp-json-file/tests/test_trace_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-file/tests/test_trace_exporter.py @@ -169,10 +169,7 @@ def setUp(self): self._tracer = provider.get_tracer(__name__) def _expected(self) -> str: - return "".join( - _format_line(encode_spans([span]).to_dict()) - for span in self._in_memory.get_finished_spans() - ) + return "".join(_format_line(encode_spans([span]).to_dict()) for span in self._in_memory.get_finished_spans()) def test_single_span_matches_in_memory(self): link_ctx = SpanContext( @@ -197,9 +194,7 @@ def test_single_span_matches_in_memory(self): self.assertEqual(self._stream.getvalue(), self._expected()) def test_multiple_spans_match_in_memory(self): - with self._tracer.start_as_current_span( - "parent-op", attributes={"phase": "request"} - ) as parent: + with self._tracer.start_as_current_span("parent-op", attributes={"phase": "request"}) as parent: parent.add_event("processing-started") with self._tracer.start_as_current_span("child-op") as child: child.set_attribute("attempt", 1) diff --git a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_internal.py b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_internal.py index 9fe33d9cdce..f90f0057940 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_internal.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_internal.py @@ -39,9 +39,7 @@ def _resolve_endpoint( if endpoint := os.environ.get(endpoint_env_var): return endpoint - base_endpoint = ( - os.environ.get(OTEL_EXPORTER_OTLP_ENDPOINT) or _DEFAULT_ENDPOINT - ) + base_endpoint = os.environ.get(OTEL_EXPORTER_OTLP_ENDPOINT) or _DEFAULT_ENDPOINT return f"{base_endpoint.removesuffix('/')}/{default_path}" @@ -55,8 +53,7 @@ def _resolve_headers( "user-agent": "OTel-OTLP-JSON-Exporter-Python/" + __version__, } env_headers = parse_env_headers( - os.environ.get(headers_env_var) - or os.environ.get(OTEL_EXPORTER_OTLP_HEADERS, ""), + os.environ.get(headers_env_var) or os.environ.get(OTEL_EXPORTER_OTLP_HEADERS, ""), liberal=True, ) headers_.update(env_headers) @@ -68,11 +65,7 @@ def _resolve_headers( def _resolve_timeout( timeout_env_var: str, ) -> float: - raw = ( - os.environ.get(timeout_env_var) - or os.environ.get(OTEL_EXPORTER_OTLP_TIMEOUT) - or _DEFAULT_TIMEOUT - ) + raw = os.environ.get(timeout_env_var) or os.environ.get(OTEL_EXPORTER_OTLP_TIMEOUT) or _DEFAULT_TIMEOUT try: return float(raw) diff --git a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_log_exporter.py b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_log_exporter.py index 0fb2a3b9d6b..88165961986 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_log_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/_log_exporter.py @@ -91,14 +91,9 @@ def __init__( ) self._client = _OTLPHTTPClient( transport=transport, - endpoint=endpoint - or _resolve_endpoint( - OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, _DEFAULT_LOGS_EXPORT_PATH - ), + endpoint=endpoint or _resolve_endpoint(OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, _DEFAULT_LOGS_EXPORT_PATH), kind="logs", - timeout=timeout - if timeout is not None - else _resolve_timeout(OTEL_EXPORTER_OTLP_LOGS_TIMEOUT), + timeout=timeout if timeout is not None else _resolve_timeout(OTEL_EXPORTER_OTLP_LOGS_TIMEOUT), compression=compression if compression is not None else _resolve_compression(OTEL_EXPORTER_OTLP_LOGS_COMPRESSION), @@ -107,9 +102,7 @@ def __init__( ) self._shutdown = False - def export( - self, batch: Sequence[ReadableLogRecord] - ) -> LogRecordExportResult: + def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: if self._shutdown: _logger.warning("Exporter already shutdown, ignoring batch") return LogRecordExportResult.FAILURE @@ -120,11 +113,7 @@ def export( _logger.error("Failed to encode logs: %s", error) return LogRecordExportResult.FAILURE export_result = self._client.export(body) - return ( - LogRecordExportResult.SUCCESS - if export_result.success - else LogRecordExportResult.FAILURE - ) + return LogRecordExportResult.SUCCESS if export_result.success else LogRecordExportResult.FAILURE def shutdown(self) -> None: if self._shutdown: diff --git a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/metric_exporter.py b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/metric_exporter.py index ff7368f3595..845d47d6ac5 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/metric_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/metric_exporter.py @@ -58,8 +58,7 @@ def __init__( headers: Mapping[str, str] | None = None, timeout: float | None = None, compression: Compression | None = None, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, max_export_batch_size: int | None = None, ) -> None: ... @@ -74,8 +73,7 @@ def __init__( headers: Mapping[str, str] | None = None, timeout: float | None = None, compression: Compression | None = None, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, max_export_batch_size: int | None = None, *, @@ -91,8 +89,7 @@ def __init__( headers: Mapping[str, str] | None = None, timeout: float | None = None, compression: Compression | None = None, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, max_export_batch_size: int | None = None, *, @@ -119,15 +116,11 @@ def __init__( _DEFAULT_METRICS_EXPORT_PATH, ), kind="metrics", - timeout=timeout - if timeout is not None - else _resolve_timeout(OTEL_EXPORTER_OTLP_METRICS_TIMEOUT), + timeout=timeout if timeout is not None else _resolve_timeout(OTEL_EXPORTER_OTLP_METRICS_TIMEOUT), compression=compression if compression is not None else _resolve_compression(OTEL_EXPORTER_OTLP_METRICS_COMPRESSION), - headers=_resolve_headers( - headers, OTEL_EXPORTER_OTLP_METRICS_HEADERS - ), + headers=_resolve_headers(headers, OTEL_EXPORTER_OTLP_METRICS_HEADERS), logger=_logger, ) self._max_export_batch_size = max_export_batch_size @@ -148,9 +141,7 @@ def export( except Exception as error: _logger.error("Failed to encode metrics: %s", error) return MetricExportResult.FAILURE - for request in split_metrics_data( - export_request, self._max_export_batch_size - ): + for request in split_metrics_data(export_request, self._max_export_batch_size): export_result = self._client.export(request.to_json().encode()) if not export_result.success: return MetricExportResult.FAILURE diff --git a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/trace_exporter.py b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/trace_exporter.py index 170bd8acaee..b097b68f2c7 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/trace_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/src/opentelemetry/exporter/otlp/json/http/trace_exporter.py @@ -86,20 +86,13 @@ def __init__( ) self._client = _OTLPHTTPClient( transport=transport, - endpoint=endpoint - or _resolve_endpoint( - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, _DEFAULT_TRACES_EXPORT_PATH - ), + endpoint=endpoint or _resolve_endpoint(OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, _DEFAULT_TRACES_EXPORT_PATH), kind="spans", - timeout=timeout - if timeout is not None - else _resolve_timeout(OTEL_EXPORTER_OTLP_TRACES_TIMEOUT), + timeout=timeout if timeout is not None else _resolve_timeout(OTEL_EXPORTER_OTLP_TRACES_TIMEOUT), compression=compression if compression is not None else _resolve_compression(OTEL_EXPORTER_OTLP_TRACES_COMPRESSION), - headers=_resolve_headers( - headers, OTEL_EXPORTER_OTLP_TRACES_HEADERS - ), + headers=_resolve_headers(headers, OTEL_EXPORTER_OTLP_TRACES_HEADERS), logger=_logger, ) self._shutdown = False @@ -115,11 +108,7 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: _logger.error("Failed to encode spans: %s", error) return SpanExportResult.FAILURE export_result = self._client.export(body) - return ( - SpanExportResult.SUCCESS - if export_result.success - else SpanExportResult.FAILURE - ) + return SpanExportResult.SUCCESS if export_result.success else SpanExportResult.FAILURE def shutdown(self, timeout_millis: float = 30_000, **kwargs) -> None: if self._shutdown: diff --git a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_internal.py b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_internal.py index a842dad9e70..0ab67182ad9 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_internal.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_internal.py @@ -98,9 +98,7 @@ def test_resolve_endpoint(self): for label, env, default_path, expected in cases: with self.subTest(label), patch.dict(os.environ, env, clear=True): self.assertEqual( - _resolve_endpoint( - OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, default_path - ), + _resolve_endpoint(OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, default_path), expected, ) @@ -167,9 +165,7 @@ def test_resolve_headers(self): for label, env, headers_arg, expected in cases: with self.subTest(label), patch.dict(os.environ, env, clear=True): self.assertEqual( - _resolve_headers( - headers_arg, OTEL_EXPORTER_OTLP_TRACES_HEADERS - ), + _resolve_headers(headers_arg, OTEL_EXPORTER_OTLP_TRACES_HEADERS), expected, ) @@ -223,13 +219,9 @@ def test_resolve_timeout(self): with self.subTest(label), patch.dict(os.environ, env, clear=True): if errors: with self.assertLogs(level=WARNING): - result = _resolve_timeout( - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT - ) + result = _resolve_timeout(OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) else: - result = _resolve_timeout( - OTEL_EXPORTER_OTLP_TRACES_TIMEOUT - ) + result = _resolve_timeout(OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) self.assertEqual(result, expected) self.assertIsInstance(result, float) @@ -425,7 +417,5 @@ def test_build_transport(self): OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE, transport_factory=mock_factory, ) - mock_factory.assert_called_once_with( - verify=expected_verify, cert=expected_cert - ) + mock_factory.assert_called_once_with(verify=expected_verify, cert=expected_cert) self.assertIs(result, mock_factory.return_value) diff --git a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_log_exporter.py b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_log_exporter.py index 3f3713f043a..4edf03da108 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_log_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_log_exporter.py @@ -66,18 +66,14 @@ def setUp(self): self._in_memory = InMemoryLogRecordExporter() provider = LoggerProvider() - provider.add_log_record_processor( - SimpleLogRecordProcessor(self._in_memory) - ) + provider.add_log_record_processor(SimpleLogRecordProcessor(self._in_memory)) self._logger = provider.get_logger(__name__) def _finished_logs(self): return list(self._in_memory.get_finished_logs()) def _make_log(self, body: str = "test-log"): - self._logger.emit( - LogRecord(body=body, severity_number=SeverityNumber.INFO) - ) + self._logger.emit(LogRecord(body=body, severity_number=SeverityNumber.INFO)) return self._finished_logs() @staticmethod @@ -104,12 +100,8 @@ def test_export_single_log(self): def test_export_multiple_logs_same_resource(self): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) exporter = OTLPLogExporter(endpoint=_TEST_ENDPOINT) - self._logger.emit( - LogRecord(body="first", severity_number=SeverityNumber.INFO) - ) - self._logger.emit( - LogRecord(body="second", severity_number=SeverityNumber.INFO) - ) + self._logger.emit(LogRecord(body="first", severity_number=SeverityNumber.INFO)) + self._logger.emit(LogRecord(body="second", severity_number=SeverityNumber.INFO)) logs = self._finished_logs() result = exporter.export(logs) @@ -118,11 +110,7 @@ def test_export_multiple_logs_same_resource(self): self.assertEqual(len(Mocket.request_list()), 1) body = json.loads(Mocket.last_request().body) self.assertEqual(body, encode_logs(logs).to_dict()) - total_logs = sum( - len(sl["logRecords"]) - for rl in body["resourceLogs"] - for sl in rl["scopeLogs"] - ) + total_logs = sum(len(sl["logRecords"]) for rl in body["resourceLogs"] for sl in rl["scopeLogs"]) self.assertEqual(total_logs, 2) @mocketize @@ -133,13 +121,9 @@ def test_export_logs_different_resources(self): for body, host in (("from-a", "a"), ("from-b", "b")): in_memory = InMemoryLogRecordExporter() provider = LoggerProvider(resource=Resource({"host": host})) - provider.add_log_record_processor( - SimpleLogRecordProcessor(in_memory) - ) + provider.add_log_record_processor(SimpleLogRecordProcessor(in_memory)) logger = provider.get_logger(__name__) - logger.emit( - LogRecord(body=body, severity_number=SeverityNumber.INFO) - ) + logger.emit(LogRecord(body=body, severity_number=SeverityNumber.INFO)) logs.extend(in_memory.get_finished_logs()) result = exporter.export(logs) @@ -193,9 +177,7 @@ def test_export_empty_sequence(self): @mocketize def test_default_endpoint_and_headers(self): - Entry.single_register( - Entry.POST, "http://localhost:4318/v1/logs", status=200 - ) + Entry.single_register(Entry.POST, "http://localhost:4318/v1/logs", status=200) exporter = OTLPLogExporter() result = exporter.export(self._make_log()) @@ -203,9 +185,7 @@ def test_default_endpoint_and_headers(self): self.assertEqual(result, LogRecordExportResult.SUCCESS) headers = Mocket.last_request().headers self.assertEqual(headers["content-type"], "application/json") - self.assertTrue( - headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/") - ) + self.assertTrue(headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/")) def test_custom_endpoint(self): url = "http://custom.example:9999/v1/logs" @@ -265,23 +245,15 @@ def test_custom_headers(self): headers = Mocket.last_request().headers self.assertEqual(headers["x-api-key"], "secret") self.assertEqual(headers["content-type"], "application/json") - self.assertTrue( - headers["user-agent"].startswith( - "OTel-OTLP-JSON-Exporter-Python/" - ) - ) + self.assertTrue(headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/")) @mocketize def test_custom_transport(self): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) custom_transport = Urllib3HTTPTransport() - with patch( - "opentelemetry.exporter.otlp.json.http._log_exporter._build_transport" - ) as mock_build_transport: - exporter = OTLPLogExporter( - endpoint=_TEST_ENDPOINT, _transport=custom_transport - ) + with patch("opentelemetry.exporter.otlp.json.http._log_exporter._build_transport") as mock_build_transport: + exporter = OTLPLogExporter(endpoint=_TEST_ENDPOINT, _transport=custom_transport) mock_build_transport.assert_not_called() self.assertIs(exporter._client._transport, custom_transport) @@ -319,9 +291,7 @@ def test_custom_timeout(self): result = exporter.export(self._make_log()) self.assertEqual(result, LogRecordExportResult.SUCCESS) - self.assertAlmostEqual( - mock_request.call_args.kwargs["timeout"], 7.5, delta=0.5 - ) + self.assertAlmostEqual(mock_request.call_args.kwargs["timeout"], 7.5, delta=0.5) @mocketize def test_certificate_args(self): @@ -360,16 +330,12 @@ def test_compression_options(self): for compression, expected_encoding, decompress in cases: with self.subTest(compression=compression), Mocketizer(): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) - exporter = OTLPLogExporter( - endpoint=_TEST_ENDPOINT, compression=compression - ) + exporter = OTLPLogExporter(endpoint=_TEST_ENDPOINT, compression=compression) transport = exporter._client._transport self._in_memory.clear() logs = self._make_log() - with patch.object( - transport, "request", wraps=transport.request - ) as mock_request: + with patch.object(transport, "request", wraps=transport.request) as mock_request: result = exporter.export(logs) self.assertEqual(result, LogRecordExportResult.SUCCESS) @@ -377,14 +343,10 @@ def test_compression_options(self): if expected_encoding is None: self.assertNotIn("Content-Encoding", sent_headers) else: - self.assertEqual( - sent_headers["Content-Encoding"], expected_encoding - ) + self.assertEqual(sent_headers["Content-Encoding"], expected_encoding) sent_data = mock_request.call_args.kwargs["data"] decompressed = decompress(sent_data) - self.assertEqual( - json.loads(decompressed), encode_logs(logs).to_dict() - ) + self.assertEqual(json.loads(decompressed), encode_logs(logs).to_dict()) def test_export_retryable_status_codes(self): for status_code in (429, 502, 503, 504): @@ -395,9 +357,7 @@ def test_export_retryable_status_codes(self): Response(status=status_code), Response(status=200), ) - exporter = OTLPLogExporter( - endpoint=_TEST_ENDPOINT, timeout=30.0 - ) + exporter = OTLPLogExporter(endpoint=_TEST_ENDPOINT, timeout=30.0) shutdown_event = self._mocked_shutdown_event() exporter._client._shutdown_event = shutdown_event self._in_memory.clear() @@ -415,9 +375,7 @@ def test_export_retryable_status_codes(self): def test_export_non_retryable_status_codes(self): for status_code in (400, 401, 403, 404, 408, 500, 501): with self.subTest(status_code=status_code), Mocketizer(): - Entry.single_register( - Entry.POST, _TEST_ENDPOINT, status=status_code - ) + Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=status_code) exporter = OTLPLogExporter(endpoint=_TEST_ENDPOINT) self._in_memory.clear() @@ -466,9 +424,7 @@ def test_export_retry_after_header(self): @mocketize def test_export_retry_after_header_http_date(self): base = 1_700_000_000.0 - retry_at = format_datetime( - datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True - ) + retry_at = format_datetime(datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True) Entry.register( Entry.POST, _TEST_ENDPOINT, diff --git a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_metric_exporter.py b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_metric_exporter.py index 55a7db71e93..8db0acdc5cb 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_metric_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_metric_exporter.py @@ -112,9 +112,7 @@ def test_export_single_metric(self): request = Mocket.last_request() self.assertEqual(request.method, "POST") self.assertEqual(request.path, "/v1/metrics") - self.assertEqual( - json.loads(request.body), encode_metrics(metrics_data).to_dict() - ) + self.assertEqual(json.loads(request.body), encode_metrics(metrics_data).to_dict()) @mocketize def test_export_multiple_metrics_same_resource(self): @@ -145,11 +143,7 @@ def test_export_multiple_metrics_same_resource(self): self.assertEqual(len(Mocket.request_list()), 1) body = json.loads(Mocket.last_request().body) self.assertEqual(body, encode_metrics(metrics_data).to_dict()) - total_metrics = sum( - len(sm["metrics"]) - for rm in body["resourceMetrics"] - for sm in rm["scopeMetrics"] - ) + total_metrics = sum(len(sm["metrics"]) for rm in body["resourceMetrics"] for sm in rm["scopeMetrics"]) self.assertEqual(total_metrics, 2) @mocketize @@ -226,9 +220,7 @@ def test_export_empty_metrics_data(self): @mocketize def test_default_endpoint_and_headers(self): - Entry.single_register( - Entry.POST, "http://localhost:4318/v1/metrics", status=200 - ) + Entry.single_register(Entry.POST, "http://localhost:4318/v1/metrics", status=200) exporter = OTLPMetricExporter() result = exporter.export(_make_metrics_data()) @@ -236,9 +228,7 @@ def test_default_endpoint_and_headers(self): self.assertEqual(result, MetricExportResult.SUCCESS) headers = Mocket.last_request().headers self.assertEqual(headers["content-type"], "application/json") - self.assertTrue( - headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/") - ) + self.assertTrue(headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/")) def test_custom_endpoint(self): url = "http://custom.example:9999/v1/metrics" @@ -289,32 +279,22 @@ def test_custom_headers(self): Mocketizer(), ): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) - exporter = OTLPMetricExporter( - endpoint=_TEST_ENDPOINT, **kwargs - ) + exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT, **kwargs) exporter.export(_make_metrics_data()) headers = Mocket.last_request().headers self.assertEqual(headers["x-api-key"], "secret") self.assertEqual(headers["content-type"], "application/json") - self.assertTrue( - headers["user-agent"].startswith( - "OTel-OTLP-JSON-Exporter-Python/" - ) - ) + self.assertTrue(headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/")) @mocketize def test_custom_transport(self): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) custom_transport = Urllib3HTTPTransport() - with patch( - "opentelemetry.exporter.otlp.json.http.metric_exporter._build_transport" - ) as mock_build_transport: - exporter = OTLPMetricExporter( - endpoint=_TEST_ENDPOINT, _transport=custom_transport - ) + with patch("opentelemetry.exporter.otlp.json.http.metric_exporter._build_transport") as mock_build_transport: + exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT, _transport=custom_transport) mock_build_transport.assert_not_called() self.assertIs(exporter._client._transport, custom_transport) @@ -341,9 +321,7 @@ def test_custom_timeout(self): Mocketizer(), ): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) - exporter = OTLPMetricExporter( - endpoint=_TEST_ENDPOINT, **kwargs - ) + exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT, **kwargs) with patch.object( exporter._client._transport, @@ -353,9 +331,7 @@ def test_custom_timeout(self): result = exporter.export(_make_metrics_data()) self.assertEqual(result, MetricExportResult.SUCCESS) - self.assertAlmostEqual( - mock_request.call_args.kwargs["timeout"], 7.5, delta=0.5 - ) + self.assertAlmostEqual(mock_request.call_args.kwargs["timeout"], 7.5, delta=0.5) @mocketize def test_certificate_args(self): @@ -394,15 +370,11 @@ def test_compression_options(self): for compression, expected_encoding, decompress in cases: with self.subTest(compression=compression), Mocketizer(): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) - exporter = OTLPMetricExporter( - endpoint=_TEST_ENDPOINT, compression=compression - ) + exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT, compression=compression) transport = exporter._client._transport metrics_data = _make_metrics_data() - with patch.object( - transport, "request", wraps=transport.request - ) as mock_request: + with patch.object(transport, "request", wraps=transport.request) as mock_request: result = exporter.export(metrics_data) self.assertEqual(result, MetricExportResult.SUCCESS) @@ -410,9 +382,7 @@ def test_compression_options(self): if expected_encoding is None: self.assertNotIn("Content-Encoding", sent_headers) else: - self.assertEqual( - sent_headers["Content-Encoding"], expected_encoding - ) + self.assertEqual(sent_headers["Content-Encoding"], expected_encoding) sent_data = mock_request.call_args.kwargs["data"] decompressed = decompress(sent_data) self.assertEqual( @@ -429,9 +399,7 @@ def test_export_batch_splitting(self): Response(status=200), Response(status=200), ) - exporter = OTLPMetricExporter( - endpoint=_TEST_ENDPOINT, max_export_batch_size=2 - ) + exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT, max_export_batch_size=2) data_points = [ NumberDataPoint( attributes=BoundedAttributes(attributes={"i": i}), @@ -452,10 +420,7 @@ def test_export_batch_splitting(self): ), ) metrics_data = _make_metrics_data(metric) - expected_batches = [ - batch.to_dict() - for batch in split_metrics_data(encode_metrics(metrics_data), 2) - ] + expected_batches = [batch.to_dict() for batch in split_metrics_data(encode_metrics(metrics_data), 2)] result = exporter.export(metrics_data) @@ -476,9 +441,7 @@ def test_export_retryable_status_codes(self): Response(status=status_code), Response(status=200), ) - exporter = OTLPMetricExporter( - endpoint=_TEST_ENDPOINT, timeout=30.0 - ) + exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT, timeout=30.0) shutdown_event = self._mocked_shutdown_event() exporter._client._shutdown_event = shutdown_event @@ -495,9 +458,7 @@ def test_export_retryable_status_codes(self): def test_export_non_retryable_status_codes(self): for status_code in (400, 401, 403, 404, 408, 500, 501): with self.subTest(status_code=status_code), Mocketizer(): - Entry.single_register( - Entry.POST, _TEST_ENDPOINT, status=status_code - ) + Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=status_code) exporter = OTLPMetricExporter(endpoint=_TEST_ENDPOINT) result = exporter.export(_make_metrics_data()) @@ -545,9 +506,7 @@ def test_export_retry_after_header(self): @mocketize def test_export_retry_after_header_http_date(self): base = 1_700_000_000.0 - retry_at = format_datetime( - datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True - ) + retry_at = format_datetime(datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True) Entry.register( Entry.POST, _TEST_ENDPOINT, diff --git a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_trace_exporter.py b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_trace_exporter.py index 77688a0ff46..a7d85eea790 100644 --- a/exporter/opentelemetry-exporter-otlp-json-http/tests/test_trace_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-json-http/tests/test_trace_exporter.py @@ -91,9 +91,7 @@ def test_export_single_span(self): request = Mocket.last_request() self.assertEqual(request.method, "POST") self.assertEqual(request.path, "/v1/traces") - self.assertEqual( - json.loads(request.body), encode_spans(spans).to_dict() - ) + self.assertEqual(json.loads(request.body), encode_spans(spans).to_dict()) @mocketize def test_export_multiple_spans_same_resource(self): @@ -111,11 +109,7 @@ def test_export_multiple_spans_same_resource(self): self.assertEqual(len(Mocket.request_list()), 1) body = json.loads(Mocket.last_request().body) self.assertEqual(body, encode_spans(spans).to_dict()) - total_spans = sum( - len(ss["spans"]) - for rs in body["resourceSpans"] - for ss in rs["scopeSpans"] - ) + total_spans = sum(len(ss["spans"]) for rs in body["resourceSpans"] for ss in rs["scopeSpans"]) self.assertEqual(total_spans, 2) @mocketize @@ -183,9 +177,7 @@ def test_export_empty_sequence(self): @mocketize def test_default_endpoint_and_headers(self): - Entry.single_register( - Entry.POST, "http://localhost:4318/v1/traces", status=200 - ) + Entry.single_register(Entry.POST, "http://localhost:4318/v1/traces", status=200) exporter = OTLPSpanExporter() result = exporter.export(self._make_span()) @@ -193,9 +185,7 @@ def test_default_endpoint_and_headers(self): self.assertEqual(result, SpanExportResult.SUCCESS) headers = Mocket.last_request().headers self.assertEqual(headers["content-type"], "application/json") - self.assertTrue( - headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/") - ) + self.assertTrue(headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/")) def test_custom_endpoint(self): url = "http://custom.example:9999/v1/traces" @@ -255,23 +245,15 @@ def test_custom_headers(self): headers = Mocket.last_request().headers self.assertEqual(headers["x-api-key"], "secret") self.assertEqual(headers["content-type"], "application/json") - self.assertTrue( - headers["user-agent"].startswith( - "OTel-OTLP-JSON-Exporter-Python/" - ) - ) + self.assertTrue(headers["user-agent"].startswith("OTel-OTLP-JSON-Exporter-Python/")) @mocketize def test_custom_transport(self): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) custom_transport = Urllib3HTTPTransport() - with patch( - "opentelemetry.exporter.otlp.json.http.trace_exporter._build_transport" - ) as mock_build_transport: - exporter = OTLPSpanExporter( - endpoint=_TEST_ENDPOINT, _transport=custom_transport - ) + with patch("opentelemetry.exporter.otlp.json.http.trace_exporter._build_transport") as mock_build_transport: + exporter = OTLPSpanExporter(endpoint=_TEST_ENDPOINT, _transport=custom_transport) mock_build_transport.assert_not_called() self.assertIs(exporter._client._transport, custom_transport) @@ -309,9 +291,7 @@ def test_custom_timeout(self): result = exporter.export(self._make_span()) self.assertEqual(result, SpanExportResult.SUCCESS) - self.assertAlmostEqual( - mock_request.call_args.kwargs["timeout"], 7.5, delta=0.5 - ) + self.assertAlmostEqual(mock_request.call_args.kwargs["timeout"], 7.5, delta=0.5) @mocketize def test_certificate_args(self): @@ -350,16 +330,12 @@ def test_compression_options(self): for compression, expected_encoding, decompress in cases: with self.subTest(compression=compression), Mocketizer(): Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=200) - exporter = OTLPSpanExporter( - endpoint=_TEST_ENDPOINT, compression=compression - ) + exporter = OTLPSpanExporter(endpoint=_TEST_ENDPOINT, compression=compression) transport = exporter._client._transport self._in_memory.clear() spans = self._make_span() - with patch.object( - transport, "request", wraps=transport.request - ) as mock_request: + with patch.object(transport, "request", wraps=transport.request) as mock_request: result = exporter.export(spans) self.assertEqual(result, SpanExportResult.SUCCESS) @@ -367,14 +343,10 @@ def test_compression_options(self): if expected_encoding is None: self.assertNotIn("Content-Encoding", sent_headers) else: - self.assertEqual( - sent_headers["Content-Encoding"], expected_encoding - ) + self.assertEqual(sent_headers["Content-Encoding"], expected_encoding) sent_data = mock_request.call_args.kwargs["data"] decompressed = decompress(sent_data) - self.assertEqual( - json.loads(decompressed), encode_spans(spans).to_dict() - ) + self.assertEqual(json.loads(decompressed), encode_spans(spans).to_dict()) def test_export_retryable_status_codes(self): for status_code in (429, 502, 503, 504): @@ -385,9 +357,7 @@ def test_export_retryable_status_codes(self): Response(status=status_code), Response(status=200), ) - exporter = OTLPSpanExporter( - endpoint=_TEST_ENDPOINT, timeout=30.0 - ) + exporter = OTLPSpanExporter(endpoint=_TEST_ENDPOINT, timeout=30.0) shutdown_event = self._mocked_shutdown_event() exporter._client._shutdown_event = shutdown_event self._in_memory.clear() @@ -405,9 +375,7 @@ def test_export_retryable_status_codes(self): def test_export_non_retryable_status_codes(self): for status_code in (400, 401, 403, 404, 408, 500, 501): with self.subTest(status_code=status_code), Mocketizer(): - Entry.single_register( - Entry.POST, _TEST_ENDPOINT, status=status_code - ) + Entry.single_register(Entry.POST, _TEST_ENDPOINT, status=status_code) exporter = OTLPSpanExporter(endpoint=_TEST_ENDPOINT) self._in_memory.clear() @@ -456,9 +424,7 @@ def test_export_retry_after_header(self): @mocketize def test_export_retry_after_header_http_date(self): base = 1_700_000_000.0 - retry_at = format_datetime( - datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True - ) + retry_at = format_datetime(datetime.fromtimestamp(base + 30, timezone.utc), usegmt=True) Entry.register( Entry.POST, _TEST_ENDPOINT, diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py index 6b3d1d76fa3..720334c9322 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_exporter_metrics.py @@ -47,9 +47,7 @@ class ExportResult: class ExporterMetricsT(Protocol): - def export_operation( - self, num_items: int - ) -> AbstractContextManager[ExportResult]: ... + def export_operation(self, num_items: int) -> AbstractContextManager[ExportResult]: ... class NoOpExporterMetrics: @@ -73,12 +71,8 @@ def __init__( create_exported = create_otel_sdk_exporter_log_exported create_inflight = create_otel_sdk_exporter_log_inflight else: - create_exported = ( - create_otel_sdk_exporter_metric_data_point_exported - ) - create_inflight = ( - create_otel_sdk_exporter_metric_data_point_inflight - ) + create_exported = create_otel_sdk_exporter_metric_data_point_exported + create_inflight = create_otel_sdk_exporter_metric_data_point_inflight port = endpoint.port if port is None: @@ -87,9 +81,7 @@ def __init__( elif endpoint.scheme == "http": port = 80 - component_type_value = ( - component_type.value if component_type else "unknown_otlp_exporter" - ) + component_type_value = component_type.value if component_type else "unknown_otlp_exporter" count = _component_counter[component_type_value] _component_counter[component_type_value] = count + 1 self._standard_attrs: dict[str, AttributeValue] = { @@ -122,16 +114,10 @@ def export_operation(self, num_items: int) -> Iterator[ExportResult]: end_time = perf_counter() self._inflight.add(-num_items, self._standard_attrs) exported_attrs = ( - {**self._standard_attrs, ERROR_TYPE: type(error).__qualname__} - if error - else self._standard_attrs + {**self._standard_attrs, ERROR_TYPE: type(error).__qualname__} if error else self._standard_attrs ) self._exported.add(num_items, exported_attrs) - duration_attrs = ( - {**exported_attrs, **error_attrs} - if error_attrs - else exported_attrs - ) + duration_attrs = {**exported_attrs, **error_attrs} if error_attrs else exported_attrs self._duration.record(end_time - start_time, duration_attrs) diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py index 7528b5994b8..a5541ff9a09 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/__init__.py @@ -65,14 +65,10 @@ def _encode_value(value: Any) -> PB2AnyValue: if isinstance(value, bytes): return PB2AnyValue(bytes_value=value) if isinstance(value, Sequence): - return PB2AnyValue( - array_value=PB2ArrayValue(values=[_encode_value(v) for v in value]) - ) + return PB2AnyValue(array_value=PB2ArrayValue(values=[_encode_value(v) for v in value])) if isinstance(value, Mapping): return PB2AnyValue( - kvlist_value=PB2KeyValueList( - values=[_encode_key_value(str(k), v) for k, v in value.items()] - ) + kvlist_value=PB2KeyValueList(values=[_encode_key_value(str(k), v) for k, v in value.items()]) ) raise Exception(f"Invalid type {type(value)} of value {value}") @@ -115,9 +111,7 @@ def _get_resource_data( sdk_resource, scope_data, ) in sdk_resource_scope_data.items(): - collector_resource = PB2Resource( - attributes=_encode_attributes(sdk_resource.attributes) - ) + collector_resource = PB2Resource(attributes=_encode_attributes(sdk_resource.attributes)) resource_data.append( resource_class( **{ diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py index 86b4380bd95..bbb907a8d49 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/_log_encoder/__init__.py @@ -30,9 +30,7 @@ def encode_logs( def _encode_log(readable_log_record: ReadableLogRecord) -> PB2LogRecord: span_id = ( - None - if readable_log_record.log_record.span_id == 0 - else _encode_span_id(readable_log_record.log_record.span_id) + None if readable_log_record.log_record.span_id == 0 else _encode_span_id(readable_log_record.log_record.span_id) ) trace_id = ( None @@ -47,13 +45,9 @@ def _encode_log(readable_log_record: ReadableLogRecord) -> PB2LogRecord: flags=int(readable_log_record.log_record.trace_flags), body=_encode_value(readable_log_record.log_record.body), severity_text=readable_log_record.log_record.severity_text, - attributes=_encode_attributes( - readable_log_record.log_record.attributes - ), + attributes=_encode_attributes(readable_log_record.log_record.attributes), dropped_attributes_count=readable_log_record.dropped_attributes, - severity_number=getattr( - readable_log_record.log_record.severity_number, "value", None - ), + severity_number=getattr(readable_log_record.log_record.severity_number, "value", None), event_name=readable_log_record.log_record.event_name, ) @@ -79,9 +73,7 @@ def _encode_resource_logs( ScopeLogs( scope=(_encode_instrumentation_scope(sdk_instrumentation)), log_records=pb2_logs, - schema_url=sdk_instrumentation.schema_url - if sdk_instrumentation - else None, + schema_url=sdk_instrumentation.schema_url if sdk_instrumentation else None, ) ) pb2_resource_logs.append( diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py index fad7aaf3dd7..37ae5567135 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py @@ -56,8 +56,7 @@ class OTLPMetricExporterMixin: def _common_configuration( self, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, ) -> None: MetricExporter.__init__( @@ -99,14 +98,9 @@ def _get_temporality( } else: - if otel_exporter_otlp_metrics_temporality_preference != ( - "CUMULATIVE" - ): + if otel_exporter_otlp_metrics_temporality_preference != ("CUMULATIVE"): _logger.warning( - "Unrecognized OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE" - " value found: " - "%s, " - "using CUMULATIVE", + "Unrecognized OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE value found: %s, using CUMULATIVE", otel_exporter_otlp_metrics_temporality_preference, ) instrument_class_temporality = { @@ -131,22 +125,15 @@ def _get_aggregation( "explicit_bucket_histogram", ) - if otel_exporter_otlp_metrics_default_histogram_aggregation == ( - "base2_exponential_bucket_histogram" - ): + if otel_exporter_otlp_metrics_default_histogram_aggregation == ("base2_exponential_bucket_histogram"): instrument_class_aggregation = { Histogram: ExponentialBucketHistogramAggregation(), } else: - if otel_exporter_otlp_metrics_default_histogram_aggregation != ( - "explicit_bucket_histogram" - ): + if otel_exporter_otlp_metrics_default_histogram_aggregation != ("explicit_bucket_histogram"): _logger.warning( - ( - "Invalid value for %s: %s, using explicit bucket " - "histogram aggregation" - ), + ("Invalid value for %s: %s, using explicit bucket histogram aggregation"), OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION, otel_exporter_otlp_metrics_default_histogram_aggregation, ) @@ -188,9 +175,7 @@ def encode_metrics(data: MetricsData) -> ExportMetricsServiceRequest: ) in resource_metrics_dict.items(): resource_data.append( pb2.ResourceMetrics( - resource=PB2Resource( - attributes=_encode_attributes(sdk_resource.attributes) - ), + resource=PB2Resource(attributes=_encode_attributes(sdk_resource.attributes)), scope_metrics=scope_data.values(), schema_url=sdk_resource.schema_url, ) @@ -261,9 +246,7 @@ def _encode_metric(metric, pb2_metric): max=data_point.max, min=data_point.min, ) - pb2_metric.histogram.aggregation_temporality = ( - metric.data.aggregation_temporality - ) + pb2_metric.histogram.aggregation_temporality = metric.data.aggregation_temporality pb2_metric.histogram.data_points.append(pt) elif isinstance(metric.data, Sum): @@ -281,9 +264,7 @@ def _encode_metric(metric, pb2_metric): # note that because sum is a message type, the # fields must be set individually rather than # instantiating a pb2.Sum and setting it once - pb2_metric.sum.aggregation_temporality = ( - metric.data.aggregation_temporality - ) + pb2_metric.sum.aggregation_temporality = metric.data.aggregation_temporality pb2_metric.sum.is_monotonic = metric.data.is_monotonic pb2_metric.sum.data_points.append(pt) @@ -320,9 +301,7 @@ def _encode_metric(metric, pb2_metric): max=data_point.max, min=data_point.min, ) - pb2_metric.exponential_histogram.aggregation_temporality = ( - metric.data.aggregation_temporality - ) + pb2_metric.exponential_histogram.aggregation_temporality = metric.data.aggregation_temporality pb2_metric.exponential_histogram.data_points.append(pt) else: @@ -344,24 +323,17 @@ def _encode_exemplars(sdk_exemplars: list[Exemplar]) -> list[pb2.Exemplar]: """ pb_exemplars = [] for sdk_exemplar in sdk_exemplars: - if ( - sdk_exemplar.span_id is not None - and sdk_exemplar.trace_id is not None - ): + if sdk_exemplar.span_id is not None and sdk_exemplar.trace_id is not None: pb_exemplar = pb2.Exemplar( time_unix_nano=sdk_exemplar.time_unix_nano, span_id=_encode_span_id(sdk_exemplar.span_id), trace_id=_encode_trace_id(sdk_exemplar.trace_id), - filtered_attributes=_encode_attributes( - sdk_exemplar.filtered_attributes - ), + filtered_attributes=_encode_attributes(sdk_exemplar.filtered_attributes), ) else: pb_exemplar = pb2.Exemplar( time_unix_nano=sdk_exemplar.time_unix_nano, - filtered_attributes=_encode_attributes( - sdk_exemplar.filtered_attributes - ), + filtered_attributes=_encode_attributes(sdk_exemplar.filtered_attributes), ) # Assign the value based on its type in the SDK exemplar diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py index 96276a383e8..af4ad6c83aa 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/trace_encoder/__init__.py @@ -41,9 +41,7 @@ def encode_spans( sdk_spans: Sequence[ReadableSpan], ) -> PB2ExportTraceServiceRequest: - return PB2ExportTraceServiceRequest( - resource_spans=_encode_resource_spans(sdk_spans) - ) + return PB2ExportTraceServiceRequest(resource_spans=_encode_resource_spans(sdk_spans)) def _encode_resource_spans( @@ -78,9 +76,7 @@ def _encode_resource_spans( PB2ScopeSpans( scope=(_encode_instrumentation_scope(sdk_instrumentation)), spans=pb2_spans, - schema_url=sdk_instrumentation.schema_url - if sdk_instrumentation - else None, + schema_url=sdk_instrumentation.schema_url if sdk_instrumentation else None, ) ) pb2_resource_spans.append( @@ -169,9 +165,7 @@ def _encode_status(status: Status) -> PB2Status | None: def _encode_trace_state(trace_state: TraceState) -> str | None: pb2_trace_state = None if trace_state is not None: - pb2_trace_state = ",".join( - [f"{key}={value}" for key, value in (trace_state.items())] - ) + pb2_trace_state = ",".join([f"{key}={value}" for key, value in (trace_state.items())]) return pb2_trace_state diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py index 4c2dd7bb427..3c87ce63681 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_attribute_encoder.py @@ -39,9 +39,7 @@ def test_encode_attributes_all_kinds(self): PB2KeyValue(key="a", value=PB2AnyValue(int_value=1)), PB2KeyValue(key="b", value=PB2AnyValue(double_value=3.14)), PB2KeyValue(key="c", value=PB2AnyValue(bool_value=False)), - PB2KeyValue( - key="hello", value=PB2AnyValue(string_value="world") - ), + PB2KeyValue(key="hello", value=PB2AnyValue(string_value="world")), PB2KeyValue( key="greet", value=PB2AnyValue( @@ -84,9 +82,7 @@ def test_encode_attributes_all_kinds(self): def test_encode_attributes_error_logs_key(self): with self.assertLogs(level=ERROR) as error: - result = _encode_attributes( - {"a": 1, "bad_key": CallingStrRaisesException(), "b": 2} - ) + result = _encode_attributes({"a": 1, "bad_key": CallingStrRaisesException(), "b": 2}) self.assertEqual(len(error.records), 1) self.assertEqual(error.records[0].msg, "Failed to encode key %s: %s") diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_exporter_metrics.py b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_exporter_metrics.py index e6c1a601c07..6f61dc0edea 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_exporter_metrics.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_exporter_metrics.py @@ -20,8 +20,7 @@ def test_factory_returns_noop_when_disabled(self): meter_provider = Mock() with patch( - "opentelemetry.exporter.otlp.proto.common." - "_exporter_metrics.get_meter_provider" + "opentelemetry.exporter.otlp.proto.common._exporter_metrics.get_meter_provider" ) as get_meter_provider: metrics = create_exporter_metrics( OtelComponentTypeValues.OTLP_HTTP_SPAN_EXPORTER, diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_log_encoder.py b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_log_encoder.py index 6a4e2faa2b6..2ed56850077 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_log_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_log_encoder.py @@ -65,9 +65,7 @@ def test_encode_basic_log_record(self): {"first_resource": "value"}, "resource_schema_url", ), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) pb2_service_request = ExportLogsServiceRequest( resource_logs=[ @@ -82,28 +80,20 @@ def test_encode_basic_log_record(self): ), scope_logs=[ PB2ScopeLogs( - scope=PB2InstrumentationScope( - name="first_name", version="first_version" - ), + scope=PB2InstrumentationScope(name="first_name", version="first_version"), log_records=[ PB2LogRecord( time_unix_nano=1644650195189786880, observed_time_unix_nano=1644650195189786881, - trace_id=_encode_trace_id( - 89564621134313219400156819398935297684 - ), - span_id=_encode_span_id( - 1312458408527513268 - ), + trace_id=_encode_trace_id(89564621134313219400156819398935297684), + span_id=_encode_span_id(1312458408527513268), flags=int(TraceFlags(0x01)), severity_text="WARN", severity_number=SeverityNumber.WARN.value, body=_encode_value( "Do not go gentle into that good night. Rage, rage against the dying of the light" ), - attributes=_encode_attributes( - {"a": 1, "b": "c"} - ), + attributes=_encode_attributes({"a": 1, "b": "c"}), ) ], ), @@ -117,20 +107,18 @@ def test_encode_basic_log_record(self): def test_encode_log_record_with_no_instrumentation_scope_and_dict_body( self, ): - log_record_with_no_instrumentation_scope_and_dict_body = ( - ReadWriteLogRecord( - LogRecord( - timestamp=1644650427658989056, - observed_timestamp=1644650427658989057, - context=_CONTEXT_LOG, - severity_text="DEBUG", - severity_number=SeverityNumber.DEBUG, - body={"error": None, "array_with_nones": [1, None, 2]}, - attributes={"a": 1, "b": "c"}, - ), - resource=SDKResource({"second_resource": "CASE"}), - instrumentation_scope=None, - ) + log_record_with_no_instrumentation_scope_and_dict_body = ReadWriteLogRecord( + LogRecord( + timestamp=1644650427658989056, + observed_timestamp=1644650427658989057, + context=_CONTEXT_LOG, + severity_text="DEBUG", + severity_number=SeverityNumber.DEBUG, + body={"error": None, "array_with_nones": [1, None, 2]}, + attributes={"a": 1, "b": "c"}, + ), + resource=SDKResource({"second_resource": "CASE"}), + instrumentation_scope=None, ) pb2_resource_logs = PB2ResourceLogs( resource=PB2Resource( @@ -148,9 +136,7 @@ def test_encode_log_record_with_no_instrumentation_scope_and_dict_body( PB2LogRecord( time_unix_nano=1644650427658989056, observed_time_unix_nano=1644650427658989057, - trace_id=_encode_trace_id( - 89564621134313219400156819398935297684 - ), + trace_id=_encode_trace_id(89564621134313219400156819398935297684), span_id=_encode_span_id(1312458408527513268), flags=int(TraceFlags(0x01)), severity_text="DEBUG", @@ -168,9 +154,7 @@ def test_encode_log_record_with_no_instrumentation_scope_and_dict_body( ], ) self.assertEqual( - encode_logs( - [log_record_with_no_instrumentation_scope_and_dict_body] - ), + encode_logs([log_record_with_no_instrumentation_scope_and_dict_body]), ExportLogsServiceRequest(resource_logs=[pb2_resource_logs]), ) @@ -185,11 +169,7 @@ def test_encode_log_record_with_empty_resource_and_dict_attribute_value( severity_text="FATAL", severity_number=SeverityNumber.FATAL, body="This instrumentation scope has a schema url and attributes", - attributes={ - "extended": { - "sequence": [{"inner": "mapping", "none": None}] - } - }, + attributes={"extended": {"sequence": [{"inner": "mapping", "none": None}]}}, ), resource=SDKResource({}), instrumentation_scope=InstrumentationScope( @@ -212,24 +192,14 @@ def test_encode_log_record_with_empty_resource_and_dict_attribute_value( PB2LogRecord( time_unix_nano=1644650584292683033, observed_time_unix_nano=1644650584292683033, - trace_id=_encode_trace_id( - 89564621134313219400156819398935297684 - ), + trace_id=_encode_trace_id(89564621134313219400156819398935297684), span_id=_encode_span_id(1312458408527513268), flags=int(TraceFlags(0x01)), severity_text="FATAL", severity_number=SeverityNumber.FATAL.value, - body=_encode_value( - "This instrumentation scope has a schema url and attributes" - ), + body=_encode_value("This instrumentation scope has a schema url and attributes"), attributes=_encode_attributes( - { - "extended": { - "sequence": [ - {"inner": "mapping", "none": None} - ] - } - } + {"extended": {"sequence": [{"inner": "mapping", "none": None}]}} ), ) ], @@ -238,9 +208,7 @@ def test_encode_log_record_with_empty_resource_and_dict_attribute_value( ], ) self.assertEqual( - encode_logs( - [log_record_with_empty_resource_and_dict_attribute_value] - ), + encode_logs([log_record_with_empty_resource_and_dict_attribute_value]), ExportLogsServiceRequest(resource_logs=[pb2_resource_logs]), ) @@ -250,10 +218,7 @@ def test_dropped_attributes_count(self): self.assertTrue(hasattr(sdk_logs[0], "dropped_attributes")) self.assertEqual( # pylint:disable=no-member - encoded_logs.resource_logs[0] - .scope_logs[0] - .log_records[0] - .dropped_attributes_count, + encoded_logs.resource_logs[0].scope_logs[0].log_records[0].dropped_attributes_count, 2, ) @@ -280,13 +245,9 @@ def _get_test_logs_dropped_attributes() -> list[ReadWriteLogRecord]: ), resource=SDKResource({"first_resource": "value"}), limits=LogRecordLimits(max_attributes=1), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), - ) - ctx_log2 = set_span_in_context( - NonRecordingSpan(SpanContext(0, 0, False)) + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) + ctx_log2 = set_span_in_context(NonRecordingSpan(SpanContext(0, 0, False))) log2 = ReadWriteLogRecord( LogRecord( timestamp=1644650249738562048, @@ -297,9 +258,7 @@ def _get_test_logs_dropped_attributes() -> list[ReadWriteLogRecord]: attributes={}, ), resource=SDKResource({"second_resource": "CASE"}), - instrumentation_scope=InstrumentationScope( - "second_name", "second_version" - ), + instrumentation_scope=InstrumentationScope("second_name", "second_version"), ) return [log1, log2] diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_metrics_encoder.py b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_metrics_encoder.py index d3b3dc8c5cd..a1b40a0c2c9 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_metrics_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_metrics_encoder.py @@ -116,16 +116,12 @@ def test_encode_sum_int(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -138,15 +134,11 @@ def test_encode_sum_int(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946015139533244, @@ -197,16 +189,12 @@ def test_encode_sum_double(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -219,15 +207,11 @@ def test_encode_sum_double(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946015139533244, @@ -278,16 +262,12 @@ def test_encode_gauge_int(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -300,15 +280,11 @@ def test_encode_gauge_int(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], time_unix_nano=1641946016139533244, @@ -357,16 +333,12 @@ def test_encode_gauge_double(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -379,15 +351,11 @@ def test_encode_gauge_double(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], time_unix_nano=1641946016139533244, @@ -435,16 +403,12 @@ def test_encode_histogram(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -457,15 +421,11 @@ def test_encode_histogram(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946016139533244, @@ -483,9 +443,7 @@ def test_encode_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -495,9 +453,7 @@ def test_encode_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -566,16 +522,12 @@ def test_encode_multiple_scope_histogram(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -588,15 +540,11 @@ def test_encode_multiple_scope_histogram(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946016139533244, @@ -614,9 +562,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -626,9 +572,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -650,15 +594,11 @@ def test_encode_multiple_scope_histogram(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946016139533244, @@ -676,9 +616,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -688,9 +626,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -705,9 +641,7 @@ def test_encode_multiple_scope_histogram(self): ], ), pb2.ScopeMetrics( - scope=InstrumentationScope( - name="second_name", version="second_version" - ), + scope=InstrumentationScope(name="second_name", version="second_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -720,15 +654,11 @@ def test_encode_multiple_scope_histogram(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946016139533244, @@ -746,9 +676,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -758,9 +686,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -775,9 +701,7 @@ def test_encode_multiple_scope_histogram(self): ], ), pb2.ScopeMetrics( - scope=InstrumentationScope( - name="third_name", version="third_version" - ), + scope=InstrumentationScope(name="third_name", version="third_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -790,15 +714,11 @@ def test_encode_multiple_scope_histogram(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946016139533244, @@ -816,9 +736,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -828,9 +746,7 @@ def test_encode_multiple_scope_histogram(self): filtered_attributes=[ KeyValue( key="filtered", - value=AnyValue( - string_value="banana" - ), + value=AnyValue(string_value="banana"), ) ], ), @@ -906,16 +822,12 @@ def test_encode_exponential_histogram(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_metrics=[ pb2.ScopeMetrics( - scope=InstrumentationScope( - name="first_name", version="first_version" - ), + scope=InstrumentationScope(name="first_name", version="first_version"), schema_url="instrumentation_scope_schema_url", metrics=[ pb2.Metric( @@ -928,15 +840,11 @@ def test_encode_exponential_histogram(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=0, @@ -1039,9 +947,7 @@ def test_encode_scope_with_attributes(self): name="first_name", version="first_version", attributes=[ - KeyValue( - key="one", value=AnyValue(int_value=1) - ), + KeyValue(key="one", value=AnyValue(int_value=1)), KeyValue( key="two", value=AnyValue(string_value="2"), @@ -1060,15 +966,11 @@ def test_encode_scope_with_attributes(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=True - ), + value=AnyValue(bool_value=True), ), ], start_time_unix_nano=1641946015139533244, diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_trace_encoder.py b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_trace_encoder.py index 0c685948b75..df4cc6ec84d 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_trace_encoder.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/tests/test_trace_encoder.py @@ -72,13 +72,9 @@ def get_exhaustive_otel_span_list() -> list[SDKSpan]: start_times[5] + (500 * 10**6), ) - parent_span_context = SDKSpanContext( - trace_id, 0x1111111111111111, is_remote=True - ) + parent_span_context = SDKSpanContext(trace_id, 0x1111111111111111, is_remote=True) - other_context = SDKSpanContext( - trace_id, 0x2222222222222222, is_remote=False - ) + other_context = SDKSpanContext(trace_id, 0x2222222222222222, is_remote=False) span1 = SDKSpan( name="test-span-1", @@ -100,9 +96,7 @@ def get_exhaustive_otel_span_list() -> list[SDKSpan]: }, ), ), - links=( - SDKLink(context=other_context, attributes={"key_bool": True}), - ), + links=(SDKLink(context=other_context, attributes={"key_bool": True}),), resource=SDKResource({}, "resource_schema_url"), ) span1.start(start_time=start_times[0]) @@ -136,9 +130,7 @@ def get_exhaustive_otel_span_list() -> list[SDKSpan]: context=other_context, parent=None, resource=SDKResource({}, "resource_schema_url"), - instrumentation_scope=SDKInstrumentationScope( - name="name", version="version" - ), + instrumentation_scope=SDKInstrumentationScope(name="name", version="version"), ) span4.start(start_time=start_times[3]) span4.end(end_time=end_times[3]) @@ -198,85 +190,55 @@ def get_exhaustive_test_spans( spans=[ PB2SPan( trace_id=trace_id, - span_id=_encode_span_id( - otel_spans[0].context.span_id - ), + span_id=_encode_span_id(otel_spans[0].context.span_id), trace_state=None, - parent_span_id=_encode_span_id( - otel_spans[0].parent.span_id - ), + parent_span_id=_encode_span_id(otel_spans[0].parent.span_id), name=otel_spans[0].name, kind=span_kind, - start_time_unix_nano=otel_spans[ - 0 - ].start_time, + start_time_unix_nano=otel_spans[0].start_time, end_time_unix_nano=otel_spans[0].end_time, attributes=[ PB2KeyValue( key="key_bool", - value=PB2AnyValue( - bool_value=False - ), + value=PB2AnyValue(bool_value=False), ), PB2KeyValue( key="key_string", - value=PB2AnyValue( - string_value="hello_world" - ), + value=PB2AnyValue(string_value="hello_world"), ), PB2KeyValue( key="key_float", - value=PB2AnyValue( - double_value=111.22 - ), + value=PB2AnyValue(double_value=111.22), ), ], events=[ PB2SPan.Event( name="event0", - time_unix_nano=otel_spans[0] - .events[0] - .timestamp, + time_unix_nano=otel_spans[0].events[0].timestamp, attributes=[ PB2KeyValue( key="annotation_bool", - value=PB2AnyValue( - bool_value=True - ), + value=PB2AnyValue(bool_value=True), ), PB2KeyValue( key="annotation_string", - value=PB2AnyValue( - string_value="annotation_test" - ), + value=PB2AnyValue(string_value="annotation_test"), ), PB2KeyValue( key="key_float", - value=PB2AnyValue( - double_value=0.3 - ), + value=PB2AnyValue(double_value=0.3), ), ], ) ], links=[ PB2SPan.Link( - trace_id=_encode_trace_id( - otel_spans[0] - .links[0] - .context.trace_id - ), - span_id=_encode_span_id( - otel_spans[0] - .links[0] - .context.span_id - ), + trace_id=_encode_trace_id(otel_spans[0].links[0].context.trace_id), + span_id=_encode_span_id(otel_spans[0].links[0].context.span_id), attributes=[ PB2KeyValue( key="key_bool", - value=PB2AnyValue( - bool_value=True - ), + value=PB2AnyValue(bool_value=True), ), ], flags=0x100, @@ -298,16 +260,12 @@ def get_exhaustive_test_spans( spans=[ PB2SPan( trace_id=trace_id, - span_id=_encode_span_id( - otel_spans[3].context.span_id - ), + span_id=_encode_span_id(otel_spans[3].context.span_id), trace_state=None, parent_span_id=None, name=otel_spans[3].name, kind=span_kind, - start_time_unix_nano=otel_spans[ - 3 - ].start_time, + start_time_unix_nano=otel_spans[3].start_time, end_time_unix_nano=otel_spans[3].end_time, attributes=None, events=None, @@ -324,9 +282,7 @@ def get_exhaustive_test_spans( attributes=[ PB2KeyValue( key="key_resource", - value=PB2AnyValue( - string_value="some_resource" - ), + value=PB2AnyValue(string_value="some_resource"), ) ] ), @@ -336,16 +292,12 @@ def get_exhaustive_test_spans( spans=[ PB2SPan( trace_id=trace_id, - span_id=_encode_span_id( - otel_spans[1].context.span_id - ), + span_id=_encode_span_id(otel_spans[1].context.span_id), trace_state=None, parent_span_id=None, name=otel_spans[1].name, kind=span_kind, - start_time_unix_nano=otel_spans[ - 1 - ].start_time, + start_time_unix_nano=otel_spans[1].start_time, end_time_unix_nano=otel_spans[1].end_time, attributes=None, events=None, @@ -355,23 +307,17 @@ def get_exhaustive_test_spans( ), PB2SPan( trace_id=trace_id, - span_id=_encode_span_id( - otel_spans[2].context.span_id - ), + span_id=_encode_span_id(otel_spans[2].context.span_id), trace_state=None, parent_span_id=None, name=otel_spans[2].name, kind=span_kind, - start_time_unix_nano=otel_spans[ - 2 - ].start_time, + start_time_unix_nano=otel_spans[2].start_time, end_time_unix_nano=otel_spans[2].end_time, attributes=[ PB2KeyValue( key="key_string", - value=PB2AnyValue( - string_value="hello_world" - ), + value=PB2AnyValue(string_value="hello_world"), ), ], events=None, @@ -388,32 +334,24 @@ def get_exhaustive_test_spans( attributes=[ PB2KeyValue( key="key_resource", - value=PB2AnyValue( - string_value="another_resource" - ), + value=PB2AnyValue(string_value="another_resource"), ), ], ), schema_url="resource_schema_url", scope_spans=[ PB2ScopeSpans( - scope=PB2InstrumentationScope( - name="scope_1_name", version="scope_1_version" - ), + scope=PB2InstrumentationScope(name="scope_1_name", version="scope_1_version"), schema_url="scope_1_schema_url", spans=[ PB2SPan( trace_id=trace_id, - span_id=_encode_span_id( - otel_spans[4].context.span_id - ), + span_id=_encode_span_id(otel_spans[4].context.span_id), trace_state=None, parent_span_id=None, name=otel_spans[4].name, kind=span_kind, - start_time_unix_nano=otel_spans[ - 4 - ].start_time, + start_time_unix_nano=otel_spans[4].start_time, end_time_unix_nano=otel_spans[4].end_time, attributes=None, events=None, @@ -442,16 +380,12 @@ def get_exhaustive_test_spans( spans=[ PB2SPan( trace_id=trace_id, - span_id=_encode_span_id( - otel_spans[5].context.span_id - ), + span_id=_encode_span_id(otel_spans[5].context.span_id), trace_state=None, parent_span_id=None, name=otel_spans[5].name, kind=span_kind, - start_time_unix_nano=otel_spans[ - 5 - ].start_time, + start_time_unix_nano=otel_spans[5].start_time, end_time_unix_nano=otel_spans[5].end_time, attributes=None, events=None, diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py index 7f86fe8fa61..c704990d048 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_log_exporter/__init__.py @@ -55,10 +55,7 @@ def __init__( endpoint: str | None = None, insecure: bool | None = None, credentials: ChannelCredentials | None = None, - headers: TypingSequence[tuple[str, str]] - | dict[str, str] - | str - | None = None, + headers: TypingSequence[tuple[str, str]] | dict[str, str] | str | None = None, timeout: float | None = None, compression: Compression | None = None, channel_options: tuple[tuple[str, str]] | None = None, @@ -70,10 +67,7 @@ def __init__( if insecure is None and insecure_logs is not None: insecure = insecure_logs.lower() == "true" - if ( - not insecure - and environ.get(OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE) is not None - ): + if not insecure and environ.get(OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE) is not None: credentials = _get_credentials( credentials, _OTEL_PYTHON_EXPORTER_OTLP_GRPC_LOGS_CREDENTIAL_PROVIDER, @@ -83,14 +77,10 @@ def __init__( ) environ_timeout = environ.get(OTEL_EXPORTER_OTLP_LOGS_TIMEOUT) - environ_timeout = ( - float(environ_timeout) if environ_timeout is not None else None - ) + environ_timeout = float(environ_timeout) if environ_timeout is not None else None compression = ( - environ_to_compression(OTEL_EXPORTER_OTLP_LOGS_COMPRESSION) - if compression is None - else compression + environ_to_compression(OTEL_EXPORTER_OTLP_LOGS_COMPRESSION) if compression is None else compression ) OTLPExporterMixin.__init__( @@ -110,9 +100,7 @@ def __init__( meter_provider=meter_provider, ) - def _translate_data( - self, data: Sequence[ReadableLogRecord] - ) -> ExportLogsServiceRequest: + def _translate_data(self, data: Sequence[ReadableLogRecord]) -> ExportLogsServiceRequest: return encode_logs(data) def _count_data(self, data: Sequence[ReadableLogRecord]): diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py index 9496e598ca3..f898153dee9 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py @@ -142,9 +142,7 @@ MetricExportResult, SpanExportResult, ) -ExportStubT = TypeVar( - "ExportStubT", TraceServiceStub, MetricsServiceStub, LogsServiceStub -) +ExportStubT = TypeVar("ExportStubT", TraceServiceStub, MetricsServiceStub, LogsServiceStub) _ENVIRON_TO_COMPRESSION = { None: None, @@ -154,21 +152,12 @@ class InvalidCompressionValueException(Exception): def __init__(self, environ_key: str, environ_value: str): - super().__init__( - f'Invalid value "{environ_value}" for compression envvar {environ_key}' - ) + super().__init__(f'Invalid value "{environ_value}" for compression envvar {environ_key}') def environ_to_compression(environ_key: str) -> Compression | None: - environ_value = ( - environ[environ_key].lower().strip() - if environ_key in environ - else None - ) - if ( - environ_value not in _ENVIRON_TO_COMPRESSION - and environ_value is not None - ): + environ_value = environ[environ_key].lower().strip() if environ_key in environ else None + if environ_value not in _ENVIRON_TO_COMPRESSION and environ_value is not None: raise InvalidCompressionValueException(environ_key, environ_value) return _ENVIRON_TO_COMPRESSION[environ_value] @@ -201,15 +190,9 @@ def _load_credentials( client_key_file: str | None, client_certificate_file: str | None, ) -> ChannelCredentials: - root_certificates = ( - _read_file(certificate_file) if certificate_file else None - ) + root_certificates = _read_file(certificate_file) if certificate_file else None private_key = _read_file(client_key_file) if client_key_file else None - certificate_chain = ( - _read_file(client_certificate_file) - if client_certificate_file - else None - ) + certificate_chain = _read_file(client_certificate_file) if client_certificate_file else None return ssl_channel_credentials( root_certificates=root_certificates, @@ -255,18 +238,14 @@ def _get_credentials( if certificate_file: client_key_file = environ.get(client_key_file_env_key) client_certificate_file = environ.get(client_certificate_file_env_key) - credentials = _load_credentials( - certificate_file, client_key_file, client_certificate_file - ) + credentials = _load_credentials(certificate_file, client_key_file, client_certificate_file) if credentials is not None: return credentials return ssl_channel_credentials() # pylint: disable=no-member -class OTLPExporterMixin( - ABC, Generic[SDKDataT, ExportServiceRequestT, ExportResultT, ExportStubT] -): +class OTLPExporterMixin(ABC, Generic[SDKDataT, ExportServiceRequestT, ExportResultT, ExportStubT]): """OTLP gRPC exporter mixin. This class provides the base functionality for OTLP exporters that send @@ -291,10 +270,7 @@ def __init__( endpoint: str | None = None, insecure: bool | None = None, credentials: ChannelCredentials | None = None, - headers: TypingSequence[tuple[str, str]] - | dict[str, str] - | str - | None = None, + headers: TypingSequence[tuple[str, str]] | dict[str, str] | str | None = None, timeout: float | None = None, compression: Compression | None = None, channel_options: tuple[tuple[str, str]] | None = None, @@ -307,9 +283,7 @@ def __init__( super().__init__() self._result = result self._stub = stub - self._endpoint = endpoint or environ.get( - OTEL_EXPORTER_OTLP_ENDPOINT, "http://localhost:4317" - ) + self._endpoint = endpoint or environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, "http://localhost:4317") parsed_url = urlparse(self._endpoint) @@ -338,9 +312,7 @@ def __init__( if channel_options: # merge the default channel options with the one passed as parameter - overridden_options = { - opt_name for (opt_name, _) in channel_options - } + overridden_options = {opt_name for (opt_name, _) in channel_options} default_options = tuple( (opt_name, opt_value) for opt_name, opt_value in _OTLP_GRPC_CHANNEL_OPTIONS @@ -350,15 +322,11 @@ def __init__( else: self._channel_options = tuple(_OTLP_GRPC_CHANNEL_OPTIONS) - self._timeout = timeout or float( - environ.get(OTEL_EXPORTER_OTLP_TIMEOUT, 10) - ) + self._timeout = timeout or float(environ.get(OTEL_EXPORTER_OTLP_TIMEOUT, 10)) self._collector_kwargs = None self._compression = ( - environ_to_compression(OTEL_EXPORTER_OTLP_COMPRESSION) - if compression is None - else compression + environ_to_compression(OTEL_EXPORTER_OTLP_COMPRESSION) if compression is None else compression ) or Compression.NoCompression self._retryable_error_codes = retryable_error_codes or os.environ.get( @@ -366,14 +334,10 @@ def __init__( ) if isinstance(self._retryable_error_codes, str): self._retryable_error_codes = frozenset( - StatusCode[code.strip().upper()] - for code in self._retryable_error_codes.split(",") - if code.strip() + StatusCode[code.strip().upper()] for code in self._retryable_error_codes.split(",") if code.strip() ) elif self._retryable_error_codes is not None: - self._retryable_error_codes = frozenset( - self._retryable_error_codes - ) + self._retryable_error_codes = frozenset(self._retryable_error_codes) else: self._retryable_error_codes = _RETRYABLE_ERROR_CODES @@ -400,10 +364,7 @@ def __init__( signal, parsed_url, meter_provider, - os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "") - .strip() - .lower() - == "true", + os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "").strip().lower() == "true", ) self._initialize_channel_and_stub() @@ -477,16 +438,10 @@ def _export( if retry_info_bin is not None: retry_info = RetryInfo() retry_info.ParseFromString(retry_info_bin) - backoff_seconds = ( - retry_info.retry_delay.seconds - + retry_info.retry_delay.nanos / 1.0e9 - ) + backoff_seconds = retry_info.retry_delay.seconds + retry_info.retry_delay.nanos / 1.0e9 # For UNAVAILABLE errors, reinitialize the channel to force reconnection - if ( - error.code() == StatusCode.UNAVAILABLE - and retry_num == 0 - ): # type: ignore + if error.code() == StatusCode.UNAVAILABLE and retry_num == 0: # type: ignore logger.debug( "Reinitializing gRPC channel for %s exporter due to UNAVAILABLE error", self._exporting, @@ -519,9 +474,7 @@ def _export( exc_info=error.code() == StatusCode.UNKNOWN, # type: ignore [reportAttributeAccessIssue] ) result.error = error - result.error_attrs = { - RPC_RESPONSE_STATUS_CODE: error.code().name - } + result.error_attrs = {RPC_RESPONSE_STATUS_CODE: error.code().name} return self._result.FAILURE # type: ignore [reportReturnType] logger.warning( "Transient error %s encountered while exporting %s to %s, retrying in %.2fs. Error details: %s", @@ -567,8 +520,5 @@ def _set_meter_provider(self, meter_provider: MeterProvider) -> None: self._signal, self._parsed_url, meter_provider, - os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "") - .strip() - .lower() - == "true", + os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "").strip().lower() == "true", ) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py index de97551f9fe..35eef81753c 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py @@ -94,14 +94,10 @@ def __init__( endpoint: str | None = None, insecure: bool | None = None, credentials: ChannelCredentials | None = None, - headers: TypingSequence[tuple[str, str]] - | dict[str, str] - | str - | None = None, + headers: TypingSequence[tuple[str, str]] | dict[str, str] | str | None = None, timeout: float | None = None, compression: Compression | None = None, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, max_export_batch_size: int | None = None, channel_options: tuple[tuple[str, str]] | None = None, @@ -113,10 +109,7 @@ def __init__( if insecure is None and insecure_metrics is not None: insecure = insecure_metrics.lower() == "true" - if ( - not insecure - and environ.get(OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE) is not None - ): + if not insecure and environ.get(OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE) is not None: credentials = _get_credentials( credentials, _OTEL_PYTHON_EXPORTER_OTLP_GRPC_METRICS_CREDENTIAL_PROVIDER, @@ -126,26 +119,19 @@ def __init__( ) environ_timeout = environ.get(OTEL_EXPORTER_OTLP_METRICS_TIMEOUT) - environ_timeout = ( - float(environ_timeout) if environ_timeout is not None else None - ) + environ_timeout = float(environ_timeout) if environ_timeout is not None else None compression = ( - environ_to_compression(OTEL_EXPORTER_OTLP_METRICS_COMPRESSION) - if compression is None - else compression + environ_to_compression(OTEL_EXPORTER_OTLP_METRICS_COMPRESSION) if compression is None else compression ) - self._common_configuration( - preferred_temporality, preferred_aggregation - ) + self._common_configuration(preferred_temporality, preferred_aggregation) OTLPExporterMixin.__init__( self, stub=MetricsServiceStub, result=MetricExportResult, - endpoint=endpoint - or environ.get(OTEL_EXPORTER_OTLP_METRICS_ENDPOINT), + endpoint=endpoint or environ.get(OTEL_EXPORTER_OTLP_METRICS_ENDPOINT), insecure=insecure, credentials=credentials, headers=headers or environ.get(OTEL_EXPORTER_OTLP_METRICS_HEADERS), @@ -235,9 +221,7 @@ def _split_metrics_data( batch_size += 1 if batch_size >= self._max_export_batch_size: - yield MetricsData( - resource_metrics=split_resource_metrics - ) + yield MetricsData(resource_metrics=split_resource_metrics) # Reset all the variables batch_size = 0 split_data_points = [] diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py index 7d396c17a80..4a09594421c 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py @@ -83,10 +83,7 @@ def __init__( endpoint: str | None = None, insecure: bool | None = None, credentials: ChannelCredentials | None = None, - headers: TypingSequence[tuple[str, str]] - | dict[str, str] - | str - | None = None, + headers: TypingSequence[tuple[str, str]] | dict[str, str] | str | None = None, timeout: float | None = None, compression: Compression | None = None, channel_options: tuple[tuple[str, str]] | None = None, @@ -98,10 +95,7 @@ def __init__( if insecure is None and insecure_spans is not None: insecure = insecure_spans.lower() == "true" - if ( - not insecure - and environ.get(OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE) is not None - ): + if not insecure and environ.get(OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE) is not None: credentials = _get_credentials( credentials, _OTEL_PYTHON_EXPORTER_OTLP_GRPC_TRACES_CREDENTIAL_PROVIDER, @@ -111,22 +105,17 @@ def __init__( ) environ_timeout = environ.get(OTEL_EXPORTER_OTLP_TRACES_TIMEOUT) - environ_timeout = ( - float(environ_timeout) if environ_timeout is not None else None - ) + environ_timeout = float(environ_timeout) if environ_timeout is not None else None compression = ( - environ_to_compression(OTEL_EXPORTER_OTLP_TRACES_COMPRESSION) - if compression is None - else compression + environ_to_compression(OTEL_EXPORTER_OTLP_TRACES_COMPRESSION) if compression is None else compression ) OTLPExporterMixin.__init__( self, stub=TraceServiceStub, result=SpanExportResult, - endpoint=endpoint - or environ.get(OTEL_EXPORTER_OTLP_TRACES_ENDPOINT), + endpoint=endpoint or environ.get(OTEL_EXPORTER_OTLP_TRACES_ENDPOINT), insecure=insecure, credentials=credentials, headers=headers or environ.get(OTEL_EXPORTER_OTLP_TRACES_HEADERS), @@ -139,9 +128,7 @@ def __init__( meter_provider=meter_provider, ) - def _translate_data( - self, data: Sequence[ReadableSpan] - ) -> ExportTraceServiceRequest: + def _translate_data(self, data: Sequence[ReadableSpan]) -> ExportTraceServiceRequest: return encode_spans(data) def _count_data(self, data: Sequence[ReadableSpan]): diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py index 5f501cd96eb..8b8954d6cb7 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/logs/test_otlp_logs_exporter.py @@ -73,9 +73,7 @@ def setUp(self): attributes={"a": 1, "b": "c"}, ), resource=SDKResource({"key": "value"}), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) ctx_log_data_2 = set_span_in_context( NonRecordingSpan( @@ -97,9 +95,7 @@ def setUp(self): attributes={"custom_attr": [1, 2, 3]}, ), resource=SDKResource({"key": "value"}), - instrumentation_scope=InstrumentationScope( - "second_name", "second_version" - ), + instrumentation_scope=InstrumentationScope("second_name", "second_version"), ) ctx_log_data_3 = set_span_in_context( NonRecordingSpan( @@ -120,14 +116,10 @@ def setUp(self): body="Mumbai, Boil water before drinking", ), resource=SDKResource({"service": "myapp"}), - instrumentation_scope=InstrumentationScope( - "third_name", "third_version" - ), + instrumentation_scope=InstrumentationScope("third_name", "third_version"), ) ctx_log_data_4 = set_span_in_context( - NonRecordingSpan( - SpanContext(0, 5213367945872657629, False, TraceFlags(0x01)) - ) + NonRecordingSpan(SpanContext(0, 5213367945872657629, False, TraceFlags(0x01))) ) self.log_data_4 = ReadWriteLogRecord( LogRecord( @@ -138,9 +130,7 @@ def setUp(self): body="Invalid trace id check", ), resource=SDKResource({"service": "myapp"}), - instrumentation_scope=InstrumentationScope( - "fourth_name", "fourth_version" - ), + instrumentation_scope=InstrumentationScope("fourth_name", "fourth_version"), ) ctx_log_data_5 = set_span_in_context( NonRecordingSpan( @@ -161,9 +151,7 @@ def setUp(self): body="Invalid span id check", ), resource=SDKResource({"service": "myapp"}), - instrumentation_scope=InstrumentationScope( - "fifth_name", "fifth_version" - ), + instrumentation_scope=InstrumentationScope("fifth_name", "fifth_version"), ) def test_exporting(self): @@ -179,9 +167,7 @@ def test_exporting(self): OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") def test_env_variables(self, mock_exporter_mixin): OTLPLogExporter() @@ -198,20 +184,15 @@ def test_env_variables(self, mock_exporter_mixin): "os.environ", { OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: "logs:4317", - OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: THIS_DIR - + "/../fixtures/test.cert", - OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: THIS_DIR - + "/../fixtures/test-client-cert.pem", - OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: THIS_DIR - + "/../fixtures/test-client-key.pem", + OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: THIS_DIR + "/../fixtures/test.cert", + OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE: THIS_DIR + "/../fixtures/test-client-cert.pem", + OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY: THIS_DIR + "/../fixtures/test-client-key.pem", OTEL_EXPORTER_OTLP_LOGS_HEADERS: " key1=value1,KEY2 = VALUE=2", OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: "10", OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") def test_env_variables_with_client_certificates(self, mock_exporter_mixin): OTLPLogExporter() @@ -228,20 +209,15 @@ def test_env_variables_with_client_certificates(self, mock_exporter_mixin): "os.environ", { OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: "logs:4317", - OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: THIS_DIR - + "/../fixtures/test.cert", + OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: THIS_DIR + "/../fixtures/test.cert", OTEL_EXPORTER_OTLP_LOGS_HEADERS: " key1=value1,KEY2 = VALUE=2", OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: "10", OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") @patch("logging.Logger.error") - def test_env_variables_with_only_certificate( - self, mock_logger_error, mock_exporter_mixin - ): + def test_env_variables_with_only_certificate(self, mock_logger_error, mock_exporter_mixin): OTLPLogExporter() self.assertTrue(len(mock_exporter_mixin.call_args_list) == 1) @@ -259,20 +235,15 @@ def test_env_variables_with_only_certificate( "os.environ", { OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: "logs:4317", - OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: THIS_DIR - + "/../fixtures/test.cert", + OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE: THIS_DIR + "/../fixtures/test.cert", OTEL_EXPORTER_OTLP_LOGS_HEADERS: " key1=value1,KEY2 = VALUE=2", OTEL_EXPORTER_OTLP_LOGS_TIMEOUT: "10", OTEL_EXPORTER_OTLP_LOGS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") @patch("logging.Logger.error") - def test_kwargs_have_precedence_over_env_variables( - self, mock_logger_error, mock_exporter_mixin - ): + def test_kwargs_have_precedence_over_env_variables(self, mock_logger_error, mock_exporter_mixin): credentials_mock = Mock() OTLPLogExporter( endpoint="logs:4318", @@ -298,11 +269,7 @@ def export_log_and_deserialize(self, log_data): # pylint: disable=protected-access translated_data = self.exporter._translate_data([log_data]) request_dict = MessageToDict(translated_data) - log_records = ( - request_dict.get("resourceLogs")[0] - .get("scopeLogs")[0] - .get("logRecords") - ) + log_records = request_dict.get("resourceLogs")[0].get("scopeLogs")[0].get("logRecords") return log_records def test_exported_log_without_trace_id(self): @@ -337,16 +304,12 @@ def test_translate_log_data(self): ResourceLogs( resource=OTLPResource( attributes=[ - KeyValue( - key="key", value=AnyValue(string_value="value") - ), + KeyValue(key="key", value=AnyValue(string_value="value")), ] ), scope_logs=[ ScopeLogs( - scope=PB2InstrumentationScope( - name="first_name", version="first_version" - ), + scope=PB2InstrumentationScope(name="first_name", version="first_version"), log_records=[ PB2LogRecord( # pylint: disable=no-member @@ -354,17 +317,13 @@ def test_translate_log_data(self): observed_time_unix_nano=self.log_data_1.log_record.observed_timestamp, severity_number=self.log_data_1.log_record.severity_number.value, severity_text="WARNING", - span_id=int.to_bytes( - 5213367945872657620, 8, "big" - ), + span_id=int.to_bytes(5213367945872657620, 8, "big"), trace_id=int.to_bytes( 2604504634922341076776623263868986797, 16, "big", ), - body=_encode_value( - "Zhengzhou, We have a heaviest rains in 1000 years" - ), + body=_encode_value("Zhengzhou, We have a heaviest rains in 1000 years"), attributes=[ KeyValue( key="a", @@ -375,9 +334,7 @@ def test_translate_log_data(self): value=AnyValue(string_value="c"), ), ], - flags=int( - self.log_data_1.log_record.trace_flags - ), + flags=int(self.log_data_1.log_record.trace_flags), ) ], ) @@ -387,9 +344,7 @@ def test_translate_log_data(self): ) # pylint: disable=protected-access - self.assertEqual( - expected, self.exporter._translate_data([self.log_data_1]) - ) + self.assertEqual(expected, self.exporter._translate_data([self.log_data_1])) def test_count_log_data(self): # pylint: disable=protected-access @@ -401,16 +356,12 @@ def test_translate_multiple_logs(self): ResourceLogs( resource=OTLPResource( attributes=[ - KeyValue( - key="key", value=AnyValue(string_value="value") - ), + KeyValue(key="key", value=AnyValue(string_value="value")), ] ), scope_logs=[ ScopeLogs( - scope=PB2InstrumentationScope( - name="first_name", version="first_version" - ), + scope=PB2InstrumentationScope(name="first_name", version="first_version"), log_records=[ PB2LogRecord( # pylint: disable=no-member @@ -418,17 +369,13 @@ def test_translate_multiple_logs(self): observed_time_unix_nano=self.log_data_1.log_record.observed_timestamp, severity_number=self.log_data_1.log_record.severity_number.value, severity_text="WARNING", - span_id=int.to_bytes( - 5213367945872657620, 8, "big" - ), + span_id=int.to_bytes(5213367945872657620, 8, "big"), trace_id=int.to_bytes( 2604504634922341076776623263868986797, 16, "big", ), - body=_encode_value( - "Zhengzhou, We have a heaviest rains in 1000 years" - ), + body=_encode_value("Zhengzhou, We have a heaviest rains in 1000 years"), attributes=[ KeyValue( key="a", @@ -439,16 +386,12 @@ def test_translate_multiple_logs(self): value=AnyValue(string_value="c"), ), ], - flags=int( - self.log_data_1.log_record.trace_flags - ), + flags=int(self.log_data_1.log_record.trace_flags), ) ], ), ScopeLogs( - scope=PB2InstrumentationScope( - name="second_name", version="second_version" - ), + scope=PB2InstrumentationScope(name="second_name", version="second_version"), log_records=[ PB2LogRecord( # pylint: disable=no-member @@ -456,26 +399,20 @@ def test_translate_multiple_logs(self): observed_time_unix_nano=self.log_data_2.log_record.observed_timestamp, severity_number=self.log_data_2.log_record.severity_number.value, severity_text="INFO", - span_id=int.to_bytes( - 5213367945872657623, 8, "big" - ), + span_id=int.to_bytes(5213367945872657623, 8, "big"), trace_id=int.to_bytes( 2604504634922341076776623263868986799, 16, "big", ), - body=_encode_value( - "Sydney, Opera House is closed" - ), + body=_encode_value("Sydney, Opera House is closed"), attributes=[ KeyValue( key="custom_attr", value=_encode_value([1, 2, 3]), ), ], - flags=int( - self.log_data_2.log_record.trace_flags - ), + flags=int(self.log_data_2.log_record.trace_flags), ) ], ), @@ -492,9 +429,7 @@ def test_translate_multiple_logs(self): ), scope_logs=[ ScopeLogs( - scope=PB2InstrumentationScope( - name="third_name", version="third_version" - ), + scope=PB2InstrumentationScope(name="third_name", version="third_version"), log_records=[ PB2LogRecord( # pylint: disable=no-member @@ -502,21 +437,15 @@ def test_translate_multiple_logs(self): observed_time_unix_nano=self.log_data_3.log_record.observed_timestamp, severity_number=self.log_data_3.log_record.severity_number.value, severity_text="ERROR", - span_id=int.to_bytes( - 5213367945872657628, 8, "big" - ), + span_id=int.to_bytes(5213367945872657628, 8, "big"), trace_id=int.to_bytes( 2604504634922341076776623263868986800, 16, "big", ), - body=_encode_value( - "Mumbai, Boil water before drinking" - ), + body=_encode_value("Mumbai, Boil water before drinking"), attributes=[], - flags=int( - self.log_data_3.log_record.trace_flags - ), + flags=int(self.log_data_3.log_record.trace_flags), ) ], ) @@ -528,16 +457,12 @@ def test_translate_multiple_logs(self): # pylint: disable=protected-access self.assertEqual( expected, - self.exporter._translate_data( - [self.log_data_1, self.log_data_2, self.log_data_3] - ), + self.exporter._translate_data([self.log_data_1, self.log_data_2, self.log_data_3]), ) def test_count_multiple_logs(self): self.assertEqual( 3, # pylint: disable=protected-access - self.exporter._count_data( - [self.log_data_1, self.log_data_2, self.log_data_3] - ), + self.exporter._count_data([self.log_data_1, self.log_data_2, self.log_data_3]), ) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py index 47764de5fd6..00e25122ee9 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_exporter_mixin.py @@ -84,9 +84,7 @@ def __init__(self, **kwargs): **kwargs, ) - def _translate_data( - self, data: Sequence[ReadableSpan] - ) -> ExportTraceServiceRequest: + def _translate_data(self, data: Sequence[ReadableSpan]) -> ExportTraceServiceRequest: return encode_spans(data) def _count_data(self, data: Sequence[ReadableSpan]) -> int: @@ -127,11 +125,7 @@ def Export(self, request, context): ( ( "google.rpc.retryinfo-bin", - RetryInfo( - retry_delay=Duration( - nanos=self.optional_retry_nanos - ) - ).SerializeToString(), + RetryInfo(retry_delay=Duration(nanos=self.optional_retry_nanos)).SerializeToString(), ), ) ) @@ -175,12 +169,8 @@ def setUp(self): self.server.start() self.metric_reader = InMemoryMetricReader() - self.meter_provider = MeterProvider( - metric_readers=[self.metric_reader] - ) - self.exporter = OTLPSpanExporterForTesting( - insecure=True, meter_provider=self.meter_provider - ) + self.meter_provider = MeterProvider(metric_readers=[self.metric_reader]) + self.exporter = OTLPSpanExporterForTesting(insecure=True, meter_provider=self.meter_provider) self.span = _Span( "a", context=Mock( @@ -267,13 +257,9 @@ def test_environ_to_compression(self): "test_invalid": "some invalid compression", }, ): + self.assertEqual(environ_to_compression("test_gzip"), Compression.Gzip) self.assertEqual( - environ_to_compression("test_gzip"), Compression.Gzip - ) - self.assertEqual( - environ_to_compression( - "test_gzip_caseinsensitive_with_whitespace" - ), + environ_to_compression("test_gzip_caseinsensitive_with_whitespace"), Compression.Gzip, ) self.assertIsNone( @@ -285,9 +271,7 @@ def test_environ_to_compression(self): # pylint: disable=no-self-use @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel") @patch.dict("os.environ", {}) - def test_otlp_exporter_otlp_compression_unspecified( - self, mock_insecure_channel - ): + def test_otlp_exporter_otlp_compression_unspecified(self, mock_insecure_channel): """No env or kwarg should be NoCompression""" OTLPSpanExporterForTesting(insecure=True) mock_insecure_channel.assert_called_once_with( @@ -303,9 +287,7 @@ def test_otlp_exporter_otlp_compression_unspecified( @patch.dict( "os.environ", - { - _OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER: "credential_provider" - }, + {_OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER: "credential_provider"}, ) @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.entry_points") def test_that_credential_gets_passed_to_exporter(self, mock_entry_points): @@ -314,18 +296,14 @@ def test_that_credential_gets_passed_to_exporter(self, mock_entry_points): def f(): return credential - mock_entry_points.configure_mock( - return_value=[IterEntryPoint("custom_credential", f)] - ) + mock_entry_points.configure_mock(return_value=[IterEntryPoint("custom_credential", f)]) exporter = OTLPSpanExporterForTesting(insecure=False) # pylint: disable=protected-access assert exporter._credentials is credential @patch.dict( "os.environ", - { - _OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER: "credential_provider" - }, + {_OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER: "credential_provider"}, ) def test_that_missing_entry_point_raises_exception(self): with self.assertRaises(RuntimeError): @@ -333,41 +311,29 @@ def test_that_missing_entry_point_raises_exception(self): @patch.dict( "os.environ", - { - _OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER: "credential_provider" - }, + {_OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER: "credential_provider"}, ) @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.entry_points") - def test_that_entry_point_returning_bad_type_raises_exception( - self, mock_entry_points - ): + def test_that_entry_point_returning_bad_type_raises_exception(self, mock_entry_points): def f(): return 1 - mock_entry_points.configure_mock( - return_value=[IterEntryPoint("custom_credential", f)] - ) + mock_entry_points.configure_mock(return_value=[IterEntryPoint("custom_credential", f)]) with self.assertRaises(RuntimeError): OTLPSpanExporterForTesting(insecure=False) # pylint: disable=no-self-use, disable=unused-argument - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials") @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel") @patch.dict("os.environ", {}) - def test_no_credentials_ssl_channel_called( - self, secure_channel, mock_ssl_channel - ): + def test_no_credentials_ssl_channel_called(self, secure_channel, mock_ssl_channel): OTLPSpanExporterForTesting(insecure=False) self.assertTrue(mock_ssl_channel.called) # pylint: disable=no-self-use @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel") @patch.dict("os.environ", {OTEL_EXPORTER_OTLP_COMPRESSION: "gzip"}) - def test_otlp_exporter_otlp_compression_envvar( - self, mock_insecure_channel - ): + def test_otlp_exporter_otlp_compression_envvar(self, mock_insecure_channel): """Just OTEL_EXPORTER_OTLP_COMPRESSION should work""" OTLPSpanExporterForTesting(insecure=True) mock_insecure_channel.assert_called_once_with( @@ -381,45 +347,29 @@ def test_otlp_exporter_otlp_compression_envvar( ), ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "}) def test_shutdown(self): add_TraceServiceServicer_to_server( TraceServiceServicerWithExportParams(StatusCode.OK), self.server, ) - exporter = OTLPSpanExporterForTesting( - insecure=True, meter_provider=self.meter_provider - ) - self.assertEqual( - exporter.export([self.span]), SpanExportResult.SUCCESS - ) + exporter = OTLPSpanExporterForTesting(insecure=True, meter_provider=self.meter_provider) + self.assertEqual(exporter.export([self.span]), SpanExportResult.SUCCESS) metrics_data = self.metric_reader.get_metrics_data() scope_metrics = metrics_data.resource_metrics[0].scope_metrics[0] self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) self.assertEqual(metrics[1].name, "otel.sdk.exporter.span.exported") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) self.assertEqual(metrics[2].name, "otel.sdk.exporter.span.inflight") - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) exporter.shutdown() with self.assertLogs(level=WARNING) as warning: - self.assertEqual( - exporter.export([self.span]), SpanExportResult.FAILURE - ) + self.assertEqual(exporter.export([self.span]), SpanExportResult.FAILURE) self.assertEqual( warning.records[0].message, "Exporter already shutdown, ignoring batch", @@ -437,9 +387,7 @@ def test_shutdown_interrupts_export_retry_backoff(self): self.server, ) - export_thread = ThreadWithReturnValue( - target=self.exporter.export, args=([self.span],) - ) + export_thread = ThreadWithReturnValue(target=self.exporter.export, args=([self.span],)) with self.assertLogs(level=WARNING) as warning: begin_wait = time.time() export_thread.start() @@ -472,17 +420,13 @@ def test_export_over_closed_grpc_channel(self): data = self.exporter._translate_data([self.span]) with self.assertRaises(ValueError) as err: self.exporter._client.Export(request=data) - self.assertEqual( - str(err.exception), "Cannot invoke RPC on closed channel!" - ) + self.assertEqual(str(err.exception), "Cannot invoke RPC on closed channel!") @unittest.skipIf( system() == "Windows", "For gRPC + windows there's some added delay in the RPCs which breaks the assertion over amount of time passed.", ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_retry_info_is_respected(self): mock_trace_service = TraceServiceServicerWithExportParams( StatusCode.UNAVAILABLE, @@ -492,9 +436,7 @@ def test_retry_info_is_respected(self): mock_trace_service, self.server, ) - exporter = OTLPSpanExporterForTesting( - insecure=True, timeout=10, meter_provider=self.meter_provider - ) + exporter = OTLPSpanExporterForTesting(insecure=True, timeout=10, meter_provider=self.meter_provider) before = time.time() self.assertEqual( exporter.export([self.span]), @@ -510,26 +452,18 @@ def test_retry_info_is_respected(self): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) self.assertEqual( metrics[0].data.data_points[0].attributes["error.type"], "_InactiveRpcError", ) self.assertEqual( - metrics[0] - .data.data_points[0] - .attributes["rpc.response.status_code"], + metrics[0].data.data_points[0].attributes["rpc.response.status_code"], "UNAVAILABLE", ) self.assertEqual(metrics[1].name, "otel.sdk.exporter.span.exported") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) self.assertEqual( metrics[1].data.data_points[0].attributes["error.type"], "_InactiveRpcError", @@ -539,12 +473,8 @@ def test_retry_info_is_respected(self): metrics[1].data.data_points[0].attributes, ) self.assertEqual(metrics[2].name, "otel.sdk.exporter.span.inflight") - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertNotIn( "rpc.response.status_code", metrics[2].data.data_points[0].attributes, @@ -555,9 +485,7 @@ def test_retry_info_is_respected(self): "For gRPC + windows there's some added delay in the RPCs which breaks the assertion over amount of time passed.", ) def test_retry_not_made_if_would_exceed_timeout(self): - mock_trace_service = TraceServiceServicerWithExportParams( - StatusCode.UNAVAILABLE - ) + mock_trace_service = TraceServiceServicerWithExportParams(StatusCode.UNAVAILABLE) add_TraceServiceServicer_to_server( mock_trace_service, self.server, @@ -580,9 +508,7 @@ def test_retry_not_made_if_would_exceed_timeout(self): "For gRPC + windows there's some added delay in the RPCs which breaks the assertion over amount of time passed.", ) def test_timeout_set_correctly(self): - mock_trace_service = TraceServiceServicerWithExportParams( - StatusCode.UNAVAILABLE, optional_export_sleep=0.25 - ) + mock_trace_service = TraceServiceServicerWithExportParams(StatusCode.UNAVAILABLE, optional_export_sleep=0.25) add_TraceServiceServicer_to_server( mock_trace_service, self.server, @@ -611,9 +537,7 @@ def test_channel_options_set_correctly(self): """Test that gRPC channel options are set correctly for keepalive and reconnection""" # This test verifies that the channel is created with the right options # We patch grpc.insecure_channel to ensure it is called without errors - with patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel" - ) as mock_channel: + with patch("opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel") as mock_channel: OTLPSpanExporterForTesting(insecure=True) self.assertTrue(mock_channel.called) @@ -625,13 +549,9 @@ def test_otlp_headers_from_env(self): (), ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_permanent_failure(self): - exporter = OTLPSpanExporterForTesting( - insecure=True, meter_provider=self.meter_provider - ) + exporter = OTLPSpanExporterForTesting(insecure=True, meter_provider=self.meter_provider) with self.assertLogs(level=WARNING) as warning: add_TraceServiceServicer_to_server( TraceServiceServicerWithExportParams( @@ -640,9 +560,7 @@ def test_permanent_failure(self): ), self.server, ) - self.assertEqual( - exporter.export([self.span]), SpanExportResult.FAILURE - ) + self.assertEqual(exporter.export([self.span]), SpanExportResult.FAILURE) self.assertEqual( warning.records[-1].message, "Failed to export traces to localhost:4317, error code: StatusCode.ALREADY_EXISTS, error details: This already exists.", @@ -653,26 +571,18 @@ def test_permanent_failure(self): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) self.assertEqual( metrics[0].data.data_points[0].attributes["error.type"], "_InactiveRpcError", ) self.assertEqual( - metrics[0] - .data.data_points[0] - .attributes["rpc.response.status_code"], + metrics[0].data.data_points[0].attributes["rpc.response.status_code"], "ALREADY_EXISTS", ) self.assertEqual(metrics[1].name, "otel.sdk.exporter.span.exported") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) self.assertEqual( metrics[1].data.data_points[0].attributes["error.type"], "_InactiveRpcError", @@ -682,12 +592,8 @@ def test_permanent_failure(self): metrics[1].data.data_points[0].attributes, ) self.assertEqual(metrics[2].name, "otel.sdk.exporter.span.inflight") - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertNotIn( "rpc.response.status_code", metrics[2].data.data_points[0].attributes, @@ -718,22 +624,14 @@ def test_unavailable_reconnects(self): def test_retryable_error_codes_initialization(self): # pylint: disable=protected-access - self.assertEqual( - self.exporter._retryable_error_codes, _RETRYABLE_ERROR_CODES - ) + self.assertEqual(self.exporter._retryable_error_codes, _RETRYABLE_ERROR_CODES) custom_codes = [StatusCode.INTERNAL, StatusCode.UNKNOWN] - exporter = OTLPSpanExporterForTesting( - insecure=True, retryable_error_codes=custom_codes - ) - self.assertEqual( - exporter._retryable_error_codes, frozenset(custom_codes) - ) + exporter = OTLPSpanExporterForTesting(insecure=True, retryable_error_codes=custom_codes) + self.assertEqual(exporter._retryable_error_codes, frozenset(custom_codes)) @patch.dict( "os.environ", - { - "OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES": ",INTERNAL, unknown,,,dEAdline_Exceeded " - }, + {"OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES": ",INTERNAL, unknown,,,dEAdline_Exceeded "}, ) def test_retryable_error_codes_initialization_from_env(self): expected_codes = frozenset( @@ -762,9 +660,7 @@ def test_retryable_error_codes_custom(self): mock_trace_service, self.server, ) - exporter = OTLPSpanExporterForTesting( - insecure=True, retryable_error_codes=custom_codes, timeout=10 - ) + exporter = OTLPSpanExporterForTesting(insecure=True, retryable_error_codes=custom_codes, timeout=10) self.assertEqual( exporter.export([self.span]), @@ -783,13 +679,7 @@ def test_retryable_error_codes_custom(self): self.assertEqual(mock_trace_service.num_requests, 1) def assert_standard_metric_attrs(self, attributes): - self.assertEqual( - attributes["otel.component.type"], "otlp_grpc_span_exporter" - ) - self.assertTrue( - attributes["otel.component.name"].startswith( - "otlp_grpc_span_exporter/" - ) - ) + self.assertEqual(attributes["otel.component.type"], "otlp_grpc_span_exporter") + self.assertTrue(attributes["otel.component.name"].startswith("otlp_grpc_span_exporter/")) self.assertEqual(attributes["server.address"], "localhost") self.assertEqual(attributes["server.port"], 4317) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_metrics_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_metrics_exporter.py index 496fe3054dc..c565e84426a 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_metrics_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_metrics_exporter.py @@ -99,9 +99,7 @@ def test_exporting(self): ) def test_preferred_temporality(self): # pylint: disable=protected-access - exporter = OTLPMetricExporter( - preferred_temporality={Counter: AggregationTemporality.CUMULATIVE} - ) + exporter = OTLPMetricExporter(preferred_temporality={Counter: AggregationTemporality.CUMULATIVE}) self.assertEqual( exporter._preferred_temporality[Counter], AggregationTemporality.CUMULATIVE, @@ -136,9 +134,7 @@ def test_preferred_temporality(self): OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") def test_env_variables(self, mock_exporter_mixin): OTLPMetricExporter() @@ -155,20 +151,15 @@ def test_env_variables(self, mock_exporter_mixin): "os.environ", { OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "collector:4317", - OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: THIS_DIR - + "/fixtures/test.cert", - OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: THIS_DIR - + "/fixtures/test-client-cert.pem", - OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: THIS_DIR - + "/fixtures/test-client-key.pem", + OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: THIS_DIR + "/fixtures/test.cert", + OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE: THIS_DIR + "/fixtures/test-client-cert.pem", + OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY: THIS_DIR + "/fixtures/test-client-key.pem", OTEL_EXPORTER_OTLP_METRICS_HEADERS: " key1=value1,KEY2 = value=2", OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: "10", OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") def test_env_variables_with_client_certificates(self, mock_exporter_mixin): OTLPMetricExporter() @@ -186,20 +177,15 @@ def test_env_variables_with_client_certificates(self, mock_exporter_mixin): "os.environ", { OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: "collector:4317", - OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: THIS_DIR - + "/fixtures/test.cert", + OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE: THIS_DIR + "/fixtures/test.cert", OTEL_EXPORTER_OTLP_METRICS_HEADERS: " key1=value1,KEY2 = value=2", OTEL_EXPORTER_OTLP_METRICS_TIMEOUT: "10", OTEL_EXPORTER_OTLP_METRICS_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") @patch("logging.Logger.error") - def test_env_variables_with_only_certificate( - self, mock_logger_error, mock_exporter_mixin - ): + def test_env_variables_with_only_certificate(self, mock_logger_error, mock_exporter_mixin): OTLPMetricExporter() self.assertTrue(len(mock_exporter_mixin.call_args_list) == 1) @@ -213,9 +199,7 @@ def test_env_variables_with_only_certificate( mock_logger_error.assert_not_called() - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials") @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel") # pylint: disable=unused-argument def test_no_credentials_error(self, mock_ssl_channel, mock_secure): @@ -226,9 +210,7 @@ def test_no_credentials_error(self, mock_ssl_channel, mock_secure): "os.environ", {OTEL_EXPORTER_OTLP_METRICS_HEADERS: " key1=value1,KEY2 = VALUE=2 "}, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials") @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel") # pylint: disable=unused-argument def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure): @@ -241,9 +223,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure): ("key2", "VALUE=2"), ), ) - exporter = OTLPMetricExporter( - headers=(("key3", "value3"), ("key4", "value4")) - ) + exporter = OTLPMetricExporter(headers=(("key3", "value3"), ("key4", "value4"))) # pylint: disable=protected-access self.assertEqual( exporter._headers, @@ -274,9 +254,7 @@ def test_otlp_insecure_from_env(self, mock_insecure): @patch.dict("os.environ", {OTEL_EXPORTER_OTLP_COMPRESSION: "gzip"}) def test_otlp_exporter_otlp_compression_kwarg(self, mock_insecure_channel): """Specifying kwarg should take precedence over env""" - OTLPMetricExporter( - insecure=True, compression=Compression.NoCompression - ) + OTLPMetricExporter(insecure=True, compression=Compression.NoCompression) mock_insecure_channel.assert_called_once_with( "localhost:4317", compression=Compression.NoCompression, @@ -290,12 +268,8 @@ def test_otlp_exporter_otlp_compression_kwarg(self, mock_insecure_channel): # pylint: disable=no-self-use @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel") - def test_otlp_exporter_otlp_channel_options_kwarg( - self, mock_insecure_channel - ): - OTLPMetricExporter( - insecure=True, channel_options=(("some", "options"),) - ) + def test_otlp_exporter_otlp_channel_options_kwarg(self, mock_insecure_channel): + OTLPMetricExporter(insecure=True, channel_options=(("some", "options"),)) mock_insecure_channel.assert_called_once_with( "localhost:4317", compression=Compression.NoCompression, @@ -651,9 +625,7 @@ def test_aggregation_temporality(self): otlp_metric_exporter = OTLPMetricExporter() - for ( - temporality - ) in otlp_metric_exporter._preferred_temporality.values(): + for temporality in otlp_metric_exporter._preferred_temporality.values(): self.assertEqual(temporality, AggregationTemporality.CUMULATIVE) with patch.dict( @@ -662,25 +634,15 @@ def test_aggregation_temporality(self): ): otlp_metric_exporter = OTLPMetricExporter() - for ( - temporality - ) in otlp_metric_exporter._preferred_temporality.values(): - self.assertEqual( - temporality, AggregationTemporality.CUMULATIVE - ) + for temporality in otlp_metric_exporter._preferred_temporality.values(): + self.assertEqual(temporality, AggregationTemporality.CUMULATIVE) - with patch.dict( - environ, {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "ABC"} - ): + with patch.dict(environ, {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "ABC"}): with self.assertLogs(level=WARNING): otlp_metric_exporter = OTLPMetricExporter() - for ( - temporality - ) in otlp_metric_exporter._preferred_temporality.values(): - self.assertEqual( - temporality, AggregationTemporality.CUMULATIVE - ) + for temporality in otlp_metric_exporter._preferred_temporality.values(): + self.assertEqual(temporality, AggregationTemporality.CUMULATIVE) with patch.dict( environ, @@ -705,9 +667,7 @@ def test_aggregation_temporality(self): AggregationTemporality.DELTA, ) self.assertEqual( - otlp_metric_exporter._preferred_temporality[ - ObservableUpDownCounter - ], + otlp_metric_exporter._preferred_temporality[ObservableUpDownCounter], AggregationTemporality.CUMULATIVE, ) self.assertEqual( @@ -738,9 +698,7 @@ def test_aggregation_temporality(self): AggregationTemporality.CUMULATIVE, ) self.assertEqual( - otlp_metric_exporter._preferred_temporality[ - ObservableUpDownCounter - ], + otlp_metric_exporter._preferred_temporality[ObservableUpDownCounter], AggregationTemporality.CUMULATIVE, ) self.assertEqual( @@ -757,9 +715,7 @@ def test_exponential_explicit_bucket_histogram(self): with patch.dict( environ, - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "base2_exponential_bucket_histogram" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "base2_exponential_bucket_histogram"}, ): self.assertIsInstance( # pylint: disable=protected-access @@ -788,9 +744,7 @@ def test_exponential_explicit_bucket_histogram(self): with patch.dict( environ, - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "explicit_bucket_histogram" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "explicit_bucket_histogram"}, ): self.assertIsInstance( # pylint: disable=protected-access @@ -816,9 +770,7 @@ def test_preferred_aggregation_override(self): ) -def _resource_metrics( - index: int, scope_metrics: list[ScopeMetrics] -) -> ResourceMetrics: +def _resource_metrics(index: int, scope_metrics: list[ScopeMetrics]) -> ResourceMetrics: return ResourceMetrics( resource=Resource( attributes={"a": index}, diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py index 6fce8a0da97..8f153ccc6b3 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/test_otlp_trace_exporter.py @@ -95,17 +95,13 @@ def setUp(self): **{ "context.trace_id": 1, "context.span_id": 2, - "attributes": BoundedAttributes( - attributes={"a": 1, "b": False} - ), + "attributes": BoundedAttributes(attributes={"a": 1, "b": False}), "dropped_attributes": 0, "kind": OTLPSpan.SpanKind.SPAN_KIND_INTERNAL, # pylint: disable=no-member } ) ], - instrumentation_scope=InstrumentationScope( - name="name", version="version" - ), + instrumentation_scope=InstrumentationScope(name="name", version="version"), ) self.span2 = _Span( @@ -117,9 +113,7 @@ def setUp(self): ), resource=SDKResource({"a": 2, "b": False}), parent=Mock(span_id=12345), - instrumentation_scope=InstrumentationScope( - name="name", version="version" - ), + instrumentation_scope=InstrumentationScope(name="name", version="version"), ) self.span3 = _Span( @@ -131,9 +125,7 @@ def setUp(self): ), resource=SDKResource({"a": 1, "b": False}), parent=Mock(span_id=12345), - instrumentation_scope=InstrumentationScope( - name="name2", version="version2" - ), + instrumentation_scope=InstrumentationScope(name="name2", version="version2"), ) self.span.start() @@ -156,9 +148,7 @@ def test_exporting(self): OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") def test_env_variables(self, mock_exporter_mixin): OTLPSpanExporter() self.assertTrue(len(mock_exporter_mixin.call_args_list) == 1) @@ -173,20 +163,15 @@ def test_env_variables(self, mock_exporter_mixin): "os.environ", { OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "collector:4317", - OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: THIS_DIR - + "/fixtures/test.cert", - OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: THIS_DIR - + "/fixtures/test-client-cert.pem", - OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: THIS_DIR - + "/fixtures/test-client-key.pem", + OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: THIS_DIR + "/fixtures/test.cert", + OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE: THIS_DIR + "/fixtures/test-client-cert.pem", + OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY: THIS_DIR + "/fixtures/test-client-key.pem", OTEL_EXPORTER_OTLP_TRACES_HEADERS: " key1=value1,KEY2 = value=2", OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "10", OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") def test_env_variables_with_client_certificates(self, mock_exporter_mixin): OTLPSpanExporter() @@ -203,20 +188,15 @@ def test_env_variables_with_client_certificates(self, mock_exporter_mixin): "os.environ", { OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "collector:4317", - OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: THIS_DIR - + "/fixtures/test.cert", + OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE: THIS_DIR + "/fixtures/test.cert", OTEL_EXPORTER_OTLP_TRACES_HEADERS: " key1=value1,KEY2 = value=2", OTEL_EXPORTER_OTLP_TRACES_TIMEOUT: "10", OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "gzip", }, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.OTLPExporterMixin.__init__") @patch("logging.Logger.error") - def test_env_variables_with_only_certificate( - self, mock_logger_error, mock_exporter_mixin - ): + def test_env_variables_with_only_certificate(self, mock_logger_error, mock_exporter_mixin): OTLPSpanExporter() self.assertTrue(len(mock_exporter_mixin.call_args_list) == 1) @@ -230,9 +210,7 @@ def test_env_variables_with_only_certificate( mock_logger_error.assert_not_called() - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials") @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel") # pylint: disable=unused-argument def test_no_credentials_error(self, mock_ssl_channel, mock_secure): @@ -243,9 +221,7 @@ def test_no_credentials_error(self, mock_ssl_channel, mock_secure): "os.environ", {OTEL_EXPORTER_OTLP_TRACES_HEADERS: " key1=value1,KEY2 = VALUE=2 "}, ) - @patch( - "opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials" - ) + @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.ssl_channel_credentials") @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.secure_channel") # pylint: disable=unused-argument def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure): @@ -258,9 +234,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure): ("key2", "VALUE=2"), ), ) - exporter = OTLPSpanExporter( - headers=(("key3", "value3"), ("key4", "value4")) - ) + exporter = OTLPSpanExporter(headers=(("key3", "value3"), ("key4", "value4"))) # pylint: disable=protected-access self.assertEqual( exporter._headers, @@ -269,9 +243,7 @@ def test_otlp_headers_from_env(self, mock_ssl_channel, mock_secure): ("key4", "value4"), ), ) - exporter = OTLPSpanExporter( - headers={"key5": "value5", "key6": "value6"} - ) + exporter = OTLPSpanExporter(headers={"key5": "value5", "key6": "value6"}) # pylint: disable=protected-access self.assertEqual( exporter._headers, @@ -320,9 +292,7 @@ def test_otlp_exporter_otlp_compression_kwarg(self, mock_insecure_channel): "os.environ", {OTEL_EXPORTER_OTLP_TRACES_COMPRESSION: "gzip"}, ) - def test_otlp_exporter_otlp_compression_precendence( - self, mock_insecure_channel - ): + def test_otlp_exporter_otlp_compression_precendence(self, mock_insecure_channel): """OTEL_EXPORTER_OTLP_TRACES_COMPRESSION as higher priority than OTEL_EXPORTER_OTLP_COMPRESSION """ @@ -340,9 +310,7 @@ def test_otlp_exporter_otlp_compression_precendence( # pylint: disable=no-self-use @patch("opentelemetry.exporter.otlp.proto.grpc.exporter.insecure_channel") - def test_otlp_exporter_otlp_channel_options_kwarg( - self, mock_insecure_channel - ): + def test_otlp_exporter_otlp_channel_options_kwarg(self, mock_insecure_channel): OTLPSpanExporter(insecure=True, channel_options=(("some", "options"),)) mock_insecure_channel.assert_called_once_with( "localhost:4317", @@ -363,16 +331,12 @@ def test_translate_spans(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_spans=[ ScopeSpans( - scope=PB2InstrumentationScope( - name="name", version="version" - ), + scope=PB2InstrumentationScope(name="name", version="version"), spans=[ OTLPSpan( # pylint: disable=no-member @@ -380,20 +344,14 @@ def test_translate_spans(self): start_time_unix_nano=self.span.start_time, end_time_unix_nano=self.span.end_time, trace_state="a=b,c=d", - span_id=int.to_bytes( - 10217189687419569865, 8, "big" - ), + span_id=int.to_bytes(10217189687419569865, 8, "big"), trace_id=int.to_bytes( 67545097771067222548457157018666467027, 16, "big", ), - parent_span_id=( - b"\000\000\000\000\000\00009" - ), - kind=( - OTLPSpan.SpanKind.SPAN_KIND_INTERNAL - ), + parent_span_id=(b"\000\000\000\000\000\00009"), + kind=(OTLPSpan.SpanKind.SPAN_KIND_INTERNAL), attributes=[ KeyValue( key="a", @@ -411,15 +369,11 @@ def test_translate_spans(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=False - ), + value=AnyValue(bool_value=False), ), ], ) @@ -427,22 +381,16 @@ def test_translate_spans(self): status=Status(code=0, message=""), links=[ OTLPSpan.Link( - trace_id=int.to_bytes( - 1, 16, "big" - ), + trace_id=int.to_bytes(1, 16, "big"), span_id=int.to_bytes(2, 8, "big"), attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=False - ), + value=AnyValue(bool_value=False), ), ], flags=0x300, @@ -471,16 +419,12 @@ def test_translate_spans_multi(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=1)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_spans=[ ScopeSpans( - scope=PB2InstrumentationScope( - name="name", version="version" - ), + scope=PB2InstrumentationScope(name="name", version="version"), spans=[ OTLPSpan( # pylint: disable=no-member @@ -488,20 +432,14 @@ def test_translate_spans_multi(self): start_time_unix_nano=self.span.start_time, end_time_unix_nano=self.span.end_time, trace_state="a=b,c=d", - span_id=int.to_bytes( - 10217189687419569865, 8, "big" - ), + span_id=int.to_bytes(10217189687419569865, 8, "big"), trace_id=int.to_bytes( 67545097771067222548457157018666467027, 16, "big", ), - parent_span_id=( - b"\000\000\000\000\000\00009" - ), - kind=( - OTLPSpan.SpanKind.SPAN_KIND_INTERNAL - ), + parent_span_id=(b"\000\000\000\000\000\00009"), + kind=(OTLPSpan.SpanKind.SPAN_KIND_INTERNAL), attributes=[ KeyValue( key="a", @@ -519,15 +457,11 @@ def test_translate_spans_multi(self): attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=False - ), + value=AnyValue(bool_value=False), ), ], ) @@ -535,22 +469,16 @@ def test_translate_spans_multi(self): status=Status(code=0, message=""), links=[ OTLPSpan.Link( - trace_id=int.to_bytes( - 1, 16, "big" - ), + trace_id=int.to_bytes(1, 16, "big"), span_id=int.to_bytes(2, 8, "big"), attributes=[ KeyValue( key="a", - value=AnyValue( - int_value=1 - ), + value=AnyValue(int_value=1), ), KeyValue( key="b", - value=AnyValue( - bool_value=False - ), + value=AnyValue(bool_value=False), ), ], flags=0x300, @@ -561,9 +489,7 @@ def test_translate_spans_multi(self): ], ), ScopeSpans( - scope=PB2InstrumentationScope( - name="name2", version="version2" - ), + scope=PB2InstrumentationScope(name="name2", version="version2"), spans=[ OTLPSpan( # pylint: disable=no-member @@ -571,20 +497,14 @@ def test_translate_spans_multi(self): start_time_unix_nano=self.span3.start_time, end_time_unix_nano=self.span3.end_time, trace_state="a=b,c=d", - span_id=int.to_bytes( - 10217189687419569865, 8, "big" - ), + span_id=int.to_bytes(10217189687419569865, 8, "big"), trace_id=int.to_bytes( 67545097771067222548457157018666467027, 16, "big", ), - parent_span_id=( - b"\000\000\000\000\000\00009" - ), - kind=( - OTLPSpan.SpanKind.SPAN_KIND_INTERNAL - ), + parent_span_id=(b"\000\000\000\000\000\00009"), + kind=(OTLPSpan.SpanKind.SPAN_KIND_INTERNAL), status=Status(code=0, message=""), flags=0x300, ) @@ -596,16 +516,12 @@ def test_translate_spans_multi(self): resource=OTLPResource( attributes=[ KeyValue(key="a", value=AnyValue(int_value=2)), - KeyValue( - key="b", value=AnyValue(bool_value=False) - ), + KeyValue(key="b", value=AnyValue(bool_value=False)), ] ), scope_spans=[ ScopeSpans( - scope=PB2InstrumentationScope( - name="name", version="version" - ), + scope=PB2InstrumentationScope(name="name", version="version"), spans=[ OTLPSpan( # pylint: disable=no-member @@ -613,20 +529,14 @@ def test_translate_spans_multi(self): start_time_unix_nano=self.span2.start_time, end_time_unix_nano=self.span2.end_time, trace_state="a=b,c=d", - span_id=int.to_bytes( - 10217189687419569865, 8, "big" - ), + span_id=int.to_bytes(10217189687419569865, 8, "big"), trace_id=int.to_bytes( 67545097771067222548457157018666467027, 16, "big", ), - parent_span_id=( - b"\000\000\000\000\000\00009" - ), - kind=( - OTLPSpan.SpanKind.SPAN_KIND_INTERNAL - ), + parent_span_id=(b"\000\000\000\000\000\00009"), + kind=(OTLPSpan.SpanKind.SPAN_KIND_INTERNAL), status=Status(code=0, message=""), flags=0x300, ) @@ -667,15 +577,9 @@ def test_span_status_translate(self): unset = SDKStatus(status_code=SDKStatusCode.UNSET) ok = SDKStatus(status_code=SDKStatusCode.OK) error = SDKStatus(status_code=SDKStatusCode.ERROR) - unset_translated = self.exporter._translate_data( - [_create_span_with_status(unset)] - ) - ok_translated = self.exporter._translate_data( - [_create_span_with_status(ok)] - ) - error_translated = self.exporter._translate_data( - [_create_span_with_status(error)] - ) + unset_translated = self.exporter._translate_data([_create_span_with_status(unset)]) + ok_translated = self.exporter._translate_data([_create_span_with_status(ok)]) + error_translated = self.exporter._translate_data([_create_span_with_status(error)]) self._check_translated_status( unset_translated, Status.STATUS_CODE_UNSET, @@ -733,40 +637,23 @@ def test_dropped_values(self): translated = self.exporter._translate_data([span]) self.assertEqual( 1, - translated.resource_spans[0] - .scope_spans[0] - .spans[0] - .dropped_links_count, + translated.resource_spans[0].scope_spans[0].spans[0].dropped_links_count, ) self.assertEqual( 2, - translated.resource_spans[0] - .scope_spans[0] - .spans[0] - .dropped_attributes_count, + translated.resource_spans[0].scope_spans[0].spans[0].dropped_attributes_count, ) self.assertEqual( 3, - translated.resource_spans[0] - .scope_spans[0] - .spans[0] - .dropped_events_count, + translated.resource_spans[0].scope_spans[0].spans[0].dropped_events_count, ) self.assertEqual( 2, - translated.resource_spans[0] - .scope_spans[0] - .spans[0] - .links[0] - .dropped_attributes_count, + translated.resource_spans[0].scope_spans[0].spans[0].links[0].dropped_attributes_count, ) self.assertEqual( 2, - translated.resource_spans[0] - .scope_spans[0] - .spans[0] - .events[0] - .dropped_attributes_count, + translated.resource_spans[0].scope_spans[0].spans[0].events[0].dropped_attributes_count, ) @@ -779,9 +666,7 @@ def _create_span_with_status(status: SDKStatus): trace_id=67545097771067222548457157018666467027, ), parent=Mock(span_id=12345), - instrumentation_scope=InstrumentationScope( - name="name", version="version" - ), + instrumentation_scope=InstrumentationScope(name="name", version="version"), ) span.set_status(status) return span diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_common/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_common/__init__.py index 46db16dd86a..b5959300df0 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_common/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_common/__init__.py @@ -31,9 +31,7 @@ def _is_retryable(resp: requests.Response) -> bool: return False -def _is_request_too_large( - serialized_data: bytes, max_request_size: int -) -> bool: +def _is_request_too_large(serialized_data: bytes, max_request_size: int) -> bool: """Return True if the serialized request exceeds a positive size limit. The size is measured on the uncompressed serialized request, matching the @@ -51,9 +49,7 @@ def _load_session_from_envvar( "OTEL_PYTHON_EXPORTER_OTLP_HTTP_METRICS_CREDENTIAL_PROVIDER", ], ) -> requests.Session | None: - _credential_env = environ.get( - _OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER - ) or environ.get(cred_envvar) + _credential_env = environ.get(_OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER) or environ.get(cred_envvar) if _credential_env: try: maybe_session = next( diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py index c25ebec6756..c7b1decc966 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py @@ -116,9 +116,7 @@ def __init__( self._shutdown_is_occuring = threading.Event() self._endpoint = endpoint or environ.get( OTEL_EXPORTER_OTLP_LOGS_ENDPOINT, - _append_logs_path( - environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_ENDPOINT) - ), + _append_logs_path(environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_ENDPOINT)), ) # Keeping these as instance variables because they are used in tests self._certificate_file = certificate_file or environ.get( @@ -142,26 +140,18 @@ def __init__( OTEL_EXPORTER_OTLP_LOGS_HEADERS, environ.get(OTEL_EXPORTER_OTLP_HEADERS, ""), ) - self._headers = headers or parse_env_headers( - headers_string, liberal=True - ) + self._headers = headers or parse_env_headers(headers_string, liberal=True) self._timeout = timeout or float( environ.get( OTEL_EXPORTER_OTLP_LOGS_TIMEOUT, environ.get(OTEL_EXPORTER_OTLP_TIMEOUT, DEFAULT_TIMEOUT), ) ) - self._max_request_size = ( - _DEFAULT_MAX_REQUEST_SIZE - if max_request_size is None - else max_request_size - ) + self._max_request_size = _DEFAULT_MAX_REQUEST_SIZE if max_request_size is None else max_request_size self._compression = compression or _compression_from_env() self._session = ( session - or _load_session_from_envvar( - _OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER - ) + or _load_session_from_envvar(_OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER) or requests.Session() ) self._session.headers.update(self._headers) @@ -169,9 +159,7 @@ def __init__( # let users override our defaults self._session.headers.update(self._headers) if self._compression is not Compression.NoCompression: - self._session.headers.update( - {"Content-Encoding": self._compression.value} - ) + self._session.headers.update({"Content-Encoding": self._compression.value}) self._shutdown = False self._metrics = create_exporter_metrics( @@ -179,15 +167,10 @@ def __init__( "logs", urlparse(self._endpoint), meter_provider, - os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "") - .strip() - .lower() - == "true", + os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "").strip().lower() == "true", ) - def _export( - self, serialized_data: bytes, timeout_sec: float | None = None - ): + def _export(self, serialized_data: bytes, timeout_sec: float | None = None): data = serialized_data if self._compression == Compression.Gzip: gzip_data = BytesIO() @@ -222,9 +205,7 @@ def _export( ) return resp - def export( - self, batch: Sequence[ReadableLogRecord] - ) -> LogRecordExportResult: + def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: if self._shutdown: _logger.warning("Exporter already shutdown, ignoring batch") return LogRecordExportResult.FAILURE @@ -233,8 +214,7 @@ def export( serialized_data = encode_logs(batch).SerializeToString() if _is_request_too_large(serialized_data, self._max_request_size): _logger.warning( - "Dropping logs batch: serialized size %d bytes exceeds " - "max_request_size %d bytes.", + "Dropping logs batch: serialized size %d bytes exceeds max_request_size %d bytes.", len(serialized_data), self._max_request_size, ) @@ -269,29 +249,14 @@ def export( status_code, reason, ) - error_attrs = ( - {HTTP_RESPONSE_STATUS_CODE: status_code} - if status_code is not None - else None - ) + error_attrs = {HTTP_RESPONSE_STATUS_CODE: status_code} if status_code is not None else None result.error = export_error result.error_attrs = error_attrs return LogRecordExportResult.FAILURE - if ( - retry_num + 1 == _MAX_RETRYS - or backoff_seconds > (deadline_sec - time()) - or self._shutdown - ): - _logger.error( - "Failed to export logs batch due to timeout, " - "max retries or shutdown." - ) - error_attrs = ( - {HTTP_RESPONSE_STATUS_CODE: status_code} - if status_code is not None - else None - ) + if retry_num + 1 == _MAX_RETRYS or backoff_seconds > (deadline_sec - time()) or self._shutdown: + _logger.error("Failed to export logs batch due to timeout, max retries or shutdown.") + error_attrs = {HTTP_RESPONSE_STATUS_CODE: status_code} if status_code is not None else None result.error = export_error result.error_attrs = error_attrs return LogRecordExportResult.FAILURE diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py index 728a5066b2f..64ac0d6d237 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/metric_exporter/__init__.py @@ -121,8 +121,7 @@ def __init__( timeout: float | None = None, compression: Compression | None = None, session: requests.Session | None = None, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, max_export_batch_size: int | None = None, *, @@ -161,9 +160,7 @@ def __init__( self._shutdown_in_progress = threading.Event() self._endpoint = endpoint or environ.get( OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, - _append_metrics_path( - environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_ENDPOINT) - ), + _append_metrics_path(environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_ENDPOINT)), ) self._certificate_file = certificate_file or environ.get( OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE, @@ -186,9 +183,7 @@ def __init__( OTEL_EXPORTER_OTLP_METRICS_HEADERS, environ.get(OTEL_EXPORTER_OTLP_HEADERS, ""), ) - self._headers = headers or parse_env_headers( - headers_string, liberal=True - ) + self._headers = headers or parse_env_headers(headers_string, liberal=True) self._timeout = timeout or float( environ.get( OTEL_EXPORTER_OTLP_METRICS_TIMEOUT, @@ -198,9 +193,7 @@ def __init__( self._compression = compression or _compression_from_env() self._session = ( session - or _load_session_from_envvar( - _OTEL_PYTHON_EXPORTER_OTLP_HTTP_METRICS_CREDENTIAL_PROVIDER - ) + or _load_session_from_envvar(_OTEL_PYTHON_EXPORTER_OTLP_HTTP_METRICS_CREDENTIAL_PROVIDER) or requests.Session() ) self._session.headers.update(self._headers) @@ -208,19 +201,11 @@ def __init__( # let users override our defaults self._session.headers.update(self._headers) if self._compression is not Compression.NoCompression: - self._session.headers.update( - {"Content-Encoding": self._compression.value} - ) + self._session.headers.update({"Content-Encoding": self._compression.value}) - self._common_configuration( - preferred_temporality, preferred_aggregation - ) + self._common_configuration(preferred_temporality, preferred_aggregation) self._max_export_batch_size: int | None = max_export_batch_size - self._max_request_size = ( - _DEFAULT_MAX_REQUEST_SIZE - if max_request_size is None - else max_request_size - ) + self._max_request_size = _DEFAULT_MAX_REQUEST_SIZE if max_request_size is None else max_request_size self._shutdown = False self._metrics = create_exporter_metrics( @@ -228,15 +213,10 @@ def __init__( "metrics", urlparse(self._endpoint), meter_provider, - os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "") - .strip() - .lower() - == "true", + os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "").strip().lower() == "true", ) - def _export( - self, serialized_data: bytes, timeout_sec: float | None = None - ): + def _export(self, serialized_data: bytes, timeout_sec: float | None = None): data = serialized_data if self._compression == Compression.Gzip: gzip_data = BytesIO() @@ -290,8 +270,7 @@ def _export_with_retries( serialized_data = export_request.SerializeToString() if _is_request_too_large(serialized_data, self._max_request_size): _logger.warning( - "Dropping metrics batch: serialized size %d bytes exceeds " - "max_request_size %d bytes.", + "Dropping metrics batch: serialized size %d bytes exceeds max_request_size %d bytes.", len(serialized_data), self._max_request_size, ) @@ -326,28 +305,13 @@ def _export_with_retries( status_code, reason, ) - error_attrs = ( - {HTTP_RESPONSE_STATUS_CODE: status_code} - if status_code is not None - else None - ) + error_attrs = {HTTP_RESPONSE_STATUS_CODE: status_code} if status_code is not None else None result.error = export_error result.error_attrs = error_attrs return MetricExportResult.FAILURE - if ( - retry_num + 1 == _MAX_RETRYS - or backoff_seconds > (deadline_sec - time()) - or self._shutdown - ): - _logger.error( - "Failed to export metrics batch due to timeout, " - "max retries or shutdown." - ) - error_attrs = ( - {HTTP_RESPONSE_STATUS_CODE: status_code} - if status_code is not None - else None - ) + if retry_num + 1 == _MAX_RETRYS or backoff_seconds > (deadline_sec - time()) or self._shutdown: + _logger.error("Failed to export metrics batch due to timeout, max retries or shutdown.") + error_attrs = {HTTP_RESPONSE_STATUS_CODE: status_code} if status_code is not None else None result.error = export_error result.error_attrs = error_attrs return MetricExportResult.FAILURE @@ -385,9 +349,7 @@ def export( ) # Else, export in batches of configured size - batched_export_requests = _split_metrics_data( - export_request, self._max_export_batch_size - ) + batched_export_requests = _split_metrics_data(export_request, self._max_export_batch_size) for split_metrics_data in batched_export_requests: export_result = self._export_with_retries( @@ -423,10 +385,7 @@ def set_meter_provider(self, meter_provider: MeterProvider) -> None: "metrics", urlparse(self._endpoint), meter_provider, - os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "") - .strip() - .lower() - == "true", + os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "").strip().lower() == "true", ) @@ -488,9 +447,7 @@ def _split_metrics_data( split_data_points = [] field_name = metric.WhichOneof("data") if not field_name: - _logger.warning( - "Tried to split and export an unsupported metric type. Skipping." - ) + _logger.warning("Tried to split and export an unsupported metric type. Skipping.") continue # Get data container using field name @@ -505,13 +462,9 @@ def _split_metrics_data( }, } if hasattr(data_container, "aggregation_temporality"): - metric_dict[field_name]["aggregation_temporality"] = ( - data_container.aggregation_temporality - ) + metric_dict[field_name]["aggregation_temporality"] = data_container.aggregation_temporality if hasattr(data_container, "is_monotonic"): - metric_dict[field_name]["is_monotonic"] = ( - data_container.is_monotonic - ) + metric_dict[field_name]["is_monotonic"] = data_container.is_monotonic split_metrics.append(metric_dict) current_data_points = data_container.data_points @@ -521,9 +474,7 @@ def _split_metrics_data( if batch_size >= max_export_batch_size: yield ExportMetricsServiceRequest( - resource_metrics=_get_split_resource_metrics_pb2( - split_resource_metrics - ) + resource_metrics=_get_split_resource_metrics_pb2(split_resource_metrics) ) # Reset all the reference variables with current metrics_data position @@ -535,9 +486,7 @@ def _split_metrics_data( # Rebuild metric dict generically using same approach as initial creation field_name = metric.WhichOneof("data") if field_name is None: - _logger.warning( - "Tried to split and export an unsupported metric type. Skipping." - ) + _logger.warning("Tried to split and export an unsupported metric type. Skipping.") continue data_container = getattr(metric, field_name) metric_dict = { @@ -549,13 +498,9 @@ def _split_metrics_data( }, } if hasattr(data_container, "aggregation_temporality"): - metric_dict[field_name][ - "aggregation_temporality" - ] = data_container.aggregation_temporality + metric_dict[field_name]["aggregation_temporality"] = data_container.aggregation_temporality if hasattr(data_container, "is_monotonic"): - metric_dict[field_name]["is_monotonic"] = ( - data_container.is_monotonic - ) + metric_dict[field_name]["is_monotonic"] = data_container.is_monotonic split_metrics = [metric_dict] split_scope_metrics = [ @@ -586,11 +531,7 @@ def _split_metrics_data( split_resource_metrics.pop() if batch_size > 0: - yield ExportMetricsServiceRequest( - resource_metrics=_get_split_resource_metrics_pb2( - split_resource_metrics - ) - ) + yield ExportMetricsServiceRequest(resource_metrics=_get_split_resource_metrics_pb2(split_resource_metrics)) def _get_split_resource_metrics_pb2( @@ -668,9 +609,7 @@ def _get_split_resource_metrics_pb2( unit=metric.get("unit"), sum=pb2.Sum( data_points=[], - aggregation_temporality=metric.get("sum").get( - "aggregation_temporality" - ), + aggregation_temporality=metric.get("sum").get("aggregation_temporality"), is_monotonic=metric.get("sum").get("is_monotonic"), ), ) @@ -682,9 +621,7 @@ def _get_split_resource_metrics_pb2( unit=metric.get("unit"), histogram=pb2.Histogram( data_points=[], - aggregation_temporality=metric.get( - "histogram" - ).get("aggregation_temporality"), + aggregation_temporality=metric.get("histogram").get("aggregation_temporality"), ), ) data_points = metric.get("histogram").get("data_points") @@ -695,14 +632,10 @@ def _get_split_resource_metrics_pb2( unit=metric.get("unit"), exponential_histogram=pb2.ExponentialHistogram( data_points=[], - aggregation_temporality=metric.get( - "exponential_histogram" - ).get("aggregation_temporality"), + aggregation_temporality=metric.get("exponential_histogram").get("aggregation_temporality"), ), ) - data_points = metric.get("exponential_histogram").get( - "data_points" - ) + data_points = metric.get("exponential_histogram").get("data_points") elif "gauge" in metric: new_metric = pb2.Metric( name=metric.get("name"), @@ -724,9 +657,7 @@ def _get_split_resource_metrics_pb2( ) data_points = metric.get("summary").get("data_points") else: - _logger.warning( - "Tried to split and export an unsupported metric type. Skipping." - ) + _logger.warning("Tried to split and export an unsupported metric type. Skipping.") continue # Append data points generically using the field name from the metric dict @@ -740,9 +671,7 @@ def _get_split_resource_metrics_pb2( if field_name in metric: metric_data_container = getattr(new_metric, field_name) for data_point in data_points: - metric_data_container.data_points.append( - data_point - ) + metric_data_container.data_points.append(data_point) break new_scope_metrics.metrics.append(new_metric) diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py index 56d0a92a9e6..306a13340ba 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/trace_exporter/__init__.py @@ -112,9 +112,7 @@ def __init__( self._shutdown_in_progress = threading.Event() self._endpoint = endpoint or environ.get( OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, - _append_trace_path( - environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_ENDPOINT) - ), + _append_trace_path(environ.get(OTEL_EXPORTER_OTLP_ENDPOINT, DEFAULT_ENDPOINT)), ) self._certificate_file = certificate_file or environ.get( OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE, @@ -137,26 +135,18 @@ def __init__( OTEL_EXPORTER_OTLP_TRACES_HEADERS, environ.get(OTEL_EXPORTER_OTLP_HEADERS, ""), ) - self._headers = headers or parse_env_headers( - headers_string, liberal=True - ) + self._headers = headers or parse_env_headers(headers_string, liberal=True) self._timeout = timeout or float( environ.get( OTEL_EXPORTER_OTLP_TRACES_TIMEOUT, environ.get(OTEL_EXPORTER_OTLP_TIMEOUT, DEFAULT_TIMEOUT), ) ) - self._max_request_size = ( - _DEFAULT_MAX_REQUEST_SIZE - if max_request_size is None - else max_request_size - ) + self._max_request_size = _DEFAULT_MAX_REQUEST_SIZE if max_request_size is None else max_request_size self._compression = compression or _compression_from_env() self._session = ( session - or _load_session_from_envvar( - _OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER - ) + or _load_session_from_envvar(_OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER) or requests.Session() ) self._session.headers.update(self._headers) @@ -164,9 +154,7 @@ def __init__( # let users override our defaults self._session.headers.update(self._headers) if self._compression is not Compression.NoCompression: - self._session.headers.update( - {"Content-Encoding": self._compression.value} - ) + self._session.headers.update({"Content-Encoding": self._compression.value}) self._shutdown = False self._metrics = create_exporter_metrics( @@ -174,15 +162,10 @@ def __init__( "traces", urlparse(self._endpoint), meter_provider, - os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "") - .strip() - .lower() - == "true", + os.environ.get(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED, "").strip().lower() == "true", ) - def _export( - self, serialized_data: bytes, timeout_sec: float | None = None - ): + def _export(self, serialized_data: bytes, timeout_sec: float | None = None): data = serialized_data if self._compression == Compression.Gzip: gzip_data = BytesIO() @@ -226,8 +209,7 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: serialized_data = encode_spans(spans).SerializePartialToString() if _is_request_too_large(serialized_data, self._max_request_size): _logger.warning( - "Dropping span batch: serialized size %d bytes exceeds " - "max_request_size %d bytes.", + "Dropping span batch: serialized size %d bytes exceeds max_request_size %d bytes.", len(serialized_data), self._max_request_size, ) @@ -262,29 +244,14 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: status_code, reason, ) - error_attrs = ( - {HTTP_RESPONSE_STATUS_CODE: status_code} - if status_code is not None - else None - ) + error_attrs = {HTTP_RESPONSE_STATUS_CODE: status_code} if status_code is not None else None result.error = export_error result.error_attrs = error_attrs return SpanExportResult.FAILURE - if ( - retry_num + 1 == _MAX_RETRYS - or backoff_seconds > (deadline_sec - time()) - or self._shutdown - ): - _logger.error( - "Failed to export span batch due to timeout, " - "max retries or shutdown." - ) - error_attrs = ( - {HTTP_RESPONSE_STATUS_CODE: status_code} - if status_code is not None - else None - ) + if retry_num + 1 == _MAX_RETRYS or backoff_seconds > (deadline_sec - time()) or self._shutdown: + _logger.error("Failed to export span batch due to timeout, max retries or shutdown.") + error_attrs = {HTTP_RESPONSE_STATUS_CODE: status_code} if status_code is not None else None result.error = export_error result.error_attrs = error_attrs return SpanExportResult.FAILURE diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/tests/metrics/test_otlp_metrics_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-http/tests/metrics/test_otlp_metrics_exporter.py index 9ead610069e..93465bd6b34 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/tests/metrics/test_otlp_metrics_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/tests/metrics/test_otlp_metrics_exporter.py @@ -100,9 +100,7 @@ class TestOTLPMetricExporter(TestCase): # pylint: disable=too-many-public-methods def setUp(self): self.metric_reader = InMemoryMetricReader() - self.meter_provider = MeterProvider( - metric_readers=[self.metric_reader] - ) + self.meter_provider = MeterProvider(metric_readers=[self.metric_reader]) self.metrics = { "sum_int": MetricsData( resource_metrics=[ @@ -129,9 +127,7 @@ def setUp(self): } def test_max_request_size_default(self): - self.assertEqual( - OTLPMetricExporter()._max_request_size, 64 * 1024 * 1024 - ) + self.assertEqual(OTLPMetricExporter()._max_request_size, 64 * 1024 * 1024) @patch.object(Session, "post") def test_oversized_payload_dropped_before_send(self, mock_post): @@ -163,30 +159,22 @@ def test_negative_max_request_size_disables_limit(self, mock_post): mock_post.assert_called() @patch.object(Session, "post") - def test_oversized_payload_dropped_with_batch_splitting_enabled( - self, mock_post - ): + def test_oversized_payload_dropped_with_batch_splitting_enabled(self, mock_post): # With batch-splitting enabled, the byte check still applies to each # post-split request, so a too-small limit drops every split before # sending (an oversized split aborts the batch, like any other # non-retryable per-split failure). - exporter = OTLPMetricExporter( - max_request_size=1, max_export_batch_size=1 - ) + exporter = OTLPMetricExporter(max_request_size=1, max_export_batch_size=1) self.assertEqual( exporter.export(self.metrics["sum_int"]), MetricExportResult.FAILURE, ) mock_post.assert_not_called() - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_oversized_payload_records_failure_metric(self, mock_post): - exporter = OTLPMetricExporter( - max_request_size=1, meter_provider=self.meter_provider - ) + exporter = OTLPMetricExporter(max_request_size=1, meter_provider=self.meter_provider) self.assertEqual( exporter.export(self.metrics["sum_int"]), MetricExportResult.FAILURE, @@ -195,18 +183,14 @@ def test_oversized_payload_records_failure_metric(self, mock_post): metrics_data = self.metric_reader.get_metrics_data() scope_metrics = metrics_data.resource_metrics[0].scope_metrics[0] exported = next( - metric - for metric in scope_metrics.metrics - if metric.name == "otel.sdk.exporter.metric_data_point.exported" + metric for metric in scope_metrics.metrics if metric.name == "otel.sdk.exporter.metric_data_point.exported" ) self.assertEqual( exported.data.data_points[0].attributes["error.type"], "RequestPayloadTooLargeError", ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_split_export_records_per_split_data_point_count(self, mock_post): # When a batch is split, each split must record its own data-point @@ -217,14 +201,10 @@ def test_split_export_records_per_split_data_point_count(self, mock_post): metrics_data = MetricsData( resource_metrics=[ ResourceMetrics( - resource=Resource( - attributes={"a": 1}, schema_url="resource_schema_url" - ), + resource=Resource(attributes={"a": 1}, schema_url="resource_schema_url"), scope_metrics=[ ScopeMetrics( - scope=SDKInstrumentationScope( - name="name", version="version" - ), + scope=SDKInstrumentationScope(name="name", version="version"), metrics=[ _generate_sum("s1", 1), _generate_sum("s2", 2), @@ -237,19 +217,13 @@ def test_split_export_records_per_split_data_point_count(self, mock_post): ) ] ) - exporter = OTLPMetricExporter( - max_export_batch_size=1, meter_provider=self.meter_provider - ) - self.assertEqual( - exporter.export(metrics_data), MetricExportResult.SUCCESS - ) + exporter = OTLPMetricExporter(max_export_batch_size=1, meter_provider=self.meter_provider) + self.assertEqual(exporter.export(metrics_data), MetricExportResult.SUCCESS) self.assertEqual(mock_post.call_count, 3) internal = self.metric_reader.get_metrics_data() scope_metrics = internal.resource_metrics[0].scope_metrics[0] exported = next( - metric - for metric in scope_metrics.metrics - if metric.name == "otel.sdk.exporter.metric_data_point.exported" + metric for metric in scope_metrics.metrics if metric.name == "otel.sdk.exporter.metric_data_point.exported" ) total = sum(dp.value for dp in exported.data.data_points) self.assertEqual(total, 3) @@ -257,9 +231,7 @@ def test_split_export_records_per_split_data_point_count(self, mock_post): def test_constructor_default(self): exporter = OTLPMetricExporter() - self.assertEqual( - exporter._endpoint, DEFAULT_ENDPOINT + DEFAULT_METRICS_EXPORT_PATH - ) + self.assertEqual(exporter._endpoint, DEFAULT_ENDPOINT + DEFAULT_METRICS_EXPORT_PATH) self.assertEqual(exporter._certificate_file, True) self.assertEqual(exporter._client_certificate_file, None) self.assertEqual(exporter._client_key_file, None) @@ -304,16 +276,12 @@ def test_exporter_metrics_env_take_priority(self, mock_entry_points): def f(): return credential - mock_entry_points.configure_mock( - return_value=[IterEntryPoint("custom_credential", f)] - ) + mock_entry_points.configure_mock(return_value=[IterEntryPoint("custom_credential", f)]) exporter = OTLPMetricExporter() self.assertEqual(exporter._endpoint, "https://metrics.endpoint.env") self.assertEqual(exporter._certificate_file, "metrics/certificate.env") - self.assertEqual( - exporter._client_certificate_file, "metrics/client-cert.pem" - ) + self.assertEqual(exporter._client_certificate_file, "metrics/client-cert.pem") self.assertEqual(exporter._client_key_file, "metrics/client-key.pem") self.assertEqual(exporter._timeout, 40) self.assertIs(exporter._compression, Compression.Deflate) @@ -363,9 +331,7 @@ def test_exporter_constructor_take_priority(self): self.assertEqual(exporter._endpoint, "example.com/1234") self.assertEqual(exporter._certificate_file, "path/to/service.crt") - self.assertEqual( - exporter._client_certificate_file, "path/to/client-cert.pem" - ) + self.assertEqual(exporter._client_certificate_file, "path/to/client-cert.pem") self.assertEqual(exporter._client_key_file, "path/to/client-key.pem") self.assertEqual(exporter._timeout, 20) self.assertIs(exporter._compression, Compression.NoCompression) @@ -390,9 +356,7 @@ def test_exporter_env(self): exporter = OTLPMetricExporter() self.assertEqual(exporter._certificate_file, OS_ENV_CERTIFICATE) - self.assertEqual( - exporter._client_certificate_file, OS_ENV_CLIENT_CERTIFICATE - ) + self.assertEqual(exporter._client_certificate_file, OS_ENV_CLIENT_CERTIFICATE) self.assertEqual(exporter._client_key_file, OS_ENV_CLIENT_KEY) self.assertEqual(exporter._timeout, int(OS_ENV_TIMEOUT)) self.assertIs(exporter._compression, Compression.Gzip) @@ -431,9 +395,7 @@ def test_exporter_env_endpoint_with_slash(self): @patch.dict( "os.environ", - { - OTEL_EXPORTER_OTLP_HEADERS: "envHeader1=val1,envHeader2=val2,missingValue" - }, + {OTEL_EXPORTER_OTLP_HEADERS: "envHeader1=val1,envHeader2=val2,missingValue"}, ) def test_headers_parse_from_env(self): with self.assertLogs(level="WARNING") as cm: @@ -449,9 +411,7 @@ def test_headers_parse_from_env(self): ), ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "}) @patch.object(Session, "post") def test_success(self, mock_post): resp = Response() @@ -471,28 +431,14 @@ def test_success(self, mock_post): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.metric_data_point.exported" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) - self.assertEqual( - metrics[1].name, "otel.sdk.exporter.metric_data_point.inflight" - ) - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) - self.assertEqual( - metrics[2].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.metric_data_point.exported") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) + self.assertEqual(metrics[1].name, "otel.sdk.exporter.metric_data_point.inflight") + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) + self.assertEqual(metrics[2].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_failure(self, mock_post): resp = Response() @@ -512,45 +458,25 @@ def test_failure(self, mock_post): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.metric_data_point.exported" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[0].data.data_points[0].attributes - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.metric_data_point.exported") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[0].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[0].data.data_points[0].attributes, ) - self.assertEqual( - metrics[1].name, "otel.sdk.exporter.metric_data_point.inflight" - ) - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[1].data.data_points[0].attributes - ) + self.assertEqual(metrics[1].name, "otel.sdk.exporter.metric_data_point.inflight") + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[1].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[1].data.data_points[0].attributes, ) + self.assertEqual(metrics[2].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertEqual( - metrics[2].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) - self.assertEqual( - metrics[2] - .data.data_points[0] - .attributes["http.response.status_code"], + metrics[2].data.data_points[0].attributes["http.response.status_code"], 401, ) @@ -850,16 +776,12 @@ def test_get_split_resource_metrics_pb2_one_of_each(self): split_resource_metrics = [ { "resource": Pb2Resource( - attributes=[ - KeyValue(key="foo", value={"string_value": "bar"}) - ], + attributes=[KeyValue(key="foo", value={"string_value": "bar"})], ), "schema_url": "http://foo-bar", "scope_metrics": [ { - "scope": InstrumentationScope( - name="foo-scope", version="1.0.0" - ), + "scope": InstrumentationScope(name="foo-scope", version="1.0.0"), "schema_url": "http://foo-baz", "metrics": [ { @@ -874,9 +796,7 @@ def test_get_split_resource_metrics_pb2_one_of_each(self): attributes=[ KeyValue( key="dp_key", - value={ - "string_value": "dp_value" - }, + value={"string_value": "dp_value"}, ) ], start_time_unix_nano=12345, @@ -899,27 +819,19 @@ def test_get_split_resource_metrics_pb2_one_of_each(self): self.assertEqual(len(result[0].scope_metrics), 1) self.assertEqual(result[0].scope_metrics[0].scope.name, "foo-scope") self.assertEqual(len(result[0].scope_metrics[0].metrics), 1) - self.assertEqual( - result[0].scope_metrics[0].metrics[0].name, "foo-metric" - ) - self.assertEqual( - result[0].scope_metrics[0].metrics[0].sum.is_monotonic, True - ) + self.assertEqual(result[0].scope_metrics[0].metrics[0].name, "foo-metric") + self.assertEqual(result[0].scope_metrics[0].metrics[0].sum.is_monotonic, True) def test_get_split_resource_metrics_pb2_multiples(self): split_resource_metrics = [ { "resource": Pb2Resource( - attributes=[ - KeyValue(key="foo1", value={"string_value": "bar2"}) - ], + attributes=[KeyValue(key="foo1", value={"string_value": "bar2"})], ), "schema_url": "http://foo-bar-1", "scope_metrics": [ { - "scope": InstrumentationScope( - name="foo-scope-1", version="1.0.0" - ), + "scope": InstrumentationScope(name="foo-scope-1", version="1.0.0"), "schema_url": "http://foo-baz-1", "metrics": [ { @@ -932,9 +844,7 @@ def test_get_split_resource_metrics_pb2_multiples(self): attributes=[ KeyValue( key="dp_key", - value={ - "string_value": "dp_value" - }, + value={"string_value": "dp_value"}, ) ], start_time_unix_nano=12345, @@ -950,16 +860,12 @@ def test_get_split_resource_metrics_pb2_multiples(self): }, { "resource": Pb2Resource( - attributes=[ - KeyValue(key="foo2", value={"string_value": "bar2"}) - ], + attributes=[KeyValue(key="foo2", value={"string_value": "bar2"})], ), "schema_url": "http://foo-bar-2", "scope_metrics": [ { - "scope": InstrumentationScope( - name="foo-scope-2", version="2.0.0" - ), + "scope": InstrumentationScope(name="foo-scope-2", version="2.0.0"), "schema_url": "http://foo-baz-2", "metrics": [ { @@ -973,9 +879,7 @@ def test_get_split_resource_metrics_pb2_multiples(self): attributes=[ KeyValue( key="dp_key", - value={ - "string_value": "dp_value" - }, + value={"string_value": "dp_value"}, ) ], start_time_unix_nano=12345, @@ -998,27 +902,19 @@ def test_get_split_resource_metrics_pb2_multiples(self): self.assertEqual(len(result[1].scope_metrics), 1) self.assertEqual(result[0].scope_metrics[0].scope.name, "foo-scope-1") self.assertEqual(result[1].scope_metrics[0].scope.name, "foo-scope-2") - self.assertEqual( - result[0].scope_metrics[0].metrics[0].name, "foo-metric-1" - ) - self.assertEqual( - result[1].scope_metrics[0].metrics[0].name, "foo-metric-2" - ) + self.assertEqual(result[0].scope_metrics[0].metrics[0].name, "foo-metric-1") + self.assertEqual(result[1].scope_metrics[0].metrics[0].name, "foo-metric-2") def test_get_split_resource_metrics_pb2_unsupported_metric_type(self): split_resource_metrics = [ { "resource": Pb2Resource( - attributes=[ - KeyValue(key="foo", value={"string_value": "bar"}) - ], + attributes=[KeyValue(key="foo", value={"string_value": "bar"})], ), "schema_url": "http://foo-bar", "scope_metrics": [ { - "scope": InstrumentationScope( - name="foo", version="1.0.0" - ), + "scope": InstrumentationScope(name="foo", version="1.0.0"), "schema_url": "http://foo-baz", "metrics": [ { @@ -1074,17 +970,13 @@ def _create_metrics_data_multiple_data_points( ) @patch.object(Session, "post") - def test_export_max_export_batch_size_single_batch_integration( - self, mock_post - ): + def test_export_max_export_batch_size_single_batch_integration(self, mock_post): resp = Response() resp.status_code = 200 mock_post.return_value = resp # 2 data points, batch size of 3: fits in one batch - metrics_data = ( - TestOTLPMetricExporter._create_metrics_data_multiple_data_points(2) - ) + metrics_data = TestOTLPMetricExporter._create_metrics_data_multiple_data_points(2) exporter = OTLPMetricExporter(max_export_batch_size=3) result = exporter.export(metrics_data) @@ -1095,9 +987,7 @@ def test_export_max_export_batch_size_single_batch_integration( call_args = mock_post.call_args self.assertEqual(call_args.kwargs["url"], exporter._endpoint) self.assertIsInstance(call_args.kwargs["data"], bytes) - self.assertEqual( - call_args.kwargs["verify"], exporter._certificate_file - ) + self.assertEqual(call_args.kwargs["verify"], exporter._certificate_file) batch_data = call_args.kwargs["data"] request = ExportMetricsServiceRequest() request.ParseFromString(batch_data) @@ -1108,17 +998,13 @@ def test_export_max_export_batch_size_single_batch_integration( self.assertEqual(metric_names, {"sum_int_0", "sum_int_1"}) @patch.object(Session, "post") - def test_export_max_export_batch_size_multiple_batches_integration( - self, mock_post - ): + def test_export_max_export_batch_size_multiple_batches_integration(self, mock_post): resp = Response() resp.status_code = 200 mock_post.return_value = resp # 3 data points, batch size of 2: requires 2 batches - metrics_data = ( - TestOTLPMetricExporter._create_metrics_data_multiple_data_points(3) - ) + metrics_data = TestOTLPMetricExporter._create_metrics_data_multiple_data_points(3) exporter = OTLPMetricExporter(max_export_batch_size=2) result = exporter.export(metrics_data) @@ -1128,9 +1014,7 @@ def test_export_max_export_batch_size_multiple_batches_integration( for call_args in mock_post.call_args_list: self.assertEqual(call_args.kwargs["url"], exporter._endpoint) self.assertIsInstance(call_args.kwargs["data"], bytes) - self.assertEqual( - call_args.kwargs["verify"], exporter._certificate_file - ) + self.assertEqual(call_args.kwargs["verify"], exporter._certificate_file) self.assertEqual(len(mock_post.call_args_list), 2) # First batch should contain sum_int_0 and sum_int_1 @@ -1138,9 +1022,7 @@ def test_export_max_export_batch_size_multiple_batches_integration( first_request = ExportMetricsServiceRequest() first_request.ParseFromString(first_batch_data) self.assertEqual(len(first_request.resource_metrics), 1) - first_metrics = ( - first_request.resource_metrics[0].scope_metrics[0].metrics - ) + first_metrics = first_request.resource_metrics[0].scope_metrics[0].metrics self.assertEqual(len(first_metrics), 2) first_metric_names = {metric.name for metric in first_metrics} self.assertEqual(first_metric_names, {"sum_int_0", "sum_int_1"}) @@ -1150,16 +1032,12 @@ def test_export_max_export_batch_size_multiple_batches_integration( second_request = ExportMetricsServiceRequest() second_request.ParseFromString(second_batch_data) self.assertEqual(len(second_request.resource_metrics), 1) - second_metrics = ( - second_request.resource_metrics[0].scope_metrics[0].metrics - ) + second_metrics = second_request.resource_metrics[0].scope_metrics[0].metrics self.assertEqual(len(second_metrics), 1) self.assertEqual(second_metrics[0].name, "sum_int_2") @patch.object(Session, "post") - def test_export_max_export_batch_size_retry_scenarios_integration( - self, mock_post - ): + def test_export_max_export_batch_size_retry_scenarios_integration(self, mock_post): # Setup HTTP responses: first request succeeds, second fails non-retryable success_resp = Response() success_resp.status_code = 200 @@ -1169,9 +1047,7 @@ def test_export_max_export_batch_size_retry_scenarios_integration( mock_post.side_effect = [success_resp, failure_resp] # 3 data points, batch size of 2: requires 2 batches - metrics_data = ( - TestOTLPMetricExporter._create_metrics_data_multiple_data_points(3) - ) + metrics_data = TestOTLPMetricExporter._create_metrics_data_multiple_data_points(3) exporter = OTLPMetricExporter(max_export_batch_size=2) # Export should fail when second batch fails @@ -1184,17 +1060,13 @@ def test_export_max_export_batch_size_retry_scenarios_integration( first_request = ExportMetricsServiceRequest() first_request.ParseFromString(first_batch_data) self.assertEqual(len(first_request.resource_metrics), 1) - first_metrics = ( - first_request.resource_metrics[0].scope_metrics[0].metrics - ) + first_metrics = first_request.resource_metrics[0].scope_metrics[0].metrics self.assertEqual(len(first_metrics), 2) first_metric_names = {metric.name for metric in first_metrics} self.assertEqual(first_metric_names, {"sum_int_0", "sum_int_1"}) @patch.object(Session, "post") - def test_export_max_export_batch_size_retryable_failure_integration( - self, mock_post - ): + def test_export_max_export_batch_size_retryable_failure_integration(self, mock_post): success_resp = Response() success_resp.status_code = 200 retryable_failure_resp = Response() @@ -1207,25 +1079,19 @@ def test_export_max_export_batch_size_retryable_failure_integration( ] # 3 data points, batch size of 2: requires 2 batches - metrics_data = ( - TestOTLPMetricExporter._create_metrics_data_multiple_data_points(3) - ) + metrics_data = TestOTLPMetricExporter._create_metrics_data_multiple_data_points(3) exporter = OTLPMetricExporter(max_export_batch_size=2, timeout=2.0) # Export should eventually succeed after retry result = exporter.export(metrics_data) self.assertEqual(result, MetricExportResult.SUCCESS) - self.assertEqual( - mock_post.call_count, 3 - ) # First batch + retry of second batch + self.assertEqual(mock_post.call_count, 3) # First batch + retry of second batch first_batch_data = mock_post.call_args_list[0].kwargs["data"] first_request = ExportMetricsServiceRequest() first_request.ParseFromString(first_batch_data) self.assertEqual(len(first_request.resource_metrics), 1) - first_metrics = ( - first_request.resource_metrics[0].scope_metrics[0].metrics - ) + first_metrics = first_request.resource_metrics[0].scope_metrics[0].metrics self.assertEqual(len(first_metrics), 2) first_metric_names = {metric.name for metric in first_metrics} self.assertEqual(first_metric_names, {"sum_int_0", "sum_int_1"}) @@ -1234,18 +1100,14 @@ def test_export_max_export_batch_size_retryable_failure_integration( second_request = ExportMetricsServiceRequest() second_request.ParseFromString(second_batch_data) self.assertEqual(len(second_request.resource_metrics), 1) - second_metrics = ( - second_request.resource_metrics[0].scope_metrics[0].metrics - ) + second_metrics = second_request.resource_metrics[0].scope_metrics[0].metrics self.assertEqual(len(second_metrics), 1) self.assertEqual(second_metrics[0].name, "sum_int_2") def test_aggregation_temporality(self): otlp_metric_exporter = OTLPMetricExporter() - for ( - temporality - ) in otlp_metric_exporter._preferred_temporality.values(): + for temporality in otlp_metric_exporter._preferred_temporality.values(): self.assertEqual(temporality, AggregationTemporality.CUMULATIVE) with patch.dict( @@ -1254,25 +1116,15 @@ def test_aggregation_temporality(self): ): otlp_metric_exporter = OTLPMetricExporter() - for ( - temporality - ) in otlp_metric_exporter._preferred_temporality.values(): - self.assertEqual( - temporality, AggregationTemporality.CUMULATIVE - ) + for temporality in otlp_metric_exporter._preferred_temporality.values(): + self.assertEqual(temporality, AggregationTemporality.CUMULATIVE) - with patch.dict( - environ, {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "ABC"} - ): + with patch.dict(environ, {OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE: "ABC"}): with self.assertLogs(level=WARNING): otlp_metric_exporter = OTLPMetricExporter() - for ( - temporality - ) in otlp_metric_exporter._preferred_temporality.values(): - self.assertEqual( - temporality, AggregationTemporality.CUMULATIVE - ) + for temporality in otlp_metric_exporter._preferred_temporality.values(): + self.assertEqual(temporality, AggregationTemporality.CUMULATIVE) with patch.dict( environ, @@ -1297,9 +1149,7 @@ def test_aggregation_temporality(self): AggregationTemporality.DELTA, ) self.assertEqual( - otlp_metric_exporter._preferred_temporality[ - ObservableUpDownCounter - ], + otlp_metric_exporter._preferred_temporality[ObservableUpDownCounter], AggregationTemporality.CUMULATIVE, ) self.assertEqual( @@ -1330,9 +1180,7 @@ def test_aggregation_temporality(self): AggregationTemporality.CUMULATIVE, ) self.assertEqual( - otlp_metric_exporter._preferred_temporality[ - ObservableUpDownCounter - ], + otlp_metric_exporter._preferred_temporality[ObservableUpDownCounter], AggregationTemporality.CUMULATIVE, ) self.assertEqual( @@ -1348,9 +1196,7 @@ def test_exponential_explicit_bucket_histogram(self): with patch.dict( environ, - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "base2_exponential_bucket_histogram" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "base2_exponential_bucket_histogram"}, ): self.assertIsInstance( OTLPMetricExporter()._preferred_aggregation[Histogram], @@ -1377,9 +1223,7 @@ def test_exponential_explicit_bucket_histogram(self): with patch.dict( environ, - { - OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "explicit_bucket_histogram" - }, + {OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION: "explicit_bucket_histogram"}, ): self.assertIsInstance( OTLPMetricExporter()._preferred_aggregation[Histogram], @@ -1399,9 +1243,7 @@ def test_2xx_status_code(self, mock_otlp_metric_exporter): @patch.dict("os.environ", {}, clear=True) @patch.object(OTLPMetricExporter, "_export", return_value=Mock(ok=True)) - def test_exporter_metrics_disabled_after_set_meter_provider( - self, _mock_export - ): + def test_exporter_metrics_disabled_after_set_meter_provider(self, _mock_export): exporter = OTLPMetricExporter() exporter.set_meter_provider(self.meter_provider) @@ -1423,18 +1265,12 @@ def test_preferred_aggregation_override(self): }, ) - self.assertEqual( - exporter._preferred_aggregation[Histogram], histogram_aggregation - ) + self.assertEqual(exporter._preferred_aggregation[Histogram], histogram_aggregation) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_retry_timeout(self, mock_post): - exporter = OTLPMetricExporter( - timeout=1.5, meter_provider=self.meter_provider - ) + exporter = OTLPMetricExporter(timeout=1.5, meter_provider=self.meter_provider) resp = Response() resp.status_code = 503 @@ -1462,45 +1298,25 @@ def test_retry_timeout(self, mock_post): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.metric_data_point.exported" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[0].data.data_points[0].attributes - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.metric_data_point.exported") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[0].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[0].data.data_points[0].attributes, ) - self.assertEqual( - metrics[1].name, "otel.sdk.exporter.metric_data_point.inflight" - ) - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[1].data.data_points[0].attributes - ) + self.assertEqual(metrics[1].name, "otel.sdk.exporter.metric_data_point.inflight") + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[1].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[1].data.data_points[0].attributes, ) + self.assertEqual(metrics[2].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertEqual( - metrics[2].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) - self.assertEqual( - metrics[2] - .data.data_points[0] - .attributes["http.response.status_code"], + metrics[2].data.data_points[0].attributes["http.response.status_code"], 503, ) @@ -1560,9 +1376,7 @@ def test_shutdown_interrupts_retry_backoff(self, mock_post): resp.status_code = 503 resp.reason = "UNAVAILABLE" mock_post.return_value = resp - thread = threading.Thread( - target=exporter.export, args=(self.metrics["sum_int"],) - ) + thread = threading.Thread(target=exporter.export, args=(self.metrics["sum_int"],)) with self.assertLogs(level=WARNING) as warning: before = time.time() thread.start() @@ -1584,21 +1398,13 @@ def test_shutdown_interrupts_retry_backoff(self, mock_post): assert after - before < 0.2 def assert_standard_metric_attrs(self, attributes): - self.assertEqual( - attributes["otel.component.type"], "otlp_http_metric_exporter" - ) - self.assertTrue( - attributes["otel.component.name"].startswith( - "otlp_http_metric_exporter/" - ) - ) + self.assertEqual(attributes["otel.component.type"], "otlp_http_metric_exporter") + self.assertTrue(attributes["otel.component.name"].startswith("otlp_http_metric_exporter/")) self.assertEqual(attributes["server.address"], "localhost") self.assertEqual(attributes["server.port"], 4318) -def _resource_metrics( - index: int, scope_metrics: list[pb2.ScopeMetrics] -) -> pb2.ResourceMetrics: +def _resource_metrics(index: int, scope_metrics: list[pb2.ScopeMetrics]) -> pb2.ResourceMetrics: return pb2.ResourceMetrics( resource={ "attributes": [KeyValue(key="a", value={"int_value": index})], diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py index 3663b0eb9bc..a907a8e0c49 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_log_exporter.py @@ -72,16 +72,12 @@ class TestOTLPHTTPLogExporter(unittest.TestCase): def setUp(self): self.metric_reader = InMemoryMetricReader() - self.meter_provider = MeterProvider( - metric_readers=[self.metric_reader] - ) + self.meter_provider = MeterProvider(metric_readers=[self.metric_reader]) def test_constructor_default(self): exporter = OTLPLogExporter() - self.assertEqual( - exporter._endpoint, DEFAULT_ENDPOINT + DEFAULT_LOGS_EXPORT_PATH - ) + self.assertEqual(exporter._endpoint, DEFAULT_ENDPOINT + DEFAULT_LOGS_EXPORT_PATH) self.assertEqual(exporter._certificate_file, True) self.assertEqual(exporter._client_certificate_file, None) self.assertEqual(exporter._client_key_file, None) @@ -126,16 +122,12 @@ def test_exporter_logs_env_take_priority(self, mock_entry_points): def f(): return credential - mock_entry_points.configure_mock( - return_value=[IterEntryPoint("custom_credential", f)] - ) + mock_entry_points.configure_mock(return_value=[IterEntryPoint("custom_credential", f)]) exporter = OTLPLogExporter() self.assertEqual(exporter._endpoint, "https://logs.endpoint.env") self.assertEqual(exporter._certificate_file, "logs/certificate.env") - self.assertEqual( - exporter._client_certificate_file, "logs/client-cert.pem" - ) + self.assertEqual(exporter._client_certificate_file, "logs/client-cert.pem") self.assertEqual(exporter._client_key_file, "logs/client-key.pem") self.assertEqual(exporter._timeout, 40) self.assertIs(exporter._compression, Compression.Deflate) @@ -166,15 +158,11 @@ def f(): }, ) @patch("opentelemetry.exporter.otlp.proto.http._common.entry_points") - def test_exception_raised_when_entrypoint_returns_wrong_type( - self, mock_entry_points - ): + def test_exception_raised_when_entrypoint_returns_wrong_type(self, mock_entry_points): def f(): return 1 - mock_entry_points.configure_mock( - return_value=[IterEntryPoint("custom_credential", f)] - ) + mock_entry_points.configure_mock(return_value=[IterEntryPoint("custom_credential", f)]) with self.assertRaises(RuntimeError): OTLPLogExporter() @@ -240,13 +228,9 @@ def test_exporter_constructor_take_priority(self): def test_exporter_env(self): exporter = OTLPLogExporter() - self.assertEqual( - exporter._endpoint, ENV_ENDPOINT + DEFAULT_LOGS_EXPORT_PATH - ) + self.assertEqual(exporter._endpoint, ENV_ENDPOINT + DEFAULT_LOGS_EXPORT_PATH) self.assertEqual(exporter._certificate_file, ENV_CERTIFICATE) - self.assertEqual( - exporter._client_certificate_file, ENV_CLIENT_CERTIFICATE - ) + self.assertEqual(exporter._client_certificate_file, ENV_CLIENT_CERTIFICATE) self.assertEqual(exporter._client_key_file, ENV_CLIENT_KEY) self.assertEqual(exporter._timeout, int(ENV_TIMEOUT)) self.assertIs(exporter._compression, Compression.Gzip) @@ -269,11 +253,7 @@ def export_log_and_deserialize(log): request = ExportLogsServiceRequest() request.ParseFromString(request_body) request_dict = MessageToDict(request) - log_records = ( - request_dict.get("resourceLogs")[0] - .get("scopeLogs")[0] - .get("logRecords") - ) + log_records = request_dict.get("resourceLogs")[0].get("scopeLogs")[0].get("logRecords") return log_records def test_exported_log_without_trace_id(self): @@ -369,9 +349,7 @@ def _get_sdk_log_data() -> list[ReadWriteLogRecord]: attributes={"a": 1, "b": "c"}, ), resource=SDKResource({"first_resource": "value"}), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) ctx_log2 = set_span_in_context( @@ -393,9 +371,7 @@ def _get_sdk_log_data() -> list[ReadWriteLogRecord]: attributes={}, ), resource=SDKResource({"second_resource": "CASE"}), - instrumentation_scope=InstrumentationScope( - "second_name", "second_version" - ), + instrumentation_scope=InstrumentationScope("second_name", "second_version"), ) ctx_log3 = set_span_in_context( NonRecordingSpan( @@ -439,9 +415,7 @@ def _get_sdk_log_data() -> list[ReadWriteLogRecord]: attributes={"filename": "model.py", "func_name": "run_method"}, ), resource=SDKResource({"first_resource": "value"}), - instrumentation_scope=InstrumentationScope( - "another_name", "another_version" - ), + instrumentation_scope=InstrumentationScope("another_name", "another_version"), ) return [log1, log2, log3, log4] @@ -457,14 +431,10 @@ def test_2xx_status_code(self, mock_otlp_metric_exporter): LogRecordExportResult.SUCCESS, ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "}) @patch.object(Session, "post") def test_retry_timeout(self, mock_post): - exporter = OTLPLogExporter( - timeout=1.5, meter_provider=self.meter_provider - ) + exporter = OTLPLogExporter(timeout=1.5, meter_provider=self.meter_provider) resp = Response() resp.status_code = 503 @@ -493,40 +463,24 @@ def test_retry_timeout(self, mock_post): metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) self.assertEqual(metrics[0].name, "otel.sdk.exporter.log.exported") - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[0].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[0].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[0].data.data_points[0].attributes, ) self.assertEqual(metrics[1].name, "otel.sdk.exporter.log.inflight") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[1].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[1].data.data_points[0].attributes, ) + self.assertEqual(metrics[2].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertEqual( - metrics[2].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) - self.assertEqual( - metrics[2] - .data.data_points[0] - .attributes["http.response.status_code"], + metrics[2].data.data_points[0].attributes["http.response.status_code"], 503, ) @@ -548,14 +502,10 @@ def test_export_no_collector_available_retryable(self, mock_post): warning.records[0].message, ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_export_no_collector_available(self, mock_post): - exporter = OTLPLogExporter( - timeout=1.5, meter_provider=self.meter_provider - ) + exporter = OTLPLogExporter(timeout=1.5, meter_provider=self.meter_provider) mock_post.side_effect = requests.exceptions.RequestException() with self.assertLogs(level=WARNING) as warning: @@ -575,9 +525,7 @@ def test_export_no_collector_available(self, mock_post): metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) self.assertEqual(metrics[0].name, "otel.sdk.exporter.log.exported") - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) self.assertEqual( metrics[0].data.data_points[0].attributes["error.type"], "RequestException", @@ -587,22 +535,14 @@ def test_export_no_collector_available(self, mock_post): metrics[0].data.data_points[0].attributes, ) self.assertEqual(metrics[1].name, "otel.sdk.exporter.log.inflight") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[1].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[1].data.data_points[0].attributes, ) - self.assertEqual( - metrics[2].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) + self.assertEqual(metrics[2].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) self.assertEqual( metrics[2].data.data_points[0].attributes["error.type"], "RequestException", @@ -634,9 +574,7 @@ def test_shutdown_interrupts_retry_backoff(self, mock_post): resp.status_code = 503 resp.reason = "UNAVAILABLE" mock_post.return_value = resp - thread = threading.Thread( - target=exporter.export, args=(self._get_sdk_log_data(),) - ) + thread = threading.Thread(target=exporter.export, args=(self._get_sdk_log_data(),)) with self.assertLogs(level=WARNING) as warning: before = time.time() thread.start() @@ -689,14 +627,10 @@ def test_negative_max_request_size_disables_limit(self, mock_post): ) mock_post.assert_called() - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_oversized_payload_records_failure_metric(self, mock_post): - exporter = OTLPLogExporter( - max_request_size=1, meter_provider=self.meter_provider - ) + exporter = OTLPLogExporter(max_request_size=1, meter_provider=self.meter_provider) self.assertEqual( exporter.export(self._get_sdk_log_data()), LogRecordExportResult.FAILURE, @@ -704,24 +638,14 @@ def test_oversized_payload_records_failure_metric(self, mock_post): mock_post.assert_not_called() metrics_data = self.metric_reader.get_metrics_data() scope_metrics = metrics_data.resource_metrics[0].scope_metrics[0] - exported = next( - metric - for metric in scope_metrics.metrics - if metric.name == "otel.sdk.exporter.log.exported" - ) + exported = next(metric for metric in scope_metrics.metrics if metric.name == "otel.sdk.exporter.log.exported") self.assertEqual( exported.data.data_points[0].attributes["error.type"], "RequestPayloadTooLargeError", ) def assert_standard_metric_attrs(self, attributes): - self.assertEqual( - attributes["otel.component.type"], "otlp_http_log_exporter" - ) - self.assertTrue( - attributes["otel.component.name"].startswith( - "otlp_http_log_exporter/" - ) - ) + self.assertEqual(attributes["otel.component.type"], "otlp_http_log_exporter") + self.assertTrue(attributes["otel.component.name"].startswith("otlp_http_log_exporter/")) self.assertEqual(attributes["server.address"], "localhost") self.assertEqual(attributes["server.port"], 4318) diff --git a/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py index 4e4918b37a5..8e881fc7809 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-http/tests/test_proto_span_exporter.py @@ -90,16 +90,12 @@ def _start_recording_server(): class TestOTLPSpanExporter(unittest.TestCase): def setUp(self): self.metric_reader = InMemoryMetricReader() - self.meter_provider = MeterProvider( - metric_readers=[self.metric_reader] - ) + self.meter_provider = MeterProvider(metric_readers=[self.metric_reader]) def test_constructor_default(self): exporter = OTLPSpanExporter() - self.assertEqual( - exporter._endpoint, DEFAULT_ENDPOINT + DEFAULT_TRACES_EXPORT_PATH - ) + self.assertEqual(exporter._endpoint, DEFAULT_ENDPOINT + DEFAULT_TRACES_EXPORT_PATH) self.assertEqual(exporter._certificate_file, True) self.assertEqual(exporter._client_certificate_file, None) self.assertEqual(exporter._client_key_file, None) @@ -144,16 +140,12 @@ def test_exporter_traces_env_take_priority(self, mock_entry_point): def f(): return credential - mock_entry_point.configure_mock( - return_value=[IterEntryPoint("custom_credential", f)] - ) + mock_entry_point.configure_mock(return_value=[IterEntryPoint("custom_credential", f)]) exporter = OTLPSpanExporter() self.assertEqual(exporter._endpoint, "https://traces.endpoint.env") self.assertEqual(exporter._certificate_file, "traces/certificate.env") - self.assertEqual( - exporter._client_certificate_file, "traces/client-cert.pem" - ) + self.assertEqual(exporter._client_certificate_file, "traces/client-cert.pem") self.assertEqual(exporter._client_key_file, "traces/client-key.pem") self.assertEqual(exporter._timeout, 40) self.assertIs(exporter._compression, Compression.Deflate) @@ -204,9 +196,7 @@ def test_exporter_constructor_take_priority(self): self.assertEqual(exporter._endpoint, "example.com/1234") self.assertEqual(exporter._certificate_file, "path/to/service.crt") - self.assertEqual( - exporter._client_certificate_file, "path/to/client-cert.pem" - ) + self.assertEqual(exporter._client_certificate_file, "path/to/client-cert.pem") self.assertEqual(exporter._client_key_file, "path/to/client-key.pem") self.assertEqual(exporter._timeout, 20) self.assertIs(exporter._compression, Compression.NoCompression) @@ -231,9 +221,7 @@ def test_exporter_env(self): exporter = OTLPSpanExporter() self.assertEqual(exporter._certificate_file, OS_ENV_CERTIFICATE) - self.assertEqual( - exporter._client_certificate_file, OS_ENV_CLIENT_CERTIFICATE - ) + self.assertEqual(exporter._client_certificate_file, OS_ENV_CLIENT_CERTIFICATE) self.assertEqual(exporter._client_key_file, OS_ENV_CLIENT_KEY) self.assertEqual(exporter._timeout, int(OS_ENV_TIMEOUT)) self.assertIs(exporter._compression, Compression.Gzip) @@ -272,9 +260,7 @@ def test_exporter_env_endpoint_with_slash(self): @patch.dict( "os.environ", - { - OTEL_EXPORTER_OTLP_HEADERS: "envHeader1=val1,envHeader2=val2,missingValue" - }, + {OTEL_EXPORTER_OTLP_HEADERS: "envHeader1=val1,envHeader2=val2,missingValue"}, ) def test_headers_parse_from_env(self): with self.assertLogs(level="WARNING") as cm: @@ -296,29 +282,21 @@ def test_2xx_status_code(self, mock_otlp_metric_exporter): Test that any HTTP 2XX code returns a successful result """ - self.assertEqual( - OTLPSpanExporter().export(MagicMock()), SpanExportResult.SUCCESS - ) + self.assertEqual(OTLPSpanExporter().export(MagicMock()), SpanExportResult.SUCCESS) @patch.dict("os.environ", {}, clear=True) @patch.object(OTLPSpanExporter, "_export", return_value=Mock(ok=True)) def test_exporter_metrics_disabled_by_default(self, _mock_export): exporter = OTLPSpanExporter(meter_provider=self.meter_provider) - self.assertEqual( - exporter.export([BASIC_SPAN]), SpanExportResult.SUCCESS - ) + self.assertEqual(exporter.export([BASIC_SPAN]), SpanExportResult.SUCCESS) self.assertIsNone(self.metric_reader.get_metrics_data()) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: " true "}) @patch.object(Session, "post") def test_retry_timeout(self, mock_post): - exporter = OTLPSpanExporter( - timeout=1.5, meter_provider=self.meter_provider - ) + exporter = OTLPSpanExporter(timeout=1.5, meter_provider=self.meter_provider) resp = Response() resp.status_code = 503 @@ -346,39 +324,23 @@ def test_retry_timeout(self, mock_post): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[0].data.data_points[0].attributes) self.assertEqual( - metrics[0].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[0].data.data_points[0].attributes - ) - self.assertEqual( - metrics[0] - .data.data_points[0] - .attributes["http.response.status_code"], + metrics[0].data.data_points[0].attributes["http.response.status_code"], 503, ) self.assertEqual(metrics[1].name, "otel.sdk.exporter.span.exported") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[1].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[1].data.data_points[0].attributes, ) self.assertEqual(metrics[2].name, "otel.sdk.exporter.span.inflight") - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[2].data.data_points[0].attributes, @@ -402,14 +364,10 @@ def test_export_no_collector_available_retryable(self, mock_post): warning.records[0].message, ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_export_no_collector_available(self, mock_post): - exporter = OTLPSpanExporter( - timeout=1.5, meter_provider=self.meter_provider - ) + exporter = OTLPSpanExporter(timeout=1.5, meter_provider=self.meter_provider) mock_post.side_effect = requests.exceptions.RequestException() with self.assertLogs(level=WARNING) as warning: @@ -428,12 +386,8 @@ def test_export_no_collector_available(self, mock_post): self.assertEqual(scope_metrics.scope.name, "opentelemetry-sdk") metrics = sorted(scope_metrics.metrics, key=lambda m: m.name) self.assertEqual(len(metrics), 3) - self.assertEqual( - metrics[0].name, "otel.sdk.exporter.operation.duration" - ) - self.assert_standard_metric_attrs( - metrics[0].data.data_points[0].attributes - ) + self.assertEqual(metrics[0].name, "otel.sdk.exporter.operation.duration") + self.assert_standard_metric_attrs(metrics[0].data.data_points[0].attributes) self.assertEqual( metrics[0].data.data_points[0].attributes["error.type"], "RequestException", @@ -443,9 +397,7 @@ def test_export_no_collector_available(self, mock_post): metrics[0].data.data_points[0].attributes, ) self.assertEqual(metrics[1].name, "otel.sdk.exporter.span.exported") - self.assert_standard_metric_attrs( - metrics[1].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[1].data.data_points[0].attributes) self.assertEqual( metrics[1].data.data_points[0].attributes["error.type"], "RequestException", @@ -455,12 +407,8 @@ def test_export_no_collector_available(self, mock_post): metrics[1].data.data_points[0].attributes, ) self.assertEqual(metrics[2].name, "otel.sdk.exporter.span.inflight") - self.assert_standard_metric_attrs( - metrics[2].data.data_points[0].attributes - ) - self.assertNotIn( - "error.type", metrics[2].data.data_points[0].attributes - ) + self.assert_standard_metric_attrs(metrics[2].data.data_points[0].attributes) + self.assertNotIn("error.type", metrics[2].data.data_points[0].attributes) self.assertNotIn( "http.response.status_code", metrics[2].data.data_points[0].attributes, @@ -516,17 +464,13 @@ def test_max_request_size_default(self): @patch.object(Session, "post") def test_oversized_payload_dropped_before_send(self, mock_post): exporter = OTLPSpanExporter(max_request_size=1) - self.assertEqual( - exporter.export([BASIC_SPAN]), SpanExportResult.FAILURE - ) + self.assertEqual(exporter.export([BASIC_SPAN]), SpanExportResult.FAILURE) mock_post.assert_not_called() @patch.object(OTLPSpanExporter, "_export", return_value=Mock(ok=True)) def test_max_request_size_zero_disables(self, _mock_export): exporter = OTLPSpanExporter(max_request_size=0) - self.assertEqual( - exporter.export([BASIC_SPAN]), SpanExportResult.SUCCESS - ) + self.assertEqual(exporter.export([BASIC_SPAN]), SpanExportResult.SUCCESS) @patch.object(Session, "post") def test_negative_max_request_size_disables_limit(self, mock_post): @@ -534,9 +478,7 @@ def test_negative_max_request_size_disables_limit(self, mock_post): resp.status_code = 200 mock_post.return_value = resp exporter = OTLPSpanExporter(max_request_size=-1) - self.assertEqual( - exporter.export([BASIC_SPAN]), SpanExportResult.SUCCESS - ) + self.assertEqual(exporter.export([BASIC_SPAN]), SpanExportResult.SUCCESS) mock_post.assert_called() @patch.object(Session, "post") @@ -552,31 +494,19 @@ def test_oversized_payload_measured_before_compression(self, mock_post): # Guard the discriminating condition: compressed < limit < uncompressed. self.assertLess(len(compressed), limit) self.assertLess(limit, len(uncompressed)) - exporter = OTLPSpanExporter( - max_request_size=limit, compression=Compression.Gzip - ) + exporter = OTLPSpanExporter(max_request_size=limit, compression=Compression.Gzip) self.assertEqual(exporter.export(spans), SpanExportResult.FAILURE) mock_post.assert_not_called() - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) @patch.object(Session, "post") def test_oversized_payload_records_failure_metric(self, mock_post): - exporter = OTLPSpanExporter( - max_request_size=1, meter_provider=self.meter_provider - ) - self.assertEqual( - exporter.export([BASIC_SPAN]), SpanExportResult.FAILURE - ) + exporter = OTLPSpanExporter(max_request_size=1, meter_provider=self.meter_provider) + self.assertEqual(exporter.export([BASIC_SPAN]), SpanExportResult.FAILURE) mock_post.assert_not_called() metrics_data = self.metric_reader.get_metrics_data() scope_metrics = metrics_data.resource_metrics[0].scope_metrics[0] - exported = next( - metric - for metric in scope_metrics.metrics - if metric.name == "otel.sdk.exporter.span.exported" - ) + exported = next(metric for metric in scope_metrics.metrics if metric.name == "otel.sdk.exporter.span.exported") self.assertEqual( exported.data.data_points[0].attributes["error.type"], "RequestPayloadTooLargeError", @@ -586,9 +516,7 @@ def test_end_to_end_export_sends_request_over_http(self): server, thread = _start_recording_server() port = server.server_address[1] try: - exporter = OTLPSpanExporter( - endpoint=f"http://127.0.0.1:{port}/v1/traces" - ) + exporter = OTLPSpanExporter(endpoint=f"http://127.0.0.1:{port}/v1/traces") result = exporter.export([BASIC_SPAN]) finally: server.shutdown() @@ -615,13 +543,7 @@ def test_end_to_end_oversized_request_never_reaches_server(self): self.assertEqual(server.received_bodies, []) def assert_standard_metric_attrs(self, attributes): - self.assertEqual( - attributes["otel.component.type"], "otlp_http_span_exporter" - ) - self.assertTrue( - attributes["otel.component.name"].startswith( - "otlp_http_span_exporter/" - ) - ) + self.assertEqual(attributes["otel.component.type"], "otlp_http_span_exporter") + self.assertTrue(attributes["otel.component.name"].startswith("otlp_http_span_exporter/")) self.assertEqual(attributes["server.address"], "localhost") self.assertEqual(attributes["server.port"], 4318) diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py index a87100eb4e1..4e0028353c1 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py @@ -117,9 +117,7 @@ _OTEL_SCOPE_ATTR_PREFIX = "otel_scope_" -def _convert_buckets( - bucket_counts: Sequence[int], explicit_bounds: Sequence[float] -) -> Sequence[tuple[str, int]]: +def _convert_buckets(bucket_counts: Sequence[int], explicit_bounds: Sequence[float]) -> Sequence[tuple[str, int]]: buckets = [] total_count = 0 for upper_bound, count in zip( @@ -137,11 +135,7 @@ def _should_convert_sum_to_gauge(metric: Metric) -> bool: # to be exported as Gauges. if not isinstance(metric.data, Sum): return False - return ( - not metric.data.is_monotonic - and metric.data.aggregation_temporality - == AggregationTemporality.CUMULATIVE - ) + return not metric.data.is_monotonic and metric.data.aggregation_temporality == AggregationTemporality.CUMULATIVE _FamilyT = TypeVar("_FamilyT", bound=PrometheusMetric) @@ -225,9 +219,7 @@ def _populate_histogram_family( label_rows: Sequence[Sequence[str]], values: Sequence[dict[str, Any]], ) -> None: - family_id = "|".join( - [per_metric_family_id, HistogramMetricFamily.__name__] - ) + family_id = "|".join([per_metric_family_id, HistogramMetricFamily.__name__]) family = _get_or_create_family( registry, family_id, @@ -240,9 +232,7 @@ def _populate_histogram_family( for label_values, value in zip(label_rows, values): family.add_metric( labels=label_values, - buckets=_convert_buckets( - value["bucket_counts"], value["explicit_bounds"] - ), + buckets=_convert_buckets(value["bucket_counts"], value["explicit_bounds"]), sum_value=value["sum"], ) @@ -345,14 +335,10 @@ def collect(self) -> Iterable[PrometheusMetric]: self._target_info = self._create_info_metric( _TARGET_INFO_NAME, _TARGET_INFO_DESCRIPTION, attributes ) - metric_family_id_metric_family[_TARGET_INFO_NAME] = ( - self._target_info - ) + metric_family_id_metric_family[_TARGET_INFO_NAME] = self._target_info while self._metrics_datas: - self._translate_to_prometheus( - self._metrics_datas.popleft(), metric_family_id_metric_family - ) + self._translate_to_prometheus(self._metrics_datas.popleft(), metric_family_id_metric_family) if metric_family_id_metric_family: yield from metric_family_id_metric_family.values() @@ -381,9 +367,7 @@ def _translate_metric( metric_name = self._resolve_metric_name(metric.name) description = metric.description or "" unit = map_unit(metric.unit or "") - label_keys, label_rows, values = self._collect_data_points( - metric.data, scope_attrs - ) + label_keys, label_rows, values = self._collect_data_points(metric.data, scope_attrs) per_metric_family_id = "|".join((metric_name, description, unit)) convert_sum_to_gauge = _should_convert_sum_to_gauge(metric) @@ -424,9 +408,7 @@ def _translate_metric( else: _logger.warning("Unsupported metric data. %s", type(metric.data)) - def _build_scope_attrs( - self, scope: InstrumentationScope - ) -> dict[str, AttributeValue]: + def _build_scope_attrs(self, scope: InstrumentationScope) -> dict[str, AttributeValue]: if not self._scope_info_enabled: return {} attrs: dict[str, AttributeValue] = {} @@ -477,9 +459,7 @@ def _collect_data_points( label_keys = sorted(keys) # Backfill missing labels with "" so every data point exposes the # full label set expected by the Prometheus family. - label_rows = [ - [labels.get(k, "") for k in label_keys] for labels in rows - ] + label_rows = [[labels.get(k, "") for k in label_keys] for labels in rows] return label_keys, label_rows, values # pylint: disable=no-self-use @@ -489,15 +469,10 @@ def _check_value(self, value: float | str | Sequence) -> str: return dumps(value, default=str) return str(value) - def _create_info_metric( - self, name: str, description: str, attributes: dict[str, str] - ) -> InfoMetricFamily: + def _create_info_metric(self, name: str, description: str, attributes: dict[str, str]) -> InfoMetricFamily: """Create an Info Metric Family with list of attributes""" # sanitize the attribute names according to Prometheus rule - attributes = { - sanitize_attribute(key): self._check_value(value) - for key, value in attributes.items() - } + attributes = {sanitize_attribute(key): self._check_value(value) for key, value in attributes.items()} info = InfoMetricFamily(name, description, labels=attributes) info.add_metric(labels=list(attributes.keys()), value=attributes) return info diff --git a/exporter/opentelemetry-exporter-prometheus/tests/test_entrypoints.py b/exporter/opentelemetry-exporter-prometheus/tests/test_entrypoints.py index d9aafd3fd27..9eb7e037e3b 100644 --- a/exporter/opentelemetry-exporter-prometheus/tests/test_entrypoints.py +++ b/exporter/opentelemetry-exporter-prometheus/tests/test_entrypoints.py @@ -37,28 +37,18 @@ def test_import_exporters(self) -> None: @patch("opentelemetry.exporter.prometheus.start_http_server") @patch.dict(os.environ) - def test_starts_http_server_defaults( - self, mock_start_http_server: Mock - ) -> None: + def test_starts_http_server_defaults(self, mock_start_http_server: Mock) -> None: _AutoPrometheusMetricReader() - mock_start_http_server.assert_called_once_with( - port=9464, addr="localhost" - ) + mock_start_http_server.assert_called_once_with(port=9464, addr="localhost") @patch("opentelemetry.exporter.prometheus.start_http_server") @patch.dict(os.environ, {OTEL_EXPORTER_PROMETHEUS_HOST: "1.2.3.4"}) - def test_starts_http_server_host_envvar( - self, mock_start_http_server: Mock - ) -> None: + def test_starts_http_server_host_envvar(self, mock_start_http_server: Mock) -> None: _AutoPrometheusMetricReader() - mock_start_http_server.assert_called_once_with( - port=ANY, addr="1.2.3.4" - ) + mock_start_http_server.assert_called_once_with(port=ANY, addr="1.2.3.4") @patch("opentelemetry.exporter.prometheus.start_http_server") @patch.dict(os.environ, {OTEL_EXPORTER_PROMETHEUS_PORT: "9999"}) - def test_starts_http_server_port_envvar( - self, mock_start_http_server: Mock - ) -> None: + def test_starts_http_server_port_envvar(self, mock_start_http_server: Mock) -> None: _AutoPrometheusMetricReader() mock_start_http_server.assert_called_once_with(port=9999, addr=ANY) diff --git a/exporter/opentelemetry-exporter-prometheus/tests/test_mapping.py b/exporter/opentelemetry-exporter-prometheus/tests/test_mapping.py index 0aef56f3b30..ca481b11686 100644 --- a/exporter/opentelemetry-exporter-prometheus/tests/test_mapping.py +++ b/exporter/opentelemetry-exporter-prometheus/tests/test_mapping.py @@ -12,24 +12,12 @@ class TestMapping(TestCase): def test_sanitize_full_name(self): - self.assertEqual( - sanitize_full_name("valid_metric_name"), "valid_metric_name" - ) - self.assertEqual( - sanitize_full_name("VALID_METRIC_NAME"), "VALID_METRIC_NAME" - ) - self.assertEqual( - sanitize_full_name("_valid_metric_name"), "_valid_metric_name" - ) - self.assertEqual( - sanitize_full_name("valid:metric_name"), "valid:metric_name" - ) - self.assertEqual( - sanitize_full_name("valid_1_metric_name"), "valid_1_metric_name" - ) - self.assertEqual( - sanitize_full_name("1leading_digit"), "_leading_digit" - ) + self.assertEqual(sanitize_full_name("valid_metric_name"), "valid_metric_name") + self.assertEqual(sanitize_full_name("VALID_METRIC_NAME"), "VALID_METRIC_NAME") + self.assertEqual(sanitize_full_name("_valid_metric_name"), "_valid_metric_name") + self.assertEqual(sanitize_full_name("valid:metric_name"), "valid:metric_name") + self.assertEqual(sanitize_full_name("valid_1_metric_name"), "valid_1_metric_name") + self.assertEqual(sanitize_full_name("1leading_digit"), "_leading_digit") self.assertEqual( sanitize_full_name("consective_____underscores"), "consective_underscores", @@ -47,24 +35,12 @@ def test_sanitize_full_name(self): self.assertEqual(sanitize_full_name("aAbBcC_12_oi"), "aAbBcC_12_oi") def test_sanitize_attribute(self): - self.assertEqual( - sanitize_attribute("valid_attr_key"), "valid_attr_key" - ) - self.assertEqual( - sanitize_attribute("VALID_attr_key"), "VALID_attr_key" - ) - self.assertEqual( - sanitize_attribute("_valid_attr_key"), "_valid_attr_key" - ) - self.assertEqual( - sanitize_attribute("valid_1_attr_key"), "valid_1_attr_key" - ) - self.assertEqual( - sanitize_attribute("sanitize:colons"), "sanitize_colons" - ) - self.assertEqual( - sanitize_attribute("1leading_digit"), "_leading_digit" - ) + self.assertEqual(sanitize_attribute("valid_attr_key"), "valid_attr_key") + self.assertEqual(sanitize_attribute("VALID_attr_key"), "VALID_attr_key") + self.assertEqual(sanitize_attribute("_valid_attr_key"), "_valid_attr_key") + self.assertEqual(sanitize_attribute("valid_1_attr_key"), "valid_1_attr_key") + self.assertEqual(sanitize_attribute("sanitize:colons"), "sanitize_colons") + self.assertEqual(sanitize_attribute("1leading_digit"), "_leading_digit") self.assertEqual( sanitize_attribute("1_~#consective_underscores"), "_consective_underscores", diff --git a/exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py b/exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py index 24a1ab284e5..0fe3a3535dd 100644 --- a/exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py +++ b/exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py @@ -104,9 +104,7 @@ def test_constructor(self): self.assertTrue(self._mock_registry_register.called) def test_shutdown(self): - with patch( - "prometheus_client.core.REGISTRY.unregister" - ) as registry_unregister_patch: + with patch("prometheus_client.core.REGISTRY.unregister") as registry_unregister_patch: exporter = PrometheusMetricReader() exporter.shutdown() self.assertTrue(registry_unregister_patch.called) @@ -174,26 +172,18 @@ def test_monotonic_sum_to_prometheus(self): ] ) - collector = _CustomCollector( - disable_target_info=True, scope_info_enabled=False - ) + collector = _CustomCollector(disable_target_info=True, scope_info_enabled=False) collector.add_metrics_data(metrics_data) for prometheus_metric in collector.collect(): self.assertEqual(type(prometheus_metric), CounterMetricFamily) - self.assertEqual( - prometheus_metric.name, "test_sum_monotonic_testunit" - ) + self.assertEqual(prometheus_metric.name, "test_sum_monotonic_testunit") self.assertEqual(prometheus_metric.documentation, "testdesc") self.assertTrue(len(prometheus_metric.samples) == 1) self.assertEqual(prometheus_metric.samples[0].value, 123) self.assertTrue(len(prometheus_metric.samples[0].labels) == 2) - self.assertEqual( - prometheus_metric.samples[0].labels["environment_"], "staging" - ) - self.assertEqual( - prometheus_metric.samples[0].labels["os"], "Windows" - ) + self.assertEqual(prometheus_metric.samples[0].labels["environment_"], "staging") + self.assertEqual(prometheus_metric.samples[0].labels["os"], "Windows") def test_non_monotonic_sum_to_prometheus(self): labels = {"environment@": "staging", "os": "Windows"} @@ -222,26 +212,18 @@ def test_non_monotonic_sum_to_prometheus(self): ] ) - collector = _CustomCollector( - disable_target_info=True, scope_info_enabled=False - ) + collector = _CustomCollector(disable_target_info=True, scope_info_enabled=False) collector.add_metrics_data(metrics_data) for prometheus_metric in collector.collect(): self.assertEqual(type(prometheus_metric), GaugeMetricFamily) - self.assertEqual( - prometheus_metric.name, "test_sum_nonmonotonic_testunit" - ) + self.assertEqual(prometheus_metric.name, "test_sum_nonmonotonic_testunit") self.assertEqual(prometheus_metric.documentation, "testdesc") self.assertTrue(len(prometheus_metric.samples) == 1) self.assertEqual(prometheus_metric.samples[0].value, 123) self.assertTrue(len(prometheus_metric.samples[0].labels) == 2) - self.assertEqual( - prometheus_metric.samples[0].labels["environment_"], "staging" - ) - self.assertEqual( - prometheus_metric.samples[0].labels["os"], "Windows" - ) + self.assertEqual(prometheus_metric.samples[0].labels["environment_"], "staging") + self.assertEqual(prometheus_metric.samples[0].labels["os"], "Windows") def test_gauge_to_prometheus(self): labels = {"environment@": "dev", "os": "Unix"} @@ -269,9 +251,7 @@ def test_gauge_to_prometheus(self): ] ) - collector = _CustomCollector( - disable_target_info=True, scope_info_enabled=False - ) + collector = _CustomCollector(disable_target_info=True, scope_info_enabled=False) collector.add_metrics_data(metrics_data) for prometheus_metric in collector.collect(): @@ -281,9 +261,7 @@ def test_gauge_to_prometheus(self): self.assertTrue(len(prometheus_metric.samples) == 1) self.assertEqual(prometheus_metric.samples[0].value, 123) self.assertTrue(len(prometheus_metric.samples[0].labels) == 2) - self.assertEqual( - prometheus_metric.samples[0].labels["environment_"], "dev" - ) + self.assertEqual(prometheus_metric.samples[0].labels["environment_"], "dev") self.assertEqual(prometheus_metric.samples[0].labels["os"], "Unix") def test_invalid_metric(self): @@ -323,9 +301,7 @@ def test_list_labels(self): ) ] ) - collector = _CustomCollector( - disable_target_info=True, scope_info_enabled=False - ) + collector = _CustomCollector(disable_target_info=True, scope_info_enabled=False) collector.add_metrics_data(metrics_data) for prometheus_metric in collector.collect(): @@ -390,9 +366,7 @@ def test_target_info_enabled_by_default(self): self.assertEqual(prometheus_metric.samples[0].value, 1) self.assertTrue(len(prometheus_metric.samples[0].labels) == 2) self.assertEqual(prometheus_metric.samples[0].labels["os"], "Unix") - self.assertEqual( - prometheus_metric.samples[0].labels["version"], "1.2.3" - ) + self.assertEqual(prometheus_metric.samples[0].labels["version"], "1.2.3") def test_target_info_disabled(self): metric_reader = PrometheusMetricReader(disable_target_info=True) @@ -408,9 +382,7 @@ def test_target_info_disabled(self): for prometheus_metric in result: self.assertNotEqual(type(prometheus_metric), InfoMetricFamily) self.assertNotEqual(prometheus_metric.name, "target") - self.assertNotEqual( - prometheus_metric.documentation, "Target metadata" - ) + self.assertNotEqual(prometheus_metric.documentation, "Target metadata") self.assertNotIn("os", prometheus_metric.samples[0].labels) self.assertNotIn("version", prometheus_metric.samples[0].labels) @@ -439,9 +411,7 @@ def test_target_info_sanitize(self): self.assertEqual(prometheus_metric.samples[0].value, 1) self.assertTrue(len(prometheus_metric.samples[0].labels) == 4) self.assertTrue("system_os" in prometheus_metric.samples[0].labels) - self.assertEqual( - prometheus_metric.samples[0].labels["system_os"], "Unix" - ) + self.assertEqual(prometheus_metric.samples[0].labels["system_os"], "Unix") self.assertTrue("system_name" in prometheus_metric.samples[0].labels) self.assertEqual( prometheus_metric.samples[0].labels["system_name"], @@ -502,9 +472,7 @@ def test_metric_name(self): prefix="foo", ) self.verify_text_format( - _generate_sum( - name="test_counter_w_invalid_chars_prefix", value=1, unit="" - ), + _generate_sum(name="test_counter_w_invalid_chars_prefix", value=1, unit=""), dedent( """\ # HELP _foo_test_counter_w_invalid_chars_prefix_total foo @@ -547,9 +515,7 @@ def test_metric_name_with_unit(self): ), ) self.verify_text_format( - _generate_gauge( - name="test.metric.spaces", value=1, unit=" \t " - ), + _generate_gauge(name="test.metric.spaces", value=1, unit=" \t "), dedent( """\ # HELP test_metric_spaces foo @@ -807,9 +773,7 @@ def test_scope_info_disabled(self): ) ] ) - collector = _CustomCollector( - disable_target_info=True, scope_info_enabled=False - ) + collector = _CustomCollector(disable_target_info=True, scope_info_enabled=False) collector.add_metrics_data(metrics_data) for prometheus_metric in collector.collect(): @@ -858,14 +822,10 @@ def test_scope_attributes_labels(self): for prometheus_metric in collector.collect(): labels = prometheus_metric.samples[0].labels - self.assertEqual( - labels[_OTEL_SCOPE_ATTR_PREFIX + "region"], "us-east-1" - ) + self.assertEqual(labels[_OTEL_SCOPE_ATTR_PREFIX + "region"], "us-east-1") self.assertEqual(labels[_OTEL_SCOPE_NAME_LABEL], "library.test") self.assertEqual(labels[_OTEL_SCOPE_VERSION_LABEL], "1.0") - self.assertEqual( - labels[_OTEL_SCOPE_SCHEMA_URL_LABEL], "schema_url" - ) + self.assertEqual(labels[_OTEL_SCOPE_SCHEMA_URL_LABEL], "schema_url") def test_multiple_data_points_with_different_label_sets(self): hist_point_1 = HistogramDataPoint( diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/encoder/__init__.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/encoder/__init__.py index 3811ccbd413..a6283a7ca4f 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/encoder/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/encoder/__init__.py @@ -55,9 +55,7 @@ class Encoder(abc.ABC): list string, max_tag_value_length is honored at the element boundary. """ - def __init__( - self, max_tag_value_length: int = DEFAULT_MAX_TAG_VALUE_LENGTH - ): + def __init__(self, max_tag_value_length: int = DEFAULT_MAX_TAG_VALUE_LENGTH): self.max_tag_value_length = max_tag_value_length @staticmethod @@ -66,15 +64,11 @@ def content_type() -> str: pass @abc.abstractmethod - def serialize( - self, spans: Sequence[Span], local_endpoint: NodeEndpoint - ) -> str: + def serialize(self, spans: Sequence[Span], local_endpoint: NodeEndpoint) -> str: pass @abc.abstractmethod - def _encode_span( - self, span: Span, encoded_local_endpoint: EncodedLocalEndpointT - ) -> Any: + def _encode_span(self, span: Span, encoded_local_endpoint: EncodedLocalEndpointT) -> Any: """ Per spec Zipkin fields that can be absent SHOULD be omitted from the payload when they are empty in the OpenTelemetry Span. @@ -113,9 +107,7 @@ def _get_parent_id(span_context) -> int | None: parent_id = None return parent_id - def _extract_tags_from_dict( - self, tags_dict: dict | None - ) -> dict[str, str]: + def _extract_tags_from_dict(self, tags_dict: dict | None) -> dict[str, str]: tags = {} if not tags_dict: return tags @@ -125,9 +117,7 @@ def _extract_tags_from_dict( elif isinstance(attribute_value, (int, float, str)): value = str(attribute_value) elif isinstance(attribute_value, Sequence): - value = self._extract_tag_value_string_from_sequence( - attribute_value - ) + value = self._extract_tag_value_string_from_sequence(attribute_value) if not value: logger.warning("Could not serialize tag %s", attribute_key) continue @@ -135,10 +125,7 @@ def _extract_tags_from_dict( logger.warning("Could not serialize tag %s", attribute_key) continue - if ( - self.max_tag_value_length is not None - and self.max_tag_value_length > 0 - ): + if self.max_tag_value_length is not None and self.max_tag_value_length > 0: value = value[: self.max_tag_value_length] tags[attribute_key] = value return tags @@ -148,13 +135,8 @@ def _extract_tag_value_string_from_sequence(self, sequence: Sequence): return None tag_value_elements = [] - running_string_length = ( - 2 # accounts for array brackets in output string - ) - defined_max_tag_value_length = ( - self.max_tag_value_length is not None - and self.max_tag_value_length > 0 - ) + running_string_length = 2 # accounts for array brackets in output string + defined_max_tag_value_length = self.max_tag_value_length is not None and self.max_tag_value_length > 0 for element in sequence: if isinstance(element, bool): @@ -203,23 +185,17 @@ def _extract_tags_from_span(self, span: Span) -> dict[str, str]: tags.update({"error": span.status.description or ""}) if span.dropped_attributes: - tags.update( - {"otel.dropped_attributes_count": str(span.dropped_attributes)} - ) + tags.update({"otel.dropped_attributes_count": str(span.dropped_attributes)}) if span.dropped_events: - tags.update( - {"otel.dropped_events_count": str(span.dropped_events)} - ) + tags.update({"otel.dropped_events_count": str(span.dropped_events)}) if span.dropped_links: tags.update({"otel.dropped_links_count": str(span.dropped_links)}) return tags - def _extract_annotations_from_events( - self, events: list[Event] | None - ) -> list[dict] | None: + def _extract_annotations_from_events(self, events: list[Event] | None) -> list[dict] | None: if not events: return None @@ -227,11 +203,7 @@ def _extract_annotations_from_events( for event in events: attrs = {} for key, value in event.attributes.items(): - if ( - isinstance(value, str) - and self.max_tag_value_length is not None - and self.max_tag_value_length > 0 - ): + if isinstance(value, str) and self.max_tag_value_length is not None and self.max_tag_value_length > 0: value = value[: self.max_tag_value_length] attrs[key] = value @@ -258,15 +230,11 @@ class JsonEncoder(Encoder): def content_type(): return "application/json" - def serialize( - self, spans: Sequence[Span], local_endpoint: NodeEndpoint - ) -> str: + def serialize(self, spans: Sequence[Span], local_endpoint: NodeEndpoint) -> str: encoded_local_endpoint = self._encode_local_endpoint(local_endpoint) encoded_spans = [] for span in spans: - encoded_spans.append( - self._encode_span(span, encoded_local_endpoint) - ) + encoded_spans.append(self._encode_span(span, encoded_local_endpoint)) return json.dumps(encoded_spans) @staticmethod diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/__init__.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/__init__.py index 3e277cb0860..e976a07b387 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/__init__.py @@ -114,14 +114,10 @@ def __init__( The tuple (local_node_ipv4, local_node_ipv6, local_node_port) is used to represent the network context of a node in the service graph. """ - self.local_node = NodeEndpoint( - local_node_ipv4, local_node_ipv6, local_node_port - ) + self.local_node = NodeEndpoint(local_node_ipv4, local_node_ipv6, local_node_port) if endpoint is None: - endpoint = ( - environ.get(OTEL_EXPORTER_ZIPKIN_ENDPOINT) or DEFAULT_ENDPOINT - ) + endpoint = environ.get(OTEL_EXPORTER_ZIPKIN_ENDPOINT) or DEFAULT_ENDPOINT self.endpoint = endpoint if version == Protocol.V1: @@ -130,13 +126,9 @@ def __init__( self.encoder = JsonV2Encoder(max_tag_value_length) self.session = session or requests.Session() - self.session.headers.update( - {"Content-Type": self.encoder.content_type()} - ) + self.session.headers.update({"Content-Type": self.encoder.content_type()}) self._closed = False - self.timeout = timeout or int( - environ.get(OTEL_EXPORTER_ZIPKIN_TIMEOUT, 10) - ) + self.timeout = timeout or int(environ.get(OTEL_EXPORTER_ZIPKIN_TIMEOUT, 10)) def export(self, spans: Sequence[Span]) -> SpanExportResult: # After the call to Shutdown subsequent calls to Export are diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v1/__init__.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v1/__init__.py index 1fb4e1a775f..7b7f194fba0 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v1/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v1/__init__.py @@ -9,9 +9,7 @@ # pylint: disable=W0223 class V1Encoder(Encoder): - def _extract_binary_annotations( - self, span: Span, encoded_local_endpoint: dict - ) -> list[dict]: + def _extract_binary_annotations(self, span: Span, encoded_local_endpoint: dict) -> list[dict]: binary_annotations = [] for tag_key, tag_value in self._extract_tags_from_span(span).items(): if isinstance(tag_value, str) and self.max_tag_value_length > 0: @@ -40,22 +38,16 @@ def _encode_span(self, span: Span, encoded_local_endpoint: dict) -> dict: "id": self._encode_span_id(context.span_id), "name": span.name, "timestamp": self._nsec_to_usec_round(span.start_time), - "duration": self._nsec_to_usec_round( - span.end_time - span.start_time - ), + "duration": self._nsec_to_usec_round(span.end_time - span.start_time), } - encoded_annotations = self._extract_annotations_from_events( - span.events - ) + encoded_annotations = self._extract_annotations_from_events(span.events) if encoded_annotations is not None: for annotation in encoded_annotations: annotation["endpoint"] = encoded_local_endpoint encoded_span["annotations"] = encoded_annotations - binary_annotations = self._extract_binary_annotations( - span, encoded_local_endpoint - ) + binary_annotations = self._extract_binary_annotations(span, encoded_local_endpoint) if binary_annotations: encoded_span["binaryAnnotations"] = binary_annotations diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v2/__init__.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v2/__init__.py index a157fe79ec9..d4369396571 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v2/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/json/v2/__init__.py @@ -28,9 +28,7 @@ def _encode_span(self, span: Span, encoded_local_endpoint: dict) -> dict: "id": self._encode_span_id(context.span_id), "name": span.name, "timestamp": self._nsec_to_usec_round(span.start_time), - "duration": self._nsec_to_usec_round( - span.end_time - span.start_time - ), + "duration": self._nsec_to_usec_round(span.end_time - span.start_time), "localEndpoint": encoded_local_endpoint, "kind": self.SPAN_KIND_MAP[span.kind], } diff --git a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/node_endpoint.py b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/node_endpoint.py index 0f85f6bfc47..39e6e77f03a 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/node_endpoint.py +++ b/exporter/opentelemetry-exporter-zipkin-json/src/opentelemetry/exporter/zipkin/node_endpoint.py @@ -51,9 +51,7 @@ def ipv4(self, address: IpInput) -> None: else: ipv4_address = ipaddress.ip_address(address) if not isinstance(ipv4_address, ipaddress.IPv4Address): - raise ValueError( - f"{address!r} does not appear to be an IPv4 address" - ) + raise ValueError(f"{address!r} does not appear to be an IPv4 address") self._ipv4 = ipv4_address @property @@ -67,7 +65,5 @@ def ipv6(self, address: IpInput) -> None: else: ipv6_address = ipaddress.ip_address(address) if not isinstance(ipv6_address, ipaddress.IPv6Address): - raise ValueError( - f"{address!r} does not appear to be an IPv6 address" - ) + raise ValueError(f"{address!r} does not appear to be an IPv6 address") self._ipv6 = ipv6_address diff --git a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py index 022bef03e6a..a8686bac237 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py +++ b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/common_tests.py @@ -70,16 +70,12 @@ def test_encode_max_tag_length_128(self): def test_constructor_default(self): encoder = self.get_encoder() - self.assertEqual( - DEFAULT_MAX_TAG_VALUE_LENGTH, encoder.max_tag_value_length - ) + self.assertEqual(DEFAULT_MAX_TAG_VALUE_LENGTH, encoder.max_tag_value_length) def test_constructor_max_tag_value_length(self): max_tag_value_length = 123456 encoder = self.get_encoder(max_tag_value_length) - self.assertEqual( - max_tag_value_length, encoder.max_tag_value_length - ) + self.assertEqual(max_tag_value_length, encoder.max_tag_value_length) def test_nsec_to_usec_round(self): base_time_nsec = 683647322 * 10**9 @@ -332,13 +328,9 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: start_times[3] + (300 * 10**6), ) - parent_span_context = trace_api.SpanContext( - trace_id, 0x1111111111111111, is_remote=False - ) + parent_span_context = trace_api.SpanContext(trace_id, 0x1111111111111111, is_remote=False) - other_context = trace_api.SpanContext( - trace_id, 0x2222222222222222, is_remote=False - ) + other_context = trace_api.SpanContext(trace_id, 0x2222222222222222, is_remote=False) span1 = trace._Span( name="test-span-1", @@ -360,11 +352,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: }, ), ), - links=( - trace_api.Link( - context=other_context, attributes={"key_bool": True} - ), - ), + links=(trace_api.Link(context=other_context, attributes={"key_bool": True}),), resource=trace.Resource({}), ) span1.start(start_time=start_times[0]) @@ -378,9 +366,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: name="test-span-2", context=parent_span_context, parent=None, - resource=trace.Resource( - attributes={"key_resource": "some_resource"} - ), + resource=trace.Resource(attributes={"key_resource": "some_resource"}), ) span2.start(start_time=start_times[1]) span2.set_status(Status(StatusCode.ERROR, "Example description")) @@ -390,9 +376,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: name="test-span-3", context=other_context, parent=None, - resource=trace.Resource( - attributes={"key_resource": "some_resource"} - ), + resource=trace.Resource(attributes={"key_resource": "some_resource"}), ) span3.start(start_time=start_times[2]) span3.set_attribute("key_string", "hello_world") @@ -403,9 +387,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: context=other_context, parent=None, resource=trace.Resource({}), - instrumentation_scope=InstrumentationScope( - name="name", version="version" - ), + instrumentation_scope=InstrumentationScope(name="name", version="version"), ) span4.start(start_time=start_times[3]) span4.end(end_time=end_times[3]) @@ -430,9 +412,7 @@ def test_encode_span_id(self): def test_encode_local_endpoint_default(self): self.assertEqual( - self.get_encoder_default()._encode_local_endpoint( - NodeEndpoint() - ), + self.get_encoder_default()._encode_local_endpoint(NodeEndpoint()), {"serviceName": TEST_SERVICE_NAME}, ) @@ -441,9 +421,7 @@ def test_encode_local_endpoint_explicits(self): ipv6 = "2001:db8::c001" port = 414120 self.assertEqual( - self.get_encoder_default()._encode_local_endpoint( - NodeEndpoint(ipv4, ipv6, port) - ), + self.get_encoder_default()._encode_local_endpoint(NodeEndpoint(ipv4, ipv6, port)), { "serviceName": TEST_SERVICE_NAME, "ipv4": ipv4, diff --git a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v1_json.py b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v1_json.py index 1df059e2120..bd103bbe021 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v1_json.py +++ b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v1_json.py @@ -33,24 +33,18 @@ def test_encode(self): local_endpoint = {"serviceName": TEST_SERVICE_NAME} otel_spans = self.get_exhaustive_otel_span_list() - trace_id = JsonV1Encoder._encode_trace_id( - otel_spans[0].context.trace_id - ) + trace_id = JsonV1Encoder._encode_trace_id(otel_spans[0].context.trace_id) expected_output = [ { "traceId": trace_id, - "id": JsonV1Encoder._encode_span_id( - otel_spans[0].context.span_id - ), + "id": JsonV1Encoder._encode_span_id(otel_spans[0].context.span_id), "name": otel_spans[0].name, "timestamp": otel_spans[0].start_time // 10**3, - "duration": (otel_spans[0].end_time // 10**3) - - (otel_spans[0].start_time // 10**3), + "duration": (otel_spans[0].end_time // 10**3) - (otel_spans[0].start_time // 10**3), "annotations": [ { - "timestamp": otel_spans[0].events[0].timestamp - // 10**3, + "timestamp": otel_spans[0].events[0].timestamp // 10**3, "value": json.dumps( { "event0": { @@ -87,19 +81,14 @@ def test_encode(self): }, ], "debug": True, - "parentId": JsonV1Encoder._encode_span_id( - otel_spans[0].parent.span_id - ), + "parentId": JsonV1Encoder._encode_span_id(otel_spans[0].parent.span_id), }, { "traceId": trace_id, - "id": JsonV1Encoder._encode_span_id( - otel_spans[1].context.span_id - ), + "id": JsonV1Encoder._encode_span_id(otel_spans[1].context.span_id), "name": otel_spans[1].name, "timestamp": otel_spans[1].start_time // 10**3, - "duration": (otel_spans[1].end_time // 10**3) - - (otel_spans[1].start_time // 10**3), + "duration": (otel_spans[1].end_time // 10**3) - (otel_spans[1].start_time // 10**3), "binaryAnnotations": [ { "key": "key_resource", @@ -120,13 +109,10 @@ def test_encode(self): }, { "traceId": trace_id, - "id": JsonV1Encoder._encode_span_id( - otel_spans[2].context.span_id - ), + "id": JsonV1Encoder._encode_span_id(otel_spans[2].context.span_id), "name": otel_spans[2].name, "timestamp": otel_spans[2].start_time // 10**3, - "duration": (otel_spans[2].end_time // 10**3) - - (otel_spans[2].start_time // 10**3), + "duration": (otel_spans[2].end_time // 10**3) - (otel_spans[2].start_time // 10**3), "binaryAnnotations": [ { "key": "key_string", @@ -142,13 +128,10 @@ def test_encode(self): }, { "traceId": trace_id, - "id": JsonV1Encoder._encode_span_id( - otel_spans[3].context.span_id - ), + "id": JsonV1Encoder._encode_span_id(otel_spans[3].context.span_id), "name": otel_spans[3].name, "timestamp": otel_spans[3].start_time // 10**3, - "duration": (otel_spans[3].end_time // 10**3) - - (otel_spans[3].start_time // 10**3), + "duration": (otel_spans[3].end_time // 10**3) - (otel_spans[3].start_time // 10**3), "binaryAnnotations": [ { "key": NAME_KEY, @@ -219,9 +202,7 @@ def test_encode_id_zero_padding(self): ) def _test_encode_max_tag_length(self, max_tag_value_length: int): - otel_span, expected_tag_output = self.get_data_for_max_tag_length_test( - max_tag_value_length - ) + otel_span, expected_tag_output = self.get_data_for_max_tag_length_test(max_tag_value_length) service_name = otel_span.name binary_annotations = [] @@ -236,17 +217,11 @@ def _test_encode_max_tag_length(self, max_tag_value_length: int): expected_output = [ { - "traceId": JsonV1Encoder._encode_trace_id( - otel_span.context.trace_id - ), + "traceId": JsonV1Encoder._encode_trace_id(otel_span.context.trace_id), "id": JsonV1Encoder._encode_span_id(otel_span.context.span_id), "name": service_name, - "timestamp": JsonV1Encoder._nsec_to_usec_round( - otel_span.start_time - ), - "duration": JsonV1Encoder._nsec_to_usec_round( - otel_span.end_time - otel_span.start_time - ), + "timestamp": JsonV1Encoder._nsec_to_usec_round(otel_span.start_time), + "duration": JsonV1Encoder._nsec_to_usec_round(otel_span.end_time - otel_span.start_time), "binaryAnnotations": binary_annotations, "debug": True, } @@ -254,20 +229,13 @@ def _test_encode_max_tag_length(self, max_tag_value_length: int): self.assert_equal_encoded_spans( json.dumps(expected_output), - JsonV1Encoder(max_tag_value_length).serialize( - [otel_span], NodeEndpoint() - ), + JsonV1Encoder(max_tag_value_length).serialize([otel_span], NodeEndpoint()), ) def test_dropped_span_attributes(self): otel_span = get_span_with_dropped_attributes_events_links() - annotations = JsonV1Encoder()._encode_span(otel_span, "test")[ - "binaryAnnotations" - ] - annotations = { - annotation["key"]: annotation["value"] - for annotation in annotations - } + annotations = JsonV1Encoder()._encode_span(otel_span, "test")["binaryAnnotations"] + annotations = {annotation["key"]: annotation["value"] for annotation in annotations} self.assertEqual("1", annotations["otel.dropped_links_count"]) self.assertEqual("2", annotations["otel.dropped_attributes_count"]) self.assertEqual("3", annotations["otel.dropped_events_count"]) diff --git a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v2_json.py b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v2_json.py index 012562ed5af..3544cfe90ef 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v2_json.py +++ b/exporter/opentelemetry-exporter-zipkin-json/tests/encoder/test_v2_json.py @@ -34,20 +34,15 @@ def test_encode(self): span_kind = JsonV2Encoder.SPAN_KIND_MAP[SpanKind.INTERNAL] otel_spans = self.get_exhaustive_otel_span_list() - trace_id = JsonV2Encoder._encode_trace_id( - otel_spans[0].context.trace_id - ) + trace_id = JsonV2Encoder._encode_trace_id(otel_spans[0].context.trace_id) expected_output = [ { "traceId": trace_id, - "id": JsonV2Encoder._encode_span_id( - otel_spans[0].context.span_id - ), + "id": JsonV2Encoder._encode_span_id(otel_spans[0].context.span_id), "name": otel_spans[0].name, "timestamp": otel_spans[0].start_time // 10**3, - "duration": (otel_spans[0].end_time // 10**3) - - (otel_spans[0].start_time // 10**3), + "duration": (otel_spans[0].end_time // 10**3) - (otel_spans[0].start_time // 10**3), "localEndpoint": local_endpoint, "kind": span_kind, "tags": { @@ -58,8 +53,7 @@ def test_encode(self): }, "annotations": [ { - "timestamp": otel_spans[0].events[0].timestamp - // 10**3, + "timestamp": otel_spans[0].events[0].timestamp // 10**3, "value": json.dumps( { "event0": { @@ -73,19 +67,14 @@ def test_encode(self): } ], "debug": True, - "parentId": JsonV2Encoder._encode_span_id( - otel_spans[0].parent.span_id - ), + "parentId": JsonV2Encoder._encode_span_id(otel_spans[0].parent.span_id), }, { "traceId": trace_id, - "id": JsonV2Encoder._encode_span_id( - otel_spans[1].context.span_id - ), + "id": JsonV2Encoder._encode_span_id(otel_spans[1].context.span_id), "name": otel_spans[1].name, "timestamp": otel_spans[1].start_time // 10**3, - "duration": (otel_spans[1].end_time // 10**3) - - (otel_spans[1].start_time // 10**3), + "duration": (otel_spans[1].end_time // 10**3) - (otel_spans[1].start_time // 10**3), "localEndpoint": local_endpoint, "kind": span_kind, "tags": { @@ -96,13 +85,10 @@ def test_encode(self): }, { "traceId": trace_id, - "id": JsonV2Encoder._encode_span_id( - otel_spans[2].context.span_id - ), + "id": JsonV2Encoder._encode_span_id(otel_spans[2].context.span_id), "name": otel_spans[2].name, "timestamp": otel_spans[2].start_time // 10**3, - "duration": (otel_spans[2].end_time // 10**3) - - (otel_spans[2].start_time // 10**3), + "duration": (otel_spans[2].end_time // 10**3) - (otel_spans[2].start_time // 10**3), "localEndpoint": local_endpoint, "kind": span_kind, "tags": { @@ -112,13 +98,10 @@ def test_encode(self): }, { "traceId": trace_id, - "id": JsonV2Encoder._encode_span_id( - otel_spans[3].context.span_id - ), + "id": JsonV2Encoder._encode_span_id(otel_spans[3].context.span_id), "name": otel_spans[3].name, "timestamp": otel_spans[3].start_time // 10**3, - "duration": (otel_spans[3].end_time // 10**3) - - (otel_spans[3].start_time // 10**3), + "duration": (otel_spans[3].end_time // 10**3) - (otel_spans[3].start_time // 10**3), "localEndpoint": local_endpoint, "kind": span_kind, "tags": { @@ -177,24 +160,16 @@ def test_encode_id_zero_padding(self): ) def _test_encode_max_tag_length(self, max_tag_value_length: int): - otel_span, expected_tag_output = self.get_data_for_max_tag_length_test( - max_tag_value_length - ) + otel_span, expected_tag_output = self.get_data_for_max_tag_length_test(max_tag_value_length) service_name = otel_span.name expected_output = [ { - "traceId": JsonV2Encoder._encode_trace_id( - otel_span.context.trace_id - ), + "traceId": JsonV2Encoder._encode_trace_id(otel_span.context.trace_id), "id": JsonV2Encoder._encode_span_id(otel_span.context.span_id), "name": service_name, - "timestamp": JsonV2Encoder._nsec_to_usec_round( - otel_span.start_time - ), - "duration": JsonV2Encoder._nsec_to_usec_round( - otel_span.end_time - otel_span.start_time - ), + "timestamp": JsonV2Encoder._nsec_to_usec_round(otel_span.start_time), + "duration": JsonV2Encoder._nsec_to_usec_round(otel_span.end_time - otel_span.start_time), "localEndpoint": {"serviceName": service_name}, "kind": JsonV2Encoder.SPAN_KIND_MAP[SpanKind.INTERNAL], "tags": expected_tag_output, @@ -204,9 +179,7 @@ def _test_encode_max_tag_length(self, max_tag_value_length: int): self.assert_equal_encoded_spans( json.dumps(expected_output), - JsonV2Encoder(max_tag_value_length).serialize( - [otel_span], NodeEndpoint() - ), + JsonV2Encoder(max_tag_value_length).serialize([otel_span], NodeEndpoint()), ) def test_dropped_span_attributes(self): diff --git a/exporter/opentelemetry-exporter-zipkin-json/tests/test_zipkin_exporter.py b/exporter/opentelemetry-exporter-zipkin-json/tests/test_zipkin_exporter.py index c4d2b6b11d7..ced0bd27d81 100644 --- a/exporter/opentelemetry-exporter-zipkin-json/tests/test_zipkin_exporter.py +++ b/exporter/opentelemetry-exporter-zipkin-json/tests/test_zipkin_exporter.py @@ -33,11 +33,7 @@ def __init__(self, status_code): class TestZipkinExporter(unittest.TestCase): @classmethod def setUpClass(cls): - trace.set_tracer_provider( - TracerProvider( - resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME}) - ) - ) + trace.set_tracer_provider(TracerProvider(resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME}))) def tearDown(self): os.environ.pop(OTEL_EXPORTER_ZIPKIN_ENDPOINT, None) @@ -114,12 +110,8 @@ def test_constructor_all_params_and_env_vars(self): self.assertIsInstance(exporter.session, requests.Session) self.assertEqual(exporter.endpoint, constructor_param_endpoint) self.assertEqual(exporter.local_node.service_name, TEST_SERVICE_NAME) - self.assertEqual( - exporter.local_node.ipv4, ipaddress.IPv4Address(local_node_ipv4) - ) - self.assertEqual( - exporter.local_node.ipv6, ipaddress.IPv6Address(local_node_ipv6) - ) + self.assertEqual(exporter.local_node.ipv4, ipaddress.IPv4Address(local_node_ipv4)) + self.assertEqual(exporter.local_node.ipv6, ipaddress.IPv6Address(local_node_ipv6)) self.assertEqual(exporter.local_node.port, local_node_port) # Assert timeout passed in constructor is prioritized over env # when both are set. @@ -177,9 +169,7 @@ def test_export_timeout(self, mock_post): exporter = ZipkinExporter(timeout=2) status = exporter.export(spans) self.assertEqual(SpanExportResult.SUCCESS, status) - mock_post.assert_called_with( - url="http://localhost:9411/api/v2/spans", data="[]", timeout=2 - ) + mock_post.assert_called_with(url="http://localhost:9411/api/v2/spans", data="[]", timeout=2) class TestZipkinNodeEndpoint(unittest.TestCase): diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/__init__.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/__init__.py index 124aa303b16..e664f20624b 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/__init__.py @@ -110,26 +110,18 @@ def __init__( The tuple (local_node_ipv4, local_node_ipv6, local_node_port) is used to represent the network context of a node in the service graph. """ - self.local_node = NodeEndpoint( - local_node_ipv4, local_node_ipv6, local_node_port - ) + self.local_node = NodeEndpoint(local_node_ipv4, local_node_ipv6, local_node_port) if endpoint is None: - endpoint = ( - environ.get(OTEL_EXPORTER_ZIPKIN_ENDPOINT) or DEFAULT_ENDPOINT - ) + endpoint = environ.get(OTEL_EXPORTER_ZIPKIN_ENDPOINT) or DEFAULT_ENDPOINT self.endpoint = endpoint self.encoder = ProtobufEncoder(max_tag_value_length) self.session = session or requests.Session() - self.session.headers.update( - {"Content-Type": self.encoder.content_type()} - ) + self.session.headers.update({"Content-Type": self.encoder.content_type()}) self._closed = False - self.timeout = timeout or int( - environ.get(OTEL_EXPORTER_ZIPKIN_TIMEOUT, 10) - ) + self.timeout = timeout or int(environ.get(OTEL_EXPORTER_ZIPKIN_TIMEOUT, 10)) def export(self, spans: Sequence[Span]) -> SpanExportResult: # After the call to Shutdown subsequent calls to Export are diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/__init__.py b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/__init__.py index 0ddd7fc123d..e06a25d055d 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/__init__.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/src/opentelemetry/exporter/zipkin/proto/http/v2/__init__.py @@ -33,21 +33,15 @@ class ProtobufEncoder(Encoder): def content_type(): return "application/x-protobuf" - def serialize( - self, spans: Sequence[Span], local_endpoint: NodeEndpoint - ) -> bytes: + def serialize(self, spans: Sequence[Span], local_endpoint: NodeEndpoint) -> bytes: encoded_local_endpoint = self._encode_local_endpoint(local_endpoint) # pylint: disable=no-member encoded_spans = zipkin_pb2.ListOfSpans() for span in spans: - encoded_spans.spans.append( - self._encode_span(span, encoded_local_endpoint) - ) + encoded_spans.spans.append(self._encode_span(span, encoded_local_endpoint)) return encoded_spans.SerializeToString() - def _encode_span( - self, span: Span, encoded_local_endpoint: zipkin_pb2.Endpoint - ) -> zipkin_pb2.Span: + def _encode_span(self, span: Span, encoded_local_endpoint: zipkin_pb2.Endpoint) -> zipkin_pb2.Span: context = span.get_span_context() # pylint: disable=no-member encoded_span = zipkin_pb2.Span( @@ -78,9 +72,7 @@ def _encode_span( return encoded_span - def _encode_annotations( - self, span_events: list[Event] | None - ) -> list | None: + def _encode_annotations(self, span_events: list[Event] | None) -> list | None: annotations = self._extract_annotations_from_events(span_events) if annotations is None: encoded_annotations = None diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py index 022bef03e6a..a8686bac237 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/common_tests.py @@ -70,16 +70,12 @@ def test_encode_max_tag_length_128(self): def test_constructor_default(self): encoder = self.get_encoder() - self.assertEqual( - DEFAULT_MAX_TAG_VALUE_LENGTH, encoder.max_tag_value_length - ) + self.assertEqual(DEFAULT_MAX_TAG_VALUE_LENGTH, encoder.max_tag_value_length) def test_constructor_max_tag_value_length(self): max_tag_value_length = 123456 encoder = self.get_encoder(max_tag_value_length) - self.assertEqual( - max_tag_value_length, encoder.max_tag_value_length - ) + self.assertEqual(max_tag_value_length, encoder.max_tag_value_length) def test_nsec_to_usec_round(self): base_time_nsec = 683647322 * 10**9 @@ -332,13 +328,9 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: start_times[3] + (300 * 10**6), ) - parent_span_context = trace_api.SpanContext( - trace_id, 0x1111111111111111, is_remote=False - ) + parent_span_context = trace_api.SpanContext(trace_id, 0x1111111111111111, is_remote=False) - other_context = trace_api.SpanContext( - trace_id, 0x2222222222222222, is_remote=False - ) + other_context = trace_api.SpanContext(trace_id, 0x2222222222222222, is_remote=False) span1 = trace._Span( name="test-span-1", @@ -360,11 +352,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: }, ), ), - links=( - trace_api.Link( - context=other_context, attributes={"key_bool": True} - ), - ), + links=(trace_api.Link(context=other_context, attributes={"key_bool": True}),), resource=trace.Resource({}), ) span1.start(start_time=start_times[0]) @@ -378,9 +366,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: name="test-span-2", context=parent_span_context, parent=None, - resource=trace.Resource( - attributes={"key_resource": "some_resource"} - ), + resource=trace.Resource(attributes={"key_resource": "some_resource"}), ) span2.start(start_time=start_times[1]) span2.set_status(Status(StatusCode.ERROR, "Example description")) @@ -390,9 +376,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: name="test-span-3", context=other_context, parent=None, - resource=trace.Resource( - attributes={"key_resource": "some_resource"} - ), + resource=trace.Resource(attributes={"key_resource": "some_resource"}), ) span3.start(start_time=start_times[2]) span3.set_attribute("key_string", "hello_world") @@ -403,9 +387,7 @@ def get_exhaustive_otel_span_list() -> list[trace._Span]: context=other_context, parent=None, resource=trace.Resource({}), - instrumentation_scope=InstrumentationScope( - name="name", version="version" - ), + instrumentation_scope=InstrumentationScope(name="name", version="version"), ) span4.start(start_time=start_times[3]) span4.end(end_time=end_times[3]) @@ -430,9 +412,7 @@ def test_encode_span_id(self): def test_encode_local_endpoint_default(self): self.assertEqual( - self.get_encoder_default()._encode_local_endpoint( - NodeEndpoint() - ), + self.get_encoder_default()._encode_local_endpoint(NodeEndpoint()), {"serviceName": TEST_SERVICE_NAME}, ) @@ -441,9 +421,7 @@ def test_encode_local_endpoint_explicits(self): ipv6 = "2001:db8::c001" port = 414120 self.assertEqual( - self.get_encoder_default()._encode_local_endpoint( - NodeEndpoint(ipv4, ipv6, port) - ), + self.get_encoder_default()._encode_local_endpoint(NodeEndpoint(ipv4, ipv6, port)), { "serviceName": TEST_SERVICE_NAME, "ipv4": ipv4, diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/test_v2_protobuf.py b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/test_v2_protobuf.py index 256cc3e1529..126050076a2 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/test_v2_protobuf.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/encoder/test_v2_protobuf.py @@ -54,9 +54,7 @@ def test_encode_local_endpoint_explicits(self): ipv6 = "2001:db8::c001" port = 414120 self.assertEqual( - ProtobufEncoder()._encode_local_endpoint( - NodeEndpoint(ipv4, ipv6, port) - ), + ProtobufEncoder()._encode_local_endpoint(NodeEndpoint(ipv4, ipv6, port)), zipkin_pb2.Endpoint( service_name=TEST_SERVICE_NAME, ipv4=ipaddress.ip_address(ipv4).packed, @@ -70,25 +68,15 @@ def test_encode(self): span_kind = ProtobufEncoder.SPAN_KIND_MAP[SpanKind.INTERNAL] otel_spans = self.get_exhaustive_otel_span_list() - trace_id = ProtobufEncoder._encode_trace_id( - otel_spans[0].context.trace_id - ) + trace_id = ProtobufEncoder._encode_trace_id(otel_spans[0].context.trace_id) expected_output = zipkin_pb2.ListOfSpans( spans=[ zipkin_pb2.Span( trace_id=trace_id, - id=ProtobufEncoder._encode_span_id( - otel_spans[0].context.span_id - ), + id=ProtobufEncoder._encode_span_id(otel_spans[0].context.span_id), name=otel_spans[0].name, - timestamp=ProtobufEncoder._nsec_to_usec_round( - otel_spans[0].start_time - ), - duration=( - ProtobufEncoder._nsec_to_usec_round( - otel_spans[0].end_time - otel_spans[0].start_time - ) - ), + timestamp=ProtobufEncoder._nsec_to_usec_round(otel_spans[0].start_time), + duration=(ProtobufEncoder._nsec_to_usec_round(otel_spans[0].end_time - otel_spans[0].start_time)), local_endpoint=local_endpoint, kind=span_kind, tags={ @@ -98,14 +86,10 @@ def test_encode(self): "otel.status_code": "OK", }, debug=True, - parent_id=ProtobufEncoder._encode_span_id( - otel_spans[0].parent.span_id - ), + parent_id=ProtobufEncoder._encode_span_id(otel_spans[0].parent.span_id), annotations=[ zipkin_pb2.Annotation( - timestamp=ProtobufEncoder._nsec_to_usec_round( - otel_spans[0].events[0].timestamp - ), + timestamp=ProtobufEncoder._nsec_to_usec_round(otel_spans[0].events[0].timestamp), value=json.dumps( { "event0": { @@ -121,18 +105,10 @@ def test_encode(self): ), zipkin_pb2.Span( trace_id=trace_id, - id=ProtobufEncoder._encode_span_id( - otel_spans[1].context.span_id - ), + id=ProtobufEncoder._encode_span_id(otel_spans[1].context.span_id), name=otel_spans[1].name, - timestamp=ProtobufEncoder._nsec_to_usec_round( - otel_spans[1].start_time - ), - duration=( - ProtobufEncoder._nsec_to_usec_round( - otel_spans[1].end_time - otel_spans[1].start_time - ) - ), + timestamp=ProtobufEncoder._nsec_to_usec_round(otel_spans[1].start_time), + duration=(ProtobufEncoder._nsec_to_usec_round(otel_spans[1].end_time - otel_spans[1].start_time)), local_endpoint=local_endpoint, kind=span_kind, tags={ @@ -144,18 +120,10 @@ def test_encode(self): ), zipkin_pb2.Span( trace_id=trace_id, - id=ProtobufEncoder._encode_span_id( - otel_spans[2].context.span_id - ), + id=ProtobufEncoder._encode_span_id(otel_spans[2].context.span_id), name=otel_spans[2].name, - timestamp=ProtobufEncoder._nsec_to_usec_round( - otel_spans[2].start_time - ), - duration=( - ProtobufEncoder._nsec_to_usec_round( - otel_spans[2].end_time - otel_spans[2].start_time - ) - ), + timestamp=ProtobufEncoder._nsec_to_usec_round(otel_spans[2].start_time), + duration=(ProtobufEncoder._nsec_to_usec_round(otel_spans[2].end_time - otel_spans[2].start_time)), local_endpoint=local_endpoint, kind=span_kind, tags={ @@ -166,18 +134,10 @@ def test_encode(self): ), zipkin_pb2.Span( trace_id=trace_id, - id=ProtobufEncoder._encode_span_id( - otel_spans[3].context.span_id - ), + id=ProtobufEncoder._encode_span_id(otel_spans[3].context.span_id), name=otel_spans[3].name, - timestamp=ProtobufEncoder._nsec_to_usec_round( - otel_spans[3].start_time - ), - duration=( - ProtobufEncoder._nsec_to_usec_round( - otel_spans[3].end_time - otel_spans[3].start_time - ) - ), + timestamp=ProtobufEncoder._nsec_to_usec_round(otel_spans[3].start_time), + duration=(ProtobufEncoder._nsec_to_usec_round(otel_spans[3].end_time - otel_spans[3].start_time)), local_endpoint=local_endpoint, kind=span_kind, tags={ @@ -191,37 +151,23 @@ def test_encode(self): ], ) - actual_output = zipkin_pb2.ListOfSpans.FromString( - ProtobufEncoder().serialize(otel_spans, NodeEndpoint()) - ) + actual_output = zipkin_pb2.ListOfSpans.FromString(ProtobufEncoder().serialize(otel_spans, NodeEndpoint())) self.assertEqual(actual_output, expected_output) def _test_encode_max_tag_length(self, max_tag_value_length: int): - otel_span, expected_tag_output = self.get_data_for_max_tag_length_test( - max_tag_value_length - ) + otel_span, expected_tag_output = self.get_data_for_max_tag_length_test(max_tag_value_length) service_name = otel_span.name expected_output = zipkin_pb2.ListOfSpans( spans=[ zipkin_pb2.Span( - trace_id=ProtobufEncoder._encode_trace_id( - otel_span.context.trace_id - ), - id=ProtobufEncoder._encode_span_id( - otel_span.context.span_id - ), + trace_id=ProtobufEncoder._encode_trace_id(otel_span.context.trace_id), + id=ProtobufEncoder._encode_span_id(otel_span.context.span_id), name=service_name, - timestamp=ProtobufEncoder._nsec_to_usec_round( - otel_span.start_time - ), - duration=ProtobufEncoder._nsec_to_usec_round( - otel_span.end_time - otel_span.start_time - ), - local_endpoint=zipkin_pb2.Endpoint( - service_name=service_name - ), + timestamp=ProtobufEncoder._nsec_to_usec_round(otel_span.start_time), + duration=ProtobufEncoder._nsec_to_usec_round(otel_span.end_time - otel_span.start_time), + local_endpoint=zipkin_pb2.Endpoint(service_name=service_name), kind=ProtobufEncoder.SPAN_KIND_MAP[SpanKind.INTERNAL], tags=expected_tag_output, annotations=None, @@ -231,9 +177,7 @@ def _test_encode_max_tag_length(self, max_tag_value_length: int): ) actual_output = zipkin_pb2.ListOfSpans.FromString( - ProtobufEncoder(max_tag_value_length).serialize( - [otel_span], NodeEndpoint() - ) + ProtobufEncoder(max_tag_value_length).serialize([otel_span], NodeEndpoint()) ) self.assertEqual(actual_output, expected_output) @@ -241,11 +185,7 @@ def _test_encode_max_tag_length(self, max_tag_value_length: int): def test_dropped_span_attributes(self): otel_span = get_span_with_dropped_attributes_events_links() # pylint: disable=no-member - tags = ( - ProtobufEncoder() - ._encode_span(otel_span, zipkin_pb2.Endpoint()) - .tags - ) + tags = ProtobufEncoder()._encode_span(otel_span, zipkin_pb2.Endpoint()).tags self.assertEqual("1", tags["otel.dropped_links_count"]) self.assertEqual("2", tags["otel.dropped_attributes_count"]) diff --git a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/test_zipkin_exporter.py b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/test_zipkin_exporter.py index f2592fe2a84..78e30b0b310 100644 --- a/exporter/opentelemetry-exporter-zipkin-proto-http/tests/test_zipkin_exporter.py +++ b/exporter/opentelemetry-exporter-zipkin-proto-http/tests/test_zipkin_exporter.py @@ -35,11 +35,7 @@ def __init__(self, status_code): class TestZipkinExporter(unittest.TestCase): @classmethod def setUpClass(cls): - trace.set_tracer_provider( - TracerProvider( - resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME}) - ) - ) + trace.set_tracer_provider(TracerProvider(resource=Resource({SERVICE_NAME: TEST_SERVICE_NAME}))) def tearDown(self): os.environ.pop(OTEL_EXPORTER_ZIPKIN_ENDPOINT, None) @@ -114,12 +110,8 @@ def test_constructor_all_params_and_env_vars(self): self.assertIsInstance(exporter.session, requests.Session) self.assertEqual(exporter.endpoint, constructor_param_endpoint) self.assertEqual(exporter.local_node.service_name, TEST_SERVICE_NAME) - self.assertEqual( - exporter.local_node.ipv4, ipaddress.IPv4Address(local_node_ipv4) - ) - self.assertEqual( - exporter.local_node.ipv6, ipaddress.IPv6Address(local_node_ipv6) - ) + self.assertEqual(exporter.local_node.ipv4, ipaddress.IPv4Address(local_node_ipv4)) + self.assertEqual(exporter.local_node.ipv6, ipaddress.IPv6Address(local_node_ipv6)) self.assertEqual(exporter.local_node.port, local_node_port) # Assert timeout passed in constructor is prioritized over env # when both are set. @@ -177,9 +169,7 @@ def test_export_timeout(self, mock_post): exporter = ZipkinExporter(timeout=2) status = exporter.export(spans) self.assertEqual(SpanExportResult.SUCCESS, status) - mock_post.assert_called_with( - url="http://localhost:9411/api/v2/spans", data=b"", timeout=2 - ) + mock_post.assert_called_with(url="http://localhost:9411/api/v2/spans", data=b"", timeout=2) class TestZipkinNodeEndpoint(unittest.TestCase): diff --git a/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py b/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py index 2319a461c9b..cc90523c374 100644 --- a/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py +++ b/opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py @@ -354,9 +354,7 @@ def get_logger( attributes: _ExtendedAttributes | None = None, ) -> Logger: """Returns a NoOpLogger.""" - return NoOpLogger( - name, version=version, schema_url=schema_url, attributes=attributes - ) + return NoOpLogger(name, version=version, schema_url=schema_url, attributes=attributes) class ProxyLoggerProvider(LoggerProvider): diff --git a/opentelemetry-api/src/opentelemetry/attributes/__init__.py b/opentelemetry-api/src/opentelemetry/attributes/__init__.py index 9c1b83b91e6..c671532146a 100644 --- a/opentelemetry-api/src/opentelemetry/attributes/__init__.py +++ b/opentelemetry-api/src/opentelemetry/attributes/__init__.py @@ -92,14 +92,10 @@ def _clean_attribute( # Reject attribute value if sequence contains a value with an incompatible type. if element_type not in _VALID_ATTR_VALUE_TYPES: _logger.warning( - "Invalid type %s in attribute '%s' value sequence. Expected one of " - "%s or None", + "Invalid type %s in attribute '%s' value sequence. Expected one of %s or None", element_type.__name__, key, - [ - valid_type.__name__ - for valid_type in _VALID_ATTR_VALUE_TYPES - ], + [valid_type.__name__ for valid_type in _VALID_ATTR_VALUE_TYPES], ) return None @@ -123,8 +119,7 @@ def _clean_attribute( return tuple(cleaned_seq) _logger.warning( - "Invalid type %s for attribute '%s' value. Expected one of %s or a " - "sequence of those types", + "Invalid type %s for attribute '%s' value. Expected one of %s or a sequence of those types", type(value).__name__, key, [valid_type.__name__ for valid_type in _VALID_ATTR_VALUE_TYPES], @@ -146,14 +141,10 @@ def _clean_extended_attribute_value( # pylint: disable=too-many-branches for key, element in value.items(): # skip invalid keys if not (key and isinstance(key, str)): - _logger.warning( - "invalid key `%s`. must be non-empty string.", key - ) + _logger.warning("invalid key `%s`. must be non-empty string.", key) continue - cleaned_dict[key] = _clean_extended_attribute( - key=key, value=element, max_len=max_len - ) + cleaned_dict[key] = _clean_extended_attribute(key=key, value=element, max_len=max_len) return cleaned_dict @@ -171,9 +162,7 @@ def _clean_extended_attribute_value( # pylint: disable=too-many-branches element_type = type(element) if element_type not in _VALID_ATTR_VALUE_TYPES: - element = _clean_extended_attribute_value( - element, max_len=max_len - ) + element = _clean_extended_attribute_value(element, max_len=max_len) element_type = type(element) # type: ignore # The type of the sequence must be homogeneous. The first non-None @@ -209,9 +198,7 @@ def _clean_extended_attribute_value( # pylint: disable=too-many-branches ) -def _clean_extended_attribute( - key: str, value: types.AnyValue, max_len: int | None -) -> types.AnyValue: +def _clean_extended_attribute(key: str, value: types.AnyValue, max_len: int | None) -> types.AnyValue: """Checks if attribute value is valid and cleans it if required. The function returns the cleaned value or None if the value is not valid. @@ -249,19 +236,14 @@ def __init__( ): if maxlen is not None: if not isinstance(maxlen, int) or maxlen < 0: - raise ValueError( - "maxlen must be valid int greater or equal to 0" - ) + raise ValueError("maxlen must be valid int greater or equal to 0") self.maxlen = maxlen self.dropped = 0 self.max_value_len = max_value_len self._extended_attributes = extended_attributes # OrderedDict is not used until the maxlen is reached for efficiency. - self._dict: ( - MutableMapping[str, types.AnyValue] - | OrderedDict[str, types.AnyValue] - ) = {} + self._dict: MutableMapping[str, types.AnyValue] | OrderedDict[str, types.AnyValue] = {} self._lock = threading.Lock() if attributes: for key, value in attributes.items(): diff --git a/opentelemetry-api/src/opentelemetry/baggage/__init__.py b/opentelemetry-api/src/opentelemetry/baggage/__init__.py index b1b36a990df..cbffa10d086 100644 --- a/opentelemetry-api/src/opentelemetry/baggage/__init__.py +++ b/opentelemetry-api/src/opentelemetry/baggage/__init__.py @@ -51,9 +51,7 @@ def get_baggage(name: str, context: Context | None = None) -> object | None: return _get_baggage_value(context=context).get(name) -def set_baggage( - name: str, value: object, context: Context | None = None -) -> Context: +def set_baggage(name: str, value: object, context: Context | None = None) -> Context: """Sets a value in the Baggage Args: diff --git a/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py b/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py index 1d873c5f3cd..37361ddc529 100644 --- a/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py +++ b/opentelemetry-api/src/opentelemetry/baggage/propagation/__init__.py @@ -50,20 +50,14 @@ def _apply_baggage_limits( Logs warnings when entries are dropped. """ length = 0 - for index, entry in enumerate( - _filter_valid_entries(entries, max_pair_length) - ): + for index, entry in enumerate(_filter_valid_entries(entries, max_pair_length)): if index >= max_pairs: - _logger.warning( - "Baggage exceeded the maximum number of list-members" - ) + _logger.warning("Baggage exceeded the maximum number of list-members") return length += (1 if index > 0 else 0) + len(entry) if length > max_header_length: - _logger.warning( - "Baggage exceeded the maximum number of bytes per baggage-string" - ) + _logger.warning("Baggage exceeded the maximum number of bytes per baggage-string") return yield entry @@ -91,9 +85,7 @@ def extract( if context is None: context = get_current() - header = _extract_first_element( - getter.get(carrier, self._BAGGAGE_HEADER_NAME) - ) + header = _extract_first_element(getter.get(carrier, self._BAGGAGE_HEADER_NAME)) if not header: return context @@ -116,9 +108,7 @@ def extract( try: name, value = entry.split("=", 1) except Exception: # pylint: disable=broad-exception-caught - _logger.warning( - "Baggage list-member `%s` doesn't match the format", entry - ) + _logger.warning("Baggage list-member `%s` doesn't match the format", entry) continue if not _is_valid_pair(name, value): diff --git a/opentelemetry-api/src/opentelemetry/context/__init__.py b/opentelemetry-api/src/opentelemetry/context/__init__.py index 1dfecd55cff..5f809bba5f2 100644 --- a/opentelemetry-api/src/opentelemetry/context/__init__.py +++ b/opentelemetry-api/src/opentelemetry/context/__init__.py @@ -32,13 +32,7 @@ def _load_runtime_context() -> _RuntimeContext: ) try: - return next( - iter( - entry_points( - group="opentelemetry_context", name=configured_context - ) - ) - ).load()() + return next(iter(entry_points(group="opentelemetry_context", name=configured_context))).load()() except Exception: # pylint: disable=broad-exception-caught logger.exception( "Failed to load context: %s, falling back to contextvars_context", @@ -77,9 +71,7 @@ def get_value(key: str, context: Context | None = None) -> object: return context.get(key) if context is not None else get_current().get(key) -def set_value( - key: str, value: object, context: Context | None = None -) -> Context: +def set_value(key: str, value: object, context: Context | None = None) -> Context: """To record the local state of a cross-cutting concern, the RuntimeContext API provides a function which takes a context, a key, and a value as input, and returns an updated context @@ -142,9 +134,7 @@ def detach(token: Token[Context]) -> None: # spec, this key should be moved accordingly. _ON_EMIT_RECURSION_COUNT_KEY = create_key("on_emit_recursion_count") _SUPPRESS_INSTRUMENTATION_KEY = create_key("suppress_instrumentation") -_SUPPRESS_HTTP_INSTRUMENTATION_KEY = create_key( - "suppress_http_instrumentation" -) +_SUPPRESS_HTTP_INSTRUMENTATION_KEY = create_key("suppress_http_instrumentation") __all__ = [ "Context", diff --git a/opentelemetry-api/src/opentelemetry/context/contextvars_context.py b/opentelemetry-api/src/opentelemetry/context/contextvars_context.py index 388329c7f6c..3cbcdd9ccc3 100644 --- a/opentelemetry-api/src/opentelemetry/context/contextvars_context.py +++ b/opentelemetry-api/src/opentelemetry/context/contextvars_context.py @@ -16,9 +16,7 @@ class ContextVarsRuntimeContext(_RuntimeContext): _CONTEXT_KEY = "current_context" def __init__(self) -> None: - self._current_context = ContextVar( - self._CONTEXT_KEY, default=Context() - ) + self._current_context = ContextVar(self._CONTEXT_KEY, default=Context()) def attach(self, context: Context) -> Token[Context]: """Sets the current `Context` object. Returns a diff --git a/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py index c3333db7185..ed1bb750168 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py +++ b/opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py @@ -156,9 +156,7 @@ def get_meter( ) -> "Meter": with self._lock: if self._real_meter_provider is not None: - return self._real_meter_provider.get_meter( - name, version, schema_url - ) + return self._real_meter_provider.get_meter(name, version, schema_url) meter = _ProxyMeter(name, version=version, schema_url=schema_url) self._meters.append(meter) @@ -240,9 +238,7 @@ def _register_instrument( the registered instrument advisory. """ - instrument_id = ",".join( - [name.strip().lower(), type_.__name__, unit, description] - ) + instrument_id = ",".join([name.strip().lower(), type_.__name__, unit, description]) already_registered = False conflict = False @@ -552,9 +548,7 @@ def on_set_meter_provider(self, meter_provider: MeterProvider) -> None: Creates a real backing meter for this instance and notifies all created instruments so they can create real backing instruments. """ - real_meter = meter_provider.get_meter( - self._name, self._version, self._schema_url - ) + real_meter = meter_provider.get_meter(self._name, self._version, self._schema_url) with self._lock: self._real_meter = real_meter @@ -584,9 +578,7 @@ def create_up_down_counter( ) -> UpDownCounter: with self._lock: if self._real_meter: - return self._real_meter.create_up_down_counter( - name, unit, description - ) + return self._real_meter.create_up_down_counter(name, unit, description) proxy = _ProxyUpDownCounter(name, unit, description) self._instruments.append(proxy) return proxy @@ -600,12 +592,8 @@ def create_observable_counter( ) -> ObservableCounter: with self._lock: if self._real_meter: - return self._real_meter.create_observable_counter( - name, callbacks, unit, description - ) - proxy = _ProxyObservableCounter( - name, callbacks, unit=unit, description=description - ) + return self._real_meter.create_observable_counter(name, callbacks, unit, description) + proxy = _ProxyObservableCounter(name, callbacks, unit=unit, description=description) self._instruments.append(proxy) return proxy @@ -625,9 +613,7 @@ def create_histogram( description, explicit_bucket_boundaries_advisory=explicit_bucket_boundaries_advisory, ) - proxy = _ProxyHistogram( - name, unit, description, explicit_bucket_boundaries_advisory - ) + proxy = _ProxyHistogram(name, unit, description, explicit_bucket_boundaries_advisory) self._instruments.append(proxy) return proxy @@ -653,12 +639,8 @@ def create_observable_gauge( ) -> ObservableGauge: with self._lock: if self._real_meter: - return self._real_meter.create_observable_gauge( - name, callbacks, unit, description - ) - proxy = _ProxyObservableGauge( - name, callbacks, unit=unit, description=description - ) + return self._real_meter.create_observable_gauge(name, callbacks, unit, description) + proxy = _ProxyObservableGauge(name, callbacks, unit=unit, description=description) self._instruments.append(proxy) return proxy @@ -677,9 +659,7 @@ def create_observable_up_down_counter( unit, description, ) - proxy = _ProxyObservableUpDownCounter( - name, callbacks, unit=unit, description=description - ) + proxy = _ProxyObservableUpDownCounter(name, callbacks, unit=unit, description=description) self._instruments.append(proxy) return proxy @@ -697,9 +677,7 @@ def create_counter( description: str = "", ) -> Counter: """Returns a no-op Counter.""" - status = self._register_instrument( - name, NoOpCounter, unit, description - ) + status = self._register_instrument(name, NoOpCounter, unit, description) if status.conflict: self._log_instrument_registration_conflict( name, @@ -736,9 +714,7 @@ def create_up_down_counter( description: str = "", ) -> UpDownCounter: """Returns a no-op UpDownCounter.""" - status = self._register_instrument( - name, NoOpUpDownCounter, unit, description - ) + status = self._register_instrument(name, NoOpUpDownCounter, unit, description) if status.conflict: self._log_instrument_registration_conflict( name, @@ -757,9 +733,7 @@ def create_observable_counter( description: str = "", ) -> ObservableCounter: """Returns a no-op ObservableCounter.""" - status = self._register_instrument( - name, NoOpObservableCounter, unit, description - ) + status = self._register_instrument(name, NoOpObservableCounter, unit, description) if status.conflict: self._log_instrument_registration_conflict( name, @@ -789,9 +763,7 @@ def create_histogram( NoOpHistogram, unit, description, - _MetricsHistogramAdvisory( - explicit_bucket_boundaries=explicit_bucket_boundaries_advisory - ), + _MetricsHistogramAdvisory(explicit_bucket_boundaries=explicit_bucket_boundaries_advisory), ) if status.conflict: self._log_instrument_registration_conflict( @@ -816,9 +788,7 @@ def create_observable_gauge( description: str = "", ) -> ObservableGauge: """Returns a no-op ObservableGauge.""" - status = self._register_instrument( - name, NoOpObservableGauge, unit, description - ) + status = self._register_instrument(name, NoOpObservableGauge, unit, description) if status.conflict: self._log_instrument_registration_conflict( name, @@ -842,9 +812,7 @@ def create_observable_up_down_counter( description: str = "", ) -> ObservableUpDownCounter: """Returns a no-op ObservableUpDownCounter.""" - status = self._register_instrument( - name, NoOpObservableUpDownCounter, unit, description - ) + status = self._register_instrument(name, NoOpObservableUpDownCounter, unit, description) if status.conflict: self._log_instrument_registration_conflict( name, diff --git a/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py b/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py index d60b8f7a4c9..e93f93c8127 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py +++ b/opentelemetry-api/src/opentelemetry/metrics/_internal/instrument.py @@ -47,10 +47,7 @@ class CallbackOptions: InstrumentT = TypeVar("InstrumentT", bound="Instrument") # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] class Instrument(ABC): @@ -66,9 +63,7 @@ def __init__( pass @staticmethod - def _check_name_unit_description( - name: str, unit: str, description: str - ) -> dict[str, str | None]: + def _check_name_unit_description(name: str, unit: str, description: str) -> dict[str, str | None]: """ Checks the following instrument name, unit and description for compliance with the spec. @@ -300,12 +295,8 @@ def __init__( ) -class _ProxyObservableCounter( - _ProxyAsynchronousInstrument[ObservableCounter], ObservableCounter -): - def _create_real_instrument( - self, meter: "metrics.Meter" - ) -> ObservableCounter: +class _ProxyObservableCounter(_ProxyAsynchronousInstrument[ObservableCounter], ObservableCounter): + def _create_real_instrument(self, meter: "metrics.Meter") -> ObservableCounter: return meter.create_observable_counter( self._name, self._callbacks, @@ -343,9 +334,7 @@ class _ProxyObservableUpDownCounter( _ProxyAsynchronousInstrument[ObservableUpDownCounter], ObservableUpDownCounter, ): - def _create_real_instrument( - self, meter: "metrics.Meter" - ) -> ObservableUpDownCounter: + def _create_real_instrument(self, meter: "metrics.Meter") -> ObservableUpDownCounter: return meter.create_observable_up_down_counter( self._name, self._callbacks, @@ -428,9 +417,7 @@ def __init__( explicit_bucket_boundaries_advisory: Sequence[float] | None = None, ) -> None: super().__init__(name, unit=unit, description=description) - self._explicit_bucket_boundaries_advisory = ( - explicit_bucket_boundaries_advisory - ) + self._explicit_bucket_boundaries_advisory = explicit_bucket_boundaries_advisory def record( self, @@ -479,9 +466,7 @@ class _ProxyObservableGauge( _ProxyAsynchronousInstrument[ObservableGauge], ObservableGauge, ): - def _create_real_instrument( - self, meter: "metrics.Meter" - ) -> ObservableGauge: + def _create_real_instrument(self, meter: "metrics.Meter") -> ObservableGauge: return meter.create_observable_gauge( self._name, self._callbacks, diff --git a/opentelemetry-api/src/opentelemetry/propagate/__init__.py b/opentelemetry-api/src/opentelemetry/propagate/__init__.py index ca0a1faffb6..cca15608620 100644 --- a/opentelemetry-api/src/opentelemetry/propagate/__init__.py +++ b/opentelemetry-api/src/opentelemetry/propagate/__init__.py @@ -33,19 +33,13 @@ def get_header_from_flask_request(request, key): return request.headers.get_all(key) - def set_header_into_requests_request( - request: requests.Request, key: str, value: str - ): + def set_header_into_requests_request(request: requests.Request, key: str, value: str): request.headers[key] = value def example_route(): - context = PROPAGATOR.extract( - get_header_from_flask_request, flask.request - ) - request_to_downstream = requests.Request( - "GET", "http://httpbin.org/get" - ) + context = PROPAGATOR.extract(get_header_from_flask_request, flask.request) + request_to_downstream = requests.Request("GET", "http://httpbin.org/get") PROPAGATOR.inject( set_header_into_requests_request, request_to_downstream, @@ -123,9 +117,7 @@ def _load_propagators() -> textmap.TextMapPropagator: TraceContextTextMapPropagator, ) - return composite.CompositePropagator( - [TraceContextTextMapPropagator(), W3CBaggagePropagator()] - ) + return composite.CompositePropagator([TraceContextTextMapPropagator(), W3CBaggagePropagator()]) # pylint: disable=import-outside-toplevel,no-name-in-module from opentelemetry.util._importlib_metadata import ( @@ -136,9 +128,7 @@ def _load_propagators() -> textmap.TextMapPropagator: for _propagator in configured.split(","): _propagator = _propagator.strip() if _propagator.lower() == "none": - logger.debug( - "OTEL_PROPAGATORS environment variable contains none, removing all propagators" - ) + logger.debug("OTEL_PROPAGATORS environment variable contains none, removing all propagators") return composite.CompositePropagator([]) try: _propagators.append( @@ -152,9 +142,7 @@ def _load_propagators() -> textmap.TextMapPropagator: ).load()() ) except StopIteration: - raise ValueError( - f"Propagator {_propagator} not found. It is either misspelled or not installed." - ) + raise ValueError(f"Propagator {_propagator} not found. It is either misspelled or not installed.") except Exception: # pylint: disable=broad-exception-caught logger.exception("Failed to load propagator: %s", _propagator) raise diff --git a/opentelemetry-api/src/opentelemetry/propagators/_envcarrier.py b/opentelemetry-api/src/opentelemetry/propagators/_envcarrier.py index 7c381e36d9c..c474745638a 100644 --- a/opentelemetry-api/src/opentelemetry/propagators/_envcarrier.py +++ b/opentelemetry-api/src/opentelemetry/propagators/_envcarrier.py @@ -29,9 +29,7 @@ def _is_normalized_key(key: str) -> bool: return False if "0" <= key[0] <= "9": return False - return all( - "A" <= char <= "Z" or "0" <= char <= "9" or char == "_" for char in key - ) + return all("A" <= char <= "Z" or "0" <= char <= "9" or char == "_" for char in key) class EnvironmentGetter(Getter[Mapping[str, str]]): @@ -85,9 +83,7 @@ class EnvironmentSetter(Setter[MutableMapping[str, str]]): subprocess.run(myCommand, env=env_vars) """ - def set( - self, carrier: MutableMapping[str, str], key: str, value: str - ) -> None: + def set(self, carrier: MutableMapping[str, str], key: str, value: str) -> None: """Set a value in the carrier dictionary for the given key. Args: diff --git a/opentelemetry-api/src/opentelemetry/propagators/composite.py b/opentelemetry-api/src/opentelemetry/propagators/composite.py index 1d3c3912ee1..769e9f93597 100644 --- a/opentelemetry-api/src/opentelemetry/propagators/composite.py +++ b/opentelemetry-api/src/opentelemetry/propagators/composite.py @@ -19,9 +19,7 @@ class CompositePropagator(textmap.TextMapPropagator): propagators: the list of propagators to use """ - def __init__( - self, propagators: collections.abc.Sequence[textmap.TextMapPropagator] - ) -> None: + def __init__(self, propagators: collections.abc.Sequence[textmap.TextMapPropagator]) -> None: self._propagators = propagators def extract( @@ -73,9 +71,7 @@ def fields(self) -> set[str]: return composite_fields -@deprecated( - "You should use CompositePropagator. Deprecated since version 1.2.0." -) +@deprecated("You should use CompositePropagator. Deprecated since version 1.2.0.") class CompositeHTTPPropagator(CompositePropagator): """CompositeHTTPPropagator provides a mechanism for combining multiple propagators into a single one. diff --git a/opentelemetry-api/src/opentelemetry/propagators/textmap.py b/opentelemetry-api/src/opentelemetry/propagators/textmap.py index 04f5fe86832..7dc132e5b92 100644 --- a/opentelemetry-api/src/opentelemetry/propagators/textmap.py +++ b/opentelemetry-api/src/opentelemetry/propagators/textmap.py @@ -61,9 +61,7 @@ def set(self, carrier: CarrierT, key: str, value: str) -> None: class DefaultGetter(Getter[Mapping[str, CarrierValT]]): - def get( - self, carrier: Mapping[str, CarrierValT], key: str - ) -> list[str] | None: + def get(self, carrier: Mapping[str, CarrierValT], key: str) -> list[str] | None: """Getter implementation to retrieve a value from a dictionary. Args: diff --git a/opentelemetry-api/src/opentelemetry/trace/__init__.py b/opentelemetry-api/src/opentelemetry/trace/__init__.py index efddbaa66d3..9409d482268 100644 --- a/opentelemetry-api/src/opentelemetry/trace/__init__.py +++ b/opentelemetry-api/src/opentelemetry/trace/__init__.py @@ -233,9 +233,7 @@ def get_tracer( return NoOpTracer() -@deprecated( - "You should use NoOpTracerProvider. Deprecated since version 1.9.0." -) +@deprecated("You should use NoOpTracerProvider. Deprecated since version 1.9.0.") class _DefaultTracerProvider(NoOpTracerProvider): """The default TracerProvider, used when no implementation is available. @@ -464,9 +462,7 @@ def start_span( if isinstance(current_span, NonRecordingSpan): return current_span parent_span_context = current_span.get_span_context() - if parent_span_context is not None and not isinstance( - parent_span_context, SpanContext - ): + if parent_span_context is not None and not isinstance(parent_span_context, SpanContext): logger.warning( "Invalid span context for %s: %s", current_span, @@ -573,9 +569,7 @@ def get_tracer_provider() -> TracerProvider: if OTEL_PYTHON_TRACER_PROVIDER not in os.environ: return _PROXY_TRACER_PROVIDER - tracer_provider: TracerProvider = _load_provider( - OTEL_PYTHON_TRACER_PROVIDER, "tracer_provider" - ) + tracer_provider: TracerProvider = _load_provider(OTEL_PYTHON_TRACER_PROVIDER, "tracer_provider") _set_tracer_provider(tracer_provider, log=False) # _TRACER_PROVIDER will have been set by one thread return cast("TracerProvider", _TRACER_PROVIDER) diff --git a/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py b/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py index 97c64d93737..bb41c132f3a 100644 --- a/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py +++ b/opentelemetry-api/src/opentelemetry/trace/propagation/tracecontext.py @@ -15,10 +15,7 @@ class TraceContextTextMapPropagator(textmap.TextMapPropagator): _TRACEPARENT_HEADER_NAME = "traceparent" _TRACESTATE_HEADER_NAME = "tracestate" - _TRACEPARENT_HEADER_FORMAT = ( - "^[ \t]*([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})" - + "(-.*)?[ \t]*$" - ) + _TRACEPARENT_HEADER_FORMAT = "^[ \t]*([0-9a-f]{2})-([0-9a-f]{32})-([0-9a-f]{16})-([0-9a-f]{2})" + "(-.*)?[ \t]*$" _TRACEPARENT_HEADER_FORMAT_RE = re.compile(_TRACEPARENT_HEADER_FORMAT) def extract( @@ -70,9 +67,7 @@ def extract( trace_flags=trace.TraceFlags(int(trace_flags, 16)), trace_state=tracestate, ) - return trace.set_span_in_context( - trace.NonRecordingSpan(span_context), context - ) + return trace.set_span_in_context(trace.NonRecordingSpan(span_context), context) def inject( self, @@ -92,9 +87,7 @@ def inject( setter.set(carrier, self._TRACEPARENT_HEADER_NAME, traceparent_string) if span_context.trace_state: tracestate_string = span_context.trace_state.to_header() - setter.set( - carrier, self._TRACESTATE_HEADER_NAME, tracestate_string - ) + setter.set(carrier, self._TRACESTATE_HEADER_NAME, tracestate_string) @property def fields(self) -> set[str]: diff --git a/opentelemetry-api/src/opentelemetry/trace/span.py b/opentelemetry-api/src/opentelemetry/trace/span.py index 993023cf83c..745f4f5ff08 100644 --- a/opentelemetry-api/src/opentelemetry/trace/span.py +++ b/opentelemetry-api/src/opentelemetry/trace/span.py @@ -38,9 +38,7 @@ # nblk-chr = %x21-2B / %x2D-3C / %x3E-7E # chr = %x20 / nblk-chr -_VALUE_FORMAT = ( - r"[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]" -) +_VALUE_FORMAT = r"[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]" _VALUE_PATTERN = re.compile(_VALUE_FORMAT) @@ -84,9 +82,7 @@ def get_span_context(self) -> SpanContext: """ @abc.abstractmethod - def set_attributes( - self, attributes: Mapping[str, types.AttributeValue] - ) -> None: + def set_attributes(self, attributes: Mapping[str, types.AttributeValue]) -> None: """Sets Attributes. Sets Attributes with the key and value passed as arguments dict. @@ -267,9 +263,7 @@ def __init__( continue self._dict[key] = value else: - _logger.warning( - "Invalid key/value pair (%s, %s) found.", key, value - ) + _logger.warning("Invalid key/value pair (%s, %s) found.", key, value) def __contains__(self, item: object) -> bool: return item in self._dict @@ -284,10 +278,7 @@ def __len__(self) -> int: return len(self._dict) def __repr__(self) -> str: - pairs = [ - f"{{key={key}, value={value}}}" - for key, value in self._dict.items() - ] + pairs = [f"{{key={key}, value={value}}}" for key, value in self._dict.items()] return str(pairs) def add(self, key: str, value: str) -> TraceState: @@ -306,9 +297,7 @@ def add(self, key: str, value: str) -> TraceState: same tracestate will be returned. """ if not _is_valid_pair(key, value): - _logger.warning( - "Invalid key/value pair (%s, %s) found.", key, value - ) + _logger.warning("Invalid key/value pair (%s, %s) found.", key, value) return self # There can be a maximum of 32 pairs if len(self) >= _TRACECONTEXT_MAXIMUM_TRACESTATE_KEYS: @@ -337,9 +326,7 @@ def update(self, key: str, value: str) -> TraceState: same tracestate will be returned. """ if not _is_valid_pair(key, value): - _logger.warning( - "Invalid key/value pair (%s, %s) found.", key, value - ) + _logger.warning("Invalid key/value pair (%s, %s) found.", key, value) return self prev_state = self._dict.copy() prev_state.pop(key, None) @@ -462,8 +449,7 @@ def __new__( trace_state = DEFAULT_TRACE_STATE is_valid = ( - INVALID_TRACE_ID < trace_id <= _TRACE_ID_MAX_VALUE - and INVALID_SPAN_ID < span_id <= _SPAN_ID_MAX_VALUE + INVALID_TRACE_ID < trace_id <= _TRACE_ID_MAX_VALUE and INVALID_SPAN_ID < span_id <= _SPAN_ID_MAX_VALUE ) return tuple.__new__( @@ -507,9 +493,7 @@ def is_valid(self) -> bool: return self[5] # pylint: disable=unsubscriptable-object def __setattr__(self, *args: str) -> None: - _logger.debug( - "Immutable type, ignoring call to set attribute", stack_info=True - ) + _logger.debug("Immutable type, ignoring call to set attribute", stack_info=True) def __delattr__(self, *args: str) -> None: _logger.debug( @@ -539,9 +523,7 @@ def is_recording(self) -> bool: def end(self, end_time: int | None = None) -> None: pass - def set_attributes( - self, attributes: Mapping[str, types.AttributeValue] - ) -> None: + def set_attributes(self, attributes: Mapping[str, types.AttributeValue]) -> None: pass def set_attribute(self, key: str, value: types.AttributeValue) -> None: diff --git a/opentelemetry-api/src/opentelemetry/trace/status.py b/opentelemetry-api/src/opentelemetry/trace/status.py index 1a814265361..88c07a69107 100644 --- a/opentelemetry-api/src/opentelemetry/trace/status.py +++ b/opentelemetry-api/src/opentelemetry/trace/status.py @@ -42,9 +42,7 @@ def __init__( logger.warning("Invalid status description type, expected str") return if status_code is not StatusCode.ERROR: - logger.warning( - "description should only be set when status_code is set to StatusCode.ERROR" - ) + logger.warning("description should only be set when status_code is set to StatusCode.ERROR") return self._description = description diff --git a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py index 9822c2e74f7..656afbb809a 100644 --- a/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py +++ b/opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py @@ -37,9 +37,7 @@ def _as_entry_points(eps: Any) -> EntryPoints: if isinstance(eps, dict): return EntryPoints(itertools.chain.from_iterable(dict.values(eps))) # This case should be unreachable, but is included as a fallback. - return EntryPoints( - ep for group in eps.groups for ep in eps.select(group=group) - ) + return EntryPoints(ep for group in eps.groups for ep in eps.select(group=group)) @cache diff --git a/opentelemetry-api/src/opentelemetry/util/_providers.py b/opentelemetry-api/src/opentelemetry/util/_providers.py index e77e5e45498..9736c5f1553 100644 --- a/opentelemetry-api/src/opentelemetry/util/_providers.py +++ b/opentelemetry-api/src/opentelemetry/util/_providers.py @@ -14,9 +14,7 @@ logger = getLogger(__name__) -def _load_provider( - provider_environment_variable: str, provider: str -) -> Provider: # type: ignore[type-var] +def _load_provider(provider_environment_variable: str, provider: str) -> Provider: # type: ignore[type-var] # pylint: disable=import-outside-toplevel,no-name-in-module from opentelemetry.util._importlib_metadata import ( entry_points, diff --git a/opentelemetry-api/src/opentelemetry/util/re.py b/opentelemetry-api/src/opentelemetry/util/re.py index 5ac78133411..d2bc5582343 100644 --- a/opentelemetry-api/src/opentelemetry/util/re.py +++ b/opentelemetry-api/src/opentelemetry/util/re.py @@ -15,9 +15,7 @@ # Optional whitespace _OWS = r"[ \t]*" # A key contains printable US-ASCII characters except: SP and "(),/:;<=>?@[\]{} -_KEY_FORMAT = ( - r"[\x21\x23-\x27\x2a\x2b\x2d\x2e\x30-\x39\x41-\x5a\x5e-\x7a\x7c\x7e]+" -) +_KEY_FORMAT = r"[\x21\x23-\x27\x2a\x2b\x2d\x2e\x30-\x39\x41-\x5a\x5e-\x7a\x7c\x7e]+" # A value contains a URL-encoded UTF-8 string. The encoded form can contain any # printable US-ASCII characters (0x20-0x7f) other than SP, DEL, and ",;/ _VALUE_FORMAT = r"[\x21\x23-\x2b\x2d-\x3a\x3c-\x5b\x5d-\x7e]*" @@ -27,9 +25,7 @@ _KEY_VALUE_FORMAT = rf"{_OWS}{_KEY_FORMAT}{_OWS}={_OWS}{_VALUE_FORMAT}{_OWS}" _HEADER_PATTERN = compile(_KEY_VALUE_FORMAT) -_LIBERAL_HEADER_PATTERN = compile( - rf"{_OWS}{_KEY_FORMAT}{_OWS}={_OWS}{_LIBERAL_VALUE_FORMAT}{_OWS}" -) +_LIBERAL_HEADER_PATTERN = compile(rf"{_OWS}{_KEY_FORMAT}{_OWS}={_OWS}{_LIBERAL_VALUE_FORMAT}{_OWS}") _DELIMITER_PATTERN = compile(r"[ \t]*,[ \t]*") _BAGGAGE_PROPERTY_FORMAT = rf"{_KEY_VALUE_FORMAT}|{_OWS}{_KEY_FORMAT}{_OWS}" @@ -48,9 +44,7 @@ # pylint: disable=invalid-name -@deprecated( - "You should use parse_env_headers. Deprecated since version 1.15.0." -) +@deprecated("You should use parse_env_headers. Deprecated since version 1.15.0.") def parse_headers(s: str) -> Mapping[str, str]: return parse_env_headers(s) @@ -71,9 +65,7 @@ def parse_env_headers(s: str, liberal: bool = False) -> Mapping[str, str]: continue header_match = _HEADER_PATTERN.fullmatch(header.strip()) if not header_match and not liberal: - _logger.warning( - _INVALID_HEADER_ERROR_MESSAGE_STRICT_TEMPLATE, header - ) + _logger.warning(_INVALID_HEADER_ERROR_MESSAGE_STRICT_TEMPLATE, header) continue if header_match: @@ -86,13 +78,9 @@ def parse_env_headers(s: str, liberal: bool = False) -> Mapping[str, str]: else: # this is not url-encoded and does not match the spec but we decided to be # liberal in what we accept to match other languages SDKs behaviour - liberal_header_match = _LIBERAL_HEADER_PATTERN.fullmatch( - header.strip() - ) + liberal_header_match = _LIBERAL_HEADER_PATTERN.fullmatch(header.strip()) if not liberal_header_match: - _logger.warning( - _INVALID_HEADER_ERROR_MESSAGE_LIBERAL_TEMPLATE, header - ) + _logger.warning(_INVALID_HEADER_ERROR_MESSAGE_LIBERAL_TEMPLATE, header) continue liberal_match_string: str = liberal_header_match.string diff --git a/opentelemetry-api/src/opentelemetry/util/types.py b/opentelemetry-api/src/opentelemetry/util/types.py index b8a753871bc..1e8e74a3f08 100644 --- a/opentelemetry-api/src/opentelemetry/util/types.py +++ b/opentelemetry-api/src/opentelemetry/util/types.py @@ -6,27 +6,9 @@ # This is the implementation of the "Any" type as specified by the specifications of OpenTelemetry data model for logs. # For more details, refer to the OTel specification: # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#type-any -AnyValue = ( - str - | bool - | int - | float - | bytes - | Sequence["AnyValue"] - | Mapping[str, "AnyValue"] - | None -) +AnyValue = str | bool | int | float | bytes | Sequence["AnyValue"] | Mapping[str, "AnyValue"] | None -AttributeValue = ( - str - | bool - | int - | float - | Sequence[str] - | Sequence[bool] - | Sequence[int] - | Sequence[float] -) +AttributeValue = str | bool | int | float | Sequence[str] | Sequence[bool] | Sequence[int] | Sequence[float] Attributes = Mapping[str, AttributeValue] | None AttributesAsKey = tuple[ tuple[ diff --git a/opentelemetry-api/tests/attributes/test_attributes.py b/opentelemetry-api/tests/attributes/test_attributes.py index 282300256fd..eb210b2730d 100644 --- a/opentelemetry-api/tests/attributes/test_attributes.py +++ b/opentelemetry-api/tests/attributes/test_attributes.py @@ -82,9 +82,7 @@ def test_sequence_attr_decode(self): None, "Keep-Alive", ] - self.assertEqual( - _clean_attribute("headers", seq, None), tuple(expected) - ) + self.assertEqual(_clean_attribute("headers", seq, None), tuple(expected)) class TestExtendedAttributes(unittest.TestCase): @@ -149,9 +147,7 @@ def test_sequence_attr_decode(self): b"\x81", b"Keep-Alive", ] - self.assertEqual( - _clean_extended_attribute("headers", seq, None), tuple(seq) - ) + self.assertEqual(_clean_extended_attribute("headers", seq, None), tuple(seq)) def test_mapping(self): mapping = { @@ -172,9 +168,7 @@ def test_mapping(self): "valid_mapping": {"str": 1}, "invalid_mapping": {}, } - self.assertEqual( - _clean_extended_attribute("headers", mapping, None), expected - ) + self.assertEqual(_clean_extended_attribute("headers", mapping, None), expected) class TestBoundedAttributes(unittest.TestCase): @@ -333,15 +327,11 @@ def __str__(self): wsgi_request = DummyWSGIRequest() - cleaned_value = _clean_extended_attribute( - "request", wsgi_request, None - ) + cleaned_value = _clean_extended_attribute("request", wsgi_request, None) # Verify we get a string back from the cleaner self.assertIsInstance(cleaned_value, str) - self.assertEqual( - "", cleaned_value - ) + self.assertEqual("", cleaned_value) def test_invalid_anyvalue_type_raises_typeerror(self): class BadStr: @@ -370,9 +360,7 @@ def test_deepcopy(self): self.assertNotEqual(bdict["age"], bdict_copy["age"]) def test_deepcopy_preserves_immutability(self): - bdict = BoundedAttributes( - maxlen=4, attributes=self.base, immutable=True - ) + bdict = BoundedAttributes(maxlen=4, attributes=self.base, immutable=True) bdict_copy = copy.deepcopy(bdict) with self.assertRaises(TypeError): diff --git a/opentelemetry-api/tests/baggage/propagation/test_propagation.py b/opentelemetry-api/tests/baggage/propagation/test_propagation.py index dca29ae14d7..619dff838ef 100644 --- a/opentelemetry-api/tests/baggage/propagation/test_propagation.py +++ b/opentelemetry-api/tests/baggage/propagation/test_propagation.py @@ -20,9 +20,5 @@ def test_propagate_baggage(self): propagator.inject(carrier, ctx) ctx_propagated = propagator.extract(carrier) - self.assertEqual( - get_baggage("Test1", context=ctx_propagated), "value1" - ) - self.assertEqual( - get_baggage("test2", context=ctx_propagated), "value2" - ) + self.assertEqual(get_baggage("Test1", context=ctx_propagated), "value1") + self.assertEqual(get_baggage("test2", context=ctx_propagated), "value2") diff --git a/opentelemetry-api/tests/logs/test_logger_provider.py b/opentelemetry-api/tests/logs/test_logger_provider.py index 809c095113f..b7de110ede5 100644 --- a/opentelemetry-api/tests/logs/test_logger_provider.py +++ b/opentelemetry-api/tests/logs/test_logger_provider.py @@ -32,9 +32,7 @@ def test_get_logger_provider(self): # pylint: disable=protected-access self.assertIsNone(logs_internal._LOGGER_PROVIDER) - self.assertIsInstance( - get_logger_provider(), logs_internal.ProxyLoggerProvider - ) + self.assertIsInstance(get_logger_provider(), logs_internal.ProxyLoggerProvider) logs_internal._LOGGER_PROVIDER = None diff --git a/opentelemetry-api/tests/logs/test_proxy.py b/opentelemetry-api/tests/logs/test_proxy.py index 71772eb5a72..c3c3519d969 100644 --- a/opentelemetry-api/tests/logs/test_proxy.py +++ b/opentelemetry-api/tests/logs/test_proxy.py @@ -57,9 +57,7 @@ def test_proxy_logger(self): self.assertIsInstance(_logs.get_logger_provider(), TestProvider) # logger provider now returns real instance - self.assertIsInstance( - _logs.get_logger_provider().get_logger("fresh"), LoggerTest - ) + self.assertIsInstance(_logs.get_logger_provider().get_logger("fresh"), LoggerTest) # references to the old provider still work but return real logger now real_logger = provider.get_logger("proxy-test") diff --git a/opentelemetry-api/tests/metrics/test_instruments.py b/opentelemetry-api/tests/metrics/test_instruments.py index 0f844b11050..7888f7a1478 100644 --- a/opentelemetry-api/tests/metrics/test_instruments.py +++ b/opentelemetry-api/tests/metrics/test_instruments.py @@ -27,9 +27,7 @@ class ChildInstrument(Instrument): # pylint: disable=useless-parent-delegation def __init__(self, name, *args, unit="", description="", **kwargs): - super().__init__( - name, *args, unit=unit, description=description, **kwargs - ) + super().__init__(name, *args, unit=unit, description=description, **kwargs) class TestCounter(TestCase): @@ -38,9 +36,7 @@ def test_create_counter(self): Test that the Counter can be created with create_counter. """ - self.assertTrue( - isinstance(NoOpMeter("name").create_counter("name"), Counter) - ) + self.assertTrue(isinstance(NoOpMeter("name").create_counter("name"), Counter)) def test_api_counter_abstract(self): """ @@ -68,12 +64,8 @@ def test_create_counter_api(self): self.assertIs(create_counter_signature.parameters["unit"].default, "") create_counter_signature = signature(Meter.create_counter) - self.assertIn( - "description", create_counter_signature.parameters.keys() - ) - self.assertIs( - create_counter_signature.parameters["description"].default, "" - ) + self.assertIn("description", create_counter_signature.parameters.keys()) + self.assertIs(create_counter_signature.parameters["description"].default, "") def test_counter_add_method(self): """ @@ -93,9 +85,7 @@ def test_counter_add_method(self): self.assertIs(add_signature.parameters["attributes"].default, None) self.assertIn("amount", add_signature.parameters.keys()) - self.assertIs( - add_signature.parameters["amount"].default, Signature.empty - ) + self.assertIs(add_signature.parameters["amount"].default, Signature.empty) class TestObservableCounter(TestCase): @@ -109,9 +99,7 @@ def callback(): self.assertTrue( isinstance( - NoOpMeter("name").create_observable_counter( - "name", callbacks=[callback()] - ), + NoOpMeter("name").create_observable_counter("name", callbacks=[callback()]), ObservableCounter, ) ) @@ -131,49 +119,29 @@ def test_create_observable_counter_api(self): Test that the API for creating a observable_counter accepts the description of the instrument """ - create_observable_counter_signature = signature( - Meter.create_observable_counter - ) - self.assertIn( - "name", create_observable_counter_signature.parameters.keys() - ) + create_observable_counter_signature = signature(Meter.create_observable_counter) + self.assertIn("name", create_observable_counter_signature.parameters.keys()) self.assertIs( create_observable_counter_signature.parameters["name"].default, Signature.empty, ) - create_observable_counter_signature = signature( - Meter.create_observable_counter - ) - self.assertIn( - "callbacks", create_observable_counter_signature.parameters.keys() - ) + create_observable_counter_signature = signature(Meter.create_observable_counter) + self.assertIn("callbacks", create_observable_counter_signature.parameters.keys()) self.assertIs( - create_observable_counter_signature.parameters[ - "callbacks" - ].default, + create_observable_counter_signature.parameters["callbacks"].default, None, ) - create_observable_counter_signature = signature( - Meter.create_observable_counter - ) - self.assertIn( - "unit", create_observable_counter_signature.parameters.keys() - ) - self.assertIs( - create_observable_counter_signature.parameters["unit"].default, "" - ) + create_observable_counter_signature = signature(Meter.create_observable_counter) + self.assertIn("unit", create_observable_counter_signature.parameters.keys()) + self.assertIs(create_observable_counter_signature.parameters["unit"].default, "") - create_observable_counter_signature = signature( - Meter.create_observable_counter - ) + create_observable_counter_signature = signature(Meter.create_observable_counter) self.assertIn( "description", create_observable_counter_signature.parameters.keys(), ) self.assertIs( - create_observable_counter_signature.parameters[ - "description" - ].default, + create_observable_counter_signature.parameters["description"].default, "", ) @@ -186,12 +154,8 @@ def test_observable_counter_generator(self): Test that the instrument does not accept negative measurements. """ - create_observable_counter_signature = signature( - Meter.create_observable_counter - ) - self.assertIn( - "callbacks", create_observable_counter_signature.parameters.keys() - ) + create_observable_counter_signature = signature(Meter.create_observable_counter) + self.assertIn("callbacks", create_observable_counter_signature.parameters.keys()) self.assertIs( create_observable_counter_signature.parameters["name"].default, Signature.empty, @@ -204,9 +168,7 @@ def test_create_histogram(self): Test that the Histogram can be created with create_histogram. """ - self.assertTrue( - isinstance(NoOpMeter("name").create_histogram("name"), Histogram) - ) + self.assertTrue(isinstance(NoOpMeter("name").create_histogram("name"), Histogram)) def test_api_histogram_abstract(self): """ @@ -231,17 +193,11 @@ def test_create_histogram_api(self): create_histogram_signature = signature(Meter.create_histogram) self.assertIn("unit", create_histogram_signature.parameters.keys()) - self.assertIs( - create_histogram_signature.parameters["unit"].default, "" - ) + self.assertIs(create_histogram_signature.parameters["unit"].default, "") create_histogram_signature = signature(Meter.create_histogram) - self.assertIn( - "description", create_histogram_signature.parameters.keys() - ) - self.assertIs( - create_histogram_signature.parameters["description"].default, "" - ) + self.assertIn("description", create_histogram_signature.parameters.keys()) + self.assertIs(create_histogram_signature.parameters["description"].default, "") def test_histogram_record_method(self): """ @@ -261,9 +217,7 @@ def test_histogram_record_method(self): self.assertIs(record_signature.parameters["attributes"].default, None) self.assertIn("amount", record_signature.parameters.keys()) - self.assertIs( - record_signature.parameters["amount"].default, Signature.empty - ) + self.assertIs(record_signature.parameters["amount"].default, Signature.empty) self.assertIsNone(NoOpHistogram("name").record(1)) @@ -274,9 +228,7 @@ def test_create_gauge(self): Test that the Gauge can be created with create_gauge. """ - self.assertTrue( - isinstance(NoOpMeter("name").create_gauge("name"), _Gauge) - ) + self.assertTrue(isinstance(NoOpMeter("name").create_gauge("name"), _Gauge)) def test_api_gauge_abstract(self): """ @@ -323,9 +275,7 @@ def callback(): self.assertTrue( isinstance( - NoOpMeter("name").create_observable_gauge( - "name", [callback()] - ), + NoOpMeter("name").create_observable_gauge("name", [callback()]), ObservableGauge, ) ) @@ -345,46 +295,26 @@ def test_create_observable_gauge_api(self): Test that the API for creating a observable_gauge accepts the description of the instrument """ - create_observable_gauge_signature = signature( - Meter.create_observable_gauge - ) - self.assertIn( - "name", create_observable_gauge_signature.parameters.keys() - ) + create_observable_gauge_signature = signature(Meter.create_observable_gauge) + self.assertIn("name", create_observable_gauge_signature.parameters.keys()) self.assertIs( create_observable_gauge_signature.parameters["name"].default, Signature.empty, ) - create_observable_gauge_signature = signature( - Meter.create_observable_gauge - ) - self.assertIn( - "callbacks", create_observable_gauge_signature.parameters.keys() - ) + create_observable_gauge_signature = signature(Meter.create_observable_gauge) + self.assertIn("callbacks", create_observable_gauge_signature.parameters.keys()) self.assertIs( create_observable_gauge_signature.parameters["callbacks"].default, None, ) - create_observable_gauge_signature = signature( - Meter.create_observable_gauge - ) - self.assertIn( - "unit", create_observable_gauge_signature.parameters.keys() - ) - self.assertIs( - create_observable_gauge_signature.parameters["unit"].default, "" - ) + create_observable_gauge_signature = signature(Meter.create_observable_gauge) + self.assertIn("unit", create_observable_gauge_signature.parameters.keys()) + self.assertIs(create_observable_gauge_signature.parameters["unit"].default, "") - create_observable_gauge_signature = signature( - Meter.create_observable_gauge - ) - self.assertIn( - "description", create_observable_gauge_signature.parameters.keys() - ) + create_observable_gauge_signature = signature(Meter.create_observable_gauge) + self.assertIn("description", create_observable_gauge_signature.parameters.keys()) self.assertIs( - create_observable_gauge_signature.parameters[ - "description" - ].default, + create_observable_gauge_signature.parameters["description"].default, "", ) @@ -395,12 +325,8 @@ def test_observable_gauge_callback(self): Test that there is a way to pass state to the callback. """ - create_observable_gauge_signature = signature( - Meter.create_observable_gauge - ) - self.assertIn( - "callbacks", create_observable_gauge_signature.parameters.keys() - ) + create_observable_gauge_signature = signature(Meter.create_observable_gauge) + self.assertIn("callbacks", create_observable_gauge_signature.parameters.keys()) self.assertIs( create_observable_gauge_signature.parameters["name"].default, Signature.empty, @@ -434,33 +360,19 @@ def test_create_up_down_counter_api(self): Test that the API for creating a up_down_counter accepts the description of the """ - create_up_down_counter_signature = signature( - Meter.create_up_down_counter - ) - self.assertIn( - "name", create_up_down_counter_signature.parameters.keys() - ) + create_up_down_counter_signature = signature(Meter.create_up_down_counter) + self.assertIn("name", create_up_down_counter_signature.parameters.keys()) self.assertIs( create_up_down_counter_signature.parameters["name"].default, Signature.empty, ) - create_up_down_counter_signature = signature( - Meter.create_up_down_counter - ) - self.assertIn( - "unit", create_up_down_counter_signature.parameters.keys() - ) - self.assertIs( - create_up_down_counter_signature.parameters["unit"].default, "" - ) + create_up_down_counter_signature = signature(Meter.create_up_down_counter) + self.assertIn("unit", create_up_down_counter_signature.parameters.keys()) + self.assertIs(create_up_down_counter_signature.parameters["unit"].default, "") - create_up_down_counter_signature = signature( - Meter.create_up_down_counter - ) - self.assertIn( - "description", create_up_down_counter_signature.parameters.keys() - ) + create_up_down_counter_signature = signature(Meter.create_up_down_counter) + self.assertIn("description", create_up_down_counter_signature.parameters.keys()) self.assertIs( create_up_down_counter_signature.parameters["description"].default, "", @@ -484,9 +396,7 @@ def test_up_down_counter_add_method(self): self.assertIs(add_signature.parameters["attributes"].default, None) self.assertIn("amount", add_signature.parameters.keys()) - self.assertIs( - add_signature.parameters["amount"].default, Signature.empty - ) + self.assertIs(add_signature.parameters["amount"].default, Signature.empty) class TestObservableUpDownCounter(TestCase): @@ -501,9 +411,7 @@ def callback(): self.assertTrue( isinstance( - NoOpMeter("name").create_observable_up_down_counter( - "name", [callback()] - ), + NoOpMeter("name").create_observable_up_down_counter("name", [callback()]), ObservableUpDownCounter, ) ) @@ -523,57 +431,41 @@ def test_create_observable_up_down_counter_api(self): Test that the API for creating a observable_up_down_counter accepts the description of the instrument """ - create_observable_up_down_counter_signature = signature( - Meter.create_observable_up_down_counter - ) + create_observable_up_down_counter_signature = signature(Meter.create_observable_up_down_counter) self.assertIn( "name", create_observable_up_down_counter_signature.parameters.keys(), ) self.assertIs( - create_observable_up_down_counter_signature.parameters[ - "name" - ].default, + create_observable_up_down_counter_signature.parameters["name"].default, Signature.empty, ) - create_observable_up_down_counter_signature = signature( - Meter.create_observable_up_down_counter - ) + create_observable_up_down_counter_signature = signature(Meter.create_observable_up_down_counter) self.assertIn( "callbacks", create_observable_up_down_counter_signature.parameters.keys(), ) self.assertIs( - create_observable_up_down_counter_signature.parameters[ - "callbacks" - ].default, + create_observable_up_down_counter_signature.parameters["callbacks"].default, None, ) - create_observable_up_down_counter_signature = signature( - Meter.create_observable_up_down_counter - ) + create_observable_up_down_counter_signature = signature(Meter.create_observable_up_down_counter) self.assertIn( "unit", create_observable_up_down_counter_signature.parameters.keys(), ) self.assertIs( - create_observable_up_down_counter_signature.parameters[ - "unit" - ].default, + create_observable_up_down_counter_signature.parameters["unit"].default, "", ) - create_observable_up_down_counter_signature = signature( - Meter.create_observable_up_down_counter - ) + create_observable_up_down_counter_signature = signature(Meter.create_observable_up_down_counter) self.assertIn( "description", create_observable_up_down_counter_signature.parameters.keys(), ) self.assertIs( - create_observable_up_down_counter_signature.parameters[ - "description" - ].default, + create_observable_up_down_counter_signature.parameters["description"].default, "", ) @@ -585,17 +477,13 @@ def test_observable_up_down_counter_callback(self): Test that the instrument accepts positive and negative values. """ - create_observable_up_down_counter_signature = signature( - Meter.create_observable_up_down_counter - ) + create_observable_up_down_counter_signature = signature(Meter.create_observable_up_down_counter) self.assertIn( "callbacks", create_observable_up_down_counter_signature.parameters.keys(), ) self.assertIs( - create_observable_up_down_counter_signature.parameters[ - "name" - ].default, + create_observable_up_down_counter_signature.parameters["name"].default, Signature.empty, ) @@ -603,98 +491,50 @@ def test_name_check(self): instrument = ChildInstrument("name") self.assertEqual( - instrument._check_name_unit_description( - "a" * 255, "unit", "description" - )["name"], + instrument._check_name_unit_description("a" * 255, "unit", "description")["name"], "a" * 255, ) self.assertEqual( - instrument._check_name_unit_description( - "a.", "unit", "description" - )["name"], + instrument._check_name_unit_description("a.", "unit", "description")["name"], "a.", ) self.assertEqual( - instrument._check_name_unit_description( - "a-", "unit", "description" - )["name"], + instrument._check_name_unit_description("a-", "unit", "description")["name"], "a-", ) self.assertEqual( - instrument._check_name_unit_description( - "a_", "unit", "description" - )["name"], + instrument._check_name_unit_description("a_", "unit", "description")["name"], "a_", ) self.assertEqual( - instrument._check_name_unit_description( - "a/", "unit", "description" - )["name"], + instrument._check_name_unit_description("a/", "unit", "description")["name"], "a/", ) # the old max length - self.assertIsNotNone( - instrument._check_name_unit_description( - "a" * 64, "unit", "description" - )["name"] - ) - self.assertIsNone( - instrument._check_name_unit_description( - "a" * 256, "unit", "description" - )["name"] - ) - self.assertIsNone( - instrument._check_name_unit_description( - "Ñ", "unit", "description" - )["name"] - ) - self.assertIsNone( - instrument._check_name_unit_description( - "_a", "unit", "description" - )["name"] - ) - self.assertIsNone( - instrument._check_name_unit_description( - "1a", "unit", "description" - )["name"] - ) - self.assertIsNone( - instrument._check_name_unit_description("", "unit", "description")[ - "name" - ] - ) + self.assertIsNotNone(instrument._check_name_unit_description("a" * 64, "unit", "description")["name"]) + self.assertIsNone(instrument._check_name_unit_description("a" * 256, "unit", "description")["name"]) + self.assertIsNone(instrument._check_name_unit_description("Ñ", "unit", "description")["name"]) + self.assertIsNone(instrument._check_name_unit_description("_a", "unit", "description")["name"]) + self.assertIsNone(instrument._check_name_unit_description("1a", "unit", "description")["name"]) + self.assertIsNone(instrument._check_name_unit_description("", "unit", "description")["name"]) def test_unit_check(self): instrument = ChildInstrument("name") self.assertEqual( - instrument._check_name_unit_description( - "name", "a" * 63, "description" - )["unit"], + instrument._check_name_unit_description("name", "a" * 63, "description")["unit"], "a" * 63, ) self.assertEqual( - instrument._check_name_unit_description( - "name", "{a}", "description" - )["unit"], + instrument._check_name_unit_description("name", "{a}", "description")["unit"], "{a}", ) - self.assertIsNone( - instrument._check_name_unit_description( - "name", "a" * 64, "description" - )["unit"] - ) - self.assertIsNone( - instrument._check_name_unit_description( - "name", "Ñ", "description" - )["unit"] - ) + self.assertIsNone(instrument._check_name_unit_description("name", "a" * 64, "description")["unit"]) + self.assertIsNone(instrument._check_name_unit_description("name", "Ñ", "description")["unit"]) self.assertEqual( - instrument._check_name_unit_description( - "name", None, "description" - )["unit"], + instrument._check_name_unit_description("name", None, "description")["unit"], "", ) @@ -702,14 +542,10 @@ def test_description_check(self): instrument = ChildInstrument("name") self.assertEqual( - instrument._check_name_unit_description( - "name", "unit", "description" - )["description"], + instrument._check_name_unit_description("name", "unit", "description")["description"], "description", ) self.assertEqual( - instrument._check_name_unit_description("name", "unit", None)[ - "description" - ], + instrument._check_name_unit_description("name", "unit", None)["description"], "", ) diff --git a/opentelemetry-api/tests/metrics/test_meter.py b/opentelemetry-api/tests/metrics/test_meter.py index 79b30b6c7f8..b6e4146a68a 100644 --- a/opentelemetry-api/tests/metrics/test_meter.py +++ b/opentelemetry-api/tests/metrics/test_meter.py @@ -17,13 +17,9 @@ def create_counter(self, name, unit="", description=""): super().create_counter(name, unit=unit, description=description) def create_up_down_counter(self, name, unit="", description=""): - super().create_up_down_counter( - name, unit=unit, description=description - ) + super().create_up_down_counter(name, unit=unit, description=description) - def create_observable_counter( - self, name, callbacks, unit="", description="" - ): + def create_observable_counter(self, name, callbacks, unit="", description=""): super().create_observable_counter( name, callbacks, @@ -49,9 +45,7 @@ def create_histogram( def create_gauge(self, name, unit="", description=""): super().create_gauge(name, unit=unit, description=description) - def create_observable_gauge( - self, name, callbacks, unit="", description="" - ): + def create_observable_gauge(self, name, callbacks, unit="", description=""): super().create_observable_gauge( name, callbacks, @@ -59,9 +53,7 @@ def create_observable_gauge( description=description, ) - def create_observable_up_down_counter( - self, name, callbacks, unit="", description="" - ): + def create_observable_up_down_counter(self, name, callbacks, unit="", description=""): super().create_observable_up_down_counter( name, callbacks, @@ -82,9 +74,7 @@ def test_repeated_instrument_names(self): test_meter.create_histogram("histogram") test_meter.create_gauge("gauge") test_meter.create_observable_gauge("observable_gauge", Mock()) - test_meter.create_observable_up_down_counter( - "observable_up_down_counter", Mock() - ) + test_meter.create_observable_up_down_counter("observable_up_down_counter", Mock()) except Exception as error: # pylint: disable=broad-exception-caught self.fail(f"Unexpected exception raised {error}") @@ -94,32 +84,22 @@ def test_repeated_instrument_names(self): "histogram", "gauge", ]: - with self.assertNoLogs( - "opentelemetry.metrics._internal", level="WARNING" - ): - getattr(test_meter, f"create_{instrument_name}")( - instrument_name - ) + with self.assertNoLogs("opentelemetry.metrics._internal", level="WARNING"): + getattr(test_meter, f"create_{instrument_name}")(instrument_name) for instrument_name in [ "observable_counter", "observable_gauge", "observable_up_down_counter", ]: - with self.assertNoLogs( - "opentelemetry.metrics._internal", level="WARNING" - ): - getattr(test_meter, f"create_{instrument_name}")( - instrument_name, Mock() - ) + with self.assertNoLogs("opentelemetry.metrics._internal", level="WARNING"): + getattr(test_meter, f"create_{instrument_name}")(instrument_name, Mock()) def test_repeated_instrument_names_with_different_advisory(self): try: test_meter = NoOpMeter("name") - test_meter.create_histogram( - "histogram", explicit_bucket_boundaries_advisory=[1.0] - ) + test_meter.create_histogram("histogram", explicit_bucket_boundaries_advisory=[1.0]) except Exception as error: # pylint: disable=broad-exception-caught self.fail(f"Unexpected exception raised {error}") @@ -185,6 +165,4 @@ def test_create_observable_up_down_counter(self): """ self.assertTrue(hasattr(Meter, "create_observable_up_down_counter")) - self.assertTrue( - Meter.create_observable_up_down_counter.__isabstractmethod__ - ) + self.assertTrue(Meter.create_observable_up_down_counter.__isabstractmethod__) diff --git a/opentelemetry-api/tests/metrics/test_meter_provider.py b/opentelemetry-api/tests/metrics/test_meter_provider.py index 02132b84181..38a202447fa 100644 --- a/opentelemetry-api/tests/metrics/test_meter_provider.py +++ b/opentelemetry-api/tests/metrics/test_meter_provider.py @@ -66,15 +66,11 @@ def test_set_meter_provider(reset_meter_provider): def test_set_meter_provider_calls_proxy_provider(reset_meter_provider): - with patch( - "opentelemetry.metrics._internal._PROXY_METER_PROVIDER" - ) as mock_proxy_mp: + with patch("opentelemetry.metrics._internal._PROXY_METER_PROVIDER") as mock_proxy_mp: assert metrics_internal._PROXY_METER_PROVIDER is mock_proxy_mp mock_real_mp = Mock() set_meter_provider(mock_real_mp) - mock_proxy_mp.on_set_meter_provider.assert_called_once_with( - mock_real_mp - ) + mock_proxy_mp.on_set_meter_provider.assert_called_once_with(mock_real_mp) def test_get_meter_provider(reset_meter_provider): @@ -89,9 +85,7 @@ def test_get_meter_provider(reset_meter_provider): metrics._METER_PROVIDER = None with ( - patch.dict( - "os.environ", {OTEL_PYTHON_METER_PROVIDER: "test_meter_provider"} - ), + patch.dict("os.environ", {OTEL_PYTHON_METER_PROVIDER: "test_meter_provider"}), patch("opentelemetry.metrics._internal._load_provider", Mock()), patch( "opentelemetry.metrics._internal.cast", @@ -107,9 +101,7 @@ def test_get_meter_parameters(self): Test that get_meter accepts name, version and schema_url """ try: - NoOpMeterProvider().get_meter( - "name", version="version", schema_url="schema_url" - ) + NoOpMeterProvider().get_meter("name", version="version", schema_url="schema_url") except Exception as error: # pylint: disable=broad-exception-caught self.fail(f"Unexpected exception raised: {error}") @@ -172,18 +164,14 @@ def test_proxy_provider(self): name = "foo" version = "1.2" schema_url = "schema_url" - proxy_meter: _ProxyMeter = proxy_meter_provider.get_meter( - name, version=version, schema_url=schema_url - ) + proxy_meter: _ProxyMeter = proxy_meter_provider.get_meter(name, version=version, schema_url=schema_url) self.assertIsInstance(proxy_meter, _ProxyMeter) # After setting a real meter provider on the proxy, it should notify # it's _ProxyMeters which should create their own real Meters mock_real_mp = Mock() proxy_meter_provider.on_set_meter_provider(mock_real_mp) - mock_real_mp.get_meter.assert_called_once_with( - name, version, schema_url - ) + mock_real_mp.get_meter.assert_called_once_with(name, version, schema_url) # After setting a real meter provider on the proxy, it should now return # new meters directly from the set real meter @@ -203,27 +191,17 @@ def test_proxy_meter(self): unit = "s" description = "Foobar" callback = Mock() - proxy_counter = proxy_meter.create_counter( - name, unit=unit, description=description - ) - proxy_updowncounter = proxy_meter.create_up_down_counter( - name, unit=unit, description=description - ) - proxy_histogram = proxy_meter.create_histogram( - name, unit=unit, description=description - ) + proxy_counter = proxy_meter.create_counter(name, unit=unit, description=description) + proxy_updowncounter = proxy_meter.create_up_down_counter(name, unit=unit, description=description) + proxy_histogram = proxy_meter.create_histogram(name, unit=unit, description=description) - proxy_gauge = proxy_meter.create_gauge( - name, unit=unit, description=description - ) + proxy_gauge = proxy_meter.create_gauge(name, unit=unit, description=description) proxy_observable_counter = proxy_meter.create_observable_counter( name, callbacks=[callback], unit=unit, description=description ) - proxy_observable_updowncounter = ( - proxy_meter.create_observable_up_down_counter( - name, callbacks=[callback], unit=unit, description=description - ) + proxy_observable_updowncounter = proxy_meter.create_observable_up_down_counter( + name, callbacks=[callback], unit=unit, description=description ) proxy_overvable_gauge = proxy_meter.create_observable_gauge( name, callbacks=[callback], unit=unit, description=description @@ -232,12 +210,8 @@ def test_proxy_meter(self): self.assertIsInstance(proxy_updowncounter, _ProxyUpDownCounter) self.assertIsInstance(proxy_histogram, _ProxyHistogram) self.assertIsInstance(proxy_gauge, _ProxyGauge) - self.assertIsInstance( - proxy_observable_counter, _ProxyObservableCounter - ) - self.assertIsInstance( - proxy_observable_updowncounter, _ProxyObservableUpDownCounter - ) + self.assertIsInstance(proxy_observable_counter, _ProxyObservableCounter) + self.assertIsInstance(proxy_observable_updowncounter, _ProxyObservableUpDownCounter) self.assertIsInstance(proxy_overvable_gauge, _ProxyObservableGauge) # Synchronous proxy instruments should be usable @@ -253,32 +227,18 @@ def test_proxy_meter(self): # from the real Meter to back their calls real_meter_provider = Mock() proxy_meter.on_set_meter_provider(real_meter_provider) - real_meter_provider.get_meter.assert_called_once_with( - meter_name, None, None - ) + real_meter_provider.get_meter.assert_called_once_with(meter_name, None, None) real_meter: Mock = real_meter_provider.get_meter() - real_meter.create_counter.assert_called_once_with( - name, unit, description - ) - real_meter.create_up_down_counter.assert_called_once_with( - name, unit, description - ) + real_meter.create_counter.assert_called_once_with(name, unit, description) + real_meter.create_up_down_counter.assert_called_once_with(name, unit, description) real_meter.create_histogram.assert_called_once_with( name, unit, description, explicit_bucket_boundaries_advisory=None ) - real_meter.create_gauge.assert_called_once_with( - name, unit, description - ) - real_meter.create_observable_counter.assert_called_once_with( - name, [callback], unit, description - ) - real_meter.create_observable_up_down_counter.assert_called_once_with( - name, [callback], unit, description - ) - real_meter.create_observable_gauge.assert_called_once_with( - name, [callback], unit, description - ) + real_meter.create_gauge.assert_called_once_with(name, unit, description) + real_meter.create_observable_counter.assert_called_once_with(name, [callback], unit, description) + real_meter.create_observable_up_down_counter.assert_called_once_with(name, [callback], unit, description) + real_meter.create_observable_gauge.assert_called_once_with(name, [callback], unit, description) # The synchronous instrument measurement methods should call through to # the real instruments @@ -294,9 +254,7 @@ def test_proxy_meter(self): proxy_counter.add(amount, attributes=attributes) real_counter.add.assert_called_once_with(amount, attributes, None) proxy_updowncounter.add(amount, attributes=attributes) - real_updowncounter.add.assert_called_once_with( - amount, attributes, None - ) + real_updowncounter.add.assert_called_once_with(amount, attributes, None) proxy_histogram.record(amount, attributes=attributes) real_histogram.record.assert_called_once_with(amount, attributes, None) proxy_gauge.set(amount, attributes=attributes) @@ -316,25 +274,15 @@ def test_proxy_meter_with_real_meter(self) -> None: unit = "s" description = "Foobar" callback = Mock() - counter = proxy_meter.create_counter( - name, unit=unit, description=description - ) - updowncounter = proxy_meter.create_up_down_counter( - name, unit=unit, description=description - ) - histogram = proxy_meter.create_histogram( - name, unit=unit, description=description - ) - gauge = proxy_meter.create_gauge( - name, unit=unit, description=description - ) + counter = proxy_meter.create_counter(name, unit=unit, description=description) + updowncounter = proxy_meter.create_up_down_counter(name, unit=unit, description=description) + histogram = proxy_meter.create_histogram(name, unit=unit, description=description) + gauge = proxy_meter.create_gauge(name, unit=unit, description=description) observable_counter = proxy_meter.create_observable_counter( name, callbacks=[callback], unit=unit, description=description ) - observable_updowncounter = ( - proxy_meter.create_observable_up_down_counter( - name, callbacks=[callback], unit=unit, description=description - ) + observable_updowncounter = proxy_meter.create_observable_up_down_counter( + name, callbacks=[callback], unit=unit, description=description ) observable_gauge = proxy_meter.create_observable_gauge( name, callbacks=[callback], unit=unit, description=description @@ -345,9 +293,7 @@ def test_proxy_meter_with_real_meter(self) -> None: self.assertIs(updowncounter, real_meter.create_up_down_counter()) self.assertIs(histogram, real_meter.create_histogram()) self.assertIs(gauge, real_meter.create_gauge()) - self.assertIs( - observable_counter, real_meter.create_observable_counter() - ) + self.assertIs(observable_counter, real_meter.create_observable_counter()) self.assertIs( observable_updowncounter, real_meter.create_observable_up_down_counter(), diff --git a/opentelemetry-api/tests/metrics/test_observation.py b/opentelemetry-api/tests/metrics/test_observation.py index adc40d57dd8..48252753209 100644 --- a/opentelemetry-api/tests/metrics/test_observation.py +++ b/opentelemetry-api/tests/metrics/test_observation.py @@ -15,9 +15,7 @@ def test_measurement_init(self): # float Observation(321.321, {"hello": "world"}) except Exception: # pylint: disable=broad-exception-caught - self.fail( - "Unexpected exception raised when instantiating Observation" - ) + self.fail("Unexpected exception raised when instantiating Observation") def test_measurement_equality(self): self.assertEqual( diff --git a/opentelemetry-api/tests/metrics/test_subclass_instantiation.py b/opentelemetry-api/tests/metrics/test_subclass_instantiation.py index f5f9a93d43b..ced37948eb9 100644 --- a/opentelemetry-api/tests/metrics/test_subclass_instantiation.py +++ b/opentelemetry-api/tests/metrics/test_subclass_instantiation.py @@ -66,9 +66,7 @@ def test_meter_subclass_instantiation(): class SynchronousImplTest(Synchronous): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) @@ -78,9 +76,7 @@ def test_synchronous_subclass_instantiation(): class AsynchronousImplTest(Asynchronous): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) @@ -90,9 +86,7 @@ def test_asynchronous_subclass_instantiation(): class CounterImplTest(Counter): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) def add(self, amount: int, **kwargs): @@ -105,9 +99,7 @@ def test_counter_subclass_instantiation(): class UpDownCounterImplTest(UpDownCounter): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) def add(self, amount: int, **kwargs): @@ -120,9 +112,7 @@ def test_up_down_counter_subclass_instantiation(): class ObservableCounterImplTest(ObservableCounter): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) @@ -132,9 +122,7 @@ def test_observable_counter_subclass_instantiation(): class HistogramImplTest(Histogram): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) def record(self, amount: int, **kwargs): @@ -147,9 +135,7 @@ def test_histogram_subclass_instantiation(): class GaugeImplTest(_Gauge): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) def set(self, amount: int, **kwargs): @@ -162,9 +148,7 @@ def test_gauge_subclass_instantiation(): class InstrumentImplTest(Instrument): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) @@ -174,9 +158,7 @@ def test_instrument_subclass_instantiation(): class ObservableGaugeImplTest(ObservableGauge): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) @@ -186,14 +168,10 @@ def test_observable_gauge_subclass_instantiation(): class ObservableUpDownCounterImplTest(ObservableUpDownCounter): - def __init__( - self, name: str, unit: str = "", description: str = "" - ) -> None: + def __init__(self, name: str, unit: str = "", description: str = "") -> None: super().__init__(name, unit, description) def test_observable_up_down_counter_subclass_instantiation(): - observable_up_down_counter = ObservableUpDownCounterImplTest( - "subclass_test" - ) + observable_up_down_counter = ObservableUpDownCounterImplTest("subclass_test") assert isinstance(observable_up_down_counter, ObservableUpDownCounter) diff --git a/opentelemetry-api/tests/propagators/test__envcarrier.py b/opentelemetry-api/tests/propagators/test__envcarrier.py index 900d8aebdd1..52896b44766 100644 --- a/opentelemetry-api/tests/propagators/test__envcarrier.py +++ b/opentelemetry-api/tests/propagators/test__envcarrier.py @@ -100,9 +100,7 @@ def test_get_empty_key_maps_to_underscore(self): def test_get_with_special_characters(self): """Test environment variables with special characters.""" getter = EnvironmentGetter() - result = getter.get( - {"TEST_KEY": "value with spaces and !@#$%"}, "test_key" - ) + result = getter.get({"TEST_KEY": "value with spaces and !@#$%"}, "test_key") self.assertEqual(result, ["value with spaces and !@#$%"]) def test_get_ignores_non_normalized_env_var_name(self): @@ -216,9 +214,7 @@ def test_set_special_characters_in_value(self): setter = EnvironmentSetter() carrier = {} setter.set(carrier, "test_key", "value with spaces and !@#$%^&*()") - self.assertEqual( - carrier, {"TEST_KEY": "value with spaces and !@#$%^&*()"} - ) + self.assertEqual(carrier, {"TEST_KEY": "value with spaces and !@#$%^&*()"}) def test_set_empty_value(self): """Test setting an empty value.""" @@ -290,9 +286,7 @@ def test_extract_with_tracestate(self): traceparent = f"00-{self.TRACE_ID:032x}-{self.SPAN_ID:016x}-01" tracestate = "vendor1=value1,vendor2=value2" - ctx = self._extract_with_env( - {"TRACEPARENT": traceparent, "TRACESTATE": tracestate} - ) + ctx = self._extract_with_env({"TRACEPARENT": traceparent, "TRACESTATE": tracestate}) span_context = trace.get_current_span(ctx).get_span_context() self.assertEqual(span_context.trace_state.get("vendor1"), "value1") @@ -306,9 +300,7 @@ def test_extract_ignores_lowercase_trace_context_names(self): """Test extraction ignores non-normalized trace context env names.""" traceparent = f"00-{self.TRACE_ID:032x}-{self.SPAN_ID:016x}-01" - ctx = self._extract_with_env( - {"traceparent": traceparent, "tracestate": "vendor=value"} - ) + ctx = self._extract_with_env({"traceparent": traceparent, "tracestate": "vendor=value"}) span_context = trace.get_current_span(ctx).get_span_context() self.assertFalse(span_context.is_valid) @@ -329,9 +321,7 @@ def test_extract_invalid_traceparent(self): with self.subTest(traceparent=invalid_tp): ctx = self._extract_with_env({"TRACEPARENT": invalid_tp}) span = trace.get_current_span(ctx) - self.assertEqual( - span.get_span_context(), trace.INVALID_SPAN_CONTEXT - ) + self.assertEqual(span.get_span_context(), trace.INVALID_SPAN_CONTEXT) def test_extract_missing_traceparent(self): """Test extraction with missing TRACEPARENT.""" @@ -345,9 +335,7 @@ def test_extract_preserves_context_on_invalid_traceparent(self): with patch.dict(os.environ, {"TRACEPARENT": "invalid"}, clear=True): getter = EnvironmentGetter() - ctx = self.propagator.extract( - os.environ, context=orig_ctx, getter=getter - ) + ctx = self.propagator.extract(os.environ, context=orig_ctx, getter=getter) self.assertDictEqual(ctx, orig_ctx) @@ -363,9 +351,7 @@ def test_inject_valid_span_context(self): env_dict = self._inject_to_env(ctx) - expected_traceparent = ( - f"00-{self.TRACE_ID:032x}-{self.SPAN_ID:016x}-01" - ) + expected_traceparent = f"00-{self.TRACE_ID:032x}-{self.SPAN_ID:016x}-01" self.assertEqual(env_dict["TRACEPARENT"], expected_traceparent) def test_inject_does_not_include_empty_tracestate(self): @@ -393,9 +379,7 @@ def test_inject_invalid_context(self): def test_roundtrip_preserves_traceparent(self): """Test that traceparent survives extract->inject->extract cycle.""" - original_traceparent = ( - f"00-{self.TRACE_ID:032x}-{self.SPAN_ID:016x}-01" - ) + original_traceparent = f"00-{self.TRACE_ID:032x}-{self.SPAN_ID:016x}-01" # Extract from environment ctx1 = self._extract_with_env({"TRACEPARENT": original_traceparent}) @@ -492,14 +476,10 @@ def _inject_to_env(self, context): def test_extract_baggage(self): """Test extracting baggage from BAGGAGE environment variable.""" - ctx = self._extract_with_env( - {"BAGGAGE": "key1=value1,key2=value2,key3=value3"} - ) + ctx = self._extract_with_env({"BAGGAGE": "key1=value1,key2=value2,key3=value3"}) baggage = get_all(ctx) - self.assertEqual( - baggage, {"key1": "value1", "key2": "value2", "key3": "value3"} - ) + self.assertEqual(baggage, {"key1": "value1", "key2": "value2", "key3": "value3"}) def test_extract_empty_baggage(self): """Test extracting empty baggage.""" @@ -571,9 +551,7 @@ def setUp(self): CompositePropagator, ) - self.propagator = CompositePropagator( - [TraceContextTextMapPropagator(), W3CBaggagePropagator()] - ) + self.propagator = CompositePropagator([TraceContextTextMapPropagator(), W3CBaggagePropagator()]) def test_extract_all_w3c_headers(self): """Test extracting both traceparent and baggage.""" diff --git a/opentelemetry-api/tests/propagators/test_composite.py b/opentelemetry-api/tests/propagators/test_composite.py index 786a05ef0fa..e3ed140ccb8 100644 --- a/opentelemetry-api/tests/propagators/test_composite.py +++ b/opentelemetry-api/tests/propagators/test_composite.py @@ -61,9 +61,7 @@ def test_no_propagators(self): propagator.inject(new_carrier) self.assertEqual(new_carrier, {}) - context = propagator.extract( - carrier=new_carrier, context={}, getter=get_as_list - ) + context = propagator.extract(carrier=new_carrier, context={}, getter=get_as_list) self.assertEqual(context, {}) def test_single_propagator(self): @@ -73,39 +71,29 @@ def test_single_propagator(self): propagator.inject(new_carrier) self.assertEqual(new_carrier, {"mock-0": "data"}) - context = propagator.extract( - carrier=new_carrier, context={}, getter=get_as_list - ) + context = propagator.extract(carrier=new_carrier, context={}, getter=get_as_list) self.assertEqual(context, {"mock-0": "context"}) def test_multiple_propagators(self): - propagator = CompositePropagator( - [self.mock_propagator_0, self.mock_propagator_1] - ) + propagator = CompositePropagator([self.mock_propagator_0, self.mock_propagator_1]) new_carrier = {} propagator.inject(new_carrier) self.assertEqual(new_carrier, {"mock-0": "data", "mock-1": "data"}) - context = propagator.extract( - carrier=new_carrier, context={}, getter=get_as_list - ) + context = propagator.extract(carrier=new_carrier, context={}, getter=get_as_list) self.assertEqual(context, {"mock-0": "context", "mock-1": "context"}) def test_multiple_propagators_same_key(self): # test that when multiple propagators extract/inject the same # key, the later propagator values are extracted/injected - propagator = CompositePropagator( - [self.mock_propagator_0, self.mock_propagator_2] - ) + propagator = CompositePropagator([self.mock_propagator_0, self.mock_propagator_2]) new_carrier = {} propagator.inject(new_carrier) self.assertEqual(new_carrier, {"mock-0": "data2"}) - context = propagator.extract( - carrier=new_carrier, context={}, getter=get_as_list - ) + context = propagator.extract(carrier=new_carrier, context={}, getter=get_as_list) self.assertEqual(context, {"mock-0": "context2"}) def test_fields(self): diff --git a/opentelemetry-api/tests/propagators/test_global_httptextformat.py b/opentelemetry-api/tests/propagators/test_global_httptextformat.py index 2101894f881..c9b6309dc17 100644 --- a/opentelemetry-api/tests/propagators/test_global_httptextformat.py +++ b/opentelemetry-api/tests/propagators/test_global_httptextformat.py @@ -18,10 +18,7 @@ class TestDefaultGlobalPropagator(unittest.TestCase): SPAN_ID = int("1234567890123456", 16) # type:int def test_propagation(self): - traceparent_value = ( - f"00-{format_trace_id(self.TRACE_ID)}-" - f"{format_span_id(self.SPAN_ID)}-00" - ) + traceparent_value = f"00-{format_trace_id(self.TRACE_ID)}-{format_span_id(self.SPAN_ID)}-00" tracestate_value = "foo=1,bar=2,baz=3" headers = { "baggage": ["key1=val1,key2=val2"], diff --git a/opentelemetry-api/tests/propagators/test_propagators.py b/opentelemetry-api/tests/propagators/test_propagators.py index ce24cc16c0f..06835971733 100644 --- a/opentelemetry-api/tests/propagators/test_propagators.py +++ b/opentelemetry-api/tests/propagators/test_propagators.py @@ -29,9 +29,7 @@ def test_propagators(propagators): {TraceContextTextMapPropagator, W3CBaggagePropagator}, ) - mock_compositehttppropagator.configure_mock( - side_effect=test_propagators - ) + mock_compositehttppropagator.configure_mock(side_effect=test_propagators) # pylint: disable=import-outside-toplevel import opentelemetry.propagate @@ -50,9 +48,7 @@ def test_propagators(propagators): set(), ) - mock_compositehttppropagator.configure_mock( - side_effect=test_propagators - ) + mock_compositehttppropagator.configure_mock(side_effect=test_propagators) # pylint: disable=import-outside-toplevel import opentelemetry.propagate @@ -61,9 +57,7 @@ def test_propagators(propagators): @patch.dict(environ, {OTEL_PROPAGATORS: "tracecontext, None"}) @patch("opentelemetry.propagators.composite.CompositePropagator") - def test_multiple_propagators_with_none( - self, mock_compositehttppropagator - ): + def test_multiple_propagators_with_none(self, mock_compositehttppropagator): def test_propagators(propagators): propagators = {propagator.__class__ for propagator in propagators} @@ -73,9 +67,7 @@ def test_propagators(propagators): set(), ) - mock_compositehttppropagator.configure_mock( - side_effect=test_propagators - ) + mock_compositehttppropagator.configure_mock(side_effect=test_propagators) # pylint: disable=import-outside-toplevel import opentelemetry.propagate @@ -85,9 +77,7 @@ def test_propagators(propagators): @patch.dict(environ, {OTEL_PROPAGATORS: "a, b, c "}) @patch("opentelemetry.propagators.composite.CompositePropagator") @patch("opentelemetry.util._importlib_metadata.entry_points") - def test_non_default_propagators( - self, mock_entry_points, mock_compositehttppropagator - ): + def test_non_default_propagators(self, mock_entry_points, mock_compositehttppropagator): mock_entry_points.configure_mock( side_effect=[ [ @@ -101,18 +91,14 @@ def test_non_default_propagators( def test_propagators(propagators): self.assertEqual(propagators, ["a", "b", "c"]) - mock_compositehttppropagator.configure_mock( - side_effect=test_propagators - ) + mock_compositehttppropagator.configure_mock(side_effect=test_propagators) # pylint: disable=import-outside-toplevel import opentelemetry.propagate reload(opentelemetry.propagate) - @patch.dict( - environ, {OTEL_PROPAGATORS: "tracecontext , unknown , baggage"} - ) + @patch.dict(environ, {OTEL_PROPAGATORS: "tracecontext , unknown , baggage"}) def test_composite_propagators_error(self): with self.assertRaises(ValueError) as cm: # pylint: disable=import-outside-toplevel diff --git a/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py b/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py index 178da653c5b..5d02792cfeb 100644 --- a/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py +++ b/opentelemetry-api/tests/propagators/test_w3cbaggagepropagator.py @@ -118,13 +118,9 @@ def test_extract_non_ascii_header_exceeds_byte_limit(self): ) def test_header_contains_too_many_entries(self): - header = ",".join( - [f"key{k}=val" for k in range(W3CBaggagePropagator._MAX_PAIRS + 1)] - ) + header = ",".join([f"key{k}=val" for k in range(W3CBaggagePropagator._MAX_PAIRS + 1)]) with self.assertLogs(level=WARNING): - self.assertEqual( - len(self._extract(header)), W3CBaggagePropagator._MAX_PAIRS - ) + self.assertEqual(len(self._extract(header)), W3CBaggagePropagator._MAX_PAIRS) def test_header_contains_pair_too_long(self): long_value = "s" * (W3CBaggagePropagator._MAX_PAIR_LENGTH + 1) @@ -138,9 +134,7 @@ def test_header_contains_pair_too_long(self): ) def test_extract_unquote_plus(self): - self.assertEqual( - self._extract("keykey=value%5Evalue"), {"keykey": "value^value"} - ) + self.assertEqual(self._extract("keykey=value%5Evalue"), {"keykey": "value^value"}) self.assertEqual( self._extract("key%23key=value%23value"), {"key#key": "value#value"}, @@ -156,29 +150,16 @@ def test_header_max_entries_skip_invalid_entry(self): ( f"key{index}=value{index}" if index != 2 - else ( - f"key{index}=" - f"value{'s' * (W3CBaggagePropagator._MAX_PAIR_LENGTH + 1)}" - ) - ) - for index in range( - W3CBaggagePropagator._MAX_PAIRS + 1 + else (f"key{index}=value{'s' * (W3CBaggagePropagator._MAX_PAIR_LENGTH + 1)}") ) + for index in range(W3CBaggagePropagator._MAX_PAIRS + 1) ] ) ), - { - f"key{index}": f"value{index}" - for index in range(W3CBaggagePropagator._MAX_PAIRS + 1) - if index != 2 - }, + {f"key{index}": f"value{index}" for index in range(W3CBaggagePropagator._MAX_PAIRS + 1) if index != 2}, ) self.assertTrue( - any( - "exceeded the maximum number of bytes per list-member" - in msg - for msg in warning.output - ) + any("exceeded the maximum number of bytes per list-member" in msg for msg in warning.output) ) # 181 entries where index 2 is malformed (no '='): _apply_baggage_limits @@ -189,34 +170,15 @@ def test_header_max_entries_skip_invalid_entry(self): self._extract( ",".join( [ - ( - f"key{index}=value{index}" - if index != 2 - else f"key{index}xvalue{index}" - ) - for index in range( - W3CBaggagePropagator._MAX_PAIRS + 1 - ) + (f"key{index}=value{index}" if index != 2 else f"key{index}xvalue{index}") + for index in range(W3CBaggagePropagator._MAX_PAIRS + 1) ] ) ), - { - f"key{index}": f"value{index}" - for index in range(W3CBaggagePropagator._MAX_PAIRS) - if index != 2 - }, - ) - self.assertTrue( - any( - "exceeded the maximum number of list-members" in msg - for msg in warning.output - ) - ) - self.assertTrue( - any( - "doesn't match the format" in msg for msg in warning.output - ) + {f"key{index}": f"value{index}" for index in range(W3CBaggagePropagator._MAX_PAIRS) if index != 2}, ) + self.assertTrue(any("exceeded the maximum number of list-members" in msg for msg in warning.output)) + self.assertTrue(any("doesn't match the format" in msg for msg in warning.output)) def test_inject_no_baggage_entries(self): values = {} @@ -270,14 +232,9 @@ def test_fields(self, mock_baggage): def test_encode_baggage_pairs(self): def _format_baggage(entries): - return ",".join( - quote_plus(str(k)) + "=" + quote_plus(str(v)) - for k, v in entries.items() - ) + return ",".join(quote_plus(str(k)) + "=" + quote_plus(str(v)) for k, v in entries.items()) - self.assertEqual( - _format_baggage({"key key": "value value"}), "key+key=value+value" - ) + self.assertEqual(_format_baggage({"key key": "value value"}), "key+key=value+value") self.assertEqual( _format_baggage({"key/key": "value/value"}), "key%2Fkey=value%2Fvalue", @@ -285,10 +242,7 @@ def _format_baggage(entries): def test_inject_too_many_entries(self): """Inject should drop entries exceeding _MAX_PAIRS.""" - values = { - f"key{i}": f"val{i}" - for i in range(self.propagator._MAX_PAIRS + 10) - } + values = {f"key{i}": f"val{i}" for i in range(self.propagator._MAX_PAIRS + 10)} ctx = get_current() for key, val in values.items(): ctx = set_baggage(key, val, context=ctx) @@ -343,9 +297,7 @@ def test_inject_total_header_too_long(self): warning.output[0], ) baggage_str = output.get("baggage", "") - self.assertLessEqual( - len(baggage_str), self.propagator._MAX_HEADER_LENGTH - ) + self.assertLessEqual(len(baggage_str), self.propagator._MAX_HEADER_LENGTH) def test_inject_empty_after_all_dropped(self): """If all entries are too long, nothing should be injected.""" @@ -362,18 +314,12 @@ def test_inject_empty_after_all_dropped(self): def test_inject_extract(self): carrier = {} - context = set_baggage( - "transaction", "string with spaces", context=get_current() - ) + context = set_baggage("transaction", "string with spaces", context=get_current()) self.propagator.inject(carrier, context) context = self.propagator.extract(carrier) - self.assertEqual( - carrier, {"baggage": "transaction=string+with+spaces"} - ) + self.assertEqual(carrier, {"baggage": "transaction=string+with+spaces"}) - self.assertEqual( - context, {"abc": {"transaction": "string with spaces"}} - ) + self.assertEqual(context, {"abc": {"transaction": "string with spaces"}}) diff --git a/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py b/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py index 7692860100f..e31443b0a56 100644 --- a/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py +++ b/opentelemetry-api/tests/trace/propagation/test_tracecontexthttptextformat.py @@ -35,10 +35,7 @@ def test_headers_with_tracestate(self): """When there is a traceparent and tracestate header, data from both should be added to the SpanContext. """ - traceparent_value = ( - f"00-{format(self.TRACE_ID, '032x')}-" - f"{format(self.SPAN_ID, '016x')}-00" - ) + traceparent_value = f"00-{format(self.TRACE_ID, '032x')}-{format(self.SPAN_ID, '016x')}-00" tracestate_value = "foo=1,bar=2,baz=3" span_context = trace.get_current_span( FORMAT.extract( @@ -50,9 +47,7 @@ def test_headers_with_tracestate(self): ).get_span_context() self.assertEqual(span_context.trace_id, self.TRACE_ID) self.assertEqual(span_context.span_id, self.SPAN_ID) - self.assertEqual( - span_context.trace_state, {"foo": "1", "bar": "2", "baz": "3"} - ) + self.assertEqual(span_context.trace_state, {"foo": "1", "bar": "2", "baz": "3"}) self.assertTrue(span_context.is_remote) output: dict[str, str] = {} span = trace.NonRecordingSpan(span_context) @@ -86,9 +81,7 @@ def test_invalid_trace_id(self): span = trace.get_current_span( FORMAT.extract( { - "traceparent": [ - "00-00000000000000000000000000000000-1234567890123456-00" - ], + "traceparent": ["00-00000000000000000000000000000000-1234567890123456-00"], "tracestate": ["foo=1,bar=2,foo=3"], }, ) @@ -116,9 +109,7 @@ def test_invalid_parent_id(self): span = trace.get_current_span( FORMAT.extract( { - "traceparent": [ - "00-00000000000000000000000000000000-0000000000000000-00" - ], + "traceparent": ["00-00000000000000000000000000000000-0000000000000000-00"], "tracestate": ["foo=1,bar=2,foo=3"], }, ) @@ -134,9 +125,7 @@ def test_no_send_empty_tracestate(self): empty tracestate headers but SHOULD avoid sending them. """ output: dict[str, str] = {} - span = trace.NonRecordingSpan( - trace.SpanContext(self.TRACE_ID, self.SPAN_ID, is_remote=False) - ) + span = trace.NonRecordingSpan(trace.SpanContext(self.TRACE_ID, self.SPAN_ID, is_remote=False)) ctx = trace.set_span_in_context(span) FORMAT.inject(output, context=ctx) self.assertTrue("traceparent" in output) @@ -153,10 +142,7 @@ def test_format_not_supported(self): span = trace.get_current_span( FORMAT.extract( { - "traceparent": [ - "00-12345678901234567890123456789012-" - "1234567890123456-00-residue" - ], + "traceparent": ["00-12345678901234567890123456789012-1234567890123456-00-residue"], "tracestate": ["foo=1,bar=2,foo=3"], }, ) @@ -175,9 +161,7 @@ def test_tracestate_empty_header(self): span = trace.get_current_span( FORMAT.extract( { - "traceparent": [ - "00-12345678901234567890123456789012-1234567890123456-00" - ], + "traceparent": ["00-12345678901234567890123456789012-1234567890123456-00"], "tracestate": ["foo=1", ""], }, ) @@ -189,9 +173,7 @@ def test_tracestate_header_with_trailing_comma(self): span = trace.get_current_span( FORMAT.extract( { - "traceparent": [ - "00-12345678901234567890123456789012-1234567890123456-00" - ], + "traceparent": ["00-12345678901234567890123456789012-1234567890123456-00"], "tracestate": ["foo=1,"], }, ) @@ -211,24 +193,15 @@ def test_tracestate_keys(self): span = trace.get_current_span( FORMAT.extract( { - "traceparent": [ - "00-12345678901234567890123456789012-" - "1234567890123456-00" - ], + "traceparent": ["00-12345678901234567890123456789012-1234567890123456-00"], "tracestate": [tracestate_value], }, ) ) - self.assertEqual( - span.get_span_context().trace_state["1a-2f@foo"], "bar1" - ) - self.assertEqual( - span.get_span_context().trace_state["1a-_*/2b@foo"], "bar2" - ) + self.assertEqual(span.get_span_context().trace_state["1a-2f@foo"], "bar1") + self.assertEqual(span.get_span_context().trace_state["1a-_*/2b@foo"], "bar2") self.assertEqual(span.get_span_context().trace_state["foo"], "bar3") - self.assertEqual( - span.get_span_context().trace_state["foo-_*/bar"], "bar4" - ) + self.assertEqual(span.get_span_context().trace_state["foo-_*/bar"], "bar4") @patch("opentelemetry.trace.INVALID_SPAN_CONTEXT") @patch("opentelemetry.trace.get_current_span") diff --git a/opentelemetry-api/tests/trace/test_globals.py b/opentelemetry-api/tests/trace/test_globals.py index c572b02bd4a..1035607a658 100644 --- a/opentelemetry-api/tests/trace/test_globals.py +++ b/opentelemetry-api/tests/trace/test_globals.py @@ -19,9 +19,7 @@ def set_status(self, status, description=None): if isinstance(status, Status): self.recorded_status = status else: - self.recorded_status = Status( - status_code=status, description=description - ) + self.recorded_status = Status(status_code=status, description=description) def end(self, end_time=None): self.has_ended = True @@ -29,9 +27,7 @@ def end(self, end_time=None): def is_recording(self): return not self.has_ended - def record_exception( - self, exception, attributes=None, timestamp=None, escaped=False - ): + def record_exception(self, exception, attributes=None, timestamp=None, escaped=False): self.recorded_exception = exception @@ -41,9 +37,7 @@ class TestGlobals(TraceGlobalsTest, unittest.TestCase): def test_get_tracer(mock_tracer_provider): # type: ignore """trace.get_tracer should proxy to the global tracer provider.""" trace.get_tracer("foo", "var") - mock_tracer_provider.get_tracer.assert_called_with( - "foo", "var", None, None - ) + mock_tracer_provider.get_tracer.assert_called_with("foo", "var", None, None) mock_provider = Mock() trace.get_tracer("foo", "var", mock_provider) mock_provider.get_tracer.assert_called_with("foo", "var", None, None) @@ -76,16 +70,10 @@ def do_concurrently() -> Mock: # despite trying to set tracer provider many times, only one of the # mock_tracer_providers should have stuck and been called from # proxy_tracer.start_span() - mock_tps_with_any_call = [ - mock - for mock in mock_tracer_providers - if mock.get_tracer.call_count > 0 - ] + mock_tps_with_any_call = [mock for mock in mock_tracer_providers if mock.get_tracer.call_count > 0] self.assertEqual(len(mock_tps_with_any_call), 1) - self.assertEqual( - mock_tps_with_any_call[0].get_tracer.call_count, num_threads - ) + self.assertEqual(mock_tps_with_any_call[0].get_tracer.call_count, num_threads) # should have warned every time except for the successful set self.assertEqual(mock_logger.warning.call_count, num_threads - 1) diff --git a/opentelemetry-api/tests/trace/test_span_context.py b/opentelemetry-api/tests/trace/test_span_context.py index d7e75b14bc5..8e90b214849 100644 --- a/opentelemetry-api/tests/trace/test_span_context.py +++ b/opentelemetry-api/tests/trace/test_span_context.py @@ -51,9 +51,7 @@ def test_trace_id_validity(self): sc = trace.SpanContext(-1, span_id, is_remote=False) self.assertFalse(sc.is_valid) - sc = trace.SpanContext( - trace_id_max_value + 1, span_id, is_remote=False - ) + sc = trace.SpanContext(trace_id_max_value + 1, span_id, is_remote=False) self.assertFalse(sc.is_valid) def test_span_id_validity(self): diff --git a/opentelemetry-api/tests/trace/test_status.py b/opentelemetry-api/tests/trace/test_status.py index a203f026f2f..fa8be53effb 100644 --- a/opentelemetry-api/tests/trace/test_status.py +++ b/opentelemetry-api/tests/trace/test_status.py @@ -32,9 +32,7 @@ def test_invalid_description(self): def test_description_and_non_error_status(self): with self.assertLogs(level=WARNING) as warning: - status = Status( - status_code=StatusCode.OK, description="status description" - ) + status = Status(status_code=StatusCode.OK, description="status description") self.assertIs(status.status_code, StatusCode.OK) self.assertEqual(status.description, None) self.assertIn( @@ -43,9 +41,7 @@ def test_description_and_non_error_status(self): ) with self.assertLogs(level=WARNING) as warning: - status = Status( - status_code=StatusCode.UNSET, description="status description" - ) + status = Status(status_code=StatusCode.UNSET, description="status description") self.assertIs(status.status_code, StatusCode.UNSET) self.assertEqual(status.description, None) self.assertIn( @@ -53,8 +49,6 @@ def test_description_and_non_error_status(self): warning.output[0], # type: ignore ) - status = Status( - status_code=StatusCode.ERROR, description="status description" - ) + status = Status(status_code=StatusCode.ERROR, description="status description") self.assertIs(status.status_code, StatusCode.ERROR) self.assertEqual(status.description, "status description") diff --git a/opentelemetry-api/tests/util/test__importlib_metadata.py b/opentelemetry-api/tests/util/test__importlib_metadata.py index 18b7505dfb3..922f5e7f46f 100644 --- a/opentelemetry-api/tests/util/test__importlib_metadata.py +++ b/opentelemetry-api/tests/util/test__importlib_metadata.py @@ -63,9 +63,7 @@ def test_uniform_behavior(self): "opentelemetry.baggage.propagation:W3CBaggagePropagator", ) - entry_points = importlib_metadata_entry_points( - group="opentelemetry_propagator" - ) + entry_points = importlib_metadata_entry_points(group="opentelemetry_propagator") self.assertIsInstance(entry_points, EntryPoints) entry_points = entry_points.select(name="baggage") @@ -98,9 +96,7 @@ def test_uniform_behavior(self): self.assertIsInstance(entry_points, EntryPoints) self.assertEqual(len(entry_points), 0) - entry_points = importlib_metadata_entry_points( - group="opentelemetry_propagator", name="abc" - ) + entry_points = importlib_metadata_entry_points(group="opentelemetry_propagator", name="abc") self.assertIsInstance(entry_points, EntryPoints) self.assertEqual(len(entry_points), 0) diff --git a/opentelemetry-api/tests/util/test_contextmanager.py b/opentelemetry-api/tests/util/test_contextmanager.py index 692168d5a3b..da92114fb9a 100644 --- a/opentelemetry-api/tests/util/test_contextmanager.py +++ b/opentelemetry-api/tests/util/test_contextmanager.py @@ -52,6 +52,4 @@ async def async_func(a: str) -> str: res = asyncio.run(async_func("a")) self.assertEqual(res, "aa") - self.assertEqual( - events, ["start_async_func", "finish_sleep", "cm_done"] - ) + self.assertEqual(events, ["start_async_func", "finish_sleep", "cm_done"]) diff --git a/opentelemetry-api/tests/util/test_re.py b/opentelemetry-api/tests/util/test_re.py index e8f48be5fbe..b2f3c6efdd2 100644 --- a/opentelemetry-api/tests/util/test_re.py +++ b/opentelemetry-api/tests/util/test_re.py @@ -60,19 +60,14 @@ def test_parse_env_headers(self): with self.subTest(headers=headers): if warn: with self.assertLogs(level="WARNING") as cm: - self.assertEqual( - parse_env_headers(headers), dict(expected) - ) + self.assertEqual(parse_env_headers(headers), dict(expected)) self.assertTrue( "Header format invalid! Header values in environment " "variables must be URL encoded per the OpenTelemetry " - "Protocol Exporter specification:" - in cm.records[0].message, + "Protocol Exporter specification:" in cm.records[0].message, ) else: - self.assertEqual( - parse_env_headers(headers), dict(expected) - ) + self.assertEqual(parse_env_headers(headers), dict(expected)) def test_parse_env_headers_liberal(self): inp = self._common_test_cases() + [ @@ -97,8 +92,7 @@ def test_parse_env_headers_liberal(self): "Header format invalid! Header values in environment " "variables must be URL encoded per the OpenTelemetry " "Protocol Exporter specification or a comma separated " - "list of name=value occurrences:" - in cm.records[0].message, + "list of name=value occurrences:" in cm.records[0].message, ) else: self.assertEqual( diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_common.py b/opentelemetry-configuration/src/opentelemetry/configuration/_common.py index 73fc0f9d0c5..0ffce6f5045 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_common.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_common.py @@ -70,9 +70,7 @@ def load_entry_point(group: str, name: str) -> type: except ConfigurationError: raise except Exception as exc: - raise ConfigurationError( - f"Failed to load plugin '{name}' from group '{group}': {exc}" - ) from exc + raise ConfigurationError(f"Failed to load plugin '{name}' from group '{group}': {exc}") from exc class _ComponentConfig(Protocol): @@ -129,9 +127,7 @@ def _resolve_component( return factory(value) if config.additional_properties: name, plugin_config = next(iter(config.additional_properties.items())) - return load_entry_point(entry_point_group, name)( - **(plugin_config or {}) - ) + return load_entry_point(entry_point_group, name)(**(plugin_config or {})) raise ConfigurationError(f"No {component_type} type specified in config.") @@ -192,8 +188,7 @@ def _map_compression( supported_values.insert(1, "'deflate'") raise ConfigurationError( - f"Unsupported compression value '{value}'. Supported values: " - f"{', '.join(supported_values)}." + f"Unsupported compression value '{value}'. Supported values: {', '.join(supported_values)}." ) @@ -209,14 +204,9 @@ def _parse_otlp_file_output_stream(output_stream: str | None) -> str | None: parsed = urlparse(output_stream) except ValueError as exc: raise ConfigurationError( - f"Failed to parse output_stream '{output_stream}' for " - f"otlp_file_development exporter: {exc}" + f"Failed to parse output_stream '{output_stream}' for otlp_file_development exporter: {exc}" ) from exc - is_local_file_uri = ( - parsed.scheme == "file" - and parsed.netloc in ("", "localhost") - and bool(parsed.path) - ) + is_local_file_uri = parsed.scheme == "file" and parsed.netloc in ("", "localhost") and bool(parsed.path) has_extra_components = parsed.params or parsed.query or parsed.fragment if is_local_file_uri and not has_extra_components: path = parsed.path diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py b/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py index 6eeaae49648..dfb1a0f0209 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_conversion.py @@ -43,11 +43,7 @@ def _is_empty_constructible_dataclass(unwrapped: Any) -> bool: return ( isinstance(unwrapped, type) and is_dataclass(unwrapped) - and all( - field.default is not MISSING - or field.default_factory is not MISSING - for field in fields(unwrapped) - ) + and all(field.default is not MISSING or field.default_factory is not MISSING for field in fields(unwrapped)) ) @@ -86,19 +82,11 @@ def _convert_value(value: Any, type_hint: Any) -> Any: return value # Direct dataclass type — recurse - if ( - isinstance(unwrapped, type) - and is_dataclass(unwrapped) - and isinstance(value, dict) - ): + if isinstance(unwrapped, type) and is_dataclass(unwrapped) and isinstance(value, dict): return _dict_to_dataclass(value, unwrapped) # Enum type — coerce string/value to the Enum member - if ( - isinstance(unwrapped, type) - and issubclass(unwrapped, Enum) - and not isinstance(value, unwrapped) - ): + if isinstance(unwrapped, type) and issubclass(unwrapped, Enum) and not isinstance(value, unwrapped): return unwrapped(value) return value diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_exceptions.py b/opentelemetry-configuration/src/opentelemetry/configuration/_exceptions.py index 7f1f9811750..85b73574c8e 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_exceptions.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_exceptions.py @@ -46,14 +46,8 @@ def __init__( install_cmd = f"pip install {self.install_name}" if feature: - message = ( - f"{feature} requires '{package}'. " - f"Install it with: {install_cmd}" - ) + message = f"{feature} requires '{package}'. Install it with: {install_cmd}" else: - message = ( - f"'{package}' is required but not installed. " - f"Install it with: {install_cmd}" - ) + message = f"'{package}' is required but not installed. Install it with: {install_cmd}" super().__init__(message) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py b/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py index ba0118bba78..c079cae7c67 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_logger_provider.py @@ -81,9 +81,7 @@ def _create_otlp_http_log_exporter( feature="otlp_http log exporter", ) from exc - compression = _map_compression( - config.compression, Compression, allow_deflate=True - ) + compression = _map_compression(config.compression, Compression, allow_deflate=True) headers = _parse_headers(config.headers, config.headers_list) timeout = (config.timeout / 1000.0) if config.timeout is not None else None @@ -167,9 +165,7 @@ def _create_log_record_exporter( return factory(value) if config.additional_properties: name, plugin_config = next(iter(config.additional_properties.items())) - return load_entry_point("opentelemetry_logs_exporter", name)( - **(plugin_config or {}) - ) + return load_entry_point("opentelemetry_logs_exporter", name)(**(plugin_config or {})) raise ConfigurationError( "No exporter type specified in log record exporter config. " "Supported types: console, otlp_http, otlp_grpc, otlp_file_development." @@ -184,25 +180,11 @@ def _create_batch_log_record_processor( Passes explicit defaults to suppress OTEL_BLRP_* env var reading. """ exporter = _create_log_record_exporter(config.exporter) - schedule_delay = ( - config.schedule_delay - if config.schedule_delay is not None - else _DEFAULT_SCHEDULE_DELAY_MILLIS - ) - export_timeout = ( - config.export_timeout - if config.export_timeout is not None - else _DEFAULT_EXPORT_TIMEOUT_MILLIS - ) - max_queue_size = ( - config.max_queue_size - if config.max_queue_size is not None - else _DEFAULT_MAX_QUEUE_SIZE - ) + schedule_delay = config.schedule_delay if config.schedule_delay is not None else _DEFAULT_SCHEDULE_DELAY_MILLIS + export_timeout = config.export_timeout if config.export_timeout is not None else _DEFAULT_EXPORT_TIMEOUT_MILLIS + max_queue_size = config.max_queue_size if config.max_queue_size is not None else _DEFAULT_MAX_QUEUE_SIZE max_export_batch_size = ( - config.max_export_batch_size - if config.max_export_batch_size is not None - else _DEFAULT_MAX_EXPORT_BATCH_SIZE + config.max_export_batch_size if config.max_export_batch_size is not None else _DEFAULT_MAX_EXPORT_BATCH_SIZE ) return BatchLogRecordProcessor( exporter=exporter, @@ -230,8 +212,7 @@ def _create_log_record_processor( if config.simple is not None: return _create_simple_log_record_processor(config.simple) raise ConfigurationError( - "No processor type specified in log record processor config. " - "Supported types: batch, simple." + "No processor type specified in log record processor config. Supported types: batch, simple." ) @@ -263,9 +244,7 @@ def create_logger_provider( ) for processor_config in config.processors: - provider.add_log_record_processor( - _create_log_record_processor(processor_config) - ) + provider.add_log_record_processor(_create_log_record_processor(processor_config)) return provider diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py b/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py index 7c13e19c5d7..eaaaeca3ee5 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_meter_provider.py @@ -150,8 +150,7 @@ def _map_temporality( ObservableGauge: AggregationTemporality.CUMULATIVE, } raise ConfigurationError( - f"Unsupported temporality preference '{pref}'. " - "Supported values: cumulative, delta, low_memory." + f"Unsupported temporality preference '{pref}'. Supported values: cumulative, delta, low_memory." ) @@ -164,16 +163,9 @@ def _map_histogram_aggregation( OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION. Default (None or explicit_bucket_histogram) → ExplicitBucketHistogramAggregation. """ - if ( - pref is None - or pref - == ExporterDefaultHistogramAggregation.explicit_bucket_histogram - ): + if pref is None or pref == ExporterDefaultHistogramAggregation.explicit_bucket_histogram: return {Histogram: ExplicitBucketHistogramAggregation()} - if ( - pref - == ExporterDefaultHistogramAggregation.base2_exponential_bucket_histogram - ): + if pref == ExporterDefaultHistogramAggregation.base2_exponential_bucket_histogram: return {Histogram: ExponentialBucketHistogramAggregation()} raise ConfigurationError( f"Unsupported default histogram aggregation '{pref}'. " @@ -199,20 +191,11 @@ def _create_aggregation(config: AggregationConfig) -> Aggregation: if config.base2_exponential_bucket_histogram is not None: kwargs = {} if config.base2_exponential_bucket_histogram.max_size is not None: - kwargs["max_size"] = ( - config.base2_exponential_bucket_histogram.max_size - ) + kwargs["max_size"] = config.base2_exponential_bucket_histogram.max_size if config.base2_exponential_bucket_histogram.max_scale is not None: - kwargs["max_scale"] = ( - config.base2_exponential_bucket_histogram.max_scale - ) - if ( - config.base2_exponential_bucket_histogram.record_min_max - is not None - ): - kwargs["record_min_max"] = ( - config.base2_exponential_bucket_histogram.record_min_max - ) + kwargs["max_scale"] = config.base2_exponential_bucket_histogram.max_scale + if config.base2_exponential_bucket_histogram.record_min_max is not None: + kwargs["record_min_max"] = config.base2_exponential_bucket_histogram.record_min_max return ExponentialBucketHistogramAggregation(**kwargs) if config.last_value is not None: return LastValueAggregation() @@ -234,16 +217,13 @@ def _create_view(config: ViewConfig) -> View: if selector.instrument_type is not None: instrument_type = _INSTRUMENT_TYPE_MAP.get(selector.instrument_type) if instrument_type is None: - raise ConfigurationError( - f"Unknown instrument type: {selector.instrument_type!r}" - ) + raise ConfigurationError(f"Unknown instrument type: {selector.instrument_type!r}") attribute_keys: set[str] | None = None if stream.attribute_keys is not None: if stream.attribute_keys.excluded: _logger.warning( - "attribute_keys.excluded is not supported by the Python SDK View; " - "the exclusion list will be ignored." + "attribute_keys.excluded is not supported by the Python SDK View; the exclusion list will be ignored." ) if stream.attribute_keys.included is not None: attribute_keys = set(stream.attribute_keys.included) @@ -271,9 +251,7 @@ def _create_console_metric_exporter( ) -> MetricExporter: """Create a ConsoleMetricExporter from config.""" preferred_temporality = _map_temporality(config.temporality_preference) - preferred_aggregation = _map_histogram_aggregation( - config.default_histogram_aggregation - ) + preferred_aggregation = _map_histogram_aggregation(config.default_histogram_aggregation) return ConsoleMetricExporter( preferred_temporality=preferred_temporality, preferred_aggregation=preferred_aggregation, @@ -298,15 +276,11 @@ def _create_otlp_http_metric_exporter( feature="otlp_http metric exporter", ) from exc - compression = _map_compression( - config.compression, Compression, allow_deflate=True - ) + compression = _map_compression(config.compression, Compression, allow_deflate=True) headers = _parse_headers(config.headers, config.headers_list) timeout = (config.timeout / 1000.0) if config.timeout is not None else None preferred_temporality = _map_temporality(config.temporality_preference) - preferred_aggregation = _map_histogram_aggregation( - config.default_histogram_aggregation - ) + preferred_aggregation = _map_histogram_aggregation(config.default_histogram_aggregation) return OTLPMetricExporter( # type: ignore[return-value] endpoint=config.endpoint, @@ -339,9 +313,7 @@ def _create_otlp_grpc_metric_exporter( headers = _parse_headers(config.headers, config.headers_list) timeout = (config.timeout / 1000.0) if config.timeout is not None else None preferred_temporality = _map_temporality(config.temporality_preference) - preferred_aggregation = _map_histogram_aggregation( - config.default_histogram_aggregation - ) + preferred_aggregation = _map_histogram_aggregation(config.default_histogram_aggregation) return OTLPMetricExporter( # type: ignore[return-value] endpoint=config.endpoint, @@ -370,9 +342,7 @@ def _create_otlp_file_development_metric_exporter( path = _parse_otlp_file_output_stream(config.output_stream) preferred_temporality = _map_temporality(config.temporality_preference) - preferred_aggregation = _map_histogram_aggregation( - config.default_histogram_aggregation - ) + preferred_aggregation = _map_histogram_aggregation(config.default_histogram_aggregation) return ( FileMetricExporter( path, @@ -411,9 +381,7 @@ def _create_push_metric_exporter( return factory(value) if config.additional_properties: name, plugin_config = next(iter(config.additional_properties.items())) - return load_entry_point("opentelemetry_metrics_exporter", name)( - **(plugin_config or {}) - ) + return load_entry_point("opentelemetry_metrics_exporter", name)(**(plugin_config or {})) raise ConfigurationError( "No exporter type specified in push metric exporter config. " "Supported types: console, otlp_http, otlp_grpc, otlp_file_development." @@ -428,16 +396,8 @@ def _create_periodic_metric_reader( Passes explicit interval/timeout defaults to suppress env var reading. """ exporter = _create_push_metric_exporter(config.exporter) - interval = ( - config.interval - if config.interval is not None - else _DEFAULT_EXPORT_INTERVAL_MILLIS - ) - timeout = ( - config.timeout - if config.timeout is not None - else _DEFAULT_EXPORT_TIMEOUT_MILLIS - ) + interval = config.interval if config.interval is not None else _DEFAULT_EXPORT_INTERVAL_MILLIS + timeout = config.timeout if config.timeout is not None else _DEFAULT_EXPORT_TIMEOUT_MILLIS return PeriodicExportingMetricReader( exporter=exporter, export_interval_millis=float(interval), @@ -467,19 +427,14 @@ def _create_prometheus_metric_reader( ) from exc disable_target_info = ( - config.target_info_enabled_development is not None - and not config.target_info_enabled_development + config.target_info_enabled_development is not None and not config.target_info_enabled_development ) if config.scope_info_enabled is not None: - _logger.warning( - "scope_info_enabled is not yet supported for " - "Prometheus metric exporter and will be ignored." - ) + _logger.warning("scope_info_enabled is not yet supported for Prometheus metric exporter and will be ignored.") if config.resource_constant_labels is not None: _logger.warning( - "resource_constant_labels is not yet supported for " - "Prometheus metric exporter and will be ignored." + "resource_constant_labels is not yet supported for Prometheus metric exporter and will be ignored." ) reader = PrometheusMetricReader( @@ -509,12 +464,9 @@ def _create_pull_metric_exporter( return _create_prometheus_metric_reader(config.prometheus_development) if config.additional_properties: name, plugin_config = next(iter(config.additional_properties.items())) - return load_entry_point("opentelemetry_pull_metric_exporter", name)( - **(plugin_config or {}) - ) + return load_entry_point("opentelemetry_pull_metric_exporter", name)(**(plugin_config or {})) raise ConfigurationError( - "No exporter type specified in pull metric exporter config. " - "Supported types: prometheus_development." + "No exporter type specified in pull metric exporter config. Supported types: prometheus_development." ) @@ -528,14 +480,10 @@ def _create_pull_metric_reader( """ if config.producers: _logger.warning( - "MetricProducer configuration is not yet supported for " - "pull metric readers and will be ignored." + "MetricProducer configuration is not yet supported for pull metric readers and will be ignored." ) if config.cardinality_limits is not None: - _logger.warning( - "cardinality_limits is not yet supported for " - "pull metric readers and will be ignored." - ) + _logger.warning("cardinality_limits is not yet supported for pull metric readers and will be ignored.") return _create_pull_metric_exporter(config.exporter) @@ -545,10 +493,7 @@ def _create_metric_reader(config: MetricReaderConfig) -> MetricReader: return _create_periodic_metric_reader(config.periodic) if config.pull is not None: return _create_pull_metric_reader(config.pull) - raise ConfigurationError( - "No reader type specified in metric reader config. " - "Supported types: periodic, pull." - ) + raise ConfigurationError("No reader type specified in metric reader config. Supported types: periodic, pull.") def _create_exemplar_filter( @@ -562,8 +507,7 @@ def _create_exemplar_filter( if value == ExemplarFilterConfig.trace_based: return TraceBasedExemplarFilter() raise ConfigurationError( - f"Unknown exemplar filter value: {value!r}. " - "Supported values: always_on, always_off, trace_based." + f"Unknown exemplar filter value: {value!r}. Supported values: always_on, always_off, trace_based." ) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_propagator.py b/opentelemetry-configuration/src/opentelemetry/configuration/_propagator.py index 5570ca648f7..d71ce06442c 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_propagator.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_propagator.py @@ -47,11 +47,7 @@ def _propagators_from_textmap_config( # Plugin propagators from additional_properties for name, plugin_config in config.additional_properties.items(): - result.append( - load_entry_point("opentelemetry_propagator", name)( - **(plugin_config or {}) - ) - ) + result.append(load_entry_point("opentelemetry_propagator", name)(**(plugin_config or {}))) return result diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_resource.py b/opentelemetry-configuration/src/opentelemetry/configuration/_resource.py index 79196c0d97e..7d4a7a90f42 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_resource.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_resource.py @@ -136,9 +136,7 @@ def create_resource(config: ResourceConfig | None) -> Resource: for detector_config in config.detection_development.detectors: _run_detectors(detector_config, detected_attrs) - filtered = _filter_attributes( - detected_attrs, config.detection_development.attributes - ) + filtered = _filter_attributes(detected_attrs, config.detection_development.attributes) if filtered: result = result.merge(Resource(filtered)) # type: ignore[arg-type] @@ -148,17 +146,13 @@ def create_resource(config: ResourceConfig | None) -> Resource: def _detect_service(_config: Any) -> dict[str, AttributeValue]: """Service detector: generates instance ID and reads OTEL_SERVICE_NAME.""" - attrs: dict[str, AttributeValue] = dict( - ServiceInstanceIdResourceDetector().detect().attributes - ) + attrs: dict[str, AttributeValue] = dict(ServiceInstanceIdResourceDetector().detect().attributes) if service_name := os.environ.get(OTEL_SERVICE_NAME): attrs[SERVICE_NAME] = service_name return attrs -_RESOURCE_DETECTOR_REGISTRY: dict[ - str, Callable[[Any], dict[str, AttributeValue]] -] = { +_RESOURCE_DETECTOR_REGISTRY: dict[str, Callable[[Any], dict[str, AttributeValue]]] = { "service": _detect_service, "host": lambda _: dict(_HostResourceDetector().detect().attributes), "process": lambda _: dict(ProcessResourceDetector().detect().attributes), @@ -185,13 +179,9 @@ def _run_detectors( if value is None: continue if name.name in _RESOURCE_DETECTOR_REGISTRY: - detected_attrs.update( - _RESOURCE_DETECTOR_REGISTRY[name.name](value) - ) + detected_attrs.update(_RESOURCE_DETECTOR_REGISTRY[name.name](value)) else: - cls = load_entry_point( - "opentelemetry_resource_detector", name.name - ) + cls = load_entry_point("opentelemetry_resource_detector", name.name) detected_attrs.update(cls(**(value or {})).detect().attributes) for name, plugin_config in detector_config.additional_properties.items(): @@ -199,9 +189,7 @@ def _run_detectors( detected_attrs.update(cls(**(plugin_config or {})).detect().attributes) -def _filter_attributes( - attrs: dict[str, object], filter_config: IncludeExclude | None -) -> dict[str, object]: +def _filter_attributes(attrs: dict[str, object], filter_config: IncludeExclude | None) -> dict[str, object]: """Filter detected attribute keys using include/exclude glob patterns. Mirrors other SDK IncludeExcludePredicate.createPatternMatching behaviour: diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py b/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py index 4bd9d9e7d5f..698c88cce5d 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_sdk.py @@ -92,9 +92,7 @@ def configure_sdk(config: OpenTelemetryConfiguration) -> None: >>> configure_sdk(config) """ if config.disabled: - _logger.warning( - "Declarative configuration has disabled=true; skipping SDK setup." - ) + _logger.warning("Declarative configuration has disabled=true; skipping SDK setup.") return if config.log_level is not None: diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py b/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py index 5871f5b0bb0..728ce540567 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/_tracer_provider.py @@ -124,9 +124,7 @@ def _create_otlp_http_span_exporter( feature="otlp_http span exporter", ) from exc - compression = _map_compression( - config.compression, Compression, allow_deflate=True - ) + compression = _map_compression(config.compression, Compression, allow_deflate=True) headers = _parse_headers(config.headers, config.headers_list) timeout = (config.timeout / 1000.0) if config.timeout is not None else None @@ -208,9 +206,7 @@ def _create_span_exporter(config: SpanExporterConfig) -> SpanExporter: return factory(value) if config.additional_properties: name, plugin_config = next(iter(config.additional_properties.items())) - return load_entry_point("opentelemetry_traces_exporter", name)( - **(plugin_config or {}) - ) + return load_entry_point("opentelemetry_traces_exporter", name)(**(plugin_config or {})) raise ConfigurationError( "No exporter type specified in span exporter config. " "Supported types: otlp_http, otlp_grpc, console, otlp_file_development." @@ -231,13 +227,8 @@ def _create_span_processor( export_timeout_millis=config.batch.export_timeout, ) if config.simple is not None: - return SimpleSpanProcessor( - _create_span_exporter(config.simple.exporter) - ) - raise ConfigurationError( - "No processor type specified in span processor config. " - "Supported types: batch, simple." - ) + return SimpleSpanProcessor(_create_span_exporter(config.simple.exporter)) + raise ConfigurationError("No processor type specified in span processor config. Supported types: batch, simple.") def _create_experimental_composable_sampler( @@ -249,20 +240,12 @@ def _create_experimental_composable_sampler( if config.always_off is not None: return composable_always_off() if config.parent_threshold is not None: - return composable_parent_threshold( - _create_experimental_composable_sampler( - config.parent_threshold.root - ) - ) + return composable_parent_threshold(_create_experimental_composable_sampler(config.parent_threshold.root)) if config.probability is not None: ratio = config.probability.ratio - return composable_traceid_ratio_based( - ratio if ratio is not None else 1.0 - ) + return composable_traceid_ratio_based(ratio if ratio is not None else 1.0) if config.rule_based is not None: - return composable_rule_based( - _create_rule_based_sampler_rules(config.rule_based) - ) + return composable_rule_based(_create_rule_based_sampler_rules(config.rule_based)) raise ConfigurationError( f"Unknown or unsupported experimental composable sampler type in config: {config!r}. " "Supported types: always_on, always_off, parent_threshold, probability, rule_based." @@ -304,17 +287,10 @@ def _create_rule_based_sampler_rule_predicate( ) if config.span_kinds is not None: predicates.append( - SpanKindPredicate( - [ - TraceSpanKind[span_kind.value.upper()] - for span_kind in config.span_kinds - ] - ) + SpanKindPredicate([TraceSpanKind[span_kind.value.upper()] for span_kind in config.span_kinds]) ) if config.parent is not None: - predicates.append( - ParentPredicate([parent.value for parent in config.parent]) - ) + predicates.append(ParentPredicate([parent.value for parent in config.parent])) if not predicates: return AlwaysMatchPredicate() if len(predicates) == 1: @@ -338,11 +314,7 @@ def _create_sampler(config: SamplerConfig) -> Sampler: ratio = config.trace_id_ratio_based.ratio return TraceIdRatioBased(ratio if ratio is not None else 1.0) if config.composite_development is not None: - return composite_sampler( - _create_experimental_composable_sampler( - config.composite_development - ) - ) + return composite_sampler(_create_experimental_composable_sampler(config.composite_development)) if config.parent_based is not None: return _create_parent_based_sampler(config.parent_based) if config.additional_properties: @@ -366,37 +338,22 @@ def _create_id_generator(config: IdGeneratorConfig) -> IdGenerator: return RandomIdGenerator() if config.additional_properties: name, plugin_config = next(iter(config.additional_properties.items())) - return load_entry_point("opentelemetry_id_generator", name)( - **(plugin_config or {}) - ) - raise ConfigurationError( - "No id_generator type specified in config. " - "Supported built-in types: random." - ) + return load_entry_point("opentelemetry_id_generator", name)(**(plugin_config or {})) + raise ConfigurationError("No id_generator type specified in config. Supported built-in types: random.") def _create_parent_based_sampler(config: ParentBasedSamplerConfig) -> Sampler: """Create a ParentBased sampler from config, applying SDK defaults for absent delegates.""" - root = ( - _create_sampler(config.root) if config.root is not None else ALWAYS_ON - ) + root = _create_sampler(config.root) if config.root is not None else ALWAYS_ON kwargs: dict = {"root": root} if config.remote_parent_sampled is not None: - kwargs["remote_parent_sampled"] = _create_sampler( - config.remote_parent_sampled - ) + kwargs["remote_parent_sampled"] = _create_sampler(config.remote_parent_sampled) if config.remote_parent_not_sampled is not None: - kwargs["remote_parent_not_sampled"] = _create_sampler( - config.remote_parent_not_sampled - ) + kwargs["remote_parent_not_sampled"] = _create_sampler(config.remote_parent_not_sampled) if config.local_parent_sampled is not None: - kwargs["local_parent_sampled"] = _create_sampler( - config.local_parent_sampled - ) + kwargs["local_parent_sampled"] = _create_sampler(config.local_parent_sampled) if config.local_parent_not_sampled is not None: - kwargs["local_parent_not_sampled"] = _create_sampler( - config.local_parent_not_sampled - ) + kwargs["local_parent_not_sampled"] = _create_sampler(config.local_parent_not_sampled) return ParentBased(**kwargs) @@ -413,14 +370,10 @@ def _create_span_limits(config: SpanLimitsConfig) -> SpanLimits: else _DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT ), max_events=( - config.event_count_limit - if config.event_count_limit is not None - else _DEFAULT_OTEL_SPAN_EVENT_COUNT_LIMIT + config.event_count_limit if config.event_count_limit is not None else _DEFAULT_OTEL_SPAN_EVENT_COUNT_LIMIT ), max_links=( - config.link_count_limit - if config.link_count_limit is not None - else _DEFAULT_OTEL_SPAN_LINK_COUNT_LIMIT + config.link_count_limit if config.link_count_limit is not None else _DEFAULT_OTEL_SPAN_LINK_COUNT_LIMIT ), max_event_attributes=( config.event_attribute_count_limit @@ -453,15 +406,9 @@ def create_tracer_provider( Returns: A configured TracerProvider. """ - sampler = ( - _create_sampler(config.sampler) - if config is not None and config.sampler is not None - else _DEFAULT_SAMPLER - ) + sampler = _create_sampler(config.sampler) if config is not None and config.sampler is not None else _DEFAULT_SAMPLER id_generator = ( - _create_id_generator(config.id_generator) - if config is not None and config.id_generator is not None - else None + _create_id_generator(config.id_generator) if config is not None and config.id_generator is not None else None ) span_limits = ( _create_span_limits(config.limits) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/file/_loader.py b/opentelemetry-configuration/src/opentelemetry/configuration/file/_loader.py index 933ec10b573..fd1d96ffda0 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/file/_loader.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/file/_loader.py @@ -53,13 +53,8 @@ def _get_schema() -> dict: if not _schema_cache: - schema_path = ( - importlib.resources.files("opentelemetry.configuration") - / "schema.json" - ) - _schema_cache.append( - json.loads(schema_path.read_text(encoding="utf-8")) - ) + schema_path = importlib.resources.files("opentelemetry.configuration") / "schema.json" + _schema_cache.append(json.loads(schema_path.read_text(encoding="utf-8"))) return _schema_cache[0] @@ -95,26 +90,20 @@ def load_config_file( if not path.is_file(): _logger.error("Configuration path is not a file: %s", file_path) - raise ConfigurationError( - f"Configuration path is not a file: {file_path}" - ) + raise ConfigurationError(f"Configuration path is not a file: {file_path}") try: with open(path, encoding="utf-8") as config_file: content = config_file.read() except OSError as exc: _logger.exception("Failed to read configuration file: %s", file_path) - raise ConfigurationError( - f"Failed to read configuration file: {file_path}" - ) from exc + raise ConfigurationError(f"Failed to read configuration file: {file_path}") from exc # Perform environment variable substitution try: content = substitute_env_vars(content) except Exception as exc: - raise ConfigurationError( - f"Environment variable substitution failed: {exc}" - ) from exc + raise ConfigurationError(f"Environment variable substitution failed: {exc}") from exc # Parse based on file extension suffix = path.suffix.lower() @@ -125,9 +114,7 @@ def load_config_file( data = json.loads(content) else: _logger.error("Unsupported file format: %s", suffix) - raise ConfigurationError( - f"Unsupported file format: {suffix}. Use .yaml, .yml, or .json" - ) + raise ConfigurationError(f"Unsupported file format: {suffix}. Use .yaml, .yml, or .json") except yaml.YAMLError as exc: _logger.exception("Failed to parse YAML from %s", file_path) raise ConfigurationError(f"Failed to parse YAML: {exc}") from exc @@ -144,9 +131,7 @@ def load_config_file( "Configuration must be a mapping/object, got %s", type(data).__name__, ) - raise ConfigurationError( - f"Configuration must be a mapping/object, got {type(data).__name__}" - ) + raise ConfigurationError(f"Configuration must be a mapping/object, got {type(data).__name__}") _validate_schema(data) _validate_file_format(data) @@ -155,12 +140,8 @@ def load_config_file( try: config = _dict_to_model(data) except Exception as exc: - _logger.exception( - "Failed to validate configuration from %s", file_path - ) - raise ConfigurationError( - f"Failed to validate configuration: {exc}" - ) from exc + _logger.exception("Failed to validate configuration from %s", file_path) + raise ConfigurationError(f"Failed to validate configuration: {exc}") from exc return config @@ -179,15 +160,12 @@ def _validate_schema(data: dict) -> None: ) except jsonschema.ValidationError as exc: raise ConfigurationError( - f"Configuration does not match schema: {exc.message} " - f"(at {' -> '.join(str(p) for p in exc.absolute_path)})" + f"Configuration does not match schema: {exc.message} (at {' -> '.join(str(p) for p in exc.absolute_path)})" if exc.absolute_path else f"Configuration does not match schema: {exc.message}" ) from exc except jsonschema.SchemaError as exc: - raise ConfigurationError( - f"Invalid configuration schema: {exc.message}" - ) from exc + raise ConfigurationError(f"Invalid configuration schema: {exc.message}") from exc def _validate_file_format(data: dict) -> None: @@ -206,10 +184,7 @@ def _validate_file_format(data: dict) -> None: # file_format is required and typed as a string by the schema, which is # validated before this runs; guard defensively regardless. if not isinstance(file_format, str): - raise ConfigurationError( - f"Invalid file_format: expected a version string, " - f"got {file_format!r}" - ) + raise ConfigurationError(f"Invalid file_format: expected a version string, got {file_format!r}") # Drop any pre-release / meta tag, e.g. "1.0-rc.2" -> "1.0". version = file_format.split("-", 1)[0] @@ -218,15 +193,11 @@ def _validate_file_format(data: dict) -> None: major = int(parts[0]) minor = int(parts[1]) if len(parts) > 1 else 0 except ValueError as exc: - raise ConfigurationError( - f"Invalid file_format '{file_format}': expected MAJOR.MINOR " - f"version numbers" - ) from exc + raise ConfigurationError(f"Invalid file_format '{file_format}': expected MAJOR.MINOR version numbers") from exc if major != _SUPPORTED_SCHEMA_MAJOR: raise ConfigurationError( - f"Unsupported file_format '{file_format}': this SDK supports " - f"schema version {_SUPPORTED_SCHEMA_MAJOR}.x" + f"Unsupported file_format '{file_format}': this SDK supports schema version {_SUPPORTED_SCHEMA_MAJOR}.x" ) if minor > _SUPPORTED_SCHEMA_MINOR: @@ -262,6 +233,5 @@ def _dict_to_model(data: dict[str, Any]) -> OpenTelemetryConfiguration: return _dict_to_dataclass(data, OpenTelemetryConfiguration) except TypeError as exc: raise TypeError( - f"Configuration structure is invalid. " - f"Check that all required fields are present and correctly typed: {exc}" + f"Configuration structure is invalid. Check that all required fields are present and correctly typed: {exc}" ) from exc diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/instrumentation.py b/opentelemetry-configuration/src/opentelemetry/configuration/instrumentation.py index 9d241f3b949..7fb73ce56e9 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/instrumentation.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/instrumentation.py @@ -51,14 +51,11 @@ class exposes a ``configuration`` attribute that is a dataclass type, the cls = load_entry_point("opentelemetry_instrumentor", name) configuration_cls = getattr(cls, "configuration", None) if isclass(configuration_cls) and is_dataclass(configuration_cls): - configuration_obj = _dict_to_dataclass( - options, configuration_cls - ) + configuration_obj = _dict_to_dataclass(options, configuration_cls) options = { f.name: value for f in fields(configuration_obj) - if (value := getattr(configuration_obj, f.name)) - is not None + if (value := getattr(configuration_obj, f.name)) is not None } instance = cls() if getattr(instance, "is_instrumented_by_opentelemetry", False): @@ -73,6 +70,4 @@ class exposes a ``configuration`` attribute that is a dataclass type, the exc, ) except Exception: # pylint: disable=broad-except - _logger.exception( - "Failed to instrument '%s' via declarative config", name - ) + _logger.exception("Failed to instrument '%s' via declarative config", name) diff --git a/opentelemetry-configuration/src/opentelemetry/configuration/models.py b/opentelemetry-configuration/src/opentelemetry/configuration/models.py index 4a0b9521dac..5a3a98d268d 100644 --- a/opentelemetry-configuration/src/opentelemetry/configuration/models.py +++ b/opentelemetry-configuration/src/opentelemetry/configuration/models.py @@ -115,9 +115,7 @@ class ExperimentalComposableRuleBasedSamplerRuleAttributeValues: ExperimentalContainerResourceDetector: TypeAlias = dict[str, Any] | None -ExperimentalEventToSpanEventBridgeLogRecordProcessor: TypeAlias = ( - dict[str, Any] | None -) +ExperimentalEventToSpanEventBridgeLogRecordProcessor: TypeAlias = dict[str, Any] | None ExperimentalHostResourceDetector: TypeAlias = dict[str, Any] | None @@ -137,9 +135,7 @@ class ExperimentalHttpServerInstrumentation: known_methods: list[str] | None = None -ExperimentalLanguageSpecificInstrumentation: TypeAlias = dict[ - str, dict[str, Any] -] +ExperimentalLanguageSpecificInstrumentation: TypeAlias = dict[str, dict[str, Any]] @dataclass @@ -168,12 +164,8 @@ class ExperimentalProbabilitySampler: class ExperimentalPrometheusTranslationStrategy(Enum): underscore_escaping_with_suffixes = "underscore_escaping_with_suffixes" - underscore_escaping_without_suffixes_development = ( - "underscore_escaping_without_suffixes/development" - ) - no_utf8_escaping_with_suffixes_development = ( - "no_utf8_escaping_with_suffixes/development" - ) + underscore_escaping_without_suffixes_development = "underscore_escaping_without_suffixes/development" + no_utf8_escaping_with_suffixes_development = "no_utf8_escaping_with_suffixes/development" no_translation_development = "no_translation/development" @@ -294,9 +286,7 @@ class OtlpGrpcMetricExporter: compression: str | None = None timeout: int | None = None temporality_preference: ExporterTemporalityPreference | None = None - default_histogram_aggregation: ( - ExporterDefaultHistogramAggregation | None - ) = None + default_histogram_aggregation: ExporterDefaultHistogramAggregation | None = None class OtlpHttpEncoding(Enum): @@ -325,9 +315,7 @@ class OtlpHttpMetricExporter: timeout: int | None = None encoding: OtlpHttpEncoding | None = None temporality_preference: ExporterTemporalityPreference | None = None - default_histogram_aggregation: ( - ExporterDefaultHistogramAggregation | None - ) = None + default_histogram_aggregation: ExporterDefaultHistogramAggregation | None = None RandomIdGenerator: TypeAlias = dict[str, Any] | None @@ -414,9 +402,7 @@ class Aggregation: default: DefaultAggregation | None = None drop: DropAggregation | None = None explicit_bucket_histogram: ExplicitBucketHistogramAggregation | None = None - base2_exponential_bucket_histogram: ( - Base2ExponentialBucketHistogramAggregation | None - ) = None + base2_exponential_bucket_histogram: Base2ExponentialBucketHistogramAggregation | None = None last_value: LastValueAggregation | None = None sum: SumAggregation | None = None @@ -440,9 +426,7 @@ class BatchSpanProcessor: @dataclass class ConsoleMetricExporter: temporality_preference: ExporterTemporalityPreference | None = None - default_histogram_aggregation: ( - ExporterDefaultHistogramAggregation | None - ) = None + default_histogram_aggregation: ExporterDefaultHistogramAggregation | None = None @dataclass @@ -495,9 +479,7 @@ class ExperimentalMeterConfigurator: class ExperimentalOtlpFileMetricExporter: output_stream: str | None = None temporality_preference: ExporterTemporalityPreference | None = None - default_histogram_aggregation: ( - ExporterDefaultHistogramAggregation | None - ) = None + default_histogram_aggregation: ExporterDefaultHistogramAggregation | None = None @dataclass @@ -507,9 +489,7 @@ class ExperimentalPrometheusMetricExporter: scope_info_enabled: bool | None = None target_info_enabled_development: bool | None = None resource_constant_labels: IncludeExclude | None = None - translation_strategy: ExperimentalPrometheusTranslationStrategy | None = ( - None - ) + translation_strategy: ExperimentalPrometheusTranslationStrategy | None = None @_additional_properties @@ -677,9 +657,7 @@ class ExperimentalResourceDetection: class LogRecordProcessor: batch: BatchLogRecordProcessor | None = None simple: SimpleLogRecordProcessor | None = None - event_to_span_event_bridge_development: ( - ExperimentalEventToSpanEventBridgeLogRecordProcessor | None - ) = None + event_to_span_event_bridge_development: ExperimentalEventToSpanEventBridgeLogRecordProcessor | None = None additional_properties: ClassVar[dict[str, Any]] @@ -717,9 +695,7 @@ class View: class LoggerProvider: processors: list[LogRecordProcessor] limits: LogRecordLimits | None = None - logger_configurator_development: ExperimentalLoggerConfigurator | None = ( - None - ) + logger_configurator_development: ExperimentalLoggerConfigurator | None = None @dataclass @@ -772,12 +748,8 @@ class ExperimentalComposableRuleBasedSamplerRule: """ sampler: ExperimentalComposableSampler - attribute_values: ( - ExperimentalComposableRuleBasedSamplerRuleAttributeValues | None - ) = None - attribute_patterns: ( - ExperimentalComposableRuleBasedSamplerRuleAttributePatterns | None - ) = None + attribute_values: ExperimentalComposableRuleBasedSamplerRuleAttributeValues | None = None + attribute_patterns: ExperimentalComposableRuleBasedSamplerRuleAttributePatterns | None = None span_kinds: list[SpanKind] | None = None parent: list[ExperimentalSpanParent] | None = None @@ -787,9 +759,7 @@ class ExperimentalComposableRuleBasedSamplerRule: class ExperimentalComposableSampler: always_off: ExperimentalComposableAlwaysOffSampler | None = None always_on: ExperimentalComposableAlwaysOnSampler | None = None - parent_threshold: ExperimentalComposableParentThresholdSampler | None = ( - None - ) + parent_threshold: ExperimentalComposableParentThresholdSampler | None = None probability: ExperimentalComposableProbabilitySampler | None = None rule_based: ExperimentalComposableRuleBasedSampler | None = None additional_properties: ClassVar[dict[str, Any]] @@ -830,6 +800,4 @@ class TracerProvider: limits: SpanLimits | None = None sampler: Sampler | None = None id_generator: IdGenerator | None = None - tracer_configurator_development: ExperimentalTracerConfigurator | None = ( - None - ) + tracer_configurator_development: ExperimentalTracerConfigurator | None = None diff --git a/opentelemetry-configuration/tests/file/test_env_substitution.py b/opentelemetry-configuration/tests/file/test_env_substitution.py index 92bbc711abf..ff52b9d704c 100644 --- a/opentelemetry-configuration/tests/file/test_env_substitution.py +++ b/opentelemetry-configuration/tests/file/test_env_substitution.py @@ -120,9 +120,7 @@ def test_newline_in_value_prevents_yaml_injection(self): os.environ, {"SERVICE_NAME": "legit-service\nmalicious_key: injected_value"}, ): - result = substitute_env_vars( - "file_format: '1.0'\nservice_name: ${SERVICE_NAME}" - ) + result = substitute_env_vars("file_format: '1.0'\nservice_name: ${SERVICE_NAME}") parsed = yaml.safe_load(result) self.assertNotIn("malicious_key", parsed) self.assertIn("legit-service", parsed["service_name"]) @@ -144,9 +142,7 @@ def test_carriage_return_in_value_is_escaped(self): def test_type_coercion_preserved_for_simple_values(self): """Simple values without newlines still undergo YAML type coercion per spec.""" with patch.dict(os.environ, {"BOOL_VAL": "true", "INT_VAL": "42"}): - bool_result = yaml.safe_load( - substitute_env_vars("key: ${BOOL_VAL}") - ) + bool_result = yaml.safe_load(substitute_env_vars("key: ${BOOL_VAL}")) int_result = yaml.safe_load(substitute_env_vars("key: ${INT_VAL}")) self.assertIs(bool_result["key"], True) self.assertEqual(int_result["key"], 42) diff --git a/opentelemetry-configuration/tests/file/test_loader.py b/opentelemetry-configuration/tests/file/test_loader.py index 4ca6b6dff11..9b13b371b65 100644 --- a/opentelemetry-configuration/tests/file/test_loader.py +++ b/opentelemetry-configuration/tests/file/test_loader.py @@ -96,9 +96,7 @@ def test_invalid_yaml_syntax(self): def test_invalid_file_extension(self): """Test error on unsupported file extension.""" - with tempfile.NamedTemporaryFile( - suffix=".txt", delete=False - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".txt", delete=False) as temp_file: temp_file.write(b"file_format: 1.0") temp_path = temp_file.name @@ -112,9 +110,7 @@ def test_invalid_file_extension(self): def test_empty_file(self): """Test error on empty file.""" - with tempfile.NamedTemporaryFile( - suffix=".yaml", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False, mode="w") as temp_file: temp_path = temp_file.name try: @@ -127,9 +123,7 @@ def test_empty_file(self): def test_non_dict_root(self): """Test error when root is not a mapping.""" - with tempfile.NamedTemporaryFile( - suffix=".yaml", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False, mode="w") as temp_file: temp_file.write("- item1\n- item2") temp_path = temp_file.name @@ -154,18 +148,13 @@ def test_unset_env_var_without_default_substitutes_empty(self): with patch.dict(os.environ, {}, clear=True): config = load_config_file(str(config_path)) - attributes = { - attribute.name: attribute.value - for attribute in config.resource.attributes - } + attributes = {attribute.name: attribute.value for attribute in config.resource.attributes} self.assertIsNone(attributes["service.name"]) self.assertEqual(attributes["deployment.environment"], "production") def test_yml_extension(self): """Test .yml extension is supported.""" - with tempfile.NamedTemporaryFile( - suffix=".yml", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".yml", delete=False, mode="w") as temp_file: temp_file.write('file_format: "1.0"') temp_path = temp_file.name @@ -177,9 +166,7 @@ def test_yml_extension(self): def test_json_syntax_error(self): """Test error on invalid JSON syntax.""" - with tempfile.NamedTemporaryFile( - suffix=".json", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".json", delete=False, mode="w") as temp_file: temp_file.write('{"file_format": invalid}') temp_path = temp_file.name @@ -193,9 +180,7 @@ def test_json_syntax_error(self): def test_schema_validation_wrong_type(self): """Test error when field has wrong type.""" - with tempfile.NamedTemporaryFile( - suffix=".yaml", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False, mode="w") as temp_file: # disabled must be a boolean, not a string temp_file.write('file_format: "1.0"\ndisabled: "yes"') temp_path = temp_file.name @@ -210,9 +195,7 @@ def test_schema_validation_wrong_type(self): def test_schema_validation_missing_file_format(self): """Test error when required file_format field is missing.""" - with tempfile.NamedTemporaryFile( - suffix=".yaml", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False, mode="w") as temp_file: temp_file.write("disabled: false") temp_path = temp_file.name @@ -226,14 +209,8 @@ def test_schema_validation_missing_file_format(self): def test_schema_validation_nested_path_in_error(self): """Test that error message includes field path for nested violations.""" - with tempfile.NamedTemporaryFile( - suffix=".yaml", delete=False, mode="w" - ) as temp_file: - temp_file.write( - 'file_format: "1.0"\n' - "attribute_limits:\n" - ' attribute_count_limit: "not-a-number"\n' - ) + with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False, mode="w") as temp_file: + temp_file.write('file_format: "1.0"\nattribute_limits:\n attribute_count_limit: "not-a-number"\n') temp_path = temp_file.name try: @@ -249,9 +226,7 @@ def test_schema_validation_nested_path_in_error(self): def test_schema_validation_invalid_enum(self): """Test error when field value is not a valid enum value.""" - with tempfile.NamedTemporaryFile( - suffix=".yaml", delete=False, mode="w" - ) as temp_file: + with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False, mode="w") as temp_file: temp_file.write('file_format: "1.0"\nlog_level: INVALID_LEVEL') temp_path = temp_file.name @@ -287,9 +262,7 @@ class TestConfigLoaderEndToEnd(unittest.TestCase): """ def _load(self, yaml: str | None = None) -> OpenTelemetryConfiguration: - with tempfile.NamedTemporaryFile( - mode="w", suffix=".yaml", delete=False - ) as fh: + with tempfile.NamedTemporaryFile(mode="w", suffix=".yaml", delete=False) as fh: fh.write(self._YAML if yaml is None else yaml) path = fh.name try: @@ -306,9 +279,7 @@ def test_nested_fields_are_typed_dataclasses(self): ParentBasedSamplerConfig, ) # Lists of dataclasses are converted element-wise. - self.assertIsInstance( - config.tracer_provider.processors[0], SpanProcessorConfig - ) + self.assertIsInstance(config.tracer_provider.processors[0], SpanProcessorConfig) self.assertIsInstance( config.tracer_provider.processors[0].batch, BatchSpanProcessorConfig, @@ -352,13 +323,9 @@ def test_null_valued_required_field_node_survives_conversion(self): # Schema accepted the null, and conversion left the required-field # node unset rather than crashing. - self.assertIsNone( - config.tracer_provider.sampler.jaeger_remote_development - ) + self.assertIsNone(config.tracer_provider.sampler.jaeger_remote_development) # A sibling nullable dict-typed node (console:) was still coerced. - self.assertEqual( - config.tracer_provider.processors[0].batch.exporter.console, {} - ) + self.assertEqual(config.tracer_provider.processors[0].batch.exporter.console, {}) class TestFileFormatValidation(unittest.TestCase): @@ -368,9 +335,7 @@ class TestFileFormatValidation(unittest.TestCase): @staticmethod def _load(file_format: str) -> OpenTelemetryConfiguration: - with tempfile.NamedTemporaryFile( - mode="w", suffix=".yaml", delete=False - ) as fh: + with tempfile.NamedTemporaryFile(mode="w", suffix=".yaml", delete=False) as fh: fh.write(f'file_format: "{file_format}"') path = fh.name try: @@ -379,9 +344,7 @@ def _load(file_format: str) -> OpenTelemetryConfiguration: os.unlink(path) def test_supported_version_is_accepted(self): - with self.assertNoLogs( - "opentelemetry.configuration.file._loader", level="WARNING" - ): + with self.assertNoLogs("opentelemetry.configuration.file._loader", level="WARNING"): config = self._load(self._SUPPORTED) self.assertEqual(config.file_format, self._SUPPORTED) @@ -397,22 +360,16 @@ def test_pre_release_meta_tag_is_accepted(self): ) def test_older_minor_is_accepted(self): version = f"{_SUPPORTED_SCHEMA_MAJOR}.{_SUPPORTED_SCHEMA_MINOR - 1}" - with self.assertNoLogs( - "opentelemetry.configuration.file._loader", level="WARNING" - ): + with self.assertNoLogs("opentelemetry.configuration.file._loader", level="WARNING"): config = self._load(version) self.assertEqual(config.file_format, version) def test_newer_minor_is_accepted_with_warning(self): version = f"{_SUPPORTED_SCHEMA_MAJOR}.{_SUPPORTED_SCHEMA_MINOR + 1}" - with self.assertLogs( - "opentelemetry.configuration.file._loader", level="WARNING" - ) as logs: + with self.assertLogs("opentelemetry.configuration.file._loader", level="WARNING") as logs: config = self._load(version) self.assertEqual(config.file_format, version) - self.assertTrue( - any("newer minor version" in message for message in logs.output) - ) + self.assertTrue(any("newer minor version" in message for message in logs.output)) def test_unsupported_major_is_rejected(self): versions = ["0.4", f"{_SUPPORTED_SCHEMA_MAJOR + 1}.0"] diff --git a/opentelemetry-configuration/tests/test_common.py b/opentelemetry-configuration/tests/test_common.py index bebe875e3b7..9d8ed6188f4 100644 --- a/opentelemetry-configuration/tests/test_common.py +++ b/opentelemetry-configuration/tests/test_common.py @@ -164,15 +164,11 @@ def test_none_string_returns_none(self): self.assertIsNone(_map_compression("none", _CompressionWithDeflate)) def test_gzip_maps_to_gzip(self): - self.assertEqual( - _map_compression("gzip", _CompressionWithDeflate), "gzip" - ) + self.assertEqual(_map_compression("gzip", _CompressionWithDeflate), "gzip") def test_deflate_maps_when_enabled(self): self.assertEqual( - _map_compression( - "deflate", _CompressionWithDeflate, allow_deflate=True - ), + _map_compression("deflate", _CompressionWithDeflate, allow_deflate=True), "deflate", ) @@ -182,32 +178,25 @@ def test_deflate_raises_by_default(self): self.assertEqual( str(ctx.exception), - "Unsupported compression value 'deflate'. Supported values: " - "'gzip', 'none'.", + "Unsupported compression value 'deflate'. Supported values: 'gzip', 'none'.", ) def test_deflate_raises_when_http_enum_lacks_support(self): with self.assertRaises(ConfigurationError) as ctx: - _map_compression( - "deflate", _CompressionWithoutDeflate, allow_deflate=True - ) + _map_compression("deflate", _CompressionWithoutDeflate, allow_deflate=True) self.assertEqual( str(ctx.exception), - "Unsupported compression value 'deflate'. Supported values: " - "'gzip', 'none'.", + "Unsupported compression value 'deflate'. Supported values: 'gzip', 'none'.", ) def test_http_error_message_includes_deflate(self): with self.assertRaises(ConfigurationError) as ctx: - _map_compression( - "brotli", _CompressionWithDeflate, allow_deflate=True - ) + _map_compression("brotli", _CompressionWithDeflate, allow_deflate=True) self.assertEqual( str(ctx.exception), - "Unsupported compression value 'brotli'. Supported values: " - "'gzip', 'deflate', 'none'.", + "Unsupported compression value 'brotli'. Supported values: 'gzip', 'deflate', 'none'.", ) @@ -226,9 +215,7 @@ def test_file_uri_returns_path(self): def test_file_uri_localhost_host_returns_path(self): self.assertEqual( - _parse_otlp_file_output_stream( - "file://localhost/tmp/traces.jsonl" - ), + _parse_otlp_file_output_stream("file://localhost/tmp/traces.jsonl"), "/tmp/traces.jsonl", ) @@ -271,8 +258,7 @@ def test_malformed_uri_raises_configuration_error(self): _parse_otlp_file_output_stream("file://[::1") self.assertIn( - "Failed to parse output_stream 'file://[::1' for " - "otlp_file_development exporter", + "Failed to parse output_stream 'file://[::1' for otlp_file_development exporter", str(ctx.exception), ) @@ -282,8 +268,7 @@ def test_relative_path_raises(self): self.assertEqual( str(ctx.exception), - "Unsupported output_stream 'file:traces.jsonl' for " - "otlp_file_development exporter. Path must be absolute.", + "Unsupported output_stream 'file:traces.jsonl' for otlp_file_development exporter. Path must be absolute.", ) def test_trailing_slash_path_raises(self): @@ -319,9 +304,7 @@ def test_unknown_kwargs_captured_in_additional_properties(self): # pylint: disable=unexpected-keyword-arg obj = self.cls(my_plugin={"key": "val"}) self.assertIsNone(obj.known_field) - self.assertEqual( - obj.additional_properties, {"my_plugin": {"key": "val"}} - ) + self.assertEqual(obj.additional_properties, {"my_plugin": {"key": "val"}}) def test_mixed_known_and_unknown_kwargs(self): # pylint: disable=unexpected-keyword-arg @@ -373,9 +356,7 @@ def test_text_map_propagator(self): self._assert_supports_additional_properties(TextMapPropagator) def test_resource_detector(self): - self._assert_supports_additional_properties( - ExperimentalResourceDetector - ) + self._assert_supports_additional_properties(ExperimentalResourceDetector) def test_log_record_exporter(self): self._assert_supports_additional_properties(LogRecordExporter) @@ -401,9 +382,7 @@ class _Config: def test_resolves_builtin_from_registry(self): config = self.cls(builtin_a={"key": "val"}) - result = _resolve_component( - config, self.registry, "test_group", "test component" - ) + result = _resolve_component(config, self.registry, "test_group", "test component") self.assertEqual(result, ("resolved_a", {"key": "val"})) def test_resolves_plugin_via_entry_point(self): @@ -415,9 +394,7 @@ def test_resolves_plugin_via_entry_point(self): ): # pylint: disable=unexpected-keyword-arg config = self.cls(my_plugin={"opt": "val"}) - result = _resolve_component( - config, self.registry, "test_group", "test component" - ) + result = _resolve_component(config, self.registry, "test_group", "test component") self.assertIs(result, mock_instance) mock_class.assert_called_once_with(opt="val") @@ -430,17 +407,13 @@ def test_plugin_with_empty_config(self): ): # pylint: disable=unexpected-keyword-arg config = self.cls(my_plugin={}) - _resolve_component( - config, self.registry, "test_group", "test component" - ) + _resolve_component(config, self.registry, "test_group", "test component") mock_class.assert_called_once_with() def test_no_component_raises_configuration_error(self): config = self.cls() with self.assertRaises(ConfigurationError): - _resolve_component( - config, self.registry, "test_group", "test component" - ) + _resolve_component(config, self.registry, "test_group", "test component") def test_plugin_not_found_raises_configuration_error(self): with patch( @@ -450,16 +423,12 @@ def test_plugin_not_found_raises_configuration_error(self): # pylint: disable=unexpected-keyword-arg config = self.cls(missing_plugin={}) with self.assertRaises(ConfigurationError): - _resolve_component( - config, self.registry, "test_group", "test component" - ) + _resolve_component(config, self.registry, "test_group", "test component") def test_first_registry_match_wins_when_multiple_set(self): """When multiple built-in fields are set (which the schema should prevent), the first registry match wins.""" config = self.cls(builtin_a={"a": 1}, builtin_b="b") - result = _resolve_component( - config, self.registry, "test_group", "test component" - ) + result = _resolve_component(config, self.registry, "test_group", "test component") # builtin_a comes first in the registry dict self.assertEqual(result, ("resolved_a", {"a": 1})) diff --git a/opentelemetry-configuration/tests/test_conversion.py b/opentelemetry-configuration/tests/test_conversion.py index 061df050df0..e12df181688 100644 --- a/opentelemetry-configuration/tests/test_conversion.py +++ b/opentelemetry-configuration/tests/test_conversion.py @@ -63,18 +63,14 @@ def test_converts_flat_dict(self): self.assertEqual(result.value, 42) def test_converts_nested_dataclass(self): - result = _dict_to_dataclass( - {"middle": {"inner": {"value": 7}}}, _Outer - ) + result = _dict_to_dataclass({"middle": {"inner": {"value": 7}}}, _Outer) self.assertIsInstance(result, _Outer) self.assertIsInstance(result.middle, _Middle) self.assertIsInstance(result.middle.inner, _Inner) self.assertEqual(result.middle.inner.value, 7) def test_converts_list_of_dataclasses(self): - result = _dict_to_dataclass( - {"middle": {"items": [{"value": 1}, {"value": 2}]}}, _Outer - ) + result = _dict_to_dataclass({"middle": {"items": [{"value": 1}, {"value": 2}]}}, _Outer) self.assertEqual(len(result.middle.items), 2) self.assertIsInstance(result.middle.items[0], _Inner) self.assertEqual(result.middle.items[0].value, 1) @@ -94,9 +90,7 @@ def test_present_null_dataclass_with_required_field_stays_none(self): # (ExperimentalJaegerRemoteSampler) has required fields, so it cannot # be defaulted. A present null must stay None rather than raising a # TypeError trying to instantiate it. Regression test for #5451. - result = _dict_to_dataclass( - {"jaeger_remote_development": None}, SamplerConfig - ) + result = _dict_to_dataclass({"jaeger_remote_development": None}, SamplerConfig) self.assertIsNone(result.jaeger_remote_development) def test_missing_optional_fields_default_to_none(self): @@ -105,13 +99,9 @@ def test_missing_optional_fields_default_to_none(self): self.assertIsNone(result.name) def test_unknown_keys_routed_to_additional_properties(self): - result = _dict_to_dataclass( - {"known": "yes", "my_plugin": {"opt": True}}, _WithExtras - ) + result = _dict_to_dataclass({"known": "yes", "my_plugin": {"opt": True}}, _WithExtras) self.assertEqual(result.known, "yes") - self.assertEqual( - result.additional_properties, {"my_plugin": {"opt": True}} - ) + self.assertEqual(result.additional_properties, {"my_plugin": {"opt": True}}) def test_primitive_values_pass_through(self): result = _dict_to_dataclass({"name": "hello"}, _Outer) @@ -126,9 +116,7 @@ def test_enum_value_coerced_from_string(self): self.assertIs(result.filter, ExemplarFilter.always_on) def test_enum_value_already_enum_passes_through(self): - result = _dict_to_dataclass( - {"filter": ExemplarFilter.trace_based}, _WithEnum - ) + result = _dict_to_dataclass({"filter": ExemplarFilter.trace_based}, _WithEnum) self.assertIs(result.filter, ExemplarFilter.trace_based) def test_present_null_mapping_coerced_to_empty_dict(self): diff --git a/opentelemetry-configuration/tests/test_exceptions.py b/opentelemetry-configuration/tests/test_exceptions.py index 042ca8090fa..edb4337cf5c 100644 --- a/opentelemetry-configuration/tests/test_exceptions.py +++ b/opentelemetry-configuration/tests/test_exceptions.py @@ -37,9 +37,7 @@ def test_with_custom_install_name(self): ) self.assertEqual(exc.install_name, "opentelemetry-sdk") self.assertEqual(exc.extras, "file-configuration") - self.assertIn( - 'pip install "opentelemetry-sdk[file-configuration]"', str(exc) - ) + self.assertIn('pip install "opentelemetry-sdk[file-configuration]"', str(exc)) def test_with_feature_and_extras(self): exc = MissingDependencyError( @@ -49,9 +47,7 @@ def test_with_feature_and_extras(self): extras="file-configuration", ) self.assertIn("File configuration requires 'jsonschema'", str(exc)) - self.assertIn( - 'pip install "opentelemetry-sdk[file-configuration]"', str(exc) - ) + self.assertIn('pip install "opentelemetry-sdk[file-configuration]"', str(exc)) def test_can_be_caught_as_configuration_error(self): with self.assertRaises(ConfigurationError): @@ -69,6 +65,4 @@ def test_is_import_error_subclass(self): self.assertTrue(issubclass(MissingDependencyError, ImportError)) def test_issubclass_import_error(self): - self.assertIsInstance( - MissingDependencyError(package="test"), ImportError - ) + self.assertIsInstance(MissingDependencyError(package="test"), ImportError) diff --git a/opentelemetry-configuration/tests/test_instrumentation.py b/opentelemetry-configuration/tests/test_instrumentation.py index 00464676bf1..3bd224e8074 100644 --- a/opentelemetry-configuration/tests/test_instrumentation.py +++ b/opentelemetry-configuration/tests/test_instrumentation.py @@ -37,9 +37,7 @@ def test_unknown_instrumentor_logs_warning(self, _mock_load): "opentelemetry.configuration.instrumentation", level=WARNING, ) as cm: - configure_instrumentation( - ExperimentalInstrumentation(python={"unknown_lib": {}}) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"unknown_lib": {}})) self.assertTrue( any("unknown_lib" in msg for msg in cm.output), f"Expected warning mentioning 'unknown_lib', got: {cm.output}", @@ -50,42 +48,28 @@ def test_instruments_listed_library_with_no_opts(self, mock_load): instrumentor = MagicMock() mock_load.return_value = _make_instrumentor_class(instrumentor) - configure_instrumentation( - ExperimentalInstrumentation(python={"requests": {}}) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"requests": {}})) - mock_load.assert_called_once_with( - "opentelemetry_instrumentor", "requests" - ) + mock_load.assert_called_once_with("opentelemetry_instrumentor", "requests") instrumentor.instrument.assert_called_once_with() @patch(_LOAD_EP) - def test_forwards_kwargs_to_instrumentor_without_configuration( - self, mock_load - ): + def test_forwards_kwargs_to_instrumentor_without_configuration(self, mock_load): instrumentor = MagicMock() mock_load.return_value = _make_instrumentor_class(instrumentor) configure_instrumentation( - ExperimentalInstrumentation( - python={"flask": {"excluded_urls": "/healthz", "foo": "bar"}} - ) + ExperimentalInstrumentation(python={"flask": {"excluded_urls": "/healthz", "foo": "bar"}}) ) - instrumentor.instrument.assert_called_once_with( - excluded_urls="/healthz", foo="bar" - ) + instrumentor.instrument.assert_called_once_with(excluded_urls="/healthz", foo="bar") @patch(_LOAD_EP) def test_enabled_false_skips_instrumentation(self, mock_load): instrumentor = MagicMock() mock_load.return_value = _make_instrumentor_class(instrumentor) - configure_instrumentation( - ExperimentalInstrumentation( - python={"requests": {"enabled": False}} - ) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"requests": {"enabled": False}})) mock_load.assert_not_called() instrumentor.instrument.assert_not_called() @@ -96,9 +80,7 @@ def test_enabled_key_not_forwarded_to_instrumentor(self, mock_load): mock_load.return_value = _make_instrumentor_class(instrumentor) configure_instrumentation( - ExperimentalInstrumentation( - python={"flask": {"enabled": True, "excluded_urls": "/ok"}} - ) + ExperimentalInstrumentation(python={"flask": {"enabled": True, "excluded_urls": "/ok"}}) ) instrumentor.instrument.assert_called_once_with(excluded_urls="/ok") @@ -109,17 +91,11 @@ def test_multiple_instrumentors_all_called(self, mock_load): requests_inst = MagicMock() def _side_effect(_group, name): - return _make_instrumentor_class( - flask_inst if name == "flask" else requests_inst - ) + return _make_instrumentor_class(flask_inst if name == "flask" else requests_inst) mock_load.side_effect = _side_effect - configure_instrumentation( - ExperimentalInstrumentation( - python={"flask": {}, "requests": {"foo": "bar"}} - ) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"flask": {}, "requests": {"foo": "bar"}})) flask_inst.instrument.assert_called_once_with() requests_inst.instrument.assert_called_once_with(foo="bar") @@ -135,9 +111,7 @@ def test_instrumentor_exception_does_not_stop_others(self, mock_load): def _side_effect(_group, _name): nonlocal call_count call_count += 1 - return _make_instrumentor_class( - broken_inst if call_count == 1 else ok_inst - ) + return _make_instrumentor_class(broken_inst if call_count == 1 else ok_inst) mock_load.side_effect = _side_effect @@ -145,9 +119,7 @@ def _side_effect(_group, _name): "opentelemetry.configuration.instrumentation", level=ERROR, ): - configure_instrumentation( - ExperimentalInstrumentation(python={"broken": {}, "ok": {}}) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"broken": {}, "ok": {}})) ok_inst.instrument.assert_called_once_with() @@ -157,22 +129,16 @@ def test_skips_already_instrumented(self, mock_load): mock_load.return_value = _make_instrumentor_class(instrumentor) instrumentor.is_instrumented_by_opentelemetry = True - configure_instrumentation( - ExperimentalInstrumentation(python={"requests": {}}) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"requests": {}})) instrumentor.instrument.assert_not_called() @patch(_LOAD_EP) def test_non_dataclass_configuration_attribute_ignored(self, mock_load): instrumentor = MagicMock() - mock_load.return_value = _make_instrumentor_class( - instrumentor, configuration="not-a-dataclass" - ) + mock_load.return_value = _make_instrumentor_class(instrumentor, configuration="not-a-dataclass") - configure_instrumentation( - ExperimentalInstrumentation(python={"requests": {"foo": "bar"}}) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"requests": {"foo": "bar"}})) instrumentor.instrument.assert_called_once_with(foo="bar") @@ -184,9 +150,7 @@ class RequestsConfig: capture_headers: bool | None = None instrumentor = MagicMock() - mock_load.return_value = _make_instrumentor_class( - instrumentor, configuration=RequestsConfig - ) + mock_load.return_value = _make_instrumentor_class(instrumentor, configuration=RequestsConfig) configure_instrumentation( ExperimentalInstrumentation( @@ -199,9 +163,7 @@ class RequestsConfig: ) ) - instrumentor.instrument.assert_called_once_with( - excluded_urls="/health", capture_headers=True - ) + instrumentor.instrument.assert_called_once_with(excluded_urls="/health", capture_headers=True) @patch(_LOAD_EP) def test_configuration_none_fields_not_forwarded(self, mock_load): @@ -211,15 +173,9 @@ class FlaskConfig: propagate_headers: bool | None = None instrumentor = MagicMock() - mock_load.return_value = _make_instrumentor_class( - instrumentor, configuration=FlaskConfig - ) + mock_load.return_value = _make_instrumentor_class(instrumentor, configuration=FlaskConfig) - configure_instrumentation( - ExperimentalInstrumentation( - python={"flask": {"excluded_urls": "/ok"}} - ) - ) + configure_instrumentation(ExperimentalInstrumentation(python={"flask": {"excluded_urls": "/ok"}})) # propagate_headers was not set, so it must not appear in the call. instrumentor.instrument.assert_called_once_with(excluded_urls="/ok") @@ -231,20 +187,14 @@ class StrictConfig: excluded_urls: str | None = None instrumentor = MagicMock() - mock_load.return_value = _make_instrumentor_class( - instrumentor, configuration=StrictConfig - ) + mock_load.return_value = _make_instrumentor_class(instrumentor, configuration=StrictConfig) with self.assertLogs( "opentelemetry.configuration.instrumentation", level=ERROR, ): configure_instrumentation( - ExperimentalInstrumentation( - python={ - "mylib": {"excluded_urls": "/ok", "typo_field": "bad"} - } - ) + ExperimentalInstrumentation(python={"mylib": {"excluded_urls": "/ok", "typo_field": "bad"}}) ) instrumentor.instrument.assert_not_called() diff --git a/opentelemetry-configuration/tests/test_logger_provider.py b/opentelemetry-configuration/tests/test_logger_provider.py index 234c451baab..18f12c8313e 100644 --- a/opentelemetry-configuration/tests/test_logger_provider.py +++ b/opentelemetry-configuration/tests/test_logger_provider.py @@ -102,83 +102,55 @@ def _make_batch_config( ) def test_batch_processor_default_schedule_delay(self): - processor = _create_batch_log_record_processor( - self._make_batch_config() - ) + processor = _create_batch_log_record_processor(self._make_batch_config()) self.assertEqual( processor._batch_processor._schedule_delay_millis, _DEFAULT_SCHEDULE_DELAY_MILLIS, ) def test_batch_processor_default_export_timeout(self): - processor = _create_batch_log_record_processor( - self._make_batch_config() - ) + processor = _create_batch_log_record_processor(self._make_batch_config()) self.assertEqual( processor._batch_processor._export_timeout_millis, _DEFAULT_EXPORT_TIMEOUT_MILLIS, ) def test_batch_processor_default_max_queue_size(self): - processor = _create_batch_log_record_processor( - self._make_batch_config() - ) + processor = _create_batch_log_record_processor(self._make_batch_config()) self.assertEqual( processor._batch_processor._max_queue_size, _DEFAULT_MAX_QUEUE_SIZE, ) def test_batch_processor_default_max_export_batch_size(self): - processor = _create_batch_log_record_processor( - self._make_batch_config() - ) + processor = _create_batch_log_record_processor(self._make_batch_config()) self.assertEqual( processor._batch_processor._max_export_batch_size, _DEFAULT_MAX_EXPORT_BATCH_SIZE, ) def test_batch_processor_explicit_schedule_delay(self): - processor = _create_batch_log_record_processor( - self._make_batch_config(schedule_delay=2000) - ) - self.assertEqual( - processor._batch_processor._schedule_delay_millis, 2000.0 - ) + processor = _create_batch_log_record_processor(self._make_batch_config(schedule_delay=2000)) + self.assertEqual(processor._batch_processor._schedule_delay_millis, 2000.0) def test_batch_processor_explicit_export_timeout(self): - processor = _create_batch_log_record_processor( - self._make_batch_config(export_timeout=5000) - ) - self.assertEqual( - processor._batch_processor._export_timeout_millis, 5000.0 - ) + processor = _create_batch_log_record_processor(self._make_batch_config(export_timeout=5000)) + self.assertEqual(processor._batch_processor._export_timeout_millis, 5000.0) def test_batch_processor_explicit_max_queue_size(self): - processor = _create_batch_log_record_processor( - self._make_batch_config(max_queue_size=512) - ) + processor = _create_batch_log_record_processor(self._make_batch_config(max_queue_size=512)) self.assertEqual(processor._batch_processor._max_queue_size, 512) def test_batch_processor_explicit_max_export_batch_size(self): - processor = _create_batch_log_record_processor( - self._make_batch_config(max_export_batch_size=128) - ) - self.assertEqual( - processor._batch_processor._max_export_batch_size, 128 - ) + processor = _create_batch_log_record_processor(self._make_batch_config(max_export_batch_size=128)) + self.assertEqual(processor._batch_processor._max_export_batch_size, 128) def test_batch_processor_uses_console_exporter(self): - processor = _create_batch_log_record_processor( - self._make_batch_config() - ) - self.assertIsInstance( - processor._batch_processor._exporter, ConsoleLogRecordExporter - ) + processor = _create_batch_log_record_processor(self._make_batch_config()) + self.assertIsInstance(processor._batch_processor._exporter, ConsoleLogRecordExporter) def test_simple_processor_uses_console_exporter(self): - config = SimpleLogRecordProcessorConfig( - exporter=LogRecordExporterConfig(console={}) - ) + config = SimpleLogRecordProcessorConfig(exporter=LogRecordExporterConfig(console={})) processor = _create_simple_log_record_processor(config) self.assertIsInstance(processor, SimpleLogRecordProcessor) self.assertIsInstance(processor._exporter, ConsoleLogRecordExporter) @@ -190,9 +162,7 @@ def test_batch_processor_dispatched_from_processor_config(self): def test_simple_processor_dispatched_from_processor_config(self): config = LogRecordProcessorConfig( - simple=SimpleLogRecordProcessorConfig( - exporter=LogRecordExporterConfig(console={}) - ) + simple=SimpleLogRecordProcessorConfig(exporter=LogRecordExporterConfig(console={})) ) processor = _create_log_record_processor(config) self.assertIsInstance(processor, SimpleLogRecordProcessor) @@ -205,9 +175,7 @@ def test_no_processor_type_raises(self): def test_batch_processor_suppresses_env_var(self): """schedule_delay default must not read OTEL_BLRP_SCHEDULE_DELAY.""" with patch.dict("os.environ", {"OTEL_BLRP_SCHEDULE_DELAY": "9999"}): - processor = _create_batch_log_record_processor( - self._make_batch_config() - ) + processor = _create_batch_log_record_processor(self._make_batch_config()) self.assertEqual( processor._batch_processor._schedule_delay_millis, _DEFAULT_SCHEDULE_DELAY_MILLIS, @@ -233,9 +201,7 @@ def test_plugin_log_exporter_loaded_via_entry_point(self): return_value=[MagicMock(**{"load.return_value": mock_class})], ): # pylint: disable=unexpected-keyword-arg - result = _create_log_record_exporter( - LogRecordExporterConfig(my_custom_exporter={}) - ) + result = _create_log_record_exporter(LogRecordExporterConfig(my_custom_exporter={})) self.assertIs(result, mock_exporter) def test_unknown_log_exporter_raises_configuration_error(self): @@ -247,14 +213,10 @@ def test_unknown_log_exporter_raises_configuration_error(self): self.assertRaises(ConfigurationError), ): # pylint: disable=unexpected-keyword-arg - _create_log_record_exporter( - LogRecordExporterConfig(no_such_exporter={}) - ) + _create_log_record_exporter(LogRecordExporterConfig(no_such_exporter={})) def test_otlp_http_missing_package_raises(self): - config = LogRecordExporterConfig( - otlp_http=OtlpHttpExporterConfig(endpoint="http://localhost:4318") - ) + config = LogRecordExporterConfig(otlp_http=OtlpHttpExporterConfig(endpoint="http://localhost:4318")) with ( patch.dict( sys.modules, @@ -268,9 +230,7 @@ def test_otlp_http_missing_package_raises(self): _create_log_record_exporter(config) def test_otlp_grpc_missing_package_raises(self): - config = LogRecordExporterConfig( - otlp_grpc=OtlpGrpcExporterConfig(endpoint="http://localhost:4317") - ) + config = LogRecordExporterConfig(otlp_grpc=OtlpGrpcExporterConfig(endpoint="http://localhost:4317")) with ( patch.dict( sys.modules, @@ -284,9 +244,7 @@ def test_otlp_grpc_missing_package_raises(self): _create_log_record_exporter(config) def test_otlp_file_development_missing_package_raises(self): - config = LogRecordExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig() - ) + config = LogRecordExporterConfig(otlp_file_development=ExperimentalOtlpFileExporterConfig()) with ( patch.dict( sys.modules, @@ -297,9 +255,7 @@ def test_otlp_file_development_missing_package_raises(self): self.assertRaises(ConfigurationError) as ctx, ): _create_log_record_exporter(config) - self.assertIn( - "opentelemetry-exporter-otlp-json-file", str(ctx.exception) - ) + self.assertIn("opentelemetry-exporter-otlp-json-file", str(ctx.exception)) def test_otlp_file_development_default_stdout(self): mock_exporter_cls = MagicMock() @@ -312,9 +268,7 @@ def test_otlp_file_development_default_stdout(self): "opentelemetry.exporter.otlp.json.file._log_exporter": mock_module, }, ): - config = LogRecordExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig() - ) + config = LogRecordExporterConfig(otlp_file_development=ExperimentalOtlpFileExporterConfig()) _create_log_record_exporter(config) mock_exporter_cls.assert_called_once() @@ -333,16 +287,12 @@ def test_otlp_file_development_file_uri(self): }, ): config = LogRecordExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig( - output_stream="file:///tmp/logs.jsonl" - ) + otlp_file_development=ExperimentalOtlpFileExporterConfig(output_stream="file:///tmp/logs.jsonl") ) _create_log_record_exporter(config) mock_exporter_cls.assert_called_once() - self.assertEqual( - mock_exporter_cls.call_args.args, ("/tmp/logs.jsonl",) - ) + self.assertEqual(mock_exporter_cls.call_args.args, ("/tmp/logs.jsonl",)) def test_otlp_file_development_unsupported_output_stream_raises(self): mock_exporter_cls = MagicMock() @@ -356,9 +306,7 @@ def test_otlp_file_development_unsupported_output_stream_raises(self): }, ): config = LogRecordExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig( - output_stream="http://example" - ) + otlp_file_development=ExperimentalOtlpFileExporterConfig(output_stream="http://example") ) with self.assertRaises(ConfigurationError) as ctx: _create_log_record_exporter(config) @@ -411,11 +359,7 @@ def test_otlp_http_exporter_headers(self): }, ): config = LogRecordExporterConfig( - otlp_http=OtlpHttpExporterConfig( - headers=[ - NameStringValuePair(name="x-api-key", value="secret") - ] - ) + otlp_http=OtlpHttpExporterConfig(headers=[NameStringValuePair(name="x-api-key", value="secret")]) ) _create_log_record_exporter(config) @@ -438,9 +382,7 @@ def test_otlp_http_exporter_deflate_compression(self): "opentelemetry.exporter.otlp.proto.http._log_exporter": mock_log_module, }, ): - config = LogRecordExporterConfig( - otlp_http=OtlpHttpExporterConfig(compression="deflate") - ) + config = LogRecordExporterConfig(otlp_http=OtlpHttpExporterConfig(compression="deflate")) _create_log_record_exporter(config) call_kwargs = mock_exporter_cls.call_args.kwargs @@ -493,9 +435,7 @@ def test_limits_logs_warning(self): @staticmethod def test_no_limits_no_warning(): config = LoggerProviderConfig(processors=[]) - with patch( - "opentelemetry.configuration._logger_provider._logger" - ) as mock_logger: + with patch("opentelemetry.configuration._logger_provider._logger") as mock_logger: create_logger_provider(config) mock_logger.warning.assert_not_called() diff --git a/opentelemetry-configuration/tests/test_meter_provider.py b/opentelemetry-configuration/tests/test_meter_provider.py index 0bc98f025d2..09ed932fafd 100644 --- a/opentelemetry-configuration/tests/test_meter_provider.py +++ b/opentelemetry-configuration/tests/test_meter_provider.py @@ -111,27 +111,19 @@ def test_none_config_no_readers(self): def test_none_config_uses_trace_based_exemplar_filter(self): provider = create_meter_provider(None) - self.assertIsInstance( - provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter - ) + self.assertIsInstance(provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter) def test_none_config_does_not_read_exemplar_filter_env_var(self): - with patch.dict( - os.environ, {"OTEL_METRICS_EXEMPLAR_FILTER": "always_on"} - ): + with patch.dict(os.environ, {"OTEL_METRICS_EXEMPLAR_FILTER": "always_on"}): provider = create_meter_provider(None) - self.assertIsInstance( - provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter - ) + self.assertIsInstance(provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter) def test_none_config_does_not_read_interval_env_var(self): config = MeterProviderConfig( readers=[ MetricReaderConfig( periodic=PeriodicMetricReaderConfig( - exporter=PushMetricExporterConfig( - console=ConsoleMetricExporterConfig() - ) + exporter=PushMetricExporterConfig(console=ConsoleMetricExporterConfig()) ) ) ] @@ -143,20 +135,14 @@ def test_none_config_does_not_read_interval_env_var(self): self.assertEqual(reader._export_interval_millis, 60000.0) def test_configure_none_does_not_set_global(self): - original = __import__( - "opentelemetry.metrics", fromlist=["get_meter_provider"] - ).get_meter_provider() + original = __import__("opentelemetry.metrics", fromlist=["get_meter_provider"]).get_meter_provider() configure_meter_provider(None) - after = __import__( - "opentelemetry.metrics", fromlist=["get_meter_provider"] - ).get_meter_provider() + after = __import__("opentelemetry.metrics", fromlist=["get_meter_provider"]).get_meter_provider() self.assertIs(original, after) def test_configure_with_config_sets_global(self): config = MeterProviderConfig(readers=[]) - with patch( - "opentelemetry.configuration._meter_provider.metrics.set_meter_provider" - ) as mock_set: + with patch("opentelemetry.configuration._meter_provider.metrics.set_meter_provider") as mock_set: configure_meter_provider(config) mock_set.assert_called_once() arg = mock_set.call_args[0][0] @@ -179,9 +165,7 @@ def _make_periodic_config(exporter_config, interval=None, timeout=None): ) def test_console_exporter(self): - config = self._make_periodic_config( - PushMetricExporterConfig(console=ConsoleMetricExporterConfig()) - ) + config = self._make_periodic_config(PushMetricExporterConfig(console=ConsoleMetricExporterConfig())) provider = create_meter_provider(config) reader = provider._metric_readers[0] self.assertIsInstance(reader, PeriodicExportingMetricReader) @@ -205,17 +189,13 @@ def test_null_valued_console_exporter_from_parsed_config(self): self.assertIsInstance(reader._exporter, ConsoleMetricExporter) def test_periodic_reader_default_interval(self): - config = self._make_periodic_config( - PushMetricExporterConfig(console=ConsoleMetricExporterConfig()) - ) + config = self._make_periodic_config(PushMetricExporterConfig(console=ConsoleMetricExporterConfig())) provider = create_meter_provider(config) reader = provider._metric_readers[0] self.assertEqual(reader._export_interval_millis, 60000.0) def test_periodic_reader_default_timeout(self): - config = self._make_periodic_config( - PushMetricExporterConfig(console=ConsoleMetricExporterConfig()) - ) + config = self._make_periodic_config(PushMetricExporterConfig(console=ConsoleMetricExporterConfig())) provider = create_meter_provider(config) reader = provider._metric_readers[0] self.assertEqual(reader._export_timeout_millis, 30000.0) @@ -239,9 +219,7 @@ def test_periodic_reader_explicit_timeout(self): self.assertEqual(reader._export_timeout_millis, 10000.0) def test_otlp_http_missing_package_raises(self): - config = self._make_periodic_config( - PushMetricExporterConfig(otlp_http=OtlpHttpMetricExporterConfig()) - ) + config = self._make_periodic_config(PushMetricExporterConfig(otlp_http=OtlpHttpMetricExporterConfig())) with ( patch.dict( sys.modules, @@ -271,11 +249,7 @@ def test_otlp_http_created_with_endpoint(self): }, ): config = self._make_periodic_config( - PushMetricExporterConfig( - otlp_http=OtlpHttpMetricExporterConfig( - endpoint="http://localhost:4318" - ) - ) + PushMetricExporterConfig(otlp_http=OtlpHttpMetricExporterConfig(endpoint="http://localhost:4318")) ) create_meter_provider(config) @@ -302,11 +276,7 @@ def test_otlp_http_created_with_deflate_compression(self): }, ): config = self._make_periodic_config( - PushMetricExporterConfig( - otlp_http=OtlpHttpMetricExporterConfig( - compression="deflate" - ) - ) + PushMetricExporterConfig(otlp_http=OtlpHttpMetricExporterConfig(compression="deflate")) ) create_meter_provider(config) @@ -314,9 +284,7 @@ def test_otlp_http_created_with_deflate_compression(self): self.assertEqual(kwargs["compression"], "deflate_val") def test_otlp_grpc_missing_package_raises(self): - config = self._make_periodic_config( - PushMetricExporterConfig(otlp_grpc=OtlpGrpcMetricExporterConfig()) - ) + config = self._make_periodic_config(PushMetricExporterConfig(otlp_grpc=OtlpGrpcMetricExporterConfig())) with ( patch.dict( sys.modules, @@ -332,9 +300,7 @@ def test_otlp_grpc_missing_package_raises(self): def test_otlp_file_development_missing_package_raises(self): config = self._make_periodic_config( - PushMetricExporterConfig( - otlp_file_development=ExperimentalOtlpFileMetricExporterConfig() - ) + PushMetricExporterConfig(otlp_file_development=ExperimentalOtlpFileMetricExporterConfig()) ) with ( patch.dict( @@ -346,9 +312,7 @@ def test_otlp_file_development_missing_package_raises(self): self.assertRaises(ConfigurationError) as ctx, ): create_meter_provider(config) - self.assertIn( - "opentelemetry-exporter-otlp-json-file", str(ctx.exception) - ) + self.assertIn("opentelemetry-exporter-otlp-json-file", str(ctx.exception)) def test_otlp_file_development_default_stdout(self): mock_exporter_cls = MagicMock() @@ -362,9 +326,7 @@ def test_otlp_file_development_default_stdout(self): }, ): config = self._make_periodic_config( - PushMetricExporterConfig( - otlp_file_development=ExperimentalOtlpFileMetricExporterConfig() - ) + PushMetricExporterConfig(otlp_file_development=ExperimentalOtlpFileMetricExporterConfig()) ) create_meter_provider(config) @@ -424,9 +386,7 @@ def test_otlp_file_development_unsupported_output_stream_raises(self): ): config = self._make_periodic_config( PushMetricExporterConfig( - otlp_file_development=ExperimentalOtlpFileMetricExporterConfig( - output_stream="http://example" - ) + otlp_file_development=ExperimentalOtlpFileMetricExporterConfig(output_stream="http://example") ) ) with self.assertRaises(ConfigurationError) as ctx: @@ -483,9 +443,7 @@ def test_pull_prometheus_defaults(self): readers=[ MetricReaderConfig( pull=PullMetricReaderConfig( - exporter=PullMetricExporterConfig( - prometheus_development=PrometheusMetricExporterConfig() - ) + exporter=PullMetricExporterConfig(prometheus_development=PrometheusMetricExporterConfig()) ) ) ] @@ -505,9 +463,7 @@ def test_pull_prometheus_missing_package_raises(self): readers=[ MetricReaderConfig( pull=PullMetricReaderConfig( - exporter=PullMetricExporterConfig( - prometheus_development=PrometheusMetricExporterConfig() - ) + exporter=PullMetricExporterConfig(prometheus_development=PrometheusMetricExporterConfig()) ) ) ] @@ -517,13 +473,7 @@ def test_pull_prometheus_missing_package_raises(self): def test_pull_no_exporter_raises(self): config = MeterProviderConfig( - readers=[ - MetricReaderConfig( - pull=PullMetricReaderConfig( - exporter=PullMetricExporterConfig() - ) - ) - ] + readers=[MetricReaderConfig(pull=PullMetricReaderConfig(exporter=PullMetricExporterConfig()))] ) with self.assertRaises(ConfigurationError): create_meter_provider(config) @@ -531,9 +481,7 @@ def test_pull_no_exporter_raises(self): def test_pull_plugin_loads_via_entry_point(self): mock_reader = MagicMock() mock_class = MagicMock(return_value=mock_reader) - mock_entry_points = MagicMock( - return_value=[MagicMock(**{"load.return_value": mock_class})] - ) + mock_entry_points = MagicMock(return_value=[MagicMock(**{"load.return_value": mock_class})]) with patch( "opentelemetry.configuration._common.entry_points", mock_entry_points, @@ -543,9 +491,7 @@ def test_pull_plugin_loads_via_entry_point(self): MetricReaderConfig( pull=PullMetricReaderConfig( # pylint: disable=unexpected-keyword-arg - exporter=PullMetricExporterConfig( - my_custom_reader={"port": 8080} - ) + exporter=PullMetricExporterConfig(my_custom_reader={"port": 8080}) ) ) ] @@ -568,9 +514,7 @@ def test_pull_plugin_not_found_raises(self): MetricReaderConfig( pull=PullMetricReaderConfig( # pylint: disable=unexpected-keyword-arg - exporter=PullMetricExporterConfig( - no_such_reader={} - ) + exporter=PullMetricExporterConfig(no_such_reader={}) ) ) ] @@ -589,9 +533,7 @@ def test_pull_producers_warns(self): readers=[ MetricReaderConfig( pull=PullMetricReaderConfig( - exporter=PullMetricExporterConfig( - prometheus_development=PrometheusMetricExporterConfig() - ), + exporter=PullMetricExporterConfig(prometheus_development=PrometheusMetricExporterConfig()), producers=[MagicMock()], ) ) @@ -615,9 +557,7 @@ def test_pull_cardinality_limits_warns(self): readers=[ MetricReaderConfig( pull=PullMetricReaderConfig( - exporter=PullMetricExporterConfig( - prometheus_development=PrometheusMetricExporterConfig() - ), + exporter=PullMetricExporterConfig(prometheus_development=PrometheusMetricExporterConfig()), cardinality_limits=MagicMock(), ) ) @@ -635,13 +575,7 @@ class TestCreateMetricReadersGeneral(unittest.TestCase): @staticmethod def _make_periodic_config(exporter_config): return MeterProviderConfig( - readers=[ - MetricReaderConfig( - periodic=PeriodicMetricReaderConfig( - exporter=exporter_config - ) - ) - ] + readers=[MetricReaderConfig(periodic=PeriodicMetricReaderConfig(exporter=exporter_config))] ) def test_no_reader_type_raises(self): @@ -662,9 +596,7 @@ def test_plugin_metric_exporter_loaded_via_entry_point(self): return_value=[MagicMock(**{"load.return_value": mock_class})], ): # pylint: disable=unexpected-keyword-arg - config = self._make_periodic_config( - PushMetricExporterConfig(my_custom_exporter={}) - ) + config = self._make_periodic_config(PushMetricExporterConfig(my_custom_exporter={})) provider = create_meter_provider(config) self.assertEqual(len(provider._metric_readers), 1) @@ -674,9 +606,7 @@ def test_unknown_metric_exporter_raises_configuration_error(self): return_value=[], ): # pylint: disable=unexpected-keyword-arg - config = self._make_periodic_config( - PushMetricExporterConfig(no_such_exporter={}) - ) + config = self._make_periodic_config(PushMetricExporterConfig(no_such_exporter={})) with self.assertRaises(ConfigurationError): create_meter_provider(config) @@ -685,16 +615,12 @@ def test_multiple_readers(self): readers=[ MetricReaderConfig( periodic=PeriodicMetricReaderConfig( - exporter=PushMetricExporterConfig( - console=ConsoleMetricExporterConfig() - ) + exporter=PushMetricExporterConfig(console=ConsoleMetricExporterConfig()) ) ), MetricReaderConfig( periodic=PeriodicMetricReaderConfig( - exporter=PushMetricExporterConfig( - console=ConsoleMetricExporterConfig() - ) + exporter=PushMetricExporterConfig(console=ConsoleMetricExporterConfig()) ) ), ] @@ -742,22 +668,14 @@ def test_default_temporality_is_cumulative(self): ) def test_cumulative_temporality(self): - exporter = self._get_exporter( - self._make_console_config( - temporality=ExporterTemporalityPreference.cumulative - ) - ) + exporter = self._get_exporter(self._make_console_config(temporality=ExporterTemporalityPreference.cumulative)) self.assertEqual( exporter._preferred_temporality[Counter], AggregationTemporality.CUMULATIVE, ) def test_delta_temporality(self): - exporter = self._get_exporter( - self._make_console_config( - temporality=ExporterTemporalityPreference.delta - ) - ) + exporter = self._get_exporter(self._make_console_config(temporality=ExporterTemporalityPreference.delta)) self.assertEqual( exporter._preferred_temporality[Counter], AggregationTemporality.DELTA, @@ -776,11 +694,7 @@ def test_delta_temporality(self): ) def test_low_memory_temporality(self): - exporter = self._get_exporter( - self._make_console_config( - temporality=ExporterTemporalityPreference.low_memory - ) - ) + exporter = self._get_exporter(self._make_console_config(temporality=ExporterTemporalityPreference.low_memory)) self.assertEqual( exporter._preferred_temporality[Counter], AggregationTemporality.DELTA, @@ -799,9 +713,7 @@ def test_default_histogram_aggregation_is_explicit(self): def test_explicit_histogram_aggregation(self): exporter = self._get_exporter( - self._make_console_config( - histogram_agg=ExporterDefaultHistogramAggregation.explicit_bucket_histogram - ) + self._make_console_config(histogram_agg=ExporterDefaultHistogramAggregation.explicit_bucket_histogram) ) self.assertIsInstance( exporter._preferred_aggregation[Histogram], @@ -835,9 +747,7 @@ def test_temporality_suppresses_env_var(self): class TestCreateViews(unittest.TestCase): @staticmethod def _make_view_config(selector_kwargs=None, stream_kwargs=None): - selector = ViewSelector( - **(selector_kwargs or {"instrument_name": "*"}) - ) + selector = ViewSelector(**(selector_kwargs or {"instrument_name": "*"})) stream = ViewStream(**(stream_kwargs or {})) return MeterProviderConfig( readers=[], @@ -856,21 +766,15 @@ def test_view_created(self): self.assertIsInstance(provider._sdk_config.views[0], View) def test_selector_instrument_name(self): - view = self._get_view( - self._make_view_config({"instrument_name": "my.metric"}) - ) + view = self._get_view(self._make_view_config({"instrument_name": "my.metric"})) self.assertEqual(view._instrument_name, "my.metric") def test_selector_instrument_type(self): - view = self._get_view( - self._make_view_config({"instrument_type": InstrumentType.counter}) - ) + view = self._get_view(self._make_view_config({"instrument_type": InstrumentType.counter})) self.assertIs(view._instrument_type, Counter) def test_selector_meter_name(self): - view = self._get_view( - self._make_view_config({"meter_name": "my.meter"}) - ) + view = self._get_view(self._make_view_config({"meter_name": "my.meter"})) self.assertEqual(view._meter_name, "my.meter") def test_stream_name(self): @@ -883,39 +787,23 @@ def test_stream_name(self): self.assertEqual(view._name, "renamed") def test_stream_description(self): - view = self._get_view( - self._make_view_config( - stream_kwargs={"description": "a description"} - ) - ) + view = self._get_view(self._make_view_config(stream_kwargs={"description": "a description"})) self.assertEqual(view._description, "a description") def test_stream_attribute_keys_included(self): view = self._get_view( - self._make_view_config( - stream_kwargs={ - "attribute_keys": IncludeExclude(included=["key1", "key2"]) - } - ) + self._make_view_config(stream_kwargs={"attribute_keys": IncludeExclude(included=["key1", "key2"])}) ) self.assertEqual(view._attribute_keys, {"key1", "key2"}) def test_stream_attribute_keys_excluded_logs_warning(self): - config = self._make_view_config( - stream_kwargs={"attribute_keys": IncludeExclude(excluded=["key1"])} - ) - with self.assertLogs( - "opentelemetry.configuration._meter_provider", level="WARNING" - ) as log: + config = self._make_view_config(stream_kwargs={"attribute_keys": IncludeExclude(excluded=["key1"])}) + with self.assertLogs("opentelemetry.configuration._meter_provider", level="WARNING") as log: create_meter_provider(config) self.assertTrue(any("excluded" in msg for msg in log.output)) def test_stream_aggregation_drop(self): - view = self._get_view( - self._make_view_config( - stream_kwargs={"aggregation": AggregationConfig(drop={})} - ) - ) + view = self._get_view(self._make_view_config(stream_kwargs={"aggregation": AggregationConfig(drop={})})) self.assertIsInstance(view._aggregation, DropAggregation) def test_stream_aggregation_explicit_bucket_histogram_with_boundaries( @@ -925,16 +813,12 @@ def test_stream_aggregation_explicit_bucket_histogram_with_boundaries( self._make_view_config( stream_kwargs={ "aggregation": AggregationConfig( - explicit_bucket_histogram=ExplicitBucketConfig( - boundaries=[1.0, 5.0, 10.0] - ) + explicit_bucket_histogram=ExplicitBucketConfig(boundaries=[1.0, 5.0, 10.0]) ) } ) ) - self.assertIsInstance( - view._aggregation, ExplicitBucketHistogramAggregation - ) + self.assertIsInstance(view._aggregation, ExplicitBucketHistogramAggregation) self.assertEqual(list(view._aggregation._boundaries), [1.0, 5.0, 10.0]) def test_stream_aggregation_base2_exponential_with_params(self): @@ -942,16 +826,12 @@ def test_stream_aggregation_base2_exponential_with_params(self): self._make_view_config( stream_kwargs={ "aggregation": AggregationConfig( - base2_exponential_bucket_histogram=Base2Config( - max_size=64, max_scale=5 - ) + base2_exponential_bucket_histogram=Base2Config(max_size=64, max_scale=5) ) } ) ) - self.assertIsInstance( - view._aggregation, ExponentialBucketHistogramAggregation - ) + self.assertIsInstance(view._aggregation, ExponentialBucketHistogramAggregation) def test_stream_aggregation_base2_exponential_record_min_max(self): for record_min_max, expected in [ @@ -964,38 +844,22 @@ def test_stream_aggregation_base2_exponential_record_min_max(self): self._make_view_config( stream_kwargs={ "aggregation": AggregationConfig( - base2_exponential_bucket_histogram=Base2Config( - record_min_max=record_min_max - ) + base2_exponential_bucket_histogram=Base2Config(record_min_max=record_min_max) ) } ) ) - self.assertIsInstance( - view._aggregation, ExponentialBucketHistogramAggregation - ) + self.assertIsInstance(view._aggregation, ExponentialBucketHistogramAggregation) self.assertEqual(view._aggregation._record_min_max, expected) def test_stream_aggregation_last_value(self): - view = self._get_view( - self._make_view_config( - stream_kwargs={"aggregation": AggregationConfig(last_value={})} - ) - ) + view = self._get_view(self._make_view_config(stream_kwargs={"aggregation": AggregationConfig(last_value={})})) self.assertIsInstance(view._aggregation, LastValueAggregation) def test_stream_aggregation_sum(self): - view = self._get_view( - self._make_view_config( - stream_kwargs={"aggregation": AggregationConfig(sum={})} - ) - ) + view = self._get_view(self._make_view_config(stream_kwargs={"aggregation": AggregationConfig(sum={})})) self.assertIsInstance(view._aggregation, SumAggregation) def test_stream_aggregation_default(self): - view = self._get_view( - self._make_view_config( - stream_kwargs={"aggregation": AggregationConfig(default={})} - ) - ) + view = self._get_view(self._make_view_config(stream_kwargs={"aggregation": AggregationConfig(default={})})) self.assertIsInstance(view._aggregation, DefaultAggregation) diff --git a/opentelemetry-configuration/tests/test_meter_provider_exemplar_filter.py b/opentelemetry-configuration/tests/test_meter_provider_exemplar_filter.py index 4ffd874b1be..51ac276532c 100644 --- a/opentelemetry-configuration/tests/test_meter_provider_exemplar_filter.py +++ b/opentelemetry-configuration/tests/test_meter_provider_exemplar_filter.py @@ -28,31 +28,17 @@ def _make_config(exemplar_filter): return MeterProviderConfig(readers=[], exemplar_filter=exemplar_filter) def test_always_on(self): - provider = create_meter_provider( - self._make_config(ExemplarFilterConfig.always_on) - ) - self.assertIsInstance( - provider._sdk_config.exemplar_filter, AlwaysOnExemplarFilter - ) + provider = create_meter_provider(self._make_config(ExemplarFilterConfig.always_on)) + self.assertIsInstance(provider._sdk_config.exemplar_filter, AlwaysOnExemplarFilter) def test_always_off(self): - provider = create_meter_provider( - self._make_config(ExemplarFilterConfig.always_off) - ) - self.assertIsInstance( - provider._sdk_config.exemplar_filter, AlwaysOffExemplarFilter - ) + provider = create_meter_provider(self._make_config(ExemplarFilterConfig.always_off)) + self.assertIsInstance(provider._sdk_config.exemplar_filter, AlwaysOffExemplarFilter) def test_trace_based(self): - provider = create_meter_provider( - self._make_config(ExemplarFilterConfig.trace_based) - ) - self.assertIsInstance( - provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter - ) + provider = create_meter_provider(self._make_config(ExemplarFilterConfig.trace_based)) + self.assertIsInstance(provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter) def test_absent_defaults_to_trace_based(self): provider = create_meter_provider(MeterProviderConfig(readers=[])) - self.assertIsInstance( - provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter - ) + self.assertIsInstance(provider._sdk_config.exemplar_filter, TraceBasedExemplarFilter) diff --git a/opentelemetry-configuration/tests/test_propagator.py b/opentelemetry-configuration/tests/test_propagator.py index 49940db2f91..9ed167433c0 100644 --- a/opentelemetry-configuration/tests/test_propagator.py +++ b/opentelemetry-configuration/tests/test_propagator.py @@ -39,9 +39,7 @@ def test_empty_config_returns_empty_composite(self): self.assertEqual(result._propagators, []) # type: ignore[attr-defined] def test_tracecontext_only(self): - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(tracecontext={})] - ) + config = PropagatorConfig(composite=[TextMapPropagatorConfig(tracecontext={})]) result = create_propagator(config) self.assertEqual(len(result._propagators), 1) # type: ignore[attr-defined] self.assertIsInstance( @@ -50,9 +48,7 @@ def test_tracecontext_only(self): ) def test_baggage_only(self): - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(baggage={})] - ) + config = PropagatorConfig(composite=[TextMapPropagatorConfig(baggage={})]) result = create_propagator(config) self.assertEqual(len(result._propagators), 1) # type: ignore[attr-defined] self.assertIsInstance(result._propagators[0], W3CBaggagePropagator) # type: ignore[attr-defined] @@ -81,9 +77,7 @@ def test_b3_via_entry_point(self): "opentelemetry.configuration._common.entry_points", return_value=[mock_ep], ): - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(b3={})] - ) + config = PropagatorConfig(composite=[TextMapPropagatorConfig(b3={})]) result = create_propagator(config) self.assertEqual(len(result._propagators), 1) # type: ignore[attr-defined] @@ -98,9 +92,7 @@ def test_b3multi_via_entry_point(self): "opentelemetry.configuration._common.entry_points", return_value=[mock_ep], ): - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(b3multi={})] - ) + config = PropagatorConfig(composite=[TextMapPropagatorConfig(b3multi={})]) result = create_propagator(config) self.assertEqual(len(result._propagators), 1) # type: ignore[attr-defined] @@ -110,9 +102,7 @@ def test_b3_not_installed_raises_configuration_error(self): "opentelemetry.configuration._common.entry_points", return_value=[], ): - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(b3={})] - ) + config = PropagatorConfig(composite=[TextMapPropagatorConfig(b3={})]) with self.assertRaises(ConfigurationError) as ctx: create_propagator(config) self.assertIn("b3", str(ctx.exception)) @@ -262,21 +252,15 @@ def test_unknown_composite_propagator_raises(self): class TestConfigurePropagator(unittest.TestCase): def test_configure_propagator_calls_set_global_textmap(self): - with patch( - "opentelemetry.configuration._propagator.set_global_textmap" - ) as mock_set: + with patch("opentelemetry.configuration._propagator.set_global_textmap") as mock_set: configure_propagator(None) mock_set.assert_called_once() arg = mock_set.call_args[0][0] self.assertIsInstance(arg, CompositePropagator) def test_configure_propagator_with_config(self): - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(tracecontext={})] - ) - with patch( - "opentelemetry.configuration._propagator.set_global_textmap" - ) as mock_set: + config = PropagatorConfig(composite=[TextMapPropagatorConfig(tracecontext={})]) + with patch("opentelemetry.configuration._propagator.set_global_textmap") as mock_set: configure_propagator(config) mock_set.assert_called_once() propagator = mock_set.call_args[0][0] @@ -286,12 +270,8 @@ def test_configure_propagator_with_config(self): @patch.dict(environ, {OTEL_PROPAGATORS: "baggage"}) def test_otel_propagators_env_var_ignored(self): """OTEL_PROPAGATORS env var must not influence configure_propagator output.""" - config = PropagatorConfig( - composite=[TextMapPropagatorConfig(tracecontext={})] - ) - with patch( - "opentelemetry.configuration._propagator.set_global_textmap" - ) as mock_set: + config = PropagatorConfig(composite=[TextMapPropagatorConfig(tracecontext={})]) + with patch("opentelemetry.configuration._propagator.set_global_textmap") as mock_set: configure_propagator(config) propagator = mock_set.call_args[0][0] self.assertEqual(len(propagator._propagators), 1) # type: ignore[attr-defined] diff --git a/opentelemetry-configuration/tests/test_resource.py b/opentelemetry-configuration/tests/test_resource.py index b93b1a7b884..caf1f0a2a0c 100644 --- a/opentelemetry-configuration/tests/test_resource.py +++ b/opentelemetry-configuration/tests/test_resource.py @@ -38,9 +38,7 @@ def test_none_config_returns_sdk_defaults(self): resource = create_resource(None) self.assertIsInstance(resource, Resource) self.assertEqual(resource.attributes[TELEMETRY_SDK_LANGUAGE], "python") - self.assertEqual( - resource.attributes[TELEMETRY_SDK_NAME], "opentelemetry" - ) + self.assertEqual(resource.attributes[TELEMETRY_SDK_NAME], "opentelemetry") self.assertIn(TELEMETRY_SDK_VERSION, resource.attributes) self.assertEqual(resource.attributes[SERVICE_NAME], "unknown_service") @@ -62,18 +60,12 @@ def test_empty_resource_config(self): self.assertEqual(resource.attributes[SERVICE_NAME], "unknown_service") def test_service_name_default_added_when_missing(self): - config = ResourceConfig( - attributes=[AttributeNameValue(name="env", value="staging")] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="env", value="staging")]) resource = create_resource(config) self.assertEqual(resource.attributes[SERVICE_NAME], "unknown_service") def test_service_name_not_overridden_when_set(self): - config = ResourceConfig( - attributes=[ - AttributeNameValue(name="service.name", value="my-app") - ] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="service.name", value="my-app")]) resource = create_resource(config) self.assertEqual(resource.attributes[SERVICE_NAME], "my-app") @@ -83,20 +75,14 @@ def test_env_vars_not_read(self): os.environ, {"OTEL_RESOURCE_ATTRIBUTES": "injected=true"}, ): - config = ResourceConfig( - attributes=[AttributeNameValue(name="k", value="v")] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value="v")]) resource = create_resource(config) self.assertNotIn("injected", resource.attributes) def test_schema_url(self): - config = ResourceConfig( - schema_url="https://opentelemetry.io/schemas/1.24.0" - ) + config = ResourceConfig(schema_url="https://opentelemetry.io/schemas/1.24.0") resource = create_resource(config) - self.assertEqual( - resource.schema_url, "https://opentelemetry.io/schemas/1.24.0" - ) + self.assertEqual(resource.schema_url, "https://opentelemetry.io/schemas/1.24.0") def test_schema_url_none(self): resource = create_resource(ResourceConfig()) @@ -118,58 +104,30 @@ def test_attributes_plain(self): self.assertEqual(resource.attributes[TELEMETRY_SDK_LANGUAGE], "python") def test_attribute_type_string(self): - config = ResourceConfig( - attributes=[ - AttributeNameValue( - name="k", value=42, type=AttributeType.string - ) - ] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value=42, type=AttributeType.string)]) resource = create_resource(config) self.assertEqual(resource.attributes["k"], "42") self.assertIsInstance(resource.attributes["k"], str) def test_attribute_type_int(self): - config = ResourceConfig( - attributes=[ - AttributeNameValue(name="k", value=3.0, type=AttributeType.int) - ] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value=3.0, type=AttributeType.int)]) resource = create_resource(config) self.assertEqual(resource.attributes["k"], 3) self.assertIsInstance(resource.attributes["k"], int) def test_attribute_type_double(self): - config = ResourceConfig( - attributes=[ - AttributeNameValue( - name="k", value="1.5", type=AttributeType.double - ) - ] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value="1.5", type=AttributeType.double)]) resource = create_resource(config) self.assertAlmostEqual(resource.attributes["k"], 1.5) # type: ignore[arg-type] self.assertIsInstance(resource.attributes["k"], float) def test_attribute_type_bool(self): - config = ResourceConfig( - attributes=[ - AttributeNameValue( - name="k", value="true", type=AttributeType.bool - ) - ] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value="true", type=AttributeType.bool)]) resource = create_resource(config) self.assertTrue(resource.attributes["k"]) def test_attribute_type_bool_false_string(self): - config = ResourceConfig( - attributes=[ - AttributeNameValue( - name="k", value="false", type=AttributeType.bool - ) - ] - ) + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value="false", type=AttributeType.bool)]) resource = create_resource(config) self.assertFalse(resource.attributes["k"]) @@ -228,9 +186,7 @@ def test_attribute_type_bool_array(self): def test_none_value_attribute_skipped_with_warning(self): """An unset ${VAR} with no default yields a null value; it must be skipped (not inserted as None or coerced) and a warning logged.""" - with self.assertLogs( - "opentelemetry.configuration._resource", level="WARNING" - ) as cm: + with self.assertLogs("opentelemetry.configuration._resource", level="WARNING") as cm: config = ResourceConfig( attributes=[ AttributeNameValue(name="empty", value=None), @@ -245,16 +201,8 @@ def test_none_value_attribute_skipped_with_warning(self): def test_none_value_typed_attribute_skipped(self): """A null value with a declared type must be skipped, not coerced (int(None)/str(None) would raise or produce garbage).""" - with self.assertLogs( - "opentelemetry.configuration._resource", level="WARNING" - ): - config = ResourceConfig( - attributes=[ - AttributeNameValue( - name="k", value=None, type=AttributeType.int - ) - ] - ) + with self.assertLogs("opentelemetry.configuration._resource", level="WARNING"): + config = ResourceConfig(attributes=[AttributeNameValue(name="k", value=None, type=AttributeType.int)]) resource = create_resource(config) self.assertNotIn("k", resource.attributes) @@ -275,9 +223,7 @@ def test_attribute_type_bool_array_string_values(self): class TestCreateResourceAttributesList(unittest.TestCase): def test_attributes_list_parsed(self): - config = ResourceConfig( - attributes_list="service.name=my-svc,region=us-east-1" - ) + config = ResourceConfig(attributes_list="service.name=my-svc,region=us-east-1") resource = create_resource(config) self.assertEqual(resource.attributes["service.name"], "my-svc") self.assertEqual(resource.attributes["region"], "us-east-1") @@ -285,9 +231,7 @@ def test_attributes_list_parsed(self): def test_attributes_list_does_not_override_attributes(self): """Explicit attributes take precedence over attributes_list.""" config = ResourceConfig( - attributes=[ - AttributeNameValue(name="service.name", value="explicit") - ], + attributes=[AttributeNameValue(name="service.name", value="explicit")], attributes_list="service.name=from-list,extra=val", ) resource = create_resource(config) @@ -313,18 +257,12 @@ def test_attributes_list_empty_pairs_skipped(self): self.assertEqual(resource.attributes["foo"], "bar") def test_attributes_list_url_decoded(self): - config = ResourceConfig( - attributes_list="service.namespace=my%20namespace,region=us-east-1" - ) + config = ResourceConfig(attributes_list="service.namespace=my%20namespace,region=us-east-1") resource = create_resource(config) - self.assertEqual( - resource.attributes["service.namespace"], "my namespace" - ) + self.assertEqual(resource.attributes["service.namespace"], "my namespace") def test_attributes_list_invalid_pair_skipped(self): - with self.assertLogs( - "opentelemetry.configuration._resource", level="WARNING" - ) as cm: + with self.assertLogs("opentelemetry.configuration._resource", level="WARNING") as cm: config = ResourceConfig(attributes_list="no-equals,foo=bar") resource = create_resource(config) self.assertEqual(resource.attributes["foo"], "bar") @@ -336,9 +274,7 @@ class TestServiceResourceDetector(unittest.TestCase): @staticmethod def _config_with_service() -> ResourceConfig: return ResourceConfig( - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(service={})] - ) + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(service={})]) ) def test_service_detector_adds_instance_id(self): @@ -366,12 +302,8 @@ def test_service_detector_no_env_var_leaves_default_service_name(self): def test_explicit_service_name_overrides_env_var(self): """Config attributes win over the service detector's env-var value.""" config = ResourceConfig( - attributes=[ - AttributeNameValue(name="service.name", value="explicit-svc") - ], - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(service={})] - ), + attributes=[AttributeNameValue(name="service.name", value="explicit-svc")], + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(service={})]), ) with patch.dict(os.environ, {"OTEL_SERVICE_NAME": "env-svc"}): resource = create_resource(config) @@ -420,9 +352,7 @@ class TestHostResourceDetector(unittest.TestCase): @staticmethod def _config_with_host() -> ResourceConfig: return ResourceConfig( - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(host={})] - ) + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(host={})]) ) def test_host_detector_adds_host_attributes(self): @@ -446,20 +376,14 @@ def test_host_detector_not_run_when_detection_development_is_none(self): self.assertNotIn(HOST_NAME, resource.attributes) def test_host_detector_not_run_when_detectors_list_empty(self): - config = ResourceConfig( - detection_development=ExperimentalResourceDetection(detectors=[]) - ) + config = ResourceConfig(detection_development=ExperimentalResourceDetection(detectors=[])) resource = create_resource(config) self.assertNotIn(HOST_NAME, resource.attributes) def test_explicit_attributes_override_host_detector(self): config = ResourceConfig( - attributes=[ - AttributeNameValue(name="host.name", value="custom-host") - ], - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(host={})] - ), + attributes=[AttributeNameValue(name="host.name", value="custom-host")], + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(host={})]), ) resource = create_resource(config) self.assertEqual(resource.attributes[HOST_NAME], "custom-host") @@ -491,9 +415,7 @@ class TestContainerResourceDetector(unittest.TestCase): @staticmethod def _config_with_container() -> ResourceConfig: return ResourceConfig( - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(container={})] - ) + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(container={})]) ) def test_container_detector_not_run_when_absent(self): @@ -507,9 +429,7 @@ def test_container_detector_not_run_when_detection_development_is_none( self.assertNotIn(CONTAINER_ID, resource.attributes) def test_container_detector_not_run_when_detectors_list_empty(self): - config = ResourceConfig( - detection_development=ExperimentalResourceDetection(detectors=[]) - ) + config = ResourceConfig(detection_development=ExperimentalResourceDetection(detectors=[])) resource = create_resource(config) self.assertNotIn(CONTAINER_ID, resource.attributes) @@ -549,12 +469,8 @@ def test_explicit_attributes_override_container_detector(self): mock_ep.load.return_value = mock_detector config = ResourceConfig( - attributes=[ - AttributeNameValue(name="container.id", value="explicit-id") - ], - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(container={})] - ), + attributes=[AttributeNameValue(name="container.id", value="explicit-id")], + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(container={})]), ) with patch( "opentelemetry.configuration._common.entry_points", @@ -569,9 +485,7 @@ class TestProcessResourceDetector(unittest.TestCase): @staticmethod def _config_with_process() -> ResourceConfig: return ResourceConfig( - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(process={})] - ) + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(process={})]) ) def test_process_detector_adds_process_attributes(self): @@ -597,23 +511,15 @@ def test_process_detector_not_run_when_detection_development_is_none(self): self.assertNotIn(PROCESS_PID, resource.attributes) def test_process_detector_not_run_when_detectors_list_empty(self): - config = ResourceConfig( - detection_development=ExperimentalResourceDetection(detectors=[]) - ) + config = ResourceConfig(detection_development=ExperimentalResourceDetection(detectors=[])) resource = create_resource(config) self.assertNotIn(PROCESS_PID, resource.attributes) def test_explicit_attributes_override_process_detector(self): """Config attributes win over detector-provided values.""" config = ResourceConfig( - attributes=[ - AttributeNameValue( - name="process.pid", value=99999, type=AttributeType.int - ) - ], - detection_development=ExperimentalResourceDetection( - detectors=[ExperimentalResourceDetector(process={})] - ), + attributes=[AttributeNameValue(name="process.pid", value=99999, type=AttributeType.int)], + detection_development=ExperimentalResourceDetection(detectors=[ExperimentalResourceDetector(process={})]), ) resource = create_resource(config) self.assertEqual(resource.attributes[PROCESS_PID], 99999) diff --git a/opentelemetry-configuration/tests/test_sdk.py b/opentelemetry-configuration/tests/test_sdk.py index d435ea6edb4..3aa5aeb91b9 100644 --- a/opentelemetry-configuration/tests/test_sdk.py +++ b/opentelemetry-configuration/tests/test_sdk.py @@ -141,9 +141,7 @@ def tearDown(self): @patch("opentelemetry.configuration._sdk.create_resource") def test_sets_opentelemetry_logger_level(self, *_mocks): configure_sdk(_config(log_level=SeverityNumber.warn)) - self.assertEqual( - logging.getLogger("opentelemetry").level, logging.WARNING - ) + self.assertEqual(logging.getLogger("opentelemetry").level, logging.WARNING) @patch("opentelemetry.configuration._sdk.configure_propagator") @patch("opentelemetry.configuration._sdk.configure_logger_provider") @@ -153,9 +151,7 @@ def test_sets_opentelemetry_logger_level(self, *_mocks): def test_absent_log_level_leaves_logger_unchanged(self, *_mocks): logging.getLogger("opentelemetry").setLevel(logging.ERROR) configure_sdk(_config()) - self.assertEqual( - logging.getLogger("opentelemetry").level, logging.ERROR - ) + self.assertEqual(logging.getLogger("opentelemetry").level, logging.ERROR) @patch("opentelemetry.configuration._sdk.configure_propagator") @patch("opentelemetry.configuration._sdk.configure_logger_provider") @@ -200,26 +196,18 @@ def test_severity_number_variants_map_correctly(self, *_mocks): def test_log_level_not_applied_when_disabled(self): logging.getLogger("opentelemetry").setLevel(logging.WARNING) configure_sdk(_config(disabled=True, log_level=SeverityNumber.error)) - self.assertEqual( - logging.getLogger("opentelemetry").level, logging.WARNING - ) + self.assertEqual(logging.getLogger("opentelemetry").level, logging.WARNING) class TestConfigureSdkIntegration(unittest.TestCase): """End-to-end: build a real OpenTelemetryConfiguration and apply it.""" - @patch( - "opentelemetry.configuration._tracer_provider.trace.set_tracer_provider" - ) + @patch("opentelemetry.configuration._tracer_provider.trace.set_tracer_provider") def test_applies_tracer_provider_globally(self, mock_set_tracer): config = _config( tracer_provider=TracerProviderConfig( processors=[ - SpanProcessorConfig( - simple=SimpleSpanProcessorConfig( - exporter=SpanExporterConfig(console={}) - ) - ) + SpanProcessorConfig(simple=SimpleSpanProcessorConfig(exporter=SpanExporterConfig(console={}))) ] ) ) @@ -227,6 +215,4 @@ def test_applies_tracer_provider_globally(self, mock_set_tracer): configure_sdk(config) mock_set_tracer.assert_called_once() - self.assertIsInstance( - mock_set_tracer.call_args[0][0], SdkTracerProvider - ) + self.assertIsInstance(mock_set_tracer.call_args[0][0], SdkTracerProvider) diff --git a/opentelemetry-configuration/tests/test_tracer_provider.py b/opentelemetry-configuration/tests/test_tracer_provider.py index aa04f64d230..088da3fdea4 100644 --- a/opentelemetry-configuration/tests/test_tracer_provider.py +++ b/opentelemetry-configuration/tests/test_tracer_provider.py @@ -119,9 +119,7 @@ def test_none_config_uses_default_sampler(self): def test_none_config_no_processors(self): provider = create_tracer_provider(None) - self.assertEqual( - len(provider._active_span_processor._span_processors), 0 - ) + self.assertEqual(len(provider._active_span_processor._span_processors), 0) def test_none_config_does_not_read_sampler_env_var(self): with patch.dict(os.environ, {"OTEL_TRACES_SAMPLER": "always_off"}): @@ -134,20 +132,14 @@ def test_none_config_does_not_read_span_limit_env_var(self): self.assertEqual(provider._span_limits.max_span_attributes, 128) def test_configure_none_does_not_set_global(self): - original = __import__( - "opentelemetry.trace", fromlist=["get_tracer_provider"] - ).get_tracer_provider() + original = __import__("opentelemetry.trace", fromlist=["get_tracer_provider"]).get_tracer_provider() configure_tracer_provider(None) - after = __import__( - "opentelemetry.trace", fromlist=["get_tracer_provider"] - ).get_tracer_provider() + after = __import__("opentelemetry.trace", fromlist=["get_tracer_provider"]).get_tracer_provider() self.assertIs(original, after) def test_configure_with_config_sets_global(self): config = TracerProviderConfig(processors=[]) - with patch( - "opentelemetry.configuration._tracer_provider.trace.set_tracer_provider" - ) as mock_set: + with patch("opentelemetry.configuration._tracer_provider.trace.set_tracer_provider") as mock_set: configure_tracer_provider(config) mock_set.assert_called_once() arg = mock_set.call_args[0][0] @@ -182,9 +174,7 @@ def test_span_limits_from_config(self): class TestCreateSampler(unittest.TestCase): @staticmethod def _make_provider(sampler_config): - return create_tracer_provider( - TracerProviderConfig(processors=[], sampler=sampler_config) - ) + return create_tracer_provider(TracerProviderConfig(processors=[], sampler=sampler_config)) def test_always_on(self): provider = self._make_provider(SamplerConfig(always_on={})) @@ -195,35 +185,23 @@ def test_always_off(self): self.assertIs(provider.sampler, ALWAYS_OFF) def test_trace_id_ratio_based(self): - provider = self._make_provider( - SamplerConfig( - trace_id_ratio_based=TraceIdRatioBasedConfig(ratio=0.5) - ) - ) + provider = self._make_provider(SamplerConfig(trace_id_ratio_based=TraceIdRatioBasedConfig(ratio=0.5))) self.assertIsInstance(provider.sampler, TraceIdRatioBased) self.assertAlmostEqual(provider.sampler._rate, 0.5) def test_trace_id_ratio_based_none_ratio_defaults_to_1(self): - provider = self._make_provider( - SamplerConfig(trace_id_ratio_based=TraceIdRatioBasedConfig()) - ) + provider = self._make_provider(SamplerConfig(trace_id_ratio_based=TraceIdRatioBasedConfig())) self.assertIsInstance(provider.sampler, TraceIdRatioBased) self.assertAlmostEqual(provider.sampler._rate, 1.0) def test_parent_based_with_root(self): provider = self._make_provider( - SamplerConfig( - parent_based=ParentBasedSamplerConfig( - root=SamplerConfig(always_on={}) - ) - ) + SamplerConfig(parent_based=ParentBasedSamplerConfig(root=SamplerConfig(always_on={}))) ) self.assertIsInstance(provider.sampler, ParentBased) def test_parent_based_no_root_defaults_to_always_on(self): - provider = self._make_provider( - SamplerConfig(parent_based=ParentBasedSamplerConfig()) - ) + provider = self._make_provider(SamplerConfig(parent_based=ParentBasedSamplerConfig())) self.assertIsInstance(provider.sampler, ParentBased) self.assertIs(provider.sampler._root, ALWAYS_ON) @@ -312,11 +290,7 @@ def _make_provider(rule_based_config): return create_tracer_provider( TracerProviderConfig( processors=[], - sampler=SamplerConfig( - composite_development=ComposableSamplerConfig( - rule_based=rule_based_config - ) - ), + sampler=SamplerConfig(composite_development=ComposableSamplerConfig(rule_based=rule_based_config)), ) ) @@ -369,9 +343,7 @@ def test_composite_rule_based_no_rules_drops(self): self.assertEqual(decision, Decision.DROP) def test_composite_rule_based_no_condition_rule_matches(self): - decision = self._decision( - RuleBasedSamplerConfig(rules=[self._rule(self._always_on())]) - ) + decision = self._decision(RuleBasedSamplerConfig(rules=[self._rule(self._always_on())])) self.assertEqual(decision, Decision.RECORD_AND_SAMPLE) @@ -380,22 +352,16 @@ def test_composite_rule_based_first_match_wins(self): rules=[ self._rule( self._always_off(), - attribute_values=self._attribute_values( - "http.route", ["/health"] - ), + attribute_values=self._attribute_values("http.route", ["/health"]), ), self._rule( self._always_on(), - attribute_values=self._attribute_values( - "http.route", ["/health"] - ), + attribute_values=self._attribute_values("http.route", ["/health"]), ), ] ) - decision = self._decision( - rule_based, attributes={"http.route": "/health"} - ) + decision = self._decision(rule_based, attributes={"http.route": "/health"}) self.assertEqual(decision, Decision.DROP) @@ -405,9 +371,7 @@ def test_composite_rule_based_attribute_values_stringifies_values(self): rules=[ self._rule( self._always_on(), - attribute_values=self._attribute_values( - "http.response.status_code", ["404"] - ), + attribute_values=self._attribute_values("http.response.status_code", ["404"]), ) ] ), @@ -422,9 +386,7 @@ def test_composite_rule_based_attribute_values_match_array_item(self): rules=[ self._rule( self._always_on(), - attribute_values=self._attribute_values( - "http.request.method", ["POST"] - ), + attribute_values=self._attribute_values("http.request.method", ["POST"]), ) ] ), @@ -447,15 +409,9 @@ def test_composite_rule_based_attribute_patterns_include_exclude(self): ] ) - included = self._decision( - rule_based, attributes={"http.route": "/api/users"} - ) - excluded = self._decision( - rule_based, attributes={"http.route": "/api/private/user"} - ) - case_mismatch = self._decision( - rule_based, attributes={"http.route": "/API/users"} - ) + included = self._decision(rule_based, attributes={"http.route": "/api/users"}) + excluded = self._decision(rule_based, attributes={"http.route": "/api/private/user"}) + case_mismatch = self._decision(rule_based, attributes={"http.route": "/API/users"}) self.assertEqual(included, Decision.RECORD_AND_SAMPLE) self.assertEqual(excluded, Decision.DROP) @@ -508,9 +464,7 @@ def test_composite_rule_based_parent(self): ) local = self._decision(rule_based, parent_context=local_parent_context) - remote = self._decision( - rule_based, parent_context=remote_parent_context - ) + remote = self._decision(rule_based, parent_context=remote_parent_context) no_parent = self._decision(rule_based) self.assertEqual(local, Decision.RECORD_AND_SAMPLE) @@ -522,9 +476,7 @@ def test_composite_rule_based_multiple_conditions_are_anded(self): rules=[ self._rule( self._always_on(), - attribute_values=self._attribute_values( - "http.route", ["/users"] - ), + attribute_values=self._attribute_values("http.route", ["/users"]), span_kinds=[SpanKindConfig.server], ) ] @@ -547,20 +499,11 @@ def test_composite_rule_based_multiple_conditions_are_anded(self): def test_composite_rule_based_nested_probability_sampler(self): provider = self._make_provider( RuleBasedSamplerConfig( - rules=[ - self._rule( - ComposableSamplerConfig( - probability=ComposableProbabilityConfig(ratio=0.0) - ) - ) - ] + rules=[self._rule(ComposableSamplerConfig(probability=ComposableProbabilityConfig(ratio=0.0)))] ) ) - expected = ( - "ComposableRuleBased{[(AlwaysMatch:" - "ComposableTraceIDRatioBased{threshold=max, ratio=0.0})]}" - ) + expected = "ComposableRuleBased{[(AlwaysMatch:ComposableTraceIDRatioBased{threshold=max, ratio=0.0})]}" self.assertEqual( provider.sampler.get_description(), expected, @@ -573,21 +516,13 @@ class TestCreateSpanExporterAndProcessor(unittest.TestCase): @staticmethod def _make_batch_config(exporter_config): return TracerProviderConfig( - processors=[ - SpanProcessorConfig( - batch=BatchSpanProcessorConfig(exporter=exporter_config) - ) - ] + processors=[SpanProcessorConfig(batch=BatchSpanProcessorConfig(exporter=exporter_config))] ) @staticmethod def _make_simple_config(exporter_config): return TracerProviderConfig( - processors=[ - SpanProcessorConfig( - simple=SimpleSpanProcessorConfig(exporter=exporter_config) - ) - ] + processors=[SpanProcessorConfig(simple=SimpleSpanProcessorConfig(exporter=exporter_config))] ) def test_console_exporter_batch(self): @@ -606,9 +541,7 @@ def test_console_exporter_simple(self): self.assertIsInstance(procs[0].span_exporter, ConsoleSpanExporter) def test_otlp_http_missing_package_raises(self): - config = self._make_batch_config( - SpanExporterConfig(otlp_http=OtlpHttpExporterConfig()) - ) + config = self._make_batch_config(SpanExporterConfig(otlp_http=OtlpHttpExporterConfig())) with ( patch.dict( sys.modules, @@ -639,11 +572,7 @@ def test_otlp_http_created_with_endpoint(self): }, ): config = self._make_batch_config( - SpanExporterConfig( - otlp_http=OtlpHttpExporterConfig( - endpoint="http://localhost:4318" - ) - ) + SpanExporterConfig(otlp_http=OtlpHttpExporterConfig(endpoint="http://localhost:4318")) ) create_tracer_provider(config) @@ -671,9 +600,7 @@ def test_otlp_http_created_with_deflate_compression(self): }, ): config = self._make_batch_config( - SpanExporterConfig( - otlp_http=OtlpHttpExporterConfig(compression="deflate") - ) + SpanExporterConfig(otlp_http=OtlpHttpExporterConfig(compression="deflate")) ) create_tracer_provider(config) @@ -694,25 +621,15 @@ def test_otlp_http_headers_list(self): }, ): config = self._make_batch_config( - SpanExporterConfig( - otlp_http=OtlpHttpExporterConfig( - headers_list="x-api-key=secret,env=prod" - ) - ) + SpanExporterConfig(otlp_http=OtlpHttpExporterConfig(headers_list="x-api-key=secret,env=prod")) ) create_tracer_provider(config) _, kwargs = mock_exporter_cls.call_args - self.assertEqual( - kwargs["headers"], {"x-api-key": "secret", "env": "prod"} - ) + self.assertEqual(kwargs["headers"], {"x-api-key": "secret", "env": "prod"}) def test_otlp_file_development_missing_package_raises(self): - config = self._make_batch_config( - SpanExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig() - ) - ) + config = self._make_batch_config(SpanExporterConfig(otlp_file_development=ExperimentalOtlpFileExporterConfig())) with ( patch.dict( sys.modules, @@ -723,9 +640,7 @@ def test_otlp_file_development_missing_package_raises(self): self.assertRaises(ConfigurationError) as ctx, ): create_tracer_provider(config) - self.assertIn( - "opentelemetry-exporter-otlp-json-file", str(ctx.exception) - ) + self.assertIn("opentelemetry-exporter-otlp-json-file", str(ctx.exception)) def test_otlp_file_development_default_stdout(self): mock_exporter_cls = MagicMock() @@ -739,9 +654,7 @@ def test_otlp_file_development_default_stdout(self): }, ): config = self._make_batch_config( - SpanExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig() - ) + SpanExporterConfig(otlp_file_development=ExperimentalOtlpFileExporterConfig()) ) create_tracer_provider(config) @@ -760,9 +673,7 @@ def test_otlp_file_development_file_uri(self): ): config = self._make_batch_config( SpanExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig( - output_stream="file:///tmp/traces.jsonl" - ) + otlp_file_development=ExperimentalOtlpFileExporterConfig(output_stream="file:///tmp/traces.jsonl") ) ) create_tracer_provider(config) @@ -782,9 +693,7 @@ def test_otlp_file_development_unsupported_output_stream_raises(self): ): config = self._make_batch_config( SpanExporterConfig( - otlp_file_development=ExperimentalOtlpFileExporterConfig( - output_stream="http://example" - ) + otlp_file_development=ExperimentalOtlpFileExporterConfig(output_stream="http://example") ) ) with self.assertRaises(ConfigurationError) as ctx: @@ -793,9 +702,7 @@ def test_otlp_file_development_unsupported_output_stream_raises(self): mock_exporter_cls.assert_not_called() def test_otlp_grpc_missing_package_raises(self): - config = self._make_batch_config( - SpanExporterConfig(otlp_grpc=OtlpGrpcExporterConfig()) - ) + config = self._make_batch_config(SpanExporterConfig(otlp_grpc=OtlpGrpcExporterConfig())) with ( patch.dict( sys.modules, @@ -831,9 +738,7 @@ def test_plugin_span_exporter_loaded_via_entry_point(self): SpanExporterConfig(my_custom_exporter={}) ) provider = create_tracer_provider(config) - self.assertEqual( - len(provider._active_span_processor._span_processors), 1 - ) + self.assertEqual(len(provider._active_span_processor._span_processors), 1) def test_unknown_span_exporter_raises_configuration_error(self): with patch( @@ -853,32 +758,22 @@ class TestCreateSpanLimits(unittest.TestCase): @staticmethod def _create_with_limits(limits_config): - return create_tracer_provider( - TracerProviderConfig(processors=[], limits=limits_config) - ) + return create_tracer_provider(TracerProviderConfig(processors=[], limits=limits_config)) def test_explicit_attribute_count_limit(self): - provider = self._create_with_limits( - SpanLimitsConfig(attribute_count_limit=10) - ) + provider = self._create_with_limits(SpanLimitsConfig(attribute_count_limit=10)) self.assertEqual(provider._span_limits.max_span_attributes, 10) def test_explicit_event_count_limit(self): - provider = self._create_with_limits( - SpanLimitsConfig(event_count_limit=5) - ) + provider = self._create_with_limits(SpanLimitsConfig(event_count_limit=5)) self.assertEqual(provider._span_limits.max_events, 5) def test_explicit_link_count_limit(self): - provider = self._create_with_limits( - SpanLimitsConfig(link_count_limit=2) - ) + provider = self._create_with_limits(SpanLimitsConfig(link_count_limit=2)) self.assertEqual(provider._span_limits.max_links, 2) def test_explicit_attribute_value_length_limit(self): - provider = self._create_with_limits( - SpanLimitsConfig(attribute_value_length_limit=64) - ) + provider = self._create_with_limits(SpanLimitsConfig(attribute_value_length_limit=64)) self.assertEqual(provider._span_limits.max_attribute_length, 64) def test_absent_limits_use_spec_defaults(self): @@ -905,11 +800,7 @@ class TestCreateIdGenerator(unittest.TestCase): @staticmethod def _make_provider(id_generator_config): - return create_tracer_provider( - TracerProviderConfig( - processors=[], id_generator=id_generator_config - ) - ) + return create_tracer_provider(TracerProviderConfig(processors=[], id_generator=id_generator_config)) def test_absent_id_generator_uses_sdk_default(self): """When id_generator is omitted, the SDK's default RandomIdGenerator is used.""" @@ -930,9 +821,7 @@ def test_plugin_id_generator_loaded_via_entry_point(self): return_value=[MagicMock(**{"load.return_value": mock_class})], ): # pylint: disable=unexpected-keyword-arg - provider = self._make_provider( - IdGeneratorConfig(my_custom_generator={}) - ) + provider = self._make_provider(IdGeneratorConfig(my_custom_generator={})) self.assertIs(provider.id_generator, mock_generator) def test_unknown_id_generator_raises_configuration_error(self): diff --git a/opentelemetry-sdk/benchmarks/logs/test_benchmark_logging_handler.py b/opentelemetry-sdk/benchmarks/logs/test_benchmark_logging_handler.py index ca32619d8dc..43c61d46324 100644 --- a/opentelemetry-sdk/benchmarks/logs/test_benchmark_logging_handler.py +++ b/opentelemetry-sdk/benchmarks/logs/test_benchmark_logging_handler.py @@ -30,9 +30,7 @@ def _create_logger(handler, name): @pytest.mark.parametrize("num_loggers", [1, 10, 100, 1000]) def test_simple_get_logger_different_names(benchmark, num_loggers): handler = _set_up_logging_handler(level=logging.DEBUG) - loggers = [ - _create_logger(handler, str(f"logger_{i}")) for i in range(num_loggers) - ] + loggers = [_create_logger(handler, str(f"logger_{i}")) for i in range(num_loggers)] def benchmark_get_logger(): for index in range(1000): diff --git a/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py b/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py index 73952bb4b68..94d08cc09e0 100644 --- a/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py +++ b/opentelemetry-sdk/benchmarks/logs/test_benchmark_logs.py @@ -22,16 +22,12 @@ simple_exporter = InMemoryLogRecordExporter() simple_provider = LoggerProvider(resource=resource) -simple_provider.add_log_record_processor( - SimpleLogRecordProcessor(simple_exporter) -) +simple_provider.add_log_record_processor(SimpleLogRecordProcessor(simple_exporter)) simple_logger = simple_provider.get_logger("simple_logger") batch_exporter = InMemoryLogRecordExporter() batch_provider = LoggerProvider(resource=resource) -batch_provider.add_log_record_processor( - BatchLogRecordProcessor(batch_exporter) -) +batch_provider.add_log_record_processor(BatchLogRecordProcessor(batch_exporter)) batch_logger = batch_provider.get_logger("batch_logger") diff --git a/opentelemetry-sdk/benchmarks/metrics/test_benchmark_metrics.py b/opentelemetry-sdk/benchmarks/metrics/test_benchmark_metrics.py index 34317ce81b5..fc6f349a986 100644 --- a/opentelemetry-sdk/benchmarks/metrics/test_benchmark_metrics.py +++ b/opentelemetry-sdk/benchmarks/metrics/test_benchmark_metrics.py @@ -81,16 +81,12 @@ def num_meter_configurator_rules(request): # pylint: disable=protected-access,redefined-outer-name -def test_counter_add_with_meter_configurator_rules( - benchmark, num_meter_configurator_rules -): +def test_counter_add_with_meter_configurator_rules(benchmark, num_meter_configurator_rules): def benchmark_counter_add(): counter_cumulative.add(1, {}) if num_meter_configurator_rules is None: - provider_reader_cumulative._set_meter_configurator( - meter_configurator=_disable_meter_configurator - ) + provider_reader_cumulative._set_meter_configurator(meter_configurator=_disable_meter_configurator) else: def meter_configurator(meter_scope): @@ -105,11 +101,7 @@ def meter_configurator(meter_scope): default_config=_MeterConfig(is_enabled=True), )(meter_scope) - provider_reader_cumulative._set_meter_configurator( - meter_configurator=meter_configurator - ) + provider_reader_cumulative._set_meter_configurator(meter_configurator=meter_configurator) benchmark(benchmark_counter_add) - provider_reader_cumulative._set_meter_configurator( - meter_configurator=_default_meter_configurator - ) + provider_reader_cumulative._set_meter_configurator(meter_configurator=_default_meter_configurator) diff --git a/opentelemetry-sdk/benchmarks/trace/test_benchmark_trace.py b/opentelemetry-sdk/benchmarks/trace/test_benchmark_trace.py index bac15bcc79a..f17e6534215 100644 --- a/opentelemetry-sdk/benchmarks/trace/test_benchmark_trace.py +++ b/opentelemetry-sdk/benchmarks/trace/test_benchmark_trace.py @@ -68,9 +68,7 @@ def benchmark_start_span(): # pylint: disable=protected-access,redefined-outer-name -def test_simple_start_span_with_tracer_configurator_rules( - benchmark, num_tracer_configurator_rules -): +def test_simple_start_span_with_tracer_configurator_rules(benchmark, num_tracer_configurator_rules): def benchmark_start_span(): span = tracer.start_span( "benchmarkedSpan", @@ -93,13 +91,9 @@ def tracer_configurator(tracer_scope): default_config=_TracerConfig(is_enabled=True), )(tracer_scope) - tracer_provider._set_tracer_configurator( - tracer_configurator=tracer_configurator - ) + tracer_provider._set_tracer_configurator(tracer_configurator=tracer_configurator) benchmark(benchmark_start_span) - tracer_provider._set_tracer_configurator( - tracer_configurator=_default_tracer_configurator - ) + tracer_provider._set_tracer_configurator(tracer_configurator=_default_tracer_configurator) @pytest.mark.parametrize("num_attrs", [1, 10, 50, 128]) @@ -228,9 +222,7 @@ def benchmark_read_links(): @pytest.mark.parametrize("num_attrs", [1, 10, 50, 128]) def test_bounded_attribute_iterator(benchmark, num_attrs): - attrs = BoundedAttributes( - attributes={f"key{i}": f"value{i}" for i in range(num_attrs)} - ) + attrs = BoundedAttributes(attributes={f"key{i}": f"value{i}" for i in range(num_attrs)}) peaks = [] for _ in range(200): @@ -279,9 +271,7 @@ def test_gil_contention_batch_processor(benchmark, num_threads): provider = TracerProvider(sampler=sampling.DEFAULT_ON) # max_export_batch_size=16 ensures the export threshold is crossed # during the benchmark so _worker_awaken.set() contention is exercised. - provider.add_span_processor( - BatchSpanProcessor(exporter, max_export_batch_size=16) - ) + provider.add_span_processor(BatchSpanProcessor(exporter, max_export_batch_size=16)) tracer = provider.get_tracer("bench") spans_per_thread = _TOTAL_SPANS // num_threads diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py index 730b2bf93a3..7763799e89b 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py @@ -97,29 +97,20 @@ _logger = logging.getLogger(__name__) ExporterArgsMap = Mapping[ - type[SpanExporter] - | type[MetricExporter] - | type[MetricReader] - | type[LogRecordExporter], + type[SpanExporter] | type[MetricExporter] | type[MetricReader] | type[LogRecordExporter], Mapping[str, Any], ] class _ConfigurationExporterSpanProcessorT(Protocol): - def __call__( - self, span_exporter: SpanExporter, *args, **kwargs - ) -> SpanProcessor: ... + def __call__(self, span_exporter: SpanExporter, *args, **kwargs) -> SpanProcessor: ... class _ConfigurationExporterLogRecordProcessorT(Protocol): - def __call__( - self, exporter: LogRecordExporter, *args, **kwargs - ) -> LogRecordProcessor: ... + def __call__(self, exporter: LogRecordExporter, *args, **kwargs) -> LogRecordProcessor: ... -def _import_config_components( - selected_components: Sequence[str], entry_point_name: str -) -> list[tuple[str, type]]: +def _import_config_components(selected_components: Sequence[str], entry_point_name: str) -> list[tuple[str, type]]: component_implementations = [] for selected_component in selected_components: @@ -127,24 +118,15 @@ def _import_config_components( component_implementations.append( ( selected_component, - next( - iter( - entry_points( - group=entry_point_name, name=selected_component - ) - ) - ).load(), + next(iter(entry_points(group=entry_point_name, name=selected_component))).load(), ) ) except KeyError: - raise RuntimeError( - f"Requested entry point '{entry_point_name}' not found" - ) + raise RuntimeError(f"Requested entry point '{entry_point_name}' not found") except StopIteration: raise RuntimeError( - f"Requested component '{selected_component}' not found in " - f"entry point '{entry_point_name}'" + f"Requested component '{selected_component}' not found in entry point '{entry_point_name}'" ) return component_implementations @@ -170,9 +152,7 @@ def _get_logger_configurator() -> str | None: return environ.get(OTEL_PYTHON_LOGGER_CONFIGURATOR, None) -def _get_exporter_entry_point( - exporter_name: str, signal_type: Literal["traces", "metrics", "logs"] -): +def _get_exporter_entry_point(exporter_name: str, signal_type: Literal["traces", "metrics", "logs"]): if exporter_name not in ( _EXPORTER_OTLP, _EXPORTER_OTLP_PROTO_GRPC, @@ -181,9 +161,7 @@ def _get_exporter_entry_point( return exporter_name # Checking env vars for OTLP protocol (grpc/http). - otlp_protocol = environ.get( - _PROTOCOL_ENV_BY_SIGNAL_TYPE[signal_type] - ) or environ.get(OTEL_EXPORTER_OTLP_PROTOCOL) + otlp_protocol = environ.get(_PROTOCOL_ENV_BY_SIGNAL_TYPE[signal_type]) or environ.get(OTEL_EXPORTER_OTLP_PROTOCOL) if not otlp_protocol: if exporter_name == _EXPORTER_OTLP: @@ -195,9 +173,7 @@ def _get_exporter_entry_point( if exporter_name == _EXPORTER_OTLP: if otlp_protocol not in _EXPORTER_BY_OTLP_PROTOCOL: # Invalid value was set by the env var - raise RuntimeError( - f"Unsupported OTLP protocol '{otlp_protocol}' is configured" - ) + raise RuntimeError(f"Unsupported OTLP protocol '{otlp_protocol}' is configured") return _EXPORTER_BY_OTLP_PROTOCOL[otlp_protocol] @@ -222,10 +198,7 @@ def _get_exporter_names( if not names or names.lower().strip() == "none": return [] - return [ - _get_exporter_entry_point(_exporter.strip(), signal_type) - for _exporter in names.split(",") - ] + return [_get_exporter_entry_point(_exporter.strip(), signal_type) for _exporter in names.split(",")] def _init_tracing( @@ -255,9 +228,7 @@ def _init_tracing( for _, exporter_class in exporters.items(): exporter_args = exporter_args_map.get(exporter_class, {}) - provider.add_span_processor( - export_processor(exporter_class(**exporter_args)) - ) + provider.add_span_processor(export_processor(exporter_class(**exporter_args))) def _init_metrics( @@ -274,11 +245,7 @@ def _init_metrics( if issubclass(exporter_or_reader_class, MetricReader): metric_readers.append(exporter_or_reader_class(**exporter_args)) else: - metric_readers.append( - PeriodicExportingMetricReader( - exporter_or_reader_class(**exporter_args) - ) - ) + metric_readers.append(PeriodicExportingMetricReader(exporter_or_reader_class(**exporter_args))) provider = MeterProvider( resource=resource, @@ -295,13 +262,10 @@ def _init_logging( setup_logging_handler: bool = True, exporter_args_map: ExporterArgsMap | None = None, log_record_processors: Sequence[LogRecordProcessor] | None = None, - export_log_record_processor: _ConfigurationExporterLogRecordProcessorT - | None = None, + export_log_record_processor: _ConfigurationExporterLogRecordProcessorT | None = None, logger_configurator: _LoggerConfiguratorT | None = None, ): - provider = LoggerProvider( - resource=resource, _logger_configurator=logger_configurator - ) + provider = LoggerProvider(resource=resource, _logger_configurator=logger_configurator) set_logger_provider(provider) exporter_args_map = exporter_args_map or {} @@ -313,9 +277,7 @@ def _init_logging( for _, exporter_class in exporters.items(): exporter_args = exporter_args_map.get(exporter_class, {}) - provider.add_log_record_processor( - export_processor(exporter_class(**exporter_args)) - ) + provider.add_log_record_processor(export_processor(exporter_class(**exporter_args))) if setup_logging_handler: warnings.warn( @@ -326,9 +288,7 @@ def _init_logging( ) # Add OTel handler - handler = LoggingHandler( - level=logging.NOTSET, logger_provider=provider - ) + handler = LoggingHandler(level=logging.NOTSET, logger_provider=provider) logging.getLogger().addHandler(handler) _overwrite_logging_config_fns(handler) @@ -437,9 +397,7 @@ def _import_exporters( for ( exporter_name, exporter_impl, - ) in _import_config_components( - trace_exporter_names, "opentelemetry_traces_exporter" - ): + ) in _import_config_components(trace_exporter_names, "opentelemetry_traces_exporter"): if issubclass(exporter_impl, SpanExporter): trace_exporters[exporter_name] = exporter_impl else: @@ -448,9 +406,7 @@ def _import_exporters( for ( exporter_name, exporter_impl, - ) in _import_config_components( - metric_exporter_names, "opentelemetry_metrics_exporter" - ): + ) in _import_config_components(metric_exporter_names, "opentelemetry_metrics_exporter"): # The metric exporter components may be push MetricExporter or pull exporters which # subclass MetricReader directly if issubclass(exporter_impl, (MetricExporter, MetricReader)): @@ -461,9 +417,7 @@ def _import_exporters( for ( exporter_name, exporter_impl, - ) in _import_config_components( - log_exporter_names, "opentelemetry_logs_exporter" - ): + ) in _import_config_components(log_exporter_names, "opentelemetry_logs_exporter"): if issubclass(exporter_impl, LogRecordExporter): log_exporters[exporter_name] = exporter_impl else: @@ -475,9 +429,7 @@ def _import_exporters( def _import_sampler_factory( sampler_name: str, ) -> Callable[[float | str | None], Sampler]: - _, sampler_impl = _import_config_components( - [sampler_name.strip()], _OTEL_SAMPLER_ENTRY_POINT_GROUP - )[0] + _, sampler_impl = _import_config_components([sampler_name.strip()], _OTEL_SAMPLER_ENTRY_POINT_GROUP)[0] return sampler_impl @@ -491,9 +443,7 @@ def _import_sampler(sampler_name: str | None) -> Sampler | None: try: rate = float(os.getenv(OTEL_TRACES_SAMPLER_ARG, "")) except (ValueError, TypeError): - _logger.warning( - "Could not convert TRACES_SAMPLER_ARG to float. Using default value 1.0." - ) + _logger.warning("Could not convert TRACES_SAMPLER_ARG to float. Using default value 1.0.") rate = 1.0 arg = rate else: @@ -537,9 +487,7 @@ def _import_opamp( """ entry_point = None try: - entry_point = next( - iter(entry_points(group="_opentelemetry_opamp", name=name)) - ) + entry_point = next(iter(entry_points(group="_opentelemetry_opamp", name=name))) return entry_point.load() except StopIteration: _logger.debug("No OpAMP init function found") @@ -566,8 +514,7 @@ def _initialize_components( span_processors: Sequence[SpanProcessor] | None = None, export_span_processor: _ConfigurationExporterSpanProcessorT | None = None, log_record_processors: Sequence[LogRecordProcessor] | None = None, - export_log_record_processor: _ConfigurationExporterLogRecordProcessorT - | None = None, + export_log_record_processor: _ConfigurationExporterLogRecordProcessorT | None = None, tracer_configurator: _TracerConfiguratorT | None = None, meter_configurator: _MeterConfiguratorT | None = None, logger_configurator: _LoggerConfiguratorT | None = None, @@ -614,19 +561,13 @@ def _initialize_components( if tracer_configurator is None: tracer_configurator_name = _get_tracer_configurator() - tracer_configurator = _import_tracer_configurator( - tracer_configurator_name - ) + tracer_configurator = _import_tracer_configurator(tracer_configurator_name) if meter_configurator is None: meter_configurator_name = _get_meter_configurator() - meter_configurator = _import_meter_configurator( - meter_configurator_name - ) + meter_configurator = _import_meter_configurator(meter_configurator_name) if logger_configurator is None: logger_configurator_name = _get_logger_configurator() - logger_configurator = _import_logger_configurator( - logger_configurator_name - ) + logger_configurator = _import_logger_configurator(logger_configurator_name) _init_tracing( exporters=span_exporters, @@ -646,12 +587,7 @@ def _initialize_components( ) if setup_logging_handler is None: setup_logging_handler = ( - os.getenv( - _OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED, "false" - ) - .strip() - .lower() - == "true" + os.getenv(_OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED, "false").strip().lower() == "true" ) _init_logging( log_exporters, diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py index f47bd38d2b6..471a94da6b6 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/__init__.py @@ -156,13 +156,9 @@ def __init__( max_log_record_attribute_length: int | None = None, ): # global attribute count - global_max_attributes = self._from_env_if_absent( - max_attributes, OTEL_ATTRIBUTE_COUNT_LIMIT - ) + global_max_attributes = self._from_env_if_absent(max_attributes, OTEL_ATTRIBUTE_COUNT_LIMIT) self.max_attributes = ( - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT + global_max_attributes if global_max_attributes is not None else _DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT ) # global attribute length @@ -193,9 +189,7 @@ def __repr__(self): ) @classmethod - def _from_env_if_absent( - cls, value: int | None, env_var: str, default: int | None = None - ) -> int | None: + def _from_env_if_absent(cls, value: int | None, env_var: str, default: int | None = None) -> int | None: err_msg = "{} must be a non-negative integer but got {}" # if no value is provided for the limit, try to load it from env @@ -218,9 +212,7 @@ def _from_env_if_absent( return value -@deprecated( - "Use LogRecordLimits. Since logs are not stable yet this WILL be removed in future releases." -) +@deprecated("Use LogRecordLimits. Since logs are not stable yet this WILL be removed in future releases.") class LogLimits(LogRecordLimits): pass @@ -248,33 +240,21 @@ def to_json(self, indent: int | None = 4) -> str: if self.log_record.severity_number is not None else None, "severity_text": self.log_record.severity_text, - "attributes": ( - dict(self.log_record.attributes) - if bool(self.log_record.attributes) - else None - ), + "attributes": (dict(self.log_record.attributes) if bool(self.log_record.attributes) else None), "dropped_attributes": self.dropped_attributes, "timestamp": ns_to_iso_str(self.log_record.timestamp) if self.log_record.timestamp is not None else None, - "observed_timestamp": ns_to_iso_str( - self.log_record.observed_timestamp - ), + "observed_timestamp": ns_to_iso_str(self.log_record.observed_timestamp), "trace_id": ( - f"0x{format_trace_id(self.log_record.trace_id)}" - if self.log_record.trace_id is not None - else "" + f"0x{format_trace_id(self.log_record.trace_id)}" if self.log_record.trace_id is not None else "" ), "span_id": ( - f"0x{format_span_id(self.log_record.span_id)}" - if self.log_record.span_id is not None - else "" + f"0x{format_span_id(self.log_record.span_id)}" if self.log_record.span_id is not None else "" ), "trace_flags": self.log_record.trace_flags, "resource": json.loads(self.resource.to_json()), - "event_name": self.log_record.event_name - if self.log_record.event_name - else "", + "event_name": self.log_record.event_name if self.log_record.event_name else "", }, indent=indent, cls=BytesEncoder, @@ -297,9 +277,7 @@ class ReadWriteLogRecord: def __post_init__(self): self.log_record.attributes = BoundedAttributes( maxlen=self.limits.max_log_record_attributes, - attributes=self.log_record.attributes - if self.log_record.attributes - else None, + attributes=self.log_record.attributes if self.log_record.attributes else None, immutable=False, max_value_len=self.limits.max_log_record_attribute_length, extended_attributes=True, @@ -415,9 +393,7 @@ def __init__(self): self._log_record_processors = () # type: tuple[LogRecordProcessor, ...] self._lock = threading.Lock() - def add_log_record_processor( - self, log_record_processor: LogRecordProcessor - ) -> None: + def add_log_record_processor(self, log_record_processor: LogRecordProcessor) -> None: """Adds a Logprocessor to the list of log processors handled by this instance""" with self._lock: self._log_record_processors += (log_record_processor,) @@ -474,13 +450,9 @@ def __init__(self, max_workers: int = 2): # iterating through it on "emit". self._log_record_processors = () # type: tuple[LogRecordProcessor, ...] self._lock = threading.Lock() - self._executor = concurrent.futures.ThreadPoolExecutor( - max_workers=max_workers - ) + self._executor = concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) - def add_log_record_processor( - self, log_record_processor: LogRecordProcessor - ): + def add_log_record_processor(self, log_record_processor: LogRecordProcessor): with self._lock: self._log_record_processors += (log_record_processor,) @@ -519,9 +491,7 @@ def force_flush(self, timeout_millis: int = 30000) -> bool: future = self._executor.submit(lp.force_flush, timeout_millis) futures.append(future) - done_futures, not_done_futures = concurrent.futures.wait( - futures, timeout_millis / 1e3 - ) + done_futures, not_done_futures = concurrent.futures.wait(futures, timeout_millis / 1e3) if not_done_futures: return False @@ -587,9 +557,7 @@ def __init__( @staticmethod def _get_attributes(record: logging.LogRecord) -> _ExtendedAttributes: - attributes = { - k: v for k, v in vars(record).items() if k not in _RESERVED_ATTRS - } + attributes = {k: v for k, v in vars(record).items() if k not in _RESERVED_ATTRS} # Add standard code attributes for logs. attributes[code_attributes.CODE_FILE_PATH] = record.pathname @@ -599,17 +567,13 @@ def _get_attributes(record: logging.LogRecord) -> _ExtendedAttributes: if record.exc_info: exctype, value, tb = record.exc_info if exctype is not None: - attributes[exception_attributes.EXCEPTION_TYPE] = ( - exctype.__name__ - ) + attributes[exception_attributes.EXCEPTION_TYPE] = exctype.__name__ if value is not None and value.args: - attributes[exception_attributes.EXCEPTION_MESSAGE] = str( - value.args[0] - ) + attributes[exception_attributes.EXCEPTION_MESSAGE] = str(value.args[0]) if tb is not None: # https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#stacktrace-representation - attributes[exception_attributes.EXCEPTION_STACKTRACE] = ( - "".join(traceback.format_exception(*record.exc_info)) + attributes[exception_attributes.EXCEPTION_STACKTRACE] = "".join( + traceback.format_exception(*record.exc_info) ) return attributes @@ -649,9 +613,7 @@ def _translate(self, record: logging.LogRecord) -> LogRecord: "WARNING": "WARN", "CRITICAL": "FATAL", } - level_name = _python_to_otel_severity_text.get( - record.levelname, record.levelname - ) + level_name = _python_to_otel_severity_text.get(record.levelname, record.levelname) return LogRecord( timestamp=timestamp, @@ -699,8 +661,7 @@ class Logger(APILogger): def __init__( self, resource: Resource, - multi_log_record_processor: SynchronousMultiLogRecordProcessor - | ConcurrentMultiLogRecordProcessor, + multi_log_record_processor: SynchronousMultiLogRecordProcessor | ConcurrentMultiLogRecordProcessor, instrumentation_scope: InstrumentationScope, *, logger_metrics: LoggerMetricsT, @@ -825,20 +786,14 @@ def __init__( self._resource = Resource.create({}) else: self._resource = resource - self._multi_log_record_processor = ( - multi_log_record_processor or SynchronousMultiLogRecordProcessor() - ) + self._multi_log_record_processor = multi_log_record_processor or SynchronousMultiLogRecordProcessor() self._logger_metrics = create_logger_metrics( meter_provider or get_meter_provider(), - parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ) disabled = environ.get(OTEL_SDK_DISABLED, "") self._disabled = disabled.lower().strip() == "true" - self._logger_configurator = ( - _logger_configurator or _default_logger_configurator - ) + self._logger_configurator = _logger_configurator or _default_logger_configurator self._at_exit_handler = None if shutdown_on_exit: self._at_exit_handler = atexit.register(self.shutdown) @@ -899,9 +854,7 @@ def _get_logger_cached( if key in self._logger_cache: return self._logger_cache[key] - self._logger_cache[key] = self._get_logger_no_cache( - name, version, schema_url - ) + self._logger_cache[key] = self._get_logger_no_cache(name, version, schema_url) return self._logger_cache[key] def get_logger( @@ -921,28 +874,20 @@ def get_logger( logger = ( self._get_logger_cached(name, version, schema_url) if attributes is None - else self._get_logger_no_cache( - name, version, schema_url, attributes - ) + else self._get_logger_no_cache(name, version, schema_url, attributes) ) with self._active_loggers_lock: self._active_loggers.add(logger) return logger - def add_log_record_processor( - self, log_record_processor: LogRecordProcessor - ): + def add_log_record_processor(self, log_record_processor: LogRecordProcessor): """Registers a new :class:`LogRecordProcessor` for this `LoggerProvider` instance. The log processors are invoked in the same order they are registered. """ - self._multi_log_record_processor.add_log_record_processor( - log_record_processor - ) + self._multi_log_record_processor.add_log_record_processor(log_record_processor) - def _set_logger_configurator( - self, *, logger_configurator: _LoggerConfiguratorT - ): + def _set_logger_configurator(self, *, logger_configurator: _LoggerConfiguratorT): """Set a new LoggerConfigurator for this LoggerProvider. Setting a new LoggerConfigurator will result in the configurator being called @@ -953,15 +898,9 @@ def _set_logger_configurator( with self._active_loggers_lock: for logger in list(self._active_loggers): # pylint: disable-next=protected-access - logger._set_logger_config( - self._apply_logger_configurator( - logger.instrumentation_scope - ) - ) + logger._set_logger_config(self._apply_logger_configurator(logger.instrumentation_scope)) - def _apply_logger_configurator( - self, instrumentation_scope: InstrumentationScope - ) -> _LoggerConfig: + def _apply_logger_configurator(self, instrumentation_scope: InstrumentationScope) -> _LoggerConfig: try: return self._logger_configurator(instrumentation_scope) # pylint: disable-next=broad-exception-caught diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/_exceptions.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/_exceptions.py index f4805c7528e..4dd4c7ee9d3 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/_exceptions.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/_exceptions.py @@ -13,16 +13,10 @@ def _get_exception_attributes( exception: BaseException, ) -> dict[str, AnyValue]: - stacktrace = "".join( - traceback.format_exception( - type(exception), value=exception, tb=exception.__traceback__ - ) - ) + stacktrace = "".join(traceback.format_exception(type(exception), value=exception, tb=exception.__traceback__)) module = type(exception).__module__ qualname = type(exception).__qualname__ - exception_type = ( - f"{module}.{qualname}" if module and module != "builtins" else qualname - ) + exception_type = f"{module}.{qualname}" if module and module != "builtins" else qualname return { exception_attributes.EXCEPTION_TYPE: exception_type, exception_attributes.EXCEPTION_MESSAGE: str(exception), diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py index b9763d92be9..d13b6cfa77e 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py @@ -54,9 +54,7 @@ _DEFAULT_MAX_EXPORT_BATCH_SIZE = 512 _DEFAULT_EXPORT_TIMEOUT_MILLIS = 30000 _DEFAULT_MAX_QUEUE_SIZE = 2048 -_ENV_VAR_INT_VALUE_ERROR_MESSAGE = ( - "Unable to parse value for %s as integer. Defaulting to %s." -) +_ENV_VAR_INT_VALUE_ERROR_MESSAGE = "Unable to parse value for %s as integer. Defaulting to %s." _logger = logging.getLogger(__name__) _logger.addFilter(DuplicateFilter()) @@ -69,9 +67,7 @@ class LogRecordExportResult(enum.Enum): FAILURE = 1 -@deprecated( - "Use LogRecordExportResult. Since logs are not stable yet this WILL be removed in future releases." -) +@deprecated("Use LogRecordExportResult. Since logs are not stable yet this WILL be removed in future releases.") class LogExportResult(enum.Enum): SUCCESS = 0 FAILURE = 1 @@ -96,9 +92,7 @@ class LogRecordExporter(abc.ABC): """ @abc.abstractmethod - def export( - self, batch: Sequence[ReadableLogRecord] - ) -> LogRecordExportResult: + def export(self, batch: Sequence[ReadableLogRecord]) -> LogRecordExportResult: """Exports a batch of logs. Args: @@ -137,9 +131,7 @@ def force_flush(self, timeout_millis: int = 10_000) -> bool: """ -@deprecated( - "Use LogRecordExporter. Since logs are not stable yet this WILL be removed in future releases." -) +@deprecated("Use LogRecordExporter. Since logs are not stable yet this WILL be removed in future releases.") class LogExporter(LogRecordExporter): pass @@ -155,9 +147,7 @@ class ConsoleLogRecordExporter(LogRecordExporter): def __init__( self, out: IO = sys.stdout, - formatter: Callable[[ReadableLogRecord], str] = lambda record: ( - record.to_json() + linesep - ), + formatter: Callable[[ReadableLogRecord], str] = lambda record: record.to_json() + linesep, ): self.out = out self.formatter = formatter @@ -175,9 +165,7 @@ def force_flush(self, timeout_millis: int = 10_000) -> bool: return True -@deprecated( - "Use ConsoleLogRecordExporter. Since logs are not stable yet this WILL be removed in future releases." -) +@deprecated("Use ConsoleLogRecordExporter. Since logs are not stable yet this WILL be removed in future releases.") class ConsoleLogExporter(ConsoleLogRecordExporter): pass @@ -206,9 +194,7 @@ def __init__( "logs", OtelComponentTypeValues.SIMPLE_LOG_PROCESSOR, meter_provider or get_meter_provider(), - enabled=parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + enabled=parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ) def on_emit(self, log_record: ReadWriteLogRecord): @@ -237,11 +223,7 @@ def on_emit(self, log_record: ReadWriteLogRecord): return # Convert ReadWriteLogRecord to ReadableLogRecord before exporting # Note: resource should not be None at this point as it's set during Logger.emit() - resource = ( - log_record.resource - if log_record.resource is not None - else Resource.create({}) - ) + resource = log_record.resource if log_record.resource is not None else Resource.create({}) readable_log_record = ReadableLogRecord( log_record=log_record.log_record, resource=resource, @@ -293,23 +275,15 @@ def __init__( max_queue_size = BatchLogRecordProcessor._default_max_queue_size() if schedule_delay_millis is None: - schedule_delay_millis = ( - BatchLogRecordProcessor._default_schedule_delay_millis() - ) + schedule_delay_millis = BatchLogRecordProcessor._default_schedule_delay_millis() if max_export_batch_size is None: - max_export_batch_size = ( - BatchLogRecordProcessor._default_max_export_batch_size() - ) + max_export_batch_size = BatchLogRecordProcessor._default_max_export_batch_size() # Not used. No way currently to pass timeout to export. if export_timeout_millis is None: - export_timeout_millis = ( - BatchLogRecordProcessor._default_export_timeout_millis() - ) + export_timeout_millis = BatchLogRecordProcessor._default_export_timeout_millis() - BatchLogRecordProcessor._validate_arguments( - max_queue_size, schedule_delay_millis, max_export_batch_size - ) + BatchLogRecordProcessor._validate_arguments(max_queue_size, schedule_delay_millis, max_export_batch_size) # Initializes BatchProcessor self._batch_processor = BatchProcessor( exporter, @@ -323,20 +297,14 @@ def __init__( OtelComponentTypeValues.BATCHING_LOG_PROCESSOR, meter_provider or get_meter_provider(), capacity=max_queue_size, - enabled=parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + enabled=parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ), ) def on_emit(self, log_record: ReadWriteLogRecord) -> None: # Convert ReadWriteLogRecord to ReadableLogRecord before passing to BatchProcessor # Note: resource should not be None at this point as it's set during Logger.emit() - resource = ( - log_record.resource - if log_record.resource is not None - else Resource.create({}) - ) + resource = log_record.resource if log_record.resource is not None else Resource.create({}) # Shallow copy the API log record to break the reference to the potentially large context # while keeping the original context intact for other processors. api_log_record = copy.copy(log_record.log_record) @@ -359,9 +327,7 @@ def force_flush(self, timeout_millis: int | None = None) -> bool: @staticmethod def _default_max_queue_size(): try: - return int( - environ.get(OTEL_BLRP_MAX_QUEUE_SIZE, _DEFAULT_MAX_QUEUE_SIZE) - ) + return int(environ.get(OTEL_BLRP_MAX_QUEUE_SIZE, _DEFAULT_MAX_QUEUE_SIZE)) except ValueError: _logger.exception( _ENV_VAR_INT_VALUE_ERROR_MESSAGE, @@ -373,11 +339,7 @@ def _default_max_queue_size(): @staticmethod def _default_schedule_delay_millis(): try: - return int( - environ.get( - OTEL_BLRP_SCHEDULE_DELAY, _DEFAULT_SCHEDULE_DELAY_MILLIS - ) - ) + return int(environ.get(OTEL_BLRP_SCHEDULE_DELAY, _DEFAULT_SCHEDULE_DELAY_MILLIS)) except ValueError: _logger.exception( _ENV_VAR_INT_VALUE_ERROR_MESSAGE, @@ -406,11 +368,7 @@ def _default_max_export_batch_size(): @staticmethod def _default_export_timeout_millis(): try: - return int( - environ.get( - OTEL_BLRP_EXPORT_TIMEOUT, _DEFAULT_EXPORT_TIMEOUT_MILLIS - ) - ) + return int(environ.get(OTEL_BLRP_EXPORT_TIMEOUT, _DEFAULT_EXPORT_TIMEOUT_MILLIS)) except ValueError: _logger.exception( _ENV_VAR_INT_VALUE_ERROR_MESSAGE, @@ -420,9 +378,7 @@ def _default_export_timeout_millis(): return _DEFAULT_EXPORT_TIMEOUT_MILLIS @staticmethod - def _validate_arguments( - max_queue_size, schedule_delay_millis, max_export_batch_size - ): + def _validate_arguments(max_queue_size, schedule_delay_millis, max_export_batch_size): if max_queue_size <= 0: raise ValueError("max_queue_size must be a positive integer.") @@ -430,11 +386,7 @@ def _validate_arguments( raise ValueError("schedule_delay_millis must be positive.") if max_export_batch_size <= 0: - raise ValueError( - "max_export_batch_size must be a positive integer." - ) + raise ValueError("max_export_batch_size must be a positive integer.") if max_export_batch_size > max_queue_size: - raise ValueError( - "max_export_batch_size must be less than or equal to max_queue_size." - ) + raise ValueError("max_export_batch_size must be less than or equal to max_queue_size.") diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/in_memory_log_exporter.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/in_memory_log_exporter.py index bc680262c33..97013f432d3 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/in_memory_log_exporter.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/in_memory_log_exporter.py @@ -34,9 +34,7 @@ def get_finished_logs(self) -> tuple[ReadableLogRecord, ...]: with self._lock: return tuple(self._logs) - def export( - self, batch: collections.abc.Sequence[ReadableLogRecord] - ) -> LogRecordExportResult: + def export(self, batch: collections.abc.Sequence[ReadableLogRecord]) -> LogRecordExportResult: if self._stopped: return LogRecordExportResult.FAILURE with self._lock: @@ -50,8 +48,6 @@ def force_flush(self, timeout_millis: int = 10_000) -> bool: return True -@deprecated( - "Use InMemoryLogRecordExporter. Since logs are not stable yet this WILL be removed in future releases." -) +@deprecated("Use InMemoryLogRecordExporter. Since logs are not stable yet this WILL be removed in future releases.") class InMemoryLogExporter(InMemoryLogRecordExporter): pass diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py index 3e2b8a263a4..d6d0596b031 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py @@ -122,9 +122,7 @@ def __init__( metrics.register_queue_size(lambda: len(self._queue)) self._metrics = metrics - def _should_export_batch( - self, batch_strategy: BatchExportStrategy, num_iterations: int - ) -> bool: + def _should_export_batch(self, batch_strategy: BatchExportStrategy, num_iterations: int) -> bool: if not self._queue or self._shutdown_timeout_exceeded: return False # Always continue to export while queue length exceeds max batch size. @@ -188,9 +186,7 @@ def _export(self, batch_strategy: BatchExportStrategy) -> None: ) except Exception as err: # pylint: disable=broad-exception-caught error = err - _logger.exception( - "Exception while exporting %s.", self._exporting - ) + _logger.exception("Exception while exporting %s.", self._exporting) finally: self._metrics.finish_items(count, error) detach(token) @@ -206,10 +202,7 @@ def emit(self, data: Telemetry) -> None: self._metrics.drop_items(1) # This will drop a log from the right side if the queue is at _max_queue_size. self._queue.appendleft(data) - if ( - len(self._queue) >= self._max_export_batch_size - and not self._worker_awaken.is_set() - ): + if len(self._queue) >= self._max_export_batch_size and not self._worker_awaken.is_set(): self._worker_awaken.set() def shutdown(self, timeout_millis: int = 30000): @@ -226,10 +219,7 @@ def shutdown(self, timeout_millis: int = 30000): # We want to shutdown immediately only if we already waited `timeout_secs`. # Otherwise we pass the remaining timeout to the exporter. # Some exporter's shutdown support a timeout param. - if ( - "timeout_millis" - in inspect.getfullargspec(self._exporter.shutdown).args - ): + if "timeout_millis" in inspect.getfullargspec(self._exporter.shutdown).args: remaining_millis = (shutdown_should_end - time.time()) * 1000 self._exporter.shutdown(timeout_millis=max(0, remaining_millis)) # type: ignore else: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py b/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py index 9f7e7d7c068..3439eb15253 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/_processor_metrics.py @@ -27,9 +27,7 @@ class ProcessorMetricsT(Protocol): - def register_queue_size( - self, get_queue_size: Callable[[], int] - ) -> None: ... + def register_queue_size(self, get_queue_size: Callable[[], int]) -> None: ... def drop_items(self, count: int) -> None: ... @@ -75,14 +73,10 @@ def __init__( if signal == "traces": create_processed = create_otel_sdk_processor_span_processed - create_queue_capacity = ( - create_otel_sdk_processor_span_queue_capacity - ) + create_queue_capacity = create_otel_sdk_processor_span_queue_capacity else: create_processed = create_otel_sdk_processor_log_processed - create_queue_capacity = ( - create_otel_sdk_processor_log_queue_capacity - ) + create_queue_capacity = create_otel_sdk_processor_log_queue_capacity self._processed = create_processed(meter) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py index 17c91f0e807..6f68ad96c40 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/__init__.py @@ -189,9 +189,7 @@ Default: 128 """ -OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = ( - "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT" -) +OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT = "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT" """ .. envvar:: OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT @@ -207,9 +205,7 @@ attribute count. This takes precedence over :envvar:`OTEL_ATTRIBUTE_COUNT_LIMIT`. """ -OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = ( - "OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT" -) +OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT = "OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT" """ .. envvar:: OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT @@ -377,9 +373,7 @@ A scheme of https indicates a secure connection and takes precedence over this configuration setting. """ -_OTEL_PYTHON_EXPORTER_OTLP_GRPC_LOGS_CREDENTIAL_PROVIDER = ( - "OTEL_PYTHON_EXPORTER_OTLP_GRPC_LOGS_CREDENTIAL_PROVIDER" -) +_OTEL_PYTHON_EXPORTER_OTLP_GRPC_LOGS_CREDENTIAL_PROVIDER = "OTEL_PYTHON_EXPORTER_OTLP_GRPC_LOGS_CREDENTIAL_PROVIDER" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_GRPC_LOGS_CREDENTIAL_PROVIDER @@ -396,9 +390,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: Note: This environment variable is experimental and subject to change. """ -_OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER = ( - "OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER" -) +_OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER = "OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_HTTP_LOGS_CREDENTIAL_PROVIDER @@ -414,9 +406,7 @@ def request_session_provder() -> requests.Session: Note: This environment variable is experimental and subject to change. """ -_OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER = ( - "OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER" -) +_OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER = "OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_HTTP_CREDENTIAL_PROVIDER @@ -432,9 +422,7 @@ def request_session_provder() -> requests.Session: Note: This environment variable is experimental and subject to change. """ -_OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER = ( - "OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER" -) +_OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER = "OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_GRPC_CREDENTIAL_PROVIDER @@ -450,9 +438,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: Note: This environment variable is experimental and subject to change. """ -_OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER = ( - "OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER" -) +_OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER = "OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_HTTP_TRACES_CREDENTIAL_PROVIDER @@ -468,9 +454,7 @@ def request_session_provder() -> requests.Session: Note: This environment variable is experimental and subject to change. """ -_OTEL_PYTHON_EXPORTER_OTLP_GRPC_TRACES_CREDENTIAL_PROVIDER = ( - "OTEL_PYTHON_EXPORTER_OTLP_GRPC_TRACES_CREDENTIAL_PROVIDER" -) +_OTEL_PYTHON_EXPORTER_OTLP_GRPC_TRACES_CREDENTIAL_PROVIDER = "OTEL_PYTHON_EXPORTER_OTLP_GRPC_TRACES_CREDENTIAL_PROVIDER" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_GRPC_TRACES_CREDENTIAL_PROVIDER @@ -523,9 +507,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: Note: This environment variable is experimental and subject to change. """ -_OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES = ( - "OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES" -) +_OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES = "OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES" """ .. envvar:: OTEL_PYTHON_EXPORTER_OTLP_GRPC_RETRYABLE_ERROR_CODES @@ -544,9 +526,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: TLS credentials of gRPC client for traces. Should only be used for a secure connection for tracing. """ -OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = ( - "OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE" -) +OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE = "OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE" """ .. envvar:: OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE @@ -594,9 +574,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: clients private key to use in mTLS communication in PEM format. """ -OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE = ( - "OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE" -) +OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE = "OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE" """ .. envvar:: OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE @@ -604,9 +582,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: clients private key to use in mTLS communication in PEM format for traces. """ -OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE = ( - "OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE" -) +OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE = "OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE" """ .. envvar:: OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE @@ -614,9 +590,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: clients private key to use in mTLS communication in PEM format for metrics. """ -OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE = ( - "OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE" -) +OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE = "OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE" """ .. envvar:: OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE @@ -656,9 +630,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: exporter. If both are present, this takes higher precedence. """ -OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = ( - "OTEL_EXPORTER_OTLP_METRICS_COMPRESSION" -) +OTEL_EXPORTER_OTLP_METRICS_COMPRESSION = "OTEL_EXPORTER_OTLP_METRICS_COMPRESSION" """ .. envvar:: OTEL_EXPORTER_OTLP_METRICS_COMPRESSION @@ -745,9 +717,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: """ -_OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED = ( - "OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED" -) +_OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED = "OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED" """ .. envvar:: OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED @@ -763,9 +733,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: """ -OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = ( - "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE" -) +OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE = "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE" """ .. envvar:: OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE @@ -801,9 +769,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: The :envvar:`OTEL_METRICS_EXEMPLAR_FILTER` is the filter for which measurements can become Exemplars. """ -OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = ( - "OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION" -) +OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION = "OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION" """ .. envvar:: OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION @@ -888,9 +854,7 @@ def channel_credential_provider() -> grpc.ChannelCredentials: change in a non-backwards compatible way. """ -OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED = ( - "OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED" -) +OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED = "OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED" """ .. envvar:: OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/_internal.py b/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/_internal.py index c8825d9e74d..0f0fa930a62 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/_internal.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/environment_variables/_internal.py @@ -7,9 +7,7 @@ _logger = getLogger(__name__) -def parse_boolean_environment_variable( - environment_variable: str, default: bool = False -) -> bool: +def parse_boolean_environment_variable(environment_variable: str, default: bool = False) -> bool: value = environ.get(environment_variable) if value is None: return default diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py index 911f4ac92de..c98952ce6ee 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/error_handler/__init__.py @@ -103,9 +103,7 @@ def __exit__(self, exc_type, exc_value, traceback): plugin_handled = False - error_handler_entry_points = entry_points( - group="opentelemetry_error_handler" - ) + error_handler_entry_points = entry_points(group="opentelemetry_error_handler") for error_handler_entry_point in error_handler_entry_points: error_handler_class = error_handler_entry_point.load() diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py index 4e12aab7aad..f4160b25355 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/__init__.py @@ -108,9 +108,7 @@ def __init__( self._measurement_consumer = measurement_consumer self._instrument_id_instrument = {} self._instrument_registration_lock = Lock() - self._meter_config = _ProxyMeterConfig( - _meter_config or _MeterConfig.default() - ) + self._meter_config = _ProxyMeterConfig(_meter_config or _MeterConfig.default()) def _is_enabled(self) -> bool: return self._meter_config.is_enabled @@ -120,19 +118,15 @@ def _set_meter_config(self, meter_config: _MeterConfig) -> None: def create_counter(self, name, unit="", description="") -> APICounter: with self._instrument_registration_lock: - status = self._register_instrument( - name, _Counter, unit, description - ) + status = self._register_instrument(name, _Counter, unit, description) if not status.already_registered: - self._instrument_id_instrument[status.instrument_id] = ( - _Counter( - name, - self._instrumentation_scope, - self._measurement_consumer, - unit, - description, - _meter_config=self._meter_config, - ) + self._instrument_id_instrument[status.instrument_id] = _Counter( + name, + self._instrumentation_scope, + self._measurement_consumer, + unit, + description, + _meter_config=self._meter_config, ) instrument = self._instrument_id_instrument[status.instrument_id] @@ -149,23 +143,17 @@ def create_counter(self, name, unit="", description="") -> APICounter: ) return instrument - def create_up_down_counter( - self, name, unit="", description="" - ) -> APIUpDownCounter: + def create_up_down_counter(self, name, unit="", description="") -> APIUpDownCounter: with self._instrument_registration_lock: - status = self._register_instrument( - name, _UpDownCounter, unit, description - ) + status = self._register_instrument(name, _UpDownCounter, unit, description) if not status.already_registered: - self._instrument_id_instrument[status.instrument_id] = ( - _UpDownCounter( - name, - self._instrumentation_scope, - self._measurement_consumer, - unit, - description, - _meter_config=self._meter_config, - ) + self._instrument_id_instrument[status.instrument_id] = _UpDownCounter( + name, + self._instrumentation_scope, + self._measurement_consumer, + unit, + description, + _meter_config=self._meter_config, ) instrument = self._instrument_id_instrument[status.instrument_id] @@ -190,27 +178,21 @@ def create_observable_counter( description="", ) -> APIObservableCounter: with self._instrument_registration_lock: - status = self._register_instrument( - name, _ObservableCounter, unit, description - ) + status = self._register_instrument(name, _ObservableCounter, unit, description) if not status.already_registered: - self._instrument_id_instrument[status.instrument_id] = ( - _ObservableCounter( - name, - self._instrumentation_scope, - self._measurement_consumer, - callbacks, - unit, - description, - _meter_config=self._meter_config, - ) + self._instrument_id_instrument[status.instrument_id] = _ObservableCounter( + name, + self._instrumentation_scope, + self._measurement_consumer, + callbacks, + unit, + description, + _meter_config=self._meter_config, ) instrument = self._instrument_id_instrument[status.instrument_id] if not status.already_registered: - self._measurement_consumer.register_asynchronous_instrument( - instrument - ) + self._measurement_consumer.register_asynchronous_instrument(instrument) if status.conflict: # FIXME #2558 go through all views here and check if this @@ -238,10 +220,7 @@ def create_histogram( if isinstance(explicit_bucket_boundaries_advisory, Sequence): try: invalid_advisory = not ( - all( - isinstance(e, (float, int)) - for e in explicit_bucket_boundaries_advisory - ) + all(isinstance(e, (float, int)) for e in explicit_bucket_boundaries_advisory) ) except (KeyError, TypeError): invalid_advisory = True @@ -250,9 +229,7 @@ def create_histogram( if invalid_advisory: explicit_bucket_boundaries_advisory = None - _logger.warning( - "explicit_bucket_boundaries_advisory must be a sequence of numbers" - ) + _logger.warning("explicit_bucket_boundaries_advisory must be a sequence of numbers") with self._instrument_registration_lock: status = self._register_instrument( @@ -263,16 +240,14 @@ def create_histogram( explicit_bucket_boundaries_advisory, ) if not status.already_registered: - self._instrument_id_instrument[status.instrument_id] = ( - _Histogram( - name, - self._instrumentation_scope, - self._measurement_consumer, - unit, - description, - explicit_bucket_boundaries_advisory, - _meter_config=self._meter_config, - ) + self._instrument_id_instrument[status.instrument_id] = _Histogram( + name, + self._instrumentation_scope, + self._measurement_consumer, + unit, + description, + explicit_bucket_boundaries_advisory, + _meter_config=self._meter_config, ) instrument = self._instrument_id_instrument[status.instrument_id] @@ -316,31 +291,23 @@ def create_gauge(self, name, unit="", description="") -> APIGauge: ) return instrument - def create_observable_gauge( - self, name, callbacks=None, unit="", description="" - ) -> APIObservableGauge: + def create_observable_gauge(self, name, callbacks=None, unit="", description="") -> APIObservableGauge: with self._instrument_registration_lock: - status = self._register_instrument( - name, _ObservableGauge, unit, description - ) + status = self._register_instrument(name, _ObservableGauge, unit, description) if not status.already_registered: - self._instrument_id_instrument[status.instrument_id] = ( - _ObservableGauge( - name, - self._instrumentation_scope, - self._measurement_consumer, - callbacks, - unit, - description, - _meter_config=self._meter_config, - ) + self._instrument_id_instrument[status.instrument_id] = _ObservableGauge( + name, + self._instrumentation_scope, + self._measurement_consumer, + callbacks, + unit, + description, + _meter_config=self._meter_config, ) instrument = self._instrument_id_instrument[status.instrument_id] if not status.already_registered: - self._measurement_consumer.register_asynchronous_instrument( - instrument - ) + self._measurement_consumer.register_asynchronous_instrument(instrument) if status.conflict: # FIXME #2558 go through all views here and check if this @@ -359,27 +326,21 @@ def create_observable_up_down_counter( self, name, callbacks=None, unit="", description="" ) -> APIObservableUpDownCounter: with self._instrument_registration_lock: - status = self._register_instrument( - name, _ObservableUpDownCounter, unit, description - ) + status = self._register_instrument(name, _ObservableUpDownCounter, unit, description) if not status.already_registered: - self._instrument_id_instrument[status.instrument_id] = ( - _ObservableUpDownCounter( - name, - self._instrumentation_scope, - self._measurement_consumer, - callbacks, - unit, - description, - _meter_config=self._meter_config, - ) + self._instrument_id_instrument[status.instrument_id] = _ObservableUpDownCounter( + name, + self._instrumentation_scope, + self._measurement_consumer, + callbacks, + unit, + description, + _meter_config=self._meter_config, ) instrument = self._instrument_id_instrument[status.instrument_id] if not status.already_registered: - self._measurement_consumer.register_asynchronous_instrument( - instrument - ) + self._measurement_consumer.register_asynchronous_instrument(instrument) if status.conflict: # FIXME #2558 go through all views here and check if this @@ -471,9 +432,7 @@ class MeterProvider(APIMeterProvider): def __init__( self, - metric_readers: Sequence[ - "opentelemetry.sdk.metrics.export.MetricReader" - ] = (), + metric_readers: Sequence["opentelemetry.sdk.metrics.export.MetricReader"] = (), resource: Resource | None = None, exemplar_filter: ExemplarFilter | None = None, shutdown_on_exit: bool = True, @@ -488,10 +447,7 @@ def __init__( resource = Resource.create({}) self._sdk_config = SdkConfiguration( exemplar_filter=( - exemplar_filter - or _get_exemplar_filter( - environ.get(OTEL_METRICS_EXEMPLAR_FILTER, "trace_based") - ) + exemplar_filter or _get_exemplar_filter(environ.get(OTEL_METRICS_EXEMPLAR_FILTER, "trace_based")) ), resource=resource, views=views, @@ -510,24 +466,19 @@ def __init__( self._meters: dict[InstrumentationScope, Meter] = {} self._shutdown_once = Once() self._shutdown = False - self._meter_configurator = ( - _meter_configurator or _default_meter_configurator - ) + self._meter_configurator = _meter_configurator or _default_meter_configurator for metric_reader in self._metric_readers: with self._all_metric_readers_lock: if metric_reader in self._all_metric_readers: # pylint: disable=broad-exception-raised raise Exception( - f"MetricReader {metric_reader} has been registered " - "already in other MeterProvider instance" + f"MetricReader {metric_reader} has been registered already in other MeterProvider instance" ) self._all_metric_readers.add(metric_reader) - metric_reader._set_collect_callback( - self._measurement_consumer.collect - ) + metric_reader._set_collect_callback(self._measurement_consumer.collect) metric_reader._set_meter_provider(self) if hasattr(os, "register_at_fork"): @@ -545,9 +496,7 @@ def _handle_fork(self) -> None: type(self)._all_metric_readers_lock = Lock() self._update_resource(_get_process_dependent_resource()) - def _set_meter_configurator( - self, *, meter_configurator: _MeterConfiguratorT - ): + def _set_meter_configurator(self, *, meter_configurator: _MeterConfiguratorT): """Set a new MeterConfigurator for this MeterProvider. Setting a new MeterConfigurator will result in the configurator being called @@ -558,19 +507,13 @@ def _set_meter_configurator( self._meter_configurator = meter_configurator for instrumentation_scope, meter in self._meters.items(): # pylint: disable-next=protected-access - meter._set_meter_config( - self._apply_meter_configurator(instrumentation_scope) - ) + meter._set_meter_config(self._apply_meter_configurator(instrumentation_scope)) def _update_resource(self, resource: Resource) -> None: with self._meter_lock: - self._sdk_config.resource = self._sdk_config.resource.merge( - resource - ) + self._sdk_config.resource = self._sdk_config.resource.merge(resource) - def _apply_meter_configurator( - self, instrumentation_scope: InstrumentationScope - ) -> _MeterConfig: + def _apply_meter_configurator(self, instrumentation_scope: InstrumentationScope) -> _MeterConfig: try: return self._meter_configurator(instrumentation_scope) # pylint: disable-next=broad-exception-caught @@ -590,12 +533,8 @@ def force_flush(self, timeout_millis: float = 10_000) -> bool: current_ts = time_ns() try: if current_ts >= deadline_ns: - raise MetricsTimeoutError( - "Timed out while flushing metric readers" - ) - metric_reader.force_flush( - timeout_millis=(deadline_ns - current_ts) / 10**6 - ) + raise MetricsTimeoutError("Timed out while flushing metric readers") + metric_reader.force_flush(timeout_millis=(deadline_ns - current_ts) / 10**6) # pylint: disable=broad-exception-caught except Exception as error: @@ -636,12 +575,8 @@ def _shutdown(): try: if current_ts >= deadline_ns: # pylint: disable=broad-exception-raised - raise Exception( - "Didn't get to execute, deadline already exceeded" - ) - metric_reader.shutdown( - timeout_millis=(deadline_ns - current_ts) / 10**6 - ) + raise Exception("Didn't get to execute, deadline already exceeded") + metric_reader.shutdown(timeout_millis=(deadline_ns - current_ts) / 10**6) # pylint: disable=broad-exception-caught except Exception as error: @@ -677,18 +612,14 @@ def get_meter( return NoOpMeter(name, version=version, schema_url=schema_url) if self._shutdown: - _logger.warning( - "A shutdown `MeterProvider` can not provide a `Meter`" - ) + _logger.warning("A shutdown `MeterProvider` can not provide a `Meter`") return NoOpMeter(name, version=version, schema_url=schema_url) if not name: _logger.warning("Meter name cannot be None or empty.") return NoOpMeter(name, version=version, schema_url=schema_url) - instrumentation_scope = InstrumentationScope( - name, version, schema_url, attributes - ) + instrumentation_scope = InstrumentationScope(name, version, schema_url, attributes) with self._meter_lock: if not self._meters.get(instrumentation_scope): # FIXME #2558 pass SDKConfig object to meter so that the meter @@ -696,15 +627,11 @@ def get_meter( self._meters[instrumentation_scope] = Meter( instrumentation_scope, self._measurement_consumer, - _meter_config=self._apply_meter_configurator( - instrumentation_scope - ), + _meter_config=self._apply_meter_configurator(instrumentation_scope), ) return self._meters[instrumentation_scope] - def add_metric_reader( - self, metric_reader: "opentelemetry.sdk.metrics.export.MetricReader" - ) -> None: + def add_metric_reader(self, metric_reader: "opentelemetry.sdk.metrics.export.MetricReader") -> None: with self._all_metric_readers_lock: if metric_reader in self._all_metric_readers: _logger.warning( @@ -714,9 +641,7 @@ def add_metric_reader( return self._measurement_consumer.add_metric_reader(metric_reader) # pylint: disable-next=protected-access - metric_reader._set_collect_callback( - self._measurement_consumer.collect - ) + metric_reader._set_collect_callback(self._measurement_consumer.collect) self._all_metric_readers.add(metric_reader) def remove_metric_reader( @@ -725,9 +650,7 @@ def remove_metric_reader( ) -> None: with self._all_metric_readers_lock: if metric_reader not in self._all_metric_readers: - _logger.warning( - "MetricReader '%s' has not been registered!", metric_reader - ) + _logger.warning("MetricReader '%s' has not been registered!", metric_reader) return self._measurement_consumer.remove_metric_reader(metric_reader) # pylint: disable-next=protected-access diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py index d9ba05363b1..8abd9d51fe9 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/_view_instrument_match.py @@ -36,9 +36,7 @@ def __init__( self._lock = Lock() self._instrument_class_aggregation = instrument_class_aggregation self._name = self._view._name or self._instrument.name - self._description = ( - self._view._description or self._instrument.description - ) + self._description = self._view._description or self._instrument.description if not isinstance(self._view._aggregation, DefaultAggregation): self._aggregation = self._view._aggregation._create_aggregation( self._instrument, @@ -47,9 +45,7 @@ def __init__( 0, ) else: - self._aggregation = self._instrument_class_aggregation[ - self._instrument.__class__ - ]._create_aggregation( + self._aggregation = self._instrument_class_aggregation[self._instrument.__class__]._create_aggregation( self._instrument, None, self._view._exemplar_reservoir_factory, @@ -75,8 +71,7 @@ def conflicts(self, other: "_ViewInstrumentMatch") -> bool: other._aggregation = cast(_SumAggregation, other._aggregation) result = ( - self._aggregation._instrument_is_monotonic - == other._aggregation._instrument_is_monotonic + self._aggregation._instrument_is_monotonic == other._aggregation._instrument_is_monotonic and self._aggregation._instrument_aggregation_temporality == other._aggregation._instrument_aggregation_temporality ) @@ -84,9 +79,7 @@ def conflicts(self, other: "_ViewInstrumentMatch") -> bool: return result # pylint: disable=protected-access - def consume_measurement( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: + def consume_measurement(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: if self._view._attribute_keys is not None: attributes = {} @@ -103,16 +96,12 @@ def consume_measurement( if aggr_key not in self._attributes_aggregation: with self._lock: if aggr_key not in self._attributes_aggregation: - if not isinstance( - self._view._aggregation, DefaultAggregation - ): - aggregation = ( - self._view._aggregation._create_aggregation( - self._instrument, - attributes, - self._view._exemplar_reservoir_factory, - time_ns(), - ) + if not isinstance(self._view._aggregation, DefaultAggregation): + aggregation = self._view._aggregation._create_aggregation( + self._instrument, + attributes, + self._view._exemplar_reservoir_factory, + time_ns(), ) else: aggregation = self._instrument_class_aggregation[ @@ -125,9 +114,7 @@ def consume_measurement( ) self._attributes_aggregation[aggr_key] = aggregation - self._attributes_aggregation[aggr_key].aggregate( - measurement, should_sample_exemplar - ) + self._attributes_aggregation[aggr_key].aggregate(measurement, should_sample_exemplar) def collect( self, @@ -137,9 +124,7 @@ def collect( data_points: list[DataPointT] = [] with self._lock: for aggregation in self._attributes_aggregation.values(): - data_point = aggregation.collect( - collection_aggregation_temporality, collection_start_nanos - ) + data_point = aggregation.collect(collection_aggregation_temporality, collection_start_nanos) if data_point is not None: data_points.append(data_point) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py index ae5acdc63fa..c0f7cf22d48 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py @@ -88,9 +88,7 @@ def __init__( self._previous_point = None @abstractmethod - def aggregate( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: + def aggregate(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: """Aggregate a measurement. Args: @@ -114,9 +112,7 @@ def _collect_exemplars(self) -> Sequence[Exemplar]: """ return self._reservoir.collect(self._attributes) - def _sample_exemplar( - self, measurement: Measurement, should_sample_exemplar: bool - ) -> None: + def _sample_exemplar(self, measurement: Measurement, should_sample_exemplar: bool) -> None: """Offer the measurement to the exemplar reservoir for sampling. It should be called within the each :ref:`aggregate` call. @@ -135,9 +131,7 @@ def _sample_exemplar( class _DropAggregation(_Aggregation): - def aggregate( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: + def aggregate(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: pass def collect( @@ -160,9 +154,7 @@ def __init__( super().__init__(attributes, reservoir_builder) self._start_time_unix_nano = start_time_unix_nano - self._instrument_aggregation_temporality = ( - instrument_aggregation_temporality - ) + self._instrument_aggregation_temporality = instrument_aggregation_temporality self._instrument_is_monotonic = instrument_is_monotonic self._value = None @@ -170,9 +162,7 @@ def __init__( self._previous_collection_start_nano = self._start_time_unix_nano self._previous_value = 0 - def aggregate( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: + def aggregate(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: with self._lock: if self._value is None: self._value = 0 @@ -310,22 +300,12 @@ def collect( value = self._value self._value = None - if ( - self._instrument_aggregation_temporality - is AggregationTemporality.DELTA - ): + if self._instrument_aggregation_temporality is AggregationTemporality.DELTA: # This happens when the corresponding instrument for this # aggregation is synchronous. - if ( - collection_aggregation_temporality - is AggregationTemporality.DELTA - ): - previous_collection_start_nano = ( - self._previous_collection_start_nano - ) - self._previous_collection_start_nano = ( - collection_start_nano - ) + if collection_aggregation_temporality is AggregationTemporality.DELTA: + previous_collection_start_nano = self._previous_collection_start_nano + self._previous_collection_start_nano = collection_start_nano if value is None: return None @@ -359,17 +339,12 @@ def collect( # does not produce measurements. return None - if ( - collection_aggregation_temporality - is AggregationTemporality.DELTA - ): + if collection_aggregation_temporality is AggregationTemporality.DELTA: result_value = value - self._previous_value self._previous_value = value - previous_collection_start_nano = ( - self._previous_collection_start_nano - ) + previous_collection_start_nano = self._previous_collection_start_nano self._previous_collection_start_nano = collection_start_nano return NumberDataPoint( @@ -398,9 +373,7 @@ def __init__( super().__init__(attributes, reservoir_builder) self._value = None - def aggregate( - self, measurement: Measurement, should_sample_exemplar: bool = True - ): + def aggregate(self, measurement: Measurement, should_sample_exemplar: bool = True): with self._lock: self._value = measurement.value @@ -461,9 +434,7 @@ def __init__( record_min_max: bool = True, ): if boundaries is None: - boundaries = ( - _DEFAULT_EXPLICIT_BUCKET_HISTOGRAM_AGGREGATION_BOUNDARIES - ) + boundaries = _DEFAULT_EXPLICIT_BUCKET_HISTOGRAM_AGGREGATION_BOUNDARIES if boundaries: for idx, bound in enumerate(boundaries): if not math.isfinite(bound): @@ -472,14 +443,10 @@ def __init__( raise ValueError("boundaries must be strictly increasing") super().__init__( attributes, - reservoir_builder=partial( - reservoir_builder, boundaries=boundaries - ), + reservoir_builder=partial(reservoir_builder, boundaries=boundaries), ) - self._instrument_aggregation_temporality = ( - instrument_aggregation_temporality - ) + self._instrument_aggregation_temporality = instrument_aggregation_temporality self._start_time_unix_nano = start_time_unix_nano self._boundaries = tuple(boundaries) self._record_min_max = record_min_max @@ -499,9 +466,7 @@ def __init__( def _get_empty_bucket_counts(self) -> list[int]: return [0] * (len(self._boundaries) + 1) - def aggregate( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: + def aggregate(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: with self._lock: if self._value is None: self._value = self._get_empty_bucket_counts() @@ -538,22 +503,12 @@ def collect( self._min = math.inf self._max = -math.inf - if ( - self._instrument_aggregation_temporality - is AggregationTemporality.DELTA - ): + if self._instrument_aggregation_temporality is AggregationTemporality.DELTA: # This happens when the corresponding instrument for this # aggregation is synchronous. - if ( - collection_aggregation_temporality - is AggregationTemporality.DELTA - ): - previous_collection_start_nano = ( - self._previous_collection_start_nano - ) - self._previous_collection_start_nano = ( - collection_start_nano - ) + if collection_aggregation_temporality is AggregationTemporality.DELTA: + previous_collection_start_nano = self._previous_collection_start_nano + self._previous_collection_start_nano = collection_start_nano if value is None: return None @@ -642,20 +597,13 @@ def __init__( # _positive holds the positive values. # _negative holds the negative values by their absolute value. if max_size < self._min_max_size: - raise ValueError( - f"Buckets max size {max_size} is smaller than " - f"minimum max size {self._min_max_size}" - ) + raise ValueError(f"Buckets max size {max_size} is smaller than minimum max size {self._min_max_size}") if max_size > self._max_max_size: - raise ValueError( - f"Buckets max size {max_size} is larger than " - f"maximum max size {self._max_max_size}" - ) + raise ValueError(f"Buckets max size {max_size} is larger than maximum max size {self._max_max_size}") if max_scale > 20: _logger.warning( - "max_scale is set to %s which is " - "larger than the recommended value of 20", + "max_scale is set to %s which is larger than the recommended value of 20", max_scale, ) @@ -667,14 +615,10 @@ def __init__( super().__init__( attributes, - reservoir_builder=partial( - reservoir_builder, size=min(20, max_size) - ), + reservoir_builder=partial(reservoir_builder, size=min(20, max_size)), ) - self._instrument_aggregation_temporality = ( - instrument_aggregation_temporality - ) + self._instrument_aggregation_temporality = instrument_aggregation_temporality self._start_time_unix_nano = start_time_unix_nano self._max_size = max_size self._max_scale = max_scale @@ -702,9 +646,7 @@ def __init__( self._mapping = self._new_mapping(self._max_scale) - def aggregate( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: + def aggregate(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: # pylint: disable=too-many-branches,too-many-statements, too-many-locals with self._lock: @@ -753,18 +695,12 @@ def aggregate( value.index_end = index value.index_base = index - elif ( - index < value.index_start - and (value.index_end - index) >= self._max_size - ): + elif index < value.index_start and (value.index_end - index) >= self._max_size: is_rescaling_needed = True low = index high = value.index_end - elif ( - index > value.index_end - and (index - value.index_start) >= self._max_size - ): + elif index > value.index_end and (index - value.index_start) >= self._max_size: is_rescaling_needed = True low = value.index_start high = index @@ -776,9 +712,7 @@ def aggregate( self._value_positive, self._value_negative, ) - self._mapping = self._new_mapping( - self._mapping.scale - scale_change - ) + self._mapping = self._new_mapping(self._mapping.scale - scale_change) index = self._mapping.map_to_index(measurement_value) @@ -845,22 +779,12 @@ def collect( self._zero_count = 0 self._scale = None - if ( - self._instrument_aggregation_temporality - is AggregationTemporality.DELTA - ): + if self._instrument_aggregation_temporality is AggregationTemporality.DELTA: # This happens when the corresponding instrument for this # aggregation is synchronous. - if ( - collection_aggregation_temporality - is AggregationTemporality.DELTA - ): - previous_collection_start_nano = ( - self._previous_collection_start_nano - ) - self._previous_collection_start_nano = ( - collection_start_nano - ) + if collection_aggregation_temporality is AggregationTemporality.DELTA: + previous_collection_start_nano = self._previous_collection_start_nano + self._previous_collection_start_nano = collection_start_nano if value_positive is None and value_negative is None: return None @@ -900,28 +824,19 @@ def collect( # need to be made so that they can be cumulatively aggregated # to the current buckets). - if ( - value_positive is None - and self._previous_value_positive is None - ): + if value_positive is None and self._previous_value_positive is None: # This happens if collect is called for the first time # and aggregate has not yet been called. value_positive = Buckets() self._previous_value_positive = value_positive.copy_empty() - if ( - value_negative is None - and self._previous_value_negative is None - ): + if value_negative is None and self._previous_value_negative is None: value_negative = Buckets() self._previous_value_negative = value_negative.copy_empty() if scale is None and self._previous_scale is None: scale = self._mapping.scale self._previous_scale = scale - if ( - value_positive is not None - and self._previous_value_positive is None - ): + if value_positive is not None and self._previous_value_positive is None: # This happens when collect is called the very first time # and aggregate has been called before. @@ -942,59 +857,40 @@ def collect( # generate empty buckets that have the same size and amount # as the current ones, this is what copy_empty does. self._previous_value_positive = value_positive.copy_empty() - if ( - value_negative is not None - and self._previous_value_negative is None - ): + if value_negative is not None and self._previous_value_negative is None: self._previous_value_negative = value_negative.copy_empty() if scale is not None and self._previous_scale is None: self._previous_scale = scale - if ( - value_positive is None - and self._previous_value_positive is not None - ): + if value_positive is None and self._previous_value_positive is not None: value_positive = self._previous_value_positive.copy_empty() - if ( - value_negative is None - and self._previous_value_negative is not None - ): + if value_negative is None and self._previous_value_negative is not None: value_negative = self._previous_value_negative.copy_empty() if scale is None and self._previous_scale is not None: scale = self._previous_scale # here self._previous_value_negative and self._previous_value_positive are not Optional anymore - self._previous_value_negative = cast( - Buckets, self._previous_value_negative - ) - self._previous_value_positive = cast( - Buckets, self._previous_value_positive - ) + self._previous_value_negative = cast(Buckets, self._previous_value_negative) + self._previous_value_positive = cast(Buckets, self._previous_value_positive) min_scale = min(self._previous_scale, scale) - low_positive, high_positive = ( - self._get_low_high_previous_current( - self._previous_value_positive, - value_positive, - scale, - min_scale, - ) + low_positive, high_positive = self._get_low_high_previous_current( + self._previous_value_positive, + value_positive, + scale, + min_scale, ) - low_negative, high_negative = ( - self._get_low_high_previous_current( - self._previous_value_negative, - value_negative, - scale, - min_scale, - ) + low_negative, high_negative = self._get_low_high_previous_current( + self._previous_value_negative, + value_negative, + scale, + min_scale, ) min_scale = min( - min_scale - - self._get_scale_change(low_positive, high_positive), - min_scale - - self._get_scale_change(low_negative, high_negative), + min_scale - self._get_scale_change(low_positive, high_positive), + min_scale - self._get_scale_change(low_negative, high_negative), ) self._downscale( @@ -1032,9 +928,7 @@ def collect( self._previous_max = max(max_, self._previous_max) self._previous_sum = sum_ + self._previous_sum self._previous_count = count + self._previous_count - self._previous_zero_count = ( - zero_count + self._previous_zero_count - ) + self._previous_zero_count = zero_count + self._previous_zero_count self._previous_scale = min_scale return ExponentialHistogramDataPoint( @@ -1048,15 +942,11 @@ def collect( zero_count=self._previous_zero_count, positive=BucketsPoint( offset=self._previous_value_positive.offset, - bucket_counts=( - self._previous_value_positive.get_offset_counts() - ), + bucket_counts=(self._previous_value_positive.get_offset_counts()), ), negative=BucketsPoint( offset=self._previous_value_negative.offset, - bucket_counts=( - self._previous_value_negative.get_offset_counts() - ), + bucket_counts=(self._previous_value_negative.get_offset_counts()), ), # FIXME: Find the right value for flags flags=0, @@ -1076,9 +966,7 @@ def _get_low_high_previous_current( (previous_point_low, previous_point_high) = self._get_low_high( previous_point_buckets, self._previous_scale, min_scale ) - (current_point_low, current_point_high) = self._get_low_high( - current_point_buckets, current_scale, min_scale - ) + (current_point_low, current_point_high) = self._get_low_high(current_point_buckets, current_scale, min_scale) if current_point_low > current_point_high: low = previous_point_low @@ -1142,9 +1030,7 @@ def _merge( ): current_change = current_scale - min_scale - for current_bucket_index, current_bucket in enumerate( - current_buckets.counts - ): + for current_bucket_index, current_bucket in enumerate(current_buckets.counts): if current_bucket == 0: continue @@ -1190,9 +1076,7 @@ def _merge( if aggregation_temporality is AggregationTemporality.DELTA: current_bucket = -current_bucket - previous_buckets.increment_bucket( - bucket_index, increment=current_bucket - ) + previous_buckets.increment_bucket(bucket_index, increment=current_bucket) class Aggregation(ABC): @@ -1205,9 +1089,7 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: """Creates an aggregation""" @@ -1236,9 +1118,7 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: # pylint: disable=too-many-return-statements @@ -1247,9 +1127,7 @@ def _create_aggregation( attributes, reservoir_builder=reservoir_factory(_SumAggregation), instrument_is_monotonic=True, - instrument_aggregation_temporality=( - AggregationTemporality.DELTA - ), + instrument_aggregation_temporality=(AggregationTemporality.DELTA), start_time_unix_nano=start_time_unix_nano, ) if isinstance(instrument, UpDownCounter): @@ -1257,9 +1135,7 @@ def _create_aggregation( attributes, reservoir_builder=reservoir_factory(_SumAggregation), instrument_is_monotonic=False, - instrument_aggregation_temporality=( - AggregationTemporality.DELTA - ), + instrument_aggregation_temporality=(AggregationTemporality.DELTA), start_time_unix_nano=start_time_unix_nano, ) @@ -1268,9 +1144,7 @@ def _create_aggregation( attributes, reservoir_builder=reservoir_factory(_SumAggregation), instrument_is_monotonic=True, - instrument_aggregation_temporality=( - AggregationTemporality.CUMULATIVE - ), + instrument_aggregation_temporality=(AggregationTemporality.CUMULATIVE), start_time_unix_nano=start_time_unix_nano, ) @@ -1279,9 +1153,7 @@ def _create_aggregation( attributes, reservoir_builder=reservoir_factory(_SumAggregation), instrument_is_monotonic=False, - instrument_aggregation_temporality=( - AggregationTemporality.CUMULATIVE - ), + instrument_aggregation_temporality=(AggregationTemporality.CUMULATIVE), start_time_unix_nano=start_time_unix_nano, ) @@ -1289,12 +1161,8 @@ def _create_aggregation( boundaries = instrument._advisory.explicit_bucket_boundaries return _ExplicitBucketHistogramAggregation( attributes, - reservoir_builder=reservoir_factory( - _ExplicitBucketHistogramAggregation - ), - instrument_aggregation_temporality=( - AggregationTemporality.DELTA - ), + reservoir_builder=reservoir_factory(_ExplicitBucketHistogramAggregation), + instrument_aggregation_temporality=(AggregationTemporality.DELTA), boundaries=boundaries, start_time_unix_nano=start_time_unix_nano, ) @@ -1343,18 +1211,14 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: instrument_aggregation_temporality = AggregationTemporality.UNSPECIFIED if isinstance(instrument, Synchronous): instrument_aggregation_temporality = AggregationTemporality.DELTA elif isinstance(instrument, Asynchronous): - instrument_aggregation_temporality = ( - AggregationTemporality.CUMULATIVE - ) + instrument_aggregation_temporality = AggregationTemporality.CUMULATIVE return _ExponentialBucketHistogramAggregation( attributes, @@ -1393,29 +1257,21 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: instrument_aggregation_temporality = AggregationTemporality.UNSPECIFIED if isinstance(instrument, Synchronous): instrument_aggregation_temporality = AggregationTemporality.DELTA elif isinstance(instrument, Asynchronous): - instrument_aggregation_temporality = ( - AggregationTemporality.CUMULATIVE - ) + instrument_aggregation_temporality = AggregationTemporality.CUMULATIVE if self._boundaries is not None: boundaries = self._boundaries else: # guard for usage with instruments without advisory advisory = getattr(instrument, "_advisory", None) - boundaries = ( - advisory.explicit_bucket_boundaries - if advisory is not None - else None - ) + boundaries = advisory.explicit_bucket_boundaries if advisory is not None else None return _ExplicitBucketHistogramAggregation( attributes, @@ -1437,18 +1293,14 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: instrument_aggregation_temporality = AggregationTemporality.UNSPECIFIED if isinstance(instrument, Synchronous): instrument_aggregation_temporality = AggregationTemporality.DELTA elif isinstance(instrument, Asynchronous): - instrument_aggregation_temporality = ( - AggregationTemporality.CUMULATIVE - ) + instrument_aggregation_temporality = AggregationTemporality.CUMULATIVE return _SumAggregation( attributes, @@ -1471,9 +1323,7 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: return _LastValueAggregation( @@ -1489,11 +1339,7 @@ def _create_aggregation( self, instrument: _Instrument, attributes: Attributes, - reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ], + reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder], start_time_unix_nano: int, ) -> _Aggregation: - return _DropAggregation( - attributes, reservoir_factory(_DropAggregation) - ) + return _DropAggregation(attributes, reservoir_factory(_DropAggregation)) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py index d204177de50..2117382a0ea 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py @@ -36,9 +36,7 @@ def should_sample( attributes: The complete set of measurement attributes context: The Context of the measurement """ - raise NotImplementedError( - "ExemplarFilter.should_sample is not implemented" - ) + raise NotImplementedError("ExemplarFilter.should_sample is not implemented") class AlwaysOnExemplarFilter(ExemplarFilter): 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 dbba3ebc75c..90a85b0543d 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 @@ -66,9 +66,7 @@ def collect(self, point_attributes: Attributes) -> list[Exemplar]: exemplars contain the attributes that were filtered out by the aggregator, but recorded alongside the original measurement. """ - raise NotImplementedError( - "ExemplarReservoir.collect is not implemented" - ) + raise NotImplementedError("ExemplarReservoir.collect is not implemented") class ExemplarBucket: @@ -115,13 +113,7 @@ def collect(self, point_attributes: Attributes) -> Exemplar | None: # See the specification for more details: # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar filtered_attributes = ( - { - k: v - for k, v in self.__attributes.items() - if k not in point_attributes - } - if self.__attributes - else None + {k: v for k, v in self.__attributes.items() if k not in point_attributes} if self.__attributes else None ) exemplar = Exemplar( @@ -154,9 +146,7 @@ class FixedSizeExemplarReservoirABC(ExemplarReservoir): def __init__(self, size: int, **kwargs) -> None: super().__init__(**kwargs) self._size: int = size - self._reservoir_storage: Mapping[int, ExemplarBucket] = defaultdict( - ExemplarBucket - ) + self._reservoir_storage: Mapping[int, ExemplarBucket] = defaultdict(ExemplarBucket) self._lock = Lock() def collect(self, point_attributes: Attributes) -> list[Exemplar]: @@ -174,10 +164,7 @@ def collect(self, point_attributes: Attributes) -> list[Exemplar]: with self._lock: exemplars = [ e - for e in ( - bucket.collect(point_attributes) - for _, bucket in sorted(self._reservoir_storage.items()) - ) + for e in (bucket.collect(point_attributes) for _, bucket in sorted(self._reservoir_storage.items())) if e is not None ] self._reset() @@ -200,13 +187,9 @@ def offer( """ with self._lock: try: - index = self._find_bucket_index( - value, time_unix_nano, attributes, context - ) + index = self._find_bucket_index(value, time_unix_nano, attributes, context) - self._reservoir_storage[index].offer( - value, time_unix_nano, attributes, context - ) + self._reservoir_storage[index].offer(value, time_unix_nano, attributes, context) except BucketIndexError: # Ignore invalid bucket index pass diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/buckets.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/buckets.py index 62d6edb4654..a8749700b00 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/buckets.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/buckets.py @@ -127,9 +127,7 @@ def downscale(self, amount: int) -> None: self._counts = self._counts[::-1] # [4, 3, 2, 1, 0] - self._counts = ( - self._counts[:bias][::-1] + self._counts[bias:][::-1] - ) + self._counts = self._counts[:bias][::-1] + self._counts[bias:][::-1] # [3, 4, 0, 1, 2] This is a rotation of the backing array. size = 1 + self.__index_end - self.__index_start diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/exponent_mapping.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/exponent_mapping.py index e603d147f66..d80000334ae 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/exponent_mapping.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/exponent_mapping.py @@ -71,9 +71,7 @@ def _init(self, scale: int): # This bucket is incomplete, since the upper boundary cannot be # represented. One greater than this index corresponds with the bucket # containing values > 2 ** 1024. - self._max_normal_lower_boundary_index = ( - MAX_NORMAL_EXPONENT >> -self._scale - ) + self._max_normal_lower_boundary_index = MAX_NORMAL_EXPONENT >> -self._scale def map_to_index(self, value: float) -> int: if value < MIN_NORMAL_VALUE: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/logarithm_mapping.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/logarithm_mapping.py index 2a3f6ca2fa1..a0641d751bd 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/logarithm_mapping.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential_histogram/mapping/logarithm_mapping.py @@ -72,9 +72,7 @@ def _init(self, scale: int): # with this index covers the range # (MIN_NORMAL_VALUE, MIN_NORMAL_VALUE * base]. One less than this index # corresponds with the bucket containing values <= MIN_NORMAL_VALUE. - self._min_normal_lower_boundary_index = ( - MIN_NORMAL_EXPONENT << self._scale - ) + self._min_normal_lower_boundary_index = MIN_NORMAL_EXPONENT << self._scale # self._max_normal_lower_boundary_index is the index such that # base ** index equals the greatest representable lower boundary. An @@ -84,9 +82,7 @@ def _init(self, scale: int): # This bucket is incomplete, since the upper boundary cannot be # represented. One greater than this index corresponds with the bucket # containing values > 2 ** 1024. - self._max_normal_lower_boundary_index = ( - (MAX_NORMAL_EXPONENT + 1) << self._scale - ) - 1 + self._max_normal_lower_boundary_index = ((MAX_NORMAL_EXPONENT + 1) << self._scale) - 1 def map_to_index(self, value: float) -> int: """ @@ -110,18 +106,14 @@ def map_to_index(self, value: float) -> int: def get_lower_boundary(self, index: int) -> float: if index >= self._max_normal_lower_boundary_index: if index == self._max_normal_lower_boundary_index: - return 2 * exp( - (index - (1 << self._scale)) / self._scale_factor - ) + return 2 * exp((index - (1 << self._scale)) / self._scale_factor) raise MappingOverflowError() if index <= self._min_normal_lower_boundary_index: if index == self._min_normal_lower_boundary_index: return MIN_NORMAL_VALUE if index == self._min_normal_lower_boundary_index - 1: - return ( - exp((index + (1 << self._scale)) / self._scale_factor) / 2 - ) + return exp((index + (1 << self._scale)) / self._scale_factor) / 2 raise MappingUnderflowError() return exp(index / self._scale_factor) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py index aee356f78d2..4007919d4b5 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py @@ -92,12 +92,8 @@ class MetricExporter(ABC): def __init__( self, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, - preferred_aggregation: dict[ - type, opentelemetry.sdk.metrics.view.Aggregation - ] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, + preferred_aggregation: dict[type, opentelemetry.sdk.metrics.view.Aggregation] | None = None, ) -> None: self._preferred_temporality = preferred_temporality self._preferred_aggregation = preferred_aggregation @@ -144,15 +140,9 @@ class ConsoleMetricExporter(MetricExporter): def __init__( self, out: IO = stdout, - formatter: Callable[[MetricsData], str] = lambda metrics_data: ( - metrics_data.to_json() + linesep - ), - preferred_temporality: dict[type, AggregationTemporality] - | None = None, - preferred_aggregation: dict[ - type, opentelemetry.sdk.metrics.view.Aggregation - ] - | None = None, + formatter: Callable[[MetricsData], str] = lambda metrics_data: metrics_data.to_json() + linesep, + preferred_temporality: dict[type, AggregationTemporality] | None = None, + preferred_aggregation: dict[type, opentelemetry.sdk.metrics.view.Aggregation] | None = None, ): super().__init__( preferred_temporality=preferred_temporality, @@ -214,12 +204,8 @@ class MetricReader(ABC): def __init__( self, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, - preferred_aggregation: dict[ - type, opentelemetry.sdk.metrics.view.Aggregation - ] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, + preferred_aggregation: dict[type, opentelemetry.sdk.metrics.view.Aggregation] | None = None, *, otel_component_type: OtelComponentTypeValues | None = None, ) -> None: @@ -250,36 +236,24 @@ def __init__( AggregationTemporality.CUMULATIVE, AggregationTemporality.DELTA, ): - raise Exception( - f"Invalid temporality value found {temporality}" - ) + raise Exception(f"Invalid temporality value found {temporality}") if preferred_temporality is not None: for typ, temporality in preferred_temporality.items(): if typ is Counter: self._instrument_class_temporality[_Counter] = temporality elif typ is UpDownCounter: - self._instrument_class_temporality[_UpDownCounter] = ( - temporality - ) + self._instrument_class_temporality[_UpDownCounter] = temporality elif typ is Histogram: - self._instrument_class_temporality[_Histogram] = ( - temporality - ) + self._instrument_class_temporality[_Histogram] = temporality elif typ is Gauge: self._instrument_class_temporality[_Gauge] = temporality elif typ is ObservableCounter: - self._instrument_class_temporality[_ObservableCounter] = ( - temporality - ) + self._instrument_class_temporality[_ObservableCounter] = temporality elif typ is ObservableUpDownCounter: - self._instrument_class_temporality[ - _ObservableUpDownCounter - ] = temporality + self._instrument_class_temporality[_ObservableUpDownCounter] = temporality elif typ is ObservableGauge: - self._instrument_class_temporality[_ObservableGauge] = ( - temporality - ) + self._instrument_class_temporality[_ObservableGauge] = temporality else: raise Exception(f"Invalid instrument class found {typ}") @@ -299,41 +273,25 @@ def __init__( if typ is Counter: self._instrument_class_aggregation[_Counter] = aggregation elif typ is UpDownCounter: - self._instrument_class_aggregation[_UpDownCounter] = ( - aggregation - ) + self._instrument_class_aggregation[_UpDownCounter] = aggregation elif typ is Histogram: - self._instrument_class_aggregation[_Histogram] = ( - aggregation - ) + self._instrument_class_aggregation[_Histogram] = aggregation elif typ is Gauge: self._instrument_class_aggregation[_Gauge] = aggregation elif typ is ObservableCounter: - self._instrument_class_aggregation[_ObservableCounter] = ( - aggregation - ) + self._instrument_class_aggregation[_ObservableCounter] = aggregation elif typ is ObservableUpDownCounter: - self._instrument_class_aggregation[ - _ObservableUpDownCounter - ] = aggregation + self._instrument_class_aggregation[_ObservableUpDownCounter] = aggregation elif typ is ObservableGauge: - self._instrument_class_aggregation[_ObservableGauge] = ( - aggregation - ) + self._instrument_class_aggregation[_ObservableGauge] = aggregation else: raise Exception(f"Invalid instrument class found {typ}") - self._otel_component_type = ( - otel_component_type.value - if otel_component_type - else type(self).__qualname__ - ) + self._otel_component_type = otel_component_type.value if otel_component_type else type(self).__qualname__ self._metrics = create_metric_reader_metrics( self._otel_component_type, NoOpMeterProvider(), - parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ) @final @@ -350,9 +308,7 @@ def collect(self, timeout_millis: float = 10_000) -> None: detailing the individual errors that caused this function to fail. """ if self._collect is None: - _logger.warning( - "Cannot call collect on a MetricReader until it is registered on a MeterProvider" - ) + _logger.warning("Cannot call collect on a MetricReader until it is registered on a MeterProvider") return start_time = perf_counter() @@ -395,9 +351,7 @@ def _set_meter_provider(self, meter_provider: MeterProvider) -> None: self._metrics = create_metric_reader_metrics( self._otel_component_type, meter_provider, - parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ) def force_flush(self, timeout_millis: float = 10_000) -> bool: @@ -426,12 +380,8 @@ class InMemoryMetricReader(MetricReader): def __init__( self, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, - preferred_aggregation: dict[ - type, opentelemetry.sdk.metrics.view.Aggregation - ] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, + preferred_aggregation: dict[type, opentelemetry.sdk.metrics.view.Aggregation] | None = None, ) -> None: super().__init__( preferred_temporality=preferred_temporality, @@ -494,23 +444,15 @@ def __init__( self._exporter = exporter if export_interval_millis is None: try: - export_interval_millis = float( - environ.get(OTEL_METRIC_EXPORT_INTERVAL, 60000) - ) + export_interval_millis = float(environ.get(OTEL_METRIC_EXPORT_INTERVAL, 60000)) except ValueError: - _logger.warning( - "Found invalid value for export interval, using default" - ) + _logger.warning("Found invalid value for export interval, using default") export_interval_millis = 60000 if export_timeout_millis is None: try: - export_timeout_millis = float( - environ.get(OTEL_METRIC_EXPORT_TIMEOUT, 30000) - ) + export_timeout_millis = float(environ.get(OTEL_METRIC_EXPORT_TIMEOUT, 30000)) except ValueError: - _logger.warning( - "Found invalid value for export timeout, using default" - ) + _logger.warning("Found invalid value for export timeout, using default") export_timeout_millis = 30000 self._export_interval_millis = export_interval_millis self._export_timeout_millis = export_timeout_millis @@ -518,10 +460,7 @@ def __init__( self._shutdown_event = Event() self._shutdown_once = Once() self._daemon_thread = None - if ( - self._export_interval_millis > 0 - and self._export_interval_millis < math.inf - ): + if self._export_interval_millis > 0 and self._export_interval_millis < math.inf: self._daemon_thread = Thread( name="OtelPeriodicExportingMetricReader", target=self._ticker, @@ -578,9 +517,7 @@ def _receive_metrics( # pylint: disable=broad-exception-caught,invalid-name try: with self._export_lock: - self._exporter.export( - metrics_data, timeout_millis=timeout_millis - ) + self._exporter.export(metrics_data, timeout_millis=timeout_millis) except Exception: _logger.exception("Exception while exporting metrics") detach(token) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/_metric_reader_metrics.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/_metric_reader_metrics.py index f7fa95c7ec4..019f1cc1725 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/_metric_reader_metrics.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/_metric_reader_metrics.py @@ -26,9 +26,7 @@ def record_collection(self, duration: float) -> None: class MetricReaderMetrics: - def __init__( - self, component_type: str, meter_provider: MeterProvider - ) -> None: + def __init__(self, component_type: str, meter_provider: MeterProvider) -> None: meter = meter_provider.get_meter("opentelemetry-sdk") count = _component_counter[component_type] @@ -39,9 +37,7 @@ def __init__( OTEL_COMPONENT_NAME: f"{component_type}/{count}", } - self._collection_duration = ( - create_otel_sdk_metric_reader_collection_duration(meter) - ) + self._collection_duration = create_otel_sdk_metric_reader_collection_duration(meter) def record_collection(self, duration: float) -> None: self._collection_duration.record(duration, self._standard_attrs) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py index 8541655093e..73b09db9236 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/instrument.py @@ -46,9 +46,7 @@ _logger = getLogger(__name__) -_ERROR_MESSAGE = ( - "Expected ASCII string of maximum length 63 characters but got {}" -) +_ERROR_MESSAGE = "Expected ASCII string of maximum length 63 characters but got {}" @runtime_checkable @@ -156,9 +154,7 @@ def inner( def _is_enabled(self) -> bool: return self._meter_config is None or self._meter_config.is_enabled - def callback( - self, callback_options: CallbackOptions - ) -> Iterable[Measurement]: + def callback(self, callback_options: CallbackOptions) -> Iterable[Measurement]: if not self._is_enabled(): return for callback in self._callbacks: @@ -179,9 +175,7 @@ def callback( attributes=api_measurement.attributes, ) except Exception: # pylint: disable=broad-exception-caught - _logger.exception( - "Callback failed for instrument %s.", self.name - ) + _logger.exception("Callback failed for instrument %s.", self.name) class Counter(_Synchronous, APICounter): @@ -208,9 +202,7 @@ def add( ) return if amount < 0: - _logger.warning( - "Add amount must be non-negative on Counter %s.", self.name - ) + _logger.warning("Add amount must be non-negative on Counter %s.", self.name) return time_unix_nano = time_ns() self._measurement_consumer.consume_measurement( @@ -262,18 +254,14 @@ def add( class ObservableCounter(_Asynchronous, APIObservableCounter): def __new__(cls, *args, **kwargs): if cls is ObservableCounter: - raise TypeError( - "ObservableCounter must be instantiated via a meter." - ) + raise TypeError("ObservableCounter must be instantiated via a meter.") return super().__new__(cls) class ObservableUpDownCounter(_Asynchronous, APIObservableUpDownCounter): def __new__(cls, *args, **kwargs): if cls is ObservableUpDownCounter: - raise TypeError( - "ObservableUpDownCounter must be instantiated via a meter." - ) + raise TypeError("ObservableUpDownCounter must be instantiated via a meter.") return super().__new__(cls) @@ -297,9 +285,7 @@ def __init__( measurement_consumer=measurement_consumer, _meter_config=_meter_config, ) - self._advisory = _MetricsHistogramAdvisory( - explicit_bucket_boundaries=explicit_bucket_boundaries_advisory - ) + self._advisory = _MetricsHistogramAdvisory(explicit_bucket_boundaries=explicit_bucket_boundaries_advisory) def __new__(cls, *args, **kwargs): if cls is Histogram: @@ -379,9 +365,7 @@ def set( class ObservableGauge(_Asynchronous, APIObservableGauge): def __new__(cls, *args, **kwargs): if cls is ObservableGauge: - raise TypeError( - "ObservableGauge must be instantiated via a meter." - ) + raise TypeError("ObservableGauge must be instantiated via a meter.") return super().__new__(cls) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/measurement_consumer.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/measurement_consumer.py index b17475bc551..a332418b4e7 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/measurement_consumer.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/measurement_consumer.py @@ -28,9 +28,7 @@ def consume_measurement(self, measurement: Measurement) -> None: @abstractmethod def register_asynchronous_instrument( self, - instrument: ( - "opentelemetry.sdk.metrics._internal.instrument._Asynchronous" - ), + instrument: ("opentelemetry.sdk.metrics._internal.instrument._Asynchronous"), ): pass @@ -51,9 +49,7 @@ def __init__( ) -> None: self._lock = Lock() self._sdk_config = sdk_config - self._reader_storages: Mapping[ - opentelemetry.sdk.metrics.export.MetricReader, MetricReaderStorage - ] = { + self._reader_storages: Mapping[opentelemetry.sdk.metrics.export.MetricReader, MetricReaderStorage] = { reader: MetricReaderStorage( sdk_config, reader._instrument_class_temporality, @@ -61,32 +57,24 @@ def __init__( ) for reader in metric_readers } - self._async_instruments: list[ - opentelemetry.sdk.metrics._internal.instrument._Asynchronous - ] = [] + self._async_instruments: list[opentelemetry.sdk.metrics._internal.instrument._Asynchronous] = [] def consume_measurement(self, measurement: Measurement) -> None: - should_sample_exemplar = ( - self._sdk_config.exemplar_filter.should_sample( - measurement.value, - measurement.time_unix_nano, - measurement.attributes, - measurement.context, - ) + should_sample_exemplar = self._sdk_config.exemplar_filter.should_sample( + measurement.value, + measurement.time_unix_nano, + measurement.attributes, + measurement.context, ) # `_reader_storages` is replaced (never mutated in place) by # `add_metric_reader` and `remove_metric_reader`, so it is safe # to iterate over without a lock. for reader_storage in self._reader_storages.values(): - reader_storage.consume_measurement( - measurement, should_sample_exemplar - ) + reader_storage.consume_measurement(measurement, should_sample_exemplar) def register_asynchronous_instrument( self, - instrument: ( - "opentelemetry.sdk.metrics._internal.instrument._Asynchronous" - ), + instrument: ("opentelemetry.sdk.metrics._internal.instrument._Asynchronous"), ) -> None: with self._lock: self._async_instruments.append(instrument) @@ -108,36 +96,26 @@ def collect( remaining_time = deadline_ns - time_ns() if remaining_time < default_timeout_ns: - callback_options = CallbackOptions( - timeout_millis=remaining_time / 1e6 - ) + callback_options = CallbackOptions(timeout_millis=remaining_time / 1e6) measurements = async_instrument.callback(callback_options) if time_ns() >= deadline_ns: - raise MetricsTimeoutError( - "Timed out while executing callback" - ) + raise MetricsTimeoutError("Timed out while executing callback") for measurement in measurements: - should_sample_exemplar = ( - self._sdk_config.exemplar_filter.should_sample( - measurement.value, - measurement.time_unix_nano, - measurement.attributes, - measurement.context, - ) - ) - metric_reader_storage.consume_measurement( - measurement, should_sample_exemplar + should_sample_exemplar = self._sdk_config.exemplar_filter.should_sample( + measurement.value, + measurement.time_unix_nano, + measurement.attributes, + measurement.context, ) + metric_reader_storage.consume_measurement(measurement, should_sample_exemplar) result = self._reader_storages[metric_reader].collect() return result - def add_metric_reader( - self, metric_reader: "opentelemetry.sdk.metrics.MetricReader" - ) -> None: + def add_metric_reader(self, metric_reader: "opentelemetry.sdk.metrics.MetricReader") -> None: """Registers a new metric reader.""" # Build a new mapping and swap it in atomically so that # a concurrent consume_measurement never iterates a mapping @@ -153,9 +131,7 @@ def add_metric_reader( ) self._reader_storages = new_reader_storages - def remove_metric_reader( - self, metric_reader: "opentelemetry.sdk.metrics.MetricReader" - ) -> None: + def remove_metric_reader(self, metric_reader: "opentelemetry.sdk.metrics.MetricReader") -> None: """Unregisters the given metric reader.""" # Mutate using copy-on-write: see add_metric_reader. with self._lock: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py index 7c409430bf9..8d105b0a7e1 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py @@ -57,15 +57,11 @@ def __init__( ) -> None: self._lock = RLock() self._sdk_config = sdk_config - self._instrument_view_instrument_matches: dict[ - _Instrument, list[_ViewInstrumentMatch] - ] = {} + self._instrument_view_instrument_matches: dict[_Instrument, list[_ViewInstrumentMatch]] = {} self._instrument_class_temporality = instrument_class_temporality self._instrument_class_aggregation = instrument_class_aggregation - def _get_or_init_view_instrument_match( - self, instrument: _Instrument - ) -> list[_ViewInstrumentMatch]: + def _get_or_init_view_instrument_match(self, instrument: _Instrument) -> list[_ViewInstrumentMatch]: # Optimistically get the relevant views for the given instrument. Once set for a given # instrument, the mapping will never change @@ -80,9 +76,7 @@ def _get_or_init_view_instrument_match( # not present, hold the lock and add a new mapping view_instrument_matches = [] - self._handle_view_instrument_match( - instrument, view_instrument_matches - ) + self._handle_view_instrument_match(instrument, view_instrument_matches) # if no view targeted the instrument, use the default if not view_instrument_matches: @@ -90,26 +84,16 @@ def _get_or_init_view_instrument_match( _ViewInstrumentMatch( view=_DEFAULT_VIEW, instrument=instrument, - instrument_class_aggregation=( - self._instrument_class_aggregation - ), + instrument_class_aggregation=(self._instrument_class_aggregation), ) ) - self._instrument_view_instrument_matches[instrument] = ( - view_instrument_matches - ) + self._instrument_view_instrument_matches[instrument] = view_instrument_matches return view_instrument_matches - def consume_measurement( - self, measurement: Measurement, should_sample_exemplar: bool = True - ) -> None: - for view_instrument_match in self._get_or_init_view_instrument_match( - measurement.instrument - ): - view_instrument_match.consume_measurement( - measurement, should_sample_exemplar - ) + def consume_measurement(self, measurement: Measurement, should_sample_exemplar: bool = True) -> None: + for view_instrument_match in self._get_or_init_view_instrument_match(measurement.instrument): + view_instrument_match.consume_measurement(measurement, should_sample_exemplar) def collect(self) -> MetricsData | None: # Use a list instead of yielding to prevent a slow reader from holding @@ -127,28 +111,20 @@ def collect(self) -> MetricsData | None: collection_start_nanos = time_ns() with self._lock: - instrumentation_scope_scope_metrics: dict[ - InstrumentationScope, ScopeMetrics - ] = {} + instrumentation_scope_scope_metrics: dict[InstrumentationScope, ScopeMetrics] = {} - instrument_matches_snapshot = list( - self._instrument_view_instrument_matches.items() - ) + instrument_matches_snapshot = list(self._instrument_view_instrument_matches.items()) for ( instrument, view_instrument_matches, ) in instrument_matches_snapshot: - aggregation_temporality = self._instrument_class_temporality[ - instrument.__class__ - ] + aggregation_temporality = self._instrument_class_temporality[instrument.__class__] metrics: list[Metric] = [] for view_instrument_match in view_instrument_matches: - data_points = view_instrument_match.collect( - aggregation_temporality, collection_start_nanos - ) + data_points = view_instrument_match.collect(aggregation_temporality, collection_start_nanos) if data_points is None: continue @@ -161,9 +137,7 @@ def collect(self) -> MetricsData | None: data = Sum( aggregation_temporality=aggregation_temporality, data_points=data_points, - is_monotonic=isinstance( - instrument, (Counter, ObservableCounter) - ), + is_monotonic=isinstance(instrument, (Counter, ObservableCounter)), ) elif isinstance( # pylint: disable=protected-access @@ -209,29 +183,21 @@ def collect(self) -> MetricsData | None: ) if metrics: - if instrument.instrumentation_scope not in ( - instrumentation_scope_scope_metrics - ): - instrumentation_scope_scope_metrics[ - instrument.instrumentation_scope - ] = ScopeMetrics( + if instrument.instrumentation_scope not in (instrumentation_scope_scope_metrics): + instrumentation_scope_scope_metrics[instrument.instrumentation_scope] = ScopeMetrics( scope=instrument.instrumentation_scope, metrics=metrics, schema_url=instrument.instrumentation_scope.schema_url, ) else: - instrumentation_scope_scope_metrics[ - instrument.instrumentation_scope - ].metrics.extend(metrics) + instrumentation_scope_scope_metrics[instrument.instrumentation_scope].metrics.extend(metrics) if instrumentation_scope_scope_metrics: return MetricsData( resource_metrics=[ ResourceMetrics( resource=self._sdk_config.resource, - scope_metrics=list( - instrumentation_scope_scope_metrics.values() - ), + scope_metrics=list(instrumentation_scope_scope_metrics.values()), schema_url=self._sdk_config.resource.schema_url, ) ] @@ -255,23 +221,14 @@ def _handle_view_instrument_match( new_view_instrument_match = _ViewInstrumentMatch( view=view, instrument=instrument, - instrument_class_aggregation=( - self._instrument_class_aggregation - ), + instrument_class_aggregation=(self._instrument_class_aggregation), ) - for ( - existing_view_instrument_matches - ) in self._instrument_view_instrument_matches.values(): - for ( - existing_view_instrument_match - ) in existing_view_instrument_matches: - if existing_view_instrument_match.conflicts( - new_view_instrument_match - ): + for existing_view_instrument_matches in self._instrument_view_instrument_matches.values(): + for existing_view_instrument_match in existing_view_instrument_matches: + if existing_view_instrument_match.conflicts(new_view_instrument_match): _logger.warning( - "Views %s and %s will cause conflicting " - "metrics identities", + "Views %s and %s will cause conflicting metrics identities", existing_view_instrument_match._view, new_view_instrument_match._view, ) @@ -279,9 +236,7 @@ def _handle_view_instrument_match( view_instrument_matches.append(new_view_instrument_match) @staticmethod - def _check_view_instrument_compatibility( - view: View, instrument: _Instrument - ) -> bool: + def _check_view_instrument_compatibility(view: View, instrument: _Instrument) -> bool: """ Checks if a view and an instrument are compatible. @@ -292,13 +247,9 @@ def _check_view_instrument_compatibility( result = True # pylint: disable=protected-access - if isinstance(instrument, Asynchronous) and isinstance( - view._aggregation, ExplicitBucketHistogramAggregation - ): + if isinstance(instrument, Asynchronous) and isinstance(view._aggregation, ExplicitBucketHistogramAggregation): _logger.warning( - "View %s and instrument %s will produce " - "semantic errors when matched, the view " - "has not been applied.", + "View %s and instrument %s will produce semantic errors when matched, the view has not been applied.", view, instrument, ) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/point.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/point.py index 4f7df8a5d0b..bb375fd7cf2 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/point.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/point.py @@ -90,17 +90,12 @@ class ExponentialHistogram: """ data_points: Sequence[ExponentialHistogramDataPoint] - aggregation_temporality: ( - "opentelemetry.sdk.metrics.export.AggregationTemporality" - ) + aggregation_temporality: "opentelemetry.sdk.metrics.export.AggregationTemporality" def to_json(self, indent: int | None = 4) -> str: return dumps( { - "data_points": [ - loads(data_point.to_json(indent=indent)) - for data_point in self.data_points - ], + "data_points": [loads(data_point.to_json(indent=indent)) for data_point in self.data_points], "aggregation_temporality": self.aggregation_temporality, }, indent=indent, @@ -113,18 +108,13 @@ class Sum: all reported measurements over a time interval.""" data_points: Sequence[NumberDataPoint] - aggregation_temporality: ( - "opentelemetry.sdk.metrics.export.AggregationTemporality" - ) + aggregation_temporality: "opentelemetry.sdk.metrics.export.AggregationTemporality" is_monotonic: bool def to_json(self, indent: int | None = 4) -> str: return dumps( { - "data_points": [ - loads(data_point.to_json(indent=indent)) - for data_point in self.data_points - ], + "data_points": [loads(data_point.to_json(indent=indent)) for data_point in self.data_points], "aggregation_temporality": self.aggregation_temporality, "is_monotonic": self.is_monotonic, }, @@ -143,10 +133,7 @@ class Gauge: def to_json(self, indent: int | None = 4) -> str: return dumps( { - "data_points": [ - loads(data_point.to_json(indent=indent)) - for data_point in self.data_points - ], + "data_points": [loads(data_point.to_json(indent=indent)) for data_point in self.data_points], }, indent=indent, ) @@ -158,17 +145,12 @@ class Histogram: histogram of all reported measurements over a time interval.""" data_points: Sequence[HistogramDataPoint] - aggregation_temporality: ( - "opentelemetry.sdk.metrics.export.AggregationTemporality" - ) + aggregation_temporality: "opentelemetry.sdk.metrics.export.AggregationTemporality" def to_json(self, indent: int | None = 4) -> str: return dumps( { - "data_points": [ - loads(data_point.to_json(indent=indent)) - for data_point in self.data_points - ], + "data_points": [loads(data_point.to_json(indent=indent)) for data_point in self.data_points], "aggregation_temporality": self.aggregation_temporality, }, indent=indent, @@ -177,9 +159,7 @@ def to_json(self, indent: int | None = 4) -> str: # pylint: disable=invalid-name DataT = Sum | Gauge | Histogram | ExponentialHistogram -DataPointT = ( - NumberDataPoint | HistogramDataPoint | ExponentialHistogramDataPoint -) +DataPointT = NumberDataPoint | HistogramDataPoint | ExponentialHistogramDataPoint @dataclass(frozen=True) @@ -216,10 +196,7 @@ def to_json(self, indent: int | None = 4) -> str: return dumps( { "scope": loads(self.scope.to_json(indent=indent)), - "metrics": [ - loads(metric.to_json(indent=indent)) - for metric in self.metrics - ], + "metrics": [loads(metric.to_json(indent=indent)) for metric in self.metrics], "schema_url": self.schema_url, }, indent=indent, @@ -238,10 +215,7 @@ def to_json(self, indent: int | None = 4) -> str: return dumps( { "resource": loads(self.resource.to_json(indent=indent)), - "scope_metrics": [ - loads(scope_metrics.to_json(indent=indent)) - for scope_metrics in self.scope_metrics - ], + "scope_metrics": [loads(scope_metrics.to_json(indent=indent)) for scope_metrics in self.scope_metrics], "schema_url": self.schema_url, }, indent=indent, @@ -258,8 +232,7 @@ def to_json(self, indent: int | None = 4) -> str: return dumps( { "resource_metrics": [ - loads(resource_metrics.to_json(indent=indent)) - for resource_metrics in self.resource_metrics + loads(resource_metrics.to_json(indent=indent)) for resource_metrics in self.resource_metrics ] }, indent=indent, diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py index 7eb1fcc728e..ea7131c73fc 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/view.py @@ -104,10 +104,7 @@ def __init__( description: str | None = None, attribute_keys: set[str] | None = None, aggregation: Aggregation | None = None, - exemplar_reservoir_factory: Callable[ - [type[_Aggregation]], ExemplarReservoirBuilder - ] - | None = None, + exemplar_reservoir_factory: Callable[[type[_Aggregation]], ExemplarReservoirBuilder] | None = None, instrument_unit: str | None = None, ): if ( @@ -120,21 +117,11 @@ def __init__( is None ): # pylint: disable=broad-exception-raised - raise Exception( - "Some instrument selection " - f"criteria must be provided for View {name}" - ) + raise Exception(f"Some instrument selection criteria must be provided for View {name}") - if ( - name is not None - and instrument_name is not None - and ("*" in instrument_name or "?" in instrument_name) - ): + if name is not None and instrument_name is not None and ("*" in instrument_name or "?" in instrument_name): # pylint: disable=broad-exception-raised - raise Exception( - f"View {name} declared with wildcard " - "characters in instrument_name" - ) + raise Exception(f"View {name} declared with wildcard characters in instrument_name") # _name, _description, _aggregation, _exemplar_reservoir_factory and # _attribute_keys will be accessed when instantiating a _ViewInstrumentMatch. @@ -149,9 +136,7 @@ def __init__( self._description = description self._attribute_keys = attribute_keys self._aggregation = aggregation or self._default_aggregation - self._exemplar_reservoir_factory = ( - exemplar_reservoir_factory or _default_reservoir_factory - ) + self._exemplar_reservoir_factory = exemplar_reservoir_factory or _default_reservoir_factory # pylint: disable=too-many-return-statements # pylint: disable=too-many-branches @@ -177,10 +162,7 @@ def _match(self, instrument: _Instrument) -> bool: return False if self._meter_schema_url is not None: - if ( - instrument.instrumentation_scope.schema_url - != self._meter_schema_url - ): + if instrument.instrumentation_scope.schema_url != self._meter_schema_url: return False return True diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py index f624736d56f..62f147c7db5 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/resources/__init__.py @@ -185,9 +185,9 @@ def create( if not attributes: attributes = {} - resource = get_aggregated_resources( - _build_resource_detectors(), _DEFAULT_RESOURCE - ).merge(Resource(attributes, schema_url)) + resource = get_aggregated_resources(_build_resource_detectors(), _DEFAULT_RESOURCE).merge( + Resource(attributes, schema_url) + ) if not resource.attributes.get(SERVICE_NAME, None): default_service_name = "unknown_service" @@ -197,9 +197,7 @@ def create( ) if process_executable_name: default_service_name += ":" + process_executable_name - resource = resource.merge( - Resource({SERVICE_NAME: default_service_name}, schema_url) - ) + resource = resource.merge(Resource({SERVICE_NAME: default_service_name}, schema_url)) return resource @staticmethod @@ -252,15 +250,10 @@ def merge(self, other: "Resource") -> "Resource": def __eq__(self, other: object) -> bool: if not isinstance(other, Resource): return False - return ( - self._attributes == other._attributes - and self._schema_url == other._schema_url - ) + return self._attributes == other._attributes and self._schema_url == other._schema_url def __hash__(self) -> int: - return hash( - f"{dumps(self._attributes.copy(), sort_keys=True)}|{self._schema_url}" - ) + return hash(f"{dumps(self._attributes.copy(), sort_keys=True)}|{self._schema_url}") def to_json(self, indent: int | None = 4) -> str: return dumps( @@ -368,8 +361,7 @@ def detect(self) -> "Resource": str, ( sys.version_info[:3] - if sys.version_info.releaselevel == "final" - and not sys.version_info.serial + if sys.version_info.releaselevel == "final" and not sys.version_info.serial else sys.version_info ), ) @@ -532,10 +524,7 @@ def detect(self) -> "Resource": global _service_instance_id, _service_instance_id_pid with _service_instance_id_lock: current_pid = os.getpid() - if ( - _service_instance_id is None - or _service_instance_id_pid != current_pid - ): + if _service_instance_id is None or _service_instance_id_pid != current_pid: _service_instance_id = str(uuid.uuid4()) _service_instance_id_pid = current_pid instance_id = _service_instance_id @@ -556,13 +545,7 @@ def _build_resource_detectors() -> list["ResourceDetector"]: """ detector_names: list[str] = list( dict.fromkeys( - [ - name.strip() - for name in environ.get( - OTEL_EXPERIMENTAL_RESOURCE_DETECTORS, "" - ).split(",") - if name.strip() - ] + [name.strip() for name in environ.get(OTEL_EXPERIMENTAL_RESOURCE_DETECTORS, "").split(",") if name.strip()] + ["service_instance", "otel"] ) ) @@ -579,16 +562,12 @@ def _build_resource_detectors() -> list["ResourceDetector"]: if "*" in detector_names: registered = set( name - for name in entry_points( - group="opentelemetry_resource_detector" - ).names # type: ignore[reportUnknownArgumentType] + for name in entry_points(group="opentelemetry_resource_detector").names # type: ignore[reportUnknownArgumentType] if name != "otel" ) expansion = sorted(registered - set(detector_names)) idx = detector_names.index("*") - detector_names = ( - detector_names[:idx] + expansion + detector_names[idx + 1 :] - ) + detector_names = detector_names[:idx] + expansion + detector_names[idx + 1 :] detectors: list[ResourceDetector] = [] for name in detector_names: @@ -613,11 +592,7 @@ def _build_resource_detectors() -> list["ResourceDetector"]: def _get_process_dependent_resource() -> Resource: # pyright: ignore[reportUnusedFunction] return get_aggregated_resources( - [ - detector - for detector in _build_resource_detectors() - if detector.is_process_dependent() - ], + [detector for detector in _build_resource_detectors() if detector.is_process_dependent()], Resource.get_empty(), ) @@ -655,12 +630,8 @@ def get_aggregated_resources( except Exception as ex: if detector.raise_on_error: raise ex - logger.warning( - "Exception %s in detector %s, ignoring", ex, detector - ) + logger.warning("Exception %s in detector %s, ignoring", ex, detector) finally: - detectors_merged_resource = detectors_merged_resource.merge( - detected_resource - ) + detectors_merged_resource = detectors_merged_resource.merge(detected_resource) return detectors_merged_resource diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py index fe800c3695a..53994894413 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py @@ -214,10 +214,7 @@ def force_flush(self, timeout_millis: int = 30000) -> bool: if current_time_ns >= deadline_ns: return False - if ( - sp.force_flush((deadline_ns - current_time_ns) // 1000000) - is False - ): + if sp.force_flush((deadline_ns - current_time_ns) // 1000000) is False: all_flushed = False return all_flushed @@ -257,9 +254,7 @@ def _after_in_child() -> None: os.register_at_fork(after_in_child=_after_in_child) def _init_executor(self, num_threads: int) -> None: - self._executor = concurrent.futures.ThreadPoolExecutor( - max_workers=num_threads - ) + self._executor = concurrent.futures.ThreadPoolExecutor(max_workers=num_threads) def add_span_processor(self, span_processor: SpanProcessor) -> None: """Adds a SpanProcessor to the list handled by this instance.""" @@ -284,9 +279,7 @@ def on_start( span: "Span", parent_context: context_api.Context | None = None, ) -> None: - self._submit_and_await( - lambda sp: sp.on_start, span, parent_context=parent_context - ) + self._submit_and_await(lambda sp: sp.on_start, span, parent_context=parent_context) def _on_ending(self, span: "Span") -> None: # pylint: disable=protected-access @@ -316,9 +309,7 @@ def force_flush(self, timeout_millis: int = 30000) -> bool: futures.append(future) timeout_sec = timeout_millis / 1e3 - done_futures, not_done_futures = concurrent.futures.wait( - futures, timeout_sec - ) + done_futures, not_done_futures = concurrent.futures.wait(futures, timeout_sec) if not_done_futures: return False @@ -399,9 +390,7 @@ def wrapper(self, *args, **kwargs): def _is_valid_link(context: SpanContext, attributes: types.Attributes) -> bool: - return bool( - context and (context.is_valid or (attributes or context.trace_state)) - ) + return bool(context and (context.is_valid or (attributes or context.trace_state))) class ReadableSpan: @@ -511,9 +500,7 @@ def resource(self) -> Resource: return self._resource @property - @deprecated( - "You should use instrumentation_scope. Deprecated since version 1.11.1." - ) + @deprecated("You should use instrumentation_scope. Deprecated since version 1.11.1.") def instrumentation_info(self) -> InstrumentationInfo | None: return self._instrumentation_info @@ -542,9 +529,7 @@ def to_json(self, indent: int | None = 4): f_span = { "name": self._name, - "context": ( - self._format_context(self._context) if self._context else None - ), + "context": (self._format_context(self._context) if self._context else None), "kind": str(self.kind), "parent_id": parent_id, "start_time": start_time, @@ -671,41 +656,25 @@ def __init__( ) # attribute count - global_max_attributes = self._from_env_if_absent( - max_attributes, OTEL_ATTRIBUTE_COUNT_LIMIT - ) + global_max_attributes = self._from_env_if_absent(max_attributes, OTEL_ATTRIBUTE_COUNT_LIMIT) self.max_attributes = ( - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT + global_max_attributes if global_max_attributes is not None else _DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT ) self.max_span_attributes = self._from_env_if_absent( max_span_attributes, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, - ( - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT - ), + (global_max_attributes if global_max_attributes is not None else _DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT), ) self.max_event_attributes = self._from_env_if_absent( max_event_attributes, OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT, - ( - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT - ), + (global_max_attributes if global_max_attributes is not None else _DEFAULT_OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT), ) self.max_link_attributes = self._from_env_if_absent( max_link_attributes, OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, - ( - global_max_attributes - if global_max_attributes is not None - else _DEFAULT_OTEL_LINK_ATTRIBUTE_COUNT_LIMIT - ), + (global_max_attributes if global_max_attributes is not None else _DEFAULT_OTEL_LINK_ATTRIBUTE_COUNT_LIMIT), ) # attribute length @@ -724,9 +693,7 @@ def __repr__(self): return f"{type(self).__name__}(max_span_attributes={self.max_span_attributes}, max_events_attributes={self.max_event_attributes}, max_link_attributes={self.max_link_attributes}, max_attributes={self.max_attributes}, max_events={self.max_events}, max_links={self.max_links}, max_attribute_length={self.max_attribute_length})" @classmethod - def _from_env_if_absent( - cls, value: int | None, env_var: str, default: int | None = None - ) -> int | None: + def _from_env_if_absent(cls, value: int | None, env_var: str, default: int | None = None) -> int | None: if value == cls.UNSET: return None @@ -886,9 +853,7 @@ def _new_links(self, links: Sequence[trace_api.Link]): def get_span_context(self) -> trace_api.SpanContext: return typing.cast(trace_api.SpanContext, self._context) - def set_attributes( - self, attributes: Mapping[str, types.AttributeValue] - ) -> None: + def set_attributes(self, attributes: Mapping[str, types.AttributeValue]) -> None: with self._lock: if self._end_time is not None: logger.warning("Setting attribute on ended span.") @@ -977,9 +942,7 @@ def start( if self._start_time is not None: logger.warning("Calling start() on a started span.") return - self._start_time = ( - start_time if start_time is not None else time_ns() - ) + self._start_time = start_time if start_time is not None else time_ns() self._span_processor.on_start(self, parent_context=parent_context) @@ -1016,11 +979,7 @@ def set_status( # Ignore future calls if status is already set to OK # Ignore calls to set to StatusCode.UNSET if isinstance(status, Status): - if ( - self._status - and self._status.status_code is StatusCode.OK - or status.status_code is StatusCode.UNSET - ): + if self._status and self._status.status_code is StatusCode.OK or status.status_code is StatusCode.UNSET: return if description is not None: logger.warning( @@ -1029,11 +988,7 @@ def set_status( ) self._status = status elif isinstance(status, StatusCode): - if ( - self._status - and self._status.status_code is StatusCode.OK - or status is StatusCode.UNSET - ): + if self._status and self._status.status_code is StatusCode.OK or status is StatusCode.UNSET: return self._status = Status(status, description) @@ -1072,11 +1027,7 @@ def record_exception( stacktrace = "".join(traceback.format_exception(exception)) module = type(exception).__module__ qualname = type(exception).__qualname__ - exception_type = ( - f"{module}.{qualname}" - if module and module != "builtins" - else qualname - ) + exception_type = f"{module}.{qualname}" if module and module != "builtins" else qualname _attributes: MutableMapping[str, types.AttributeValue] = { EXCEPTION_TYPE: exception_type, EXCEPTION_MESSAGE: str(exception), @@ -1085,9 +1036,7 @@ def record_exception( } if attributes: _attributes.update(attributes) - self.add_event( - name="exception", attributes=_attributes, timestamp=timestamp - ) + self.add_event(name="exception", attributes=_attributes, timestamp=timestamp) class _Span(Span): @@ -1114,8 +1063,7 @@ def __init__( self, sampler: sampling.Sampler, resource: Resource, - span_processor: SynchronousMultiSpanProcessor - | ConcurrentMultiSpanProcessor, + span_processor: SynchronousMultiSpanProcessor | ConcurrentMultiSpanProcessor, id_generator: IdGenerator, instrumentation_info: InstrumentationInfo, span_limits: SpanLimits, @@ -1136,9 +1084,7 @@ def __init__( meter_provider = meter_provider or metrics_api.get_meter_provider() self._tracer_metrics = create_tracer_metrics( meter_provider, - parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ) def _set_tracer_config(self, tracer_config: _TracerConfig): @@ -1194,16 +1140,10 @@ def start_span( # pylint: disable=too-many-locals set_status_on_exception: bool = True, ) -> trace_api.Span: links = links or () - parent_span_context = trace_api.get_current_span( - context - ).get_span_context() - - if parent_span_context is not None and not isinstance( - parent_span_context, trace_api.SpanContext - ): - raise TypeError( - "parent_span_context must be a SpanContext or None." - ) + parent_span_context = trace_api.get_current_span(context).get_span_context() + + if parent_span_context is not None and not isinstance(parent_span_context, trace_api.SpanContext): + raise TypeError("parent_span_context must be a SpanContext or None.") if not self._is_enabled(): return trace_api.NonRecordingSpan(context=parent_span_context) @@ -1221,9 +1161,7 @@ def start_span( # pylint: disable=too-many-locals # The sampler may also add attributes to the newly-created span, e.g. # to include information about the sampling result. # The sampler may also modify the parent span context's tracestate - sampling_result = self.sampler.should_sample( - context, trace_id, name, kind, attributes, links - ) + sampling_result = self.sampler.should_sample(context, trace_id, name, kind, attributes, links) trace_flags = ( trace_api.TraceFlags(trace_api.TraceFlags.SAMPLED) @@ -1237,9 +1175,7 @@ def start_span( # pylint: disable=too-many-locals random_trace_id = parent_span_context.trace_flags.random_trace_id if random_trace_id: - trace_flags = trace_api.TraceFlags( - trace_flags | trace_api.TraceFlags.RANDOM_TRACE_ID - ) + trace_flags = trace_api.TraceFlags(trace_flags | trace_api.TraceFlags.RANDOM_TRACE_ID) span_context = trace_api.SpanContext( trace_id, @@ -1249,9 +1185,7 @@ def start_span( # pylint: disable=too-many-locals trace_state=sampling_result.trace_state, ) - record_end_metrics = self._tracer_metrics.start_span( - parent_span_context, sampling_result.decision - ) + record_end_metrics = self._tracer_metrics.start_span(parent_span_context, sampling_result.decision) # Only record if is_recording() is true if sampling_result.decision.is_recording(): @@ -1314,18 +1248,14 @@ def __init__( sampler: sampling.Sampler | None = None, resource: Resource | None = None, shutdown_on_exit: bool = True, - active_span_processor: SynchronousMultiSpanProcessor - | ConcurrentMultiSpanProcessor - | None = None, + active_span_processor: SynchronousMultiSpanProcessor | ConcurrentMultiSpanProcessor | None = None, id_generator: IdGenerator | None = None, span_limits: SpanLimits | None = None, *, meter_provider: metrics_api.MeterProvider | None = None, _tracer_configurator: _TracerConfiguratorT | None = None, ) -> None: - self._active_span_processor = ( - active_span_processor or SynchronousMultiSpanProcessor() - ) + self._active_span_processor = active_span_processor or SynchronousMultiSpanProcessor() if id_generator is None: self.id_generator = RandomIdGenerator() else: @@ -1346,9 +1276,7 @@ def __init__( if shutdown_on_exit: self._atexit_handler = atexit.register(self.shutdown) - self._tracer_configurator = ( - _tracer_configurator or _default_tracer_configurator - ) + self._tracer_configurator = _tracer_configurator or _default_tracer_configurator self._tracers_lock = threading.Lock() self._tracers: dict[InstrumentationScope, Tracer] = {} if hasattr(os, "register_at_fork"): @@ -1364,9 +1292,7 @@ def _handle_fork(self) -> None: self._tracers_lock = threading.Lock() self._update_resource(_get_process_dependent_resource()) - def _set_tracer_configurator( - self, *, tracer_configurator: _TracerConfiguratorT - ): + def _set_tracer_configurator(self, *, tracer_configurator: _TracerConfiguratorT): """This is the function used to update the TracerProvider TracerConfigurator Setting a new TracerConfigurator for a TracerProvider will update the @@ -1375,9 +1301,7 @@ def _set_tracer_configurator( self._tracer_configurator = tracer_configurator with self._tracers_lock: for instrumentation_scope, tracer in self._tracers.items(): - tracer_config = self._apply_tracer_configurator( - instrumentation_scope - ) + tracer_config = self._apply_tracer_configurator(instrumentation_scope) # pylint: disable-next=protected-access tracer._set_tracer_config(tracer_config) @@ -1391,9 +1315,7 @@ def _update_resource(self, resource: Resource) -> None: for tracer in self._tracers.values(): tracer._set_resource(self._resource) # pylint: disable=protected-access - def _apply_tracer_configurator( - self, instrumentation_scope: InstrumentationScope - ): + def _apply_tracer_configurator(self, instrumentation_scope: InstrumentationScope): try: return self._tracer_configurator(instrumentation_scope) except Exception: # pylint: disable=broad-exception-caught @@ -1420,9 +1342,7 @@ def get_tracer( filterwarnings( "ignore", - message=( - r"You should use InstrumentationScope. Deprecated since version 1.11.1." - ), + message=(r"You should use InstrumentationScope. Deprecated since version 1.11.1."), category=DeprecationWarning, module="opentelemetry.sdk.trace", ) @@ -1444,9 +1364,7 @@ def get_tracer( if instrumentation_scope in self._tracers: return self._tracers[instrumentation_scope] - tracer_config = self._apply_tracer_configurator( - instrumentation_scope - ) + tracer_config = self._apply_tracer_configurator(instrumentation_scope) tracer = Tracer( self.sampler, self.resource, diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_composable.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_composable.py index 26515992844..6bedc8d9afa 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_composable.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_composable.py @@ -25,9 +25,7 @@ class SamplingIntent: attributes: Attributes = field(default=None) """Any attributes to be added to a sampled span.""" - update_trace_state: Callable[[TraceState], TraceState] = field( - default=lambda ts: ts - ) + update_trace_state: Callable[[TraceState], TraceState] = field(default=lambda ts: ts) """Any updates to be made to trace state.""" diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_parent_threshold.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_parent_threshold.py index 69e10f58ad9..88af9a5f677 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_parent_threshold.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_parent_threshold.py @@ -36,9 +36,7 @@ def sampling_intent( parent_span_ctx = parent_span.get_span_context() is_root = not parent_span_ctx.is_valid if is_root: - return self._root_sampler.sampling_intent( - parent_ctx, name, span_kind, attributes, links, trace_state - ) + return self._root_sampler.sampling_intent(parent_ctx, name, span_kind, attributes, links, trace_state) ot_trace_state = OtelTraceState.parse(trace_state) @@ -48,11 +46,7 @@ def sampling_intent( threshold_reliable=True, ) - threshold = ( - MIN_THRESHOLD - if parent_span_ctx.trace_flags.sampled - else INVALID_THRESHOLD - ) + threshold = MIN_THRESHOLD if parent_span_ctx.trace_flags.sampled else INVALID_THRESHOLD return SamplingIntent(threshold=threshold, threshold_reliable=False) def get_description(self) -> str: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py index d5fbdda41ca..8a0e814e633 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_rule_based.py @@ -39,9 +39,7 @@ class AttributePredicate: """An exact match of an attribute value""" def __init__(self, key: str, value: AnyValue): - logging.warning( - "This is deprecated, use AttributeValuesPredicate instead" - ) + logging.warning("This is deprecated, use AttributeValuesPredicate instead") self.key = key self.value = value @@ -123,10 +121,7 @@ def __call__( ) -> bool: if not attributes or self._key not in attributes: return False - return any( - str(value) in self._values - for value in _attribute_values(attributes[self._key]) - ) + return any(str(value) in self._values for value in _attribute_values(attributes[self._key])) def __str__(self) -> str: values = ",".join(sorted(self._values)) @@ -155,18 +150,11 @@ def __call__( ) -> bool: if not attributes or self._key not in attributes: return False - return any( - self._matches_value(str(value)) - for value in _attribute_values(attributes[self._key]) - ) + return any(self._matches_value(str(value)) for value in _attribute_values(attributes[self._key])) def _matches_value(self, value: str) -> bool: - included = not self._included or any( - fnmatchcase(value, pattern) for pattern in self._included - ) - excluded = any( - fnmatchcase(value, pattern) for pattern in self._excluded - ) + included = not self._included or any(fnmatchcase(value, pattern) for pattern in self._included) + excluded = any(fnmatchcase(value, pattern) for pattern in self._excluded) return included and not excluded def __str__(self) -> str: @@ -221,18 +209,14 @@ def __str__(self) -> str: def _attribute_values(value): - if isinstance(value, Sequence) and not isinstance( - value, (str, bytes, bytearray) - ): + if isinstance(value, Sequence) and not isinstance(value, (str, bytes, bytearray)): return value return (value,) RulesT = Sequence[tuple[PredicateT, ComposableSampler]] -_non_sampling_intent = SamplingIntent( - threshold=INVALID_THRESHOLD, threshold_reliable=False -) +_non_sampling_intent = SamplingIntent(threshold=INVALID_THRESHOLD, threshold_reliable=False) class _ComposableRuleBased(ComposableSampler): @@ -269,10 +253,7 @@ def sampling_intent( return _non_sampling_intent def get_description(self) -> str: - rules_str = ",".join( - f"({predicate}:{sampler.get_description()})" - for predicate, sampler in self._rules - ) + rules_str = ",".join(f"({predicate}:{sampler.get_description()})" for predicate, sampler in self._rules) return f"ComposableRuleBased{{[{rules_str}]}}" diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_sampler.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_sampler.py index 7a9ec416848..b15dcfb0d2c 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_sampler.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_sampler.py @@ -31,9 +31,7 @@ def should_sample( ) -> SamplingResult: ot_trace_state = OtelTraceState.parse(trace_state) - intent = self._delegate.sampling_intent( - parent_context, name, kind, attributes, links, trace_state - ) + intent = self._delegate.sampling_intent(parent_context, name, kind, attributes, links, trace_state) threshold = intent.threshold if is_valid_threshold(threshold): diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_trace_state.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_trace_state.py index ea0a4fb5694..8133454e4f5 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_trace_state.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_trace_state.py @@ -57,32 +57,21 @@ def parse(trace_state: TraceState | None) -> OtelTraceState: threshold = _parse_th(member[len("th:") :], INVALID_THRESHOLD) continue if member.startswith("rv:"): - random_value = _parse_rv( - member[len("rv:") :], INVALID_RANDOM_VALUE - ) + random_value = _parse_rv(member[len("rv:") :], INVALID_RANDOM_VALUE) continue if rest is None: rest = [member] else: rest.append(member) - return OtelTraceState( - random_value=random_value, threshold=threshold, rest=rest or () - ) + return OtelTraceState(random_value=random_value, threshold=threshold, rest=rest or ()) def serialize(self) -> str: - if ( - not is_valid_threshold(self.threshold) - and not is_valid_random_value(self.random_value) - and not self.rest - ): + if not is_valid_threshold(self.threshold) and not is_valid_random_value(self.random_value) and not self.rest: return "" parts: list[str] = [] - if ( - is_valid_threshold(self.threshold) - and self.threshold != MAX_THRESHOLD - ): + if is_valid_threshold(self.threshold) and self.threshold != MAX_THRESHOLD: parts.append(f"th:{serialize_th(self.threshold)}") if is_valid_random_value(self.random_value): parts.append(f"rv:{_serialize_rv(self.random_value)}") diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_traceid_ratio.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_traceid_ratio.py index 951d305d385..2a6488f9cbf 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_traceid_ratio.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_traceid_ratio.py @@ -27,9 +27,7 @@ def __init__(self, ratio: float): if threshold != MAX_THRESHOLD: intent = SamplingIntent(threshold=threshold) else: - intent = SamplingIntent( - threshold=INVALID_THRESHOLD, threshold_reliable=False - ) + intent = SamplingIntent(threshold=INVALID_THRESHOLD, threshold_reliable=False) self._intent = intent self._description = f"ComposableTraceIDRatioBased{{threshold={threshold_str}, ratio={ratio}}}" diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_util.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_util.py index 7a5598d445e..dc8c10ae40b 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_util.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/_sampling_experimental/_util.py @@ -12,9 +12,7 @@ def calculate_threshold(sampling_probability: float) -> int: - return MAX_THRESHOLD - round( - sampling_probability * _probability_threshold_scale - ) + return MAX_THRESHOLD - round(sampling_probability * _probability_threshold_scale) def is_valid_threshold(threshold: int) -> bool: diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py index ad8f57840a0..052ee8116bc 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py @@ -42,9 +42,7 @@ _DEFAULT_MAX_EXPORT_BATCH_SIZE = 512 _DEFAULT_EXPORT_TIMEOUT_MILLIS = 30000 _DEFAULT_MAX_QUEUE_SIZE = 2048 -_ENV_VAR_INT_VALUE_ERROR_MESSAGE = ( - "Unable to parse value for %s as integer. Defaulting to %s." -) +_ENV_VAR_INT_VALUE_ERROR_MESSAGE = "Unable to parse value for %s as integer. Defaulting to %s." logger = logging.getLogger(__name__) @@ -64,9 +62,7 @@ class SpanExporter: `SimpleSpanProcessor` or a `BatchSpanProcessor`. """ - def export( - self, spans: collections.abc.Sequence[ReadableSpan] - ) -> SpanExportResult: # pyright: ignore[reportReturnType] + def export(self, spans: collections.abc.Sequence[ReadableSpan]) -> SpanExportResult: # pyright: ignore[reportReturnType] """Exports a batch of telemetry data. Args: @@ -107,14 +103,10 @@ def __init__( "traces", OtelComponentTypeValues.SIMPLE_SPAN_PROCESSOR, meter_provider or get_meter_provider(), - enabled=parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + enabled=parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ) - def on_start( - self, span: Span, parent_context: Context | None = None - ) -> None: + def on_start(self, span: Span, parent_context: Context | None = None) -> None: pass def _on_ending(self, span: Span) -> None: @@ -174,24 +166,16 @@ def __init__( max_queue_size = BatchSpanProcessor._default_max_queue_size() if schedule_delay_millis is None: - schedule_delay_millis = ( - BatchSpanProcessor._default_schedule_delay_millis() - ) + schedule_delay_millis = BatchSpanProcessor._default_schedule_delay_millis() if max_export_batch_size is None: - max_export_batch_size = ( - BatchSpanProcessor._default_max_export_batch_size() - ) + max_export_batch_size = BatchSpanProcessor._default_max_export_batch_size() # Not used. No way currently to pass timeout to export. if export_timeout_millis is None: - export_timeout_millis = ( - BatchSpanProcessor._default_export_timeout_millis() - ) + export_timeout_millis = BatchSpanProcessor._default_export_timeout_millis() - BatchSpanProcessor._validate_arguments( - max_queue_size, schedule_delay_millis, max_export_batch_size - ) + BatchSpanProcessor._validate_arguments(max_queue_size, schedule_delay_millis, max_export_batch_size) self._batch_processor = BatchProcessor( span_exporter, @@ -205,9 +189,7 @@ def __init__( OtelComponentTypeValues.BATCHING_SPAN_PROCESSOR, meter_provider or get_meter_provider(), capacity=max_queue_size, - enabled=parse_boolean_environment_variable( - OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED - ), + enabled=parse_boolean_environment_variable(OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED), ), ) @@ -216,9 +198,7 @@ def __init__( def span_exporter(self): return self._batch_processor._exporter # pylint: disable=protected-access - def on_start( - self, span: Span, parent_context: Context | None = None - ) -> None: + def on_start(self, span: Span, parent_context: Context | None = None) -> None: pass def _on_ending(self, span: Span) -> None: @@ -238,9 +218,7 @@ def force_flush(self, timeout_millis: int | None = None) -> bool: @staticmethod def _default_max_queue_size(): try: - return int( - environ.get(OTEL_BSP_MAX_QUEUE_SIZE, _DEFAULT_MAX_QUEUE_SIZE) - ) + return int(environ.get(OTEL_BSP_MAX_QUEUE_SIZE, _DEFAULT_MAX_QUEUE_SIZE)) except ValueError: logger.exception( _ENV_VAR_INT_VALUE_ERROR_MESSAGE, @@ -252,11 +230,7 @@ def _default_max_queue_size(): @staticmethod def _default_schedule_delay_millis(): try: - return int( - environ.get( - OTEL_BSP_SCHEDULE_DELAY, _DEFAULT_SCHEDULE_DELAY_MILLIS - ) - ) + return int(environ.get(OTEL_BSP_SCHEDULE_DELAY, _DEFAULT_SCHEDULE_DELAY_MILLIS)) except ValueError: logger.exception( _ENV_VAR_INT_VALUE_ERROR_MESSAGE, @@ -285,11 +259,7 @@ def _default_max_export_batch_size(): @staticmethod def _default_export_timeout_millis(): try: - return int( - environ.get( - OTEL_BSP_EXPORT_TIMEOUT, _DEFAULT_EXPORT_TIMEOUT_MILLIS - ) - ) + return int(environ.get(OTEL_BSP_EXPORT_TIMEOUT, _DEFAULT_EXPORT_TIMEOUT_MILLIS)) except ValueError: logger.exception( _ENV_VAR_INT_VALUE_ERROR_MESSAGE, @@ -299,9 +269,7 @@ def _default_export_timeout_millis(): return _DEFAULT_EXPORT_TIMEOUT_MILLIS @staticmethod - def _validate_arguments( - max_queue_size, schedule_delay_millis, max_export_batch_size - ): + def _validate_arguments(max_queue_size, schedule_delay_millis, max_export_batch_size): if max_queue_size <= 0: raise ValueError("max_queue_size must be a positive integer.") @@ -309,14 +277,10 @@ def _validate_arguments( raise ValueError("schedule_delay_millis must be positive.") if max_export_batch_size <= 0: - raise ValueError( - "max_export_batch_size must be a positive integer." - ) + raise ValueError("max_export_batch_size must be a positive integer.") if max_export_batch_size > max_queue_size: - raise ValueError( - "max_export_batch_size must be less than or equal to max_queue_size." - ) + raise ValueError("max_export_batch_size must be less than or equal to max_queue_size.") class ConsoleSpanExporter(SpanExporter): @@ -331,17 +295,13 @@ def __init__( self, service_name: str | None = None, out: typing.IO = sys.stdout, - formatter: collections.abc.Callable[ - [ReadableSpan], str - ] = lambda span: span.to_json() + linesep, + formatter: collections.abc.Callable[[ReadableSpan], str] = lambda span: span.to_json() + linesep, ): self.out = out self.formatter = formatter self.service_name = service_name - def export( - self, spans: collections.abc.Sequence[ReadableSpan] - ) -> SpanExportResult: + def export(self, spans: collections.abc.Sequence[ReadableSpan]) -> SpanExportResult: for span in spans: self.out.write(self.formatter(span)) self.out.flush() diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/in_memory_span_exporter.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/in_memory_span_exporter.py index c4f4ea49d27..dbe0da104d2 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/in_memory_span_exporter.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/export/in_memory_span_exporter.py @@ -37,9 +37,7 @@ def get_finished_spans(self) -> tuple[ReadableSpan, ...]: with self._lock: return tuple(self._finished_spans) - def export( - self, spans: collections.abc.Sequence[ReadableSpan] - ) -> SpanExportResult: + def export(self, spans: collections.abc.Sequence[ReadableSpan]) -> SpanExportResult: """Stores a list of spans in memory.""" if self._stopped: return SpanExportResult.FAILURE diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py b/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py index a16c9d4bfbc..0cb48acc4a1 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/trace/sampling.py @@ -338,9 +338,7 @@ def should_sample( links: Sequence[Link] | None = None, trace_state: TraceState | None = None, ) -> SamplingResult: - parent_span_context = get_current_span( - parent_context - ).get_span_context() + parent_span_context = get_current_span(parent_context).get_span_context() # default to the root sampler sampler = self._root # respect the sampling and remote flag of the parent if present @@ -418,9 +416,7 @@ def __init__(self, _): def _get_from_env_or_default() -> Sampler: - trace_sampler = os.getenv( - OTEL_TRACES_SAMPLER, "parentbased_always_on" - ).lower() + trace_sampler = os.getenv(OTEL_TRACES_SAMPLER, "parentbased_always_on").lower() if trace_sampler not in _KNOWN_SAMPLERS: _logger.warning("Couldn't recognize sampler %s.", trace_sampler) trace_sampler = "parentbased_always_on" diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py index 3410f1cba8c..d689f4dc5f3 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.py @@ -12,9 +12,7 @@ def ns_to_iso_str(nanoseconds): """Get an ISO 8601 string from time_ns value.""" - ts = datetime.datetime.fromtimestamp( - nanoseconds / 1e9, tz=datetime.timezone.utc - ) + ts = datetime.datetime.fromtimestamp(nanoseconds / 1e9, tz=datetime.timezone.utc) return ts.strftime("%Y-%m-%dT%H:%M:%S.%fZ") @@ -23,9 +21,7 @@ def get_dict_as_key(labels): return tuple( sorted( map( - lambda kv: ( - (kv[0], tuple(kv[1])) if isinstance(kv[1], list) else kv - ), + lambda kv: (kv[0], tuple(kv[1])) if isinstance(kv[1], list) else kv, labels.items(), ) ) @@ -67,10 +63,7 @@ def __iter__(self): def append(self, item): with self._lock: - if ( - self._dq.maxlen is not None - and len(self._dq) == self._dq.maxlen - ): + if self._dq.maxlen is not None and len(self._dq) == self._dq.maxlen: self.dropped += 1 self._dq.append(item) @@ -110,9 +103,7 @@ def __init__(self, maxlen: int | None): self._lock = threading.Lock() # type: threading.Lock def __repr__(self): - return ( - f"{type(self).__name__}({dict(self._dict)}, maxlen={self.maxlen})" - ) + return f"{type(self).__name__}({dict(self._dict)}, maxlen={self.maxlen})" def __getitem__(self, key): return self._dict[key] diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.pyi b/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.pyi index 53d372afba0..d2add7c7ed1 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.pyi +++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.pyi @@ -56,9 +56,7 @@ class BoundedList(Sequence[_T]): def append(self, item: _T) -> None: ... def extend(self, seq: Sequence[_T]) -> None: ... @classmethod - def from_seq( - cls, maxlen: int | None, seq: Iterable[_T] - ) -> BoundedList[_T]: ... # pylint: disable=undefined-variable + def from_seq(cls, maxlen: int | None, seq: Iterable[_T]) -> BoundedList[_T]: ... # pylint: disable=undefined-variable class BoundedDict(MutableMapping[_KT, _VT]): """An ordered dict with a fixed max capacity. @@ -75,6 +73,4 @@ class BoundedDict(MutableMapping[_KT, _VT]): def __iter__(self) -> Iterator[_KT]: ... def __len__(self) -> int: ... @classmethod - def from_map( - cls, maxlen: int, mapping: Mapping[_KT, _VT] - ) -> BoundedDict[_KT, _VT]: ... # pylint: disable=undefined-variable + def from_map(cls, maxlen: int, mapping: Mapping[_KT, _VT]) -> BoundedDict[_KT, _VT]: ... # pylint: disable=undefined-variable diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py index a6a00cbfcbf..853b6a46bd5 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/util/instrumentation.py @@ -23,9 +23,7 @@ class InstrumentationInfo: __slots__ = ("_name", "_version", "_schema_url") - @deprecated( - "You should use InstrumentationScope. Deprecated since version 1.11.1." - ) + @deprecated("You should use InstrumentationScope. Deprecated since version 1.11.1.") def __init__( self, name: str, @@ -160,9 +158,7 @@ def to_json(self, indent: int | None = 4) -> str: "name": self._name, "version": self._version, "schema_url": self._schema_url, - "attributes": ( - dict(self._attributes) if bool(self._attributes) else None - ), + "attributes": (dict(self._attributes) if bool(self._attributes) else None), }, indent=indent, ) diff --git a/opentelemetry-sdk/tests/_configuration/test_configurator_file_routing.py b/opentelemetry-sdk/tests/_configuration/test_configurator_file_routing.py index 399b72495bd..bddde2a1bf2 100644 --- a/opentelemetry-sdk/tests/_configuration/test_configurator_file_routing.py +++ b/opentelemetry-sdk/tests/_configuration/test_configurator_file_routing.py @@ -42,15 +42,11 @@ def tearDown(self): @patch("opentelemetry.sdk._configuration._initialize_components") def test_env_var_unset_runs_env_var_path(self, mock_init_components): _OTelSDKConfigurator()._configure(auto_instrumentation_version="X") - mock_init_components.assert_called_once_with( - auto_instrumentation_version="X" - ) + mock_init_components.assert_called_once_with(auto_instrumentation_version="X") @patch.dict("os.environ", {OTEL_CONFIG_FILE: "/tmp/otel.yaml"}) @patch("opentelemetry.sdk._configuration._initialize_components") - def test_env_var_set_routes_to_declarative_path( - self, mock_init_components - ): + def test_env_var_set_routes_to_declarative_path(self, mock_init_components): fake = _FakeConfigurationModule() sentinel_config = object() fake.load_config_file.return_value = sentinel_config @@ -63,13 +59,9 @@ def test_env_var_set_routes_to_declarative_path( mock_init_components.assert_not_called() @patch.dict("os.environ", {OTEL_CONFIG_FILE: "/tmp/otel.yaml"}) - @patch.dict( - "sys.modules", {"opentelemetry.configuration": None}, clear=False - ) + @patch.dict("sys.modules", {"opentelemetry.configuration": None}, clear=False) @patch("opentelemetry.sdk._configuration._initialize_components") - def test_env_var_set_but_package_missing_raises( - self, mock_init_components - ): + def test_env_var_set_but_package_missing_raises(self, mock_init_components): # When opentelemetry-configuration is not installed but the env # var is set, surface a clear RuntimeError instead of a bare # ImportError so users know which package to install. @@ -84,18 +76,11 @@ def test_env_var_set_with_kwargs_warns_and_ignores(self): fake.load_config_file.return_value = object() with patch.dict("sys.modules", {"opentelemetry.configuration": fake}): - with self.assertLogs( - "opentelemetry.sdk._configuration", level="WARNING" - ) as captured: - _OTelSDKConfigurator()._configure( - sampler="X", auto_instrumentation_version="Y" - ) + with self.assertLogs("opentelemetry.sdk._configuration", level="WARNING") as captured: + _OTelSDKConfigurator()._configure(sampler="X", auto_instrumentation_version="Y") self.assertTrue( - any( - "OTEL_CONFIG_FILE" in msg and "sampler" in msg - for msg in captured.output - ), + any("OTEL_CONFIG_FILE" in msg and "sampler" in msg for msg in captured.output), f"Expected warning about ignored kwargs, got: {captured.output}", ) fake.configure_sdk.assert_called_once() @@ -110,6 +95,4 @@ def _configure(self, **kwargs): CustomConfigurator()._configure(auto_instrumentation_version="V") - mock_init_components.assert_called_once_with( - auto_instrumentation_version="V", sampler="TEST_SAMPLER" - ) + mock_init_components.assert_called_once_with(auto_instrumentation_version="V", sampler="TEST_SAMPLER") diff --git a/opentelemetry-sdk/tests/context/test_asyncio.py b/opentelemetry-sdk/tests/context/test_asyncio.py index 778533ec5d3..e0689f1e085 100644 --- a/opentelemetry-sdk/tests/context/test_asyncio.py +++ b/opentelemetry-sdk/tests/context/test_asyncio.py @@ -56,9 +56,7 @@ def tearDown(self): context.detach(self.token) self.loop.close() - @patch( - "opentelemetry.context._RUNTIME_CONTEXT", ContextVarsRuntimeContext() - ) + @patch("opentelemetry.context._RUNTIME_CONTEXT", ContextVarsRuntimeContext()) def test_with_asyncio(self): with self.tracer.start_as_current_span("asyncio_test"): for name in _SPAN_NAMES: @@ -84,9 +82,7 @@ def test_with_asyncio(self): span_names_list.sort() expected.sort() self.assertListEqual(span_names_list, expected) - expected_parent = next( - span for span in span_list if span.name == "asyncio_test" - ) + expected_parent = next(span for span in span_list if span.name == "asyncio_test") for span in span_list: if span is expected_parent: continue diff --git a/opentelemetry-sdk/tests/error_handler/test_error_handler.py b/opentelemetry-sdk/tests/error_handler/test_error_handler.py index f64757b104a..c2247b0678e 100644 --- a/opentelemetry-sdk/tests/error_handler/test_error_handler.py +++ b/opentelemetry-sdk/tests/error_handler/test_error_handler.py @@ -33,13 +33,9 @@ class AssertionErrorHandler(ErrorHandler, AssertionError): _handle = Mock() mock_entry_point_zero_division_error_handler = Mock() - mock_entry_point_zero_division_error_handler.configure_mock( - **{"load.return_value": ZeroDivisionErrorHandler} - ) + mock_entry_point_zero_division_error_handler.configure_mock(**{"load.return_value": ZeroDivisionErrorHandler}) mock_entry_point_assertion_error_handler = Mock() - mock_entry_point_assertion_error_handler.configure_mock( - **{"load.return_value": AssertionErrorHandler} - ) + mock_entry_point_assertion_error_handler.configure_mock(**{"load.return_value": AssertionErrorHandler}) mock_entry_points.configure_mock( return_value=[ @@ -72,13 +68,9 @@ def _handle(self, error: Exception): assert False mock_entry_point_error_error_handler = Mock() - mock_entry_point_error_error_handler.configure_mock( - **{"load.return_value": ErrorErrorHandler} - ) + mock_entry_point_error_error_handler.configure_mock(**{"load.return_value": ErrorErrorHandler}) - mock_entry_points.configure_mock( - return_value=[mock_entry_point_error_error_handler] - ) + mock_entry_points.configure_mock(return_value=[mock_entry_point_error_error_handler]) error = ZeroDivisionError() @@ -95,13 +87,9 @@ def __new__(cls): return mock_error_handler_instance mock_entry_point_error_handler = Mock() - mock_entry_point_error_handler.configure_mock( - **{"load.return_value": MockErrorHandlerClass} - ) + mock_entry_point_error_handler.configure_mock(**{"load.return_value": MockErrorHandlerClass}) - mock_entry_points.configure_mock( - return_value=[mock_entry_point_error_handler] - ) + mock_entry_points.configure_mock(return_value=[mock_entry_point_error_handler]) error = IndexError() diff --git a/opentelemetry-sdk/tests/logs/scripts/logger_provider_resource_after_fork.py b/opentelemetry-sdk/tests/logs/scripts/logger_provider_resource_after_fork.py index 2ff16b6b1d9..68cd4d80e2c 100644 --- a/opentelemetry-sdk/tests/logs/scripts/logger_provider_resource_after_fork.py +++ b/opentelemetry-sdk/tests/logs/scripts/logger_provider_resource_after_fork.py @@ -17,9 +17,7 @@ def main() -> None: exporter = InMemoryLogRecordExporter() logger_provider = LoggerProvider(shutdown_on_exit=False) - logger_provider.add_log_record_processor( - SimpleLogRecordProcessor(exporter) - ) + logger_provider.add_log_record_processor(SimpleLogRecordProcessor(exporter)) logger = logger_provider.get_logger("cached") parent_pid = os.getpid() parent_resource_pid = logger_provider.resource.attributes[PROCESS_PID] @@ -36,22 +34,11 @@ def main() -> None: json.dumps( { "child_pid": child_pid, - "provider_pid": logger_provider.resource.attributes[ - PROCESS_PID - ], - "cached_logger_pid": logger.resource.attributes[ - PROCESS_PID - ], - "new_logger_pid": new_logger.resource.attributes[ - PROCESS_PID - ], - "exported_resource_pids": [ - log.resource.attributes[PROCESS_PID] - for log in finished_logs - ], - "log_bodies": sorted( - log.log_record.body for log in finished_logs - ), + "provider_pid": logger_provider.resource.attributes[PROCESS_PID], + "cached_logger_pid": logger.resource.attributes[PROCESS_PID], + "new_logger_pid": new_logger.resource.attributes[PROCESS_PID], + "exported_resource_pids": [log.resource.attributes[PROCESS_PID] for log in finished_logs], + "log_bodies": sorted(log.log_record.body for log in finished_logs), } ), flush=True, @@ -66,12 +53,8 @@ def main() -> None: "parent_pid": parent_pid, "parent_resource_pid": parent_resource_pid, "parent_logger_pid": parent_logger_pid, - "parent_resource_pid_after_fork": logger_provider.resource.attributes[ - PROCESS_PID - ], - "parent_logger_pid_after_fork": logger.resource.attributes[ - PROCESS_PID - ], + "parent_resource_pid_after_fork": logger_provider.resource.attributes[PROCESS_PID], + "parent_logger_pid_after_fork": logger.resource.attributes[PROCESS_PID], } ), flush=True, diff --git a/opentelemetry-sdk/tests/logs/test_export.py b/opentelemetry-sdk/tests/logs/test_export.py index 5d8b4328cea..6d80182f9b0 100644 --- a/opentelemetry-sdk/tests/logs/test_export.py +++ b/opentelemetry-sdk/tests/logs/test_export.py @@ -79,28 +79,19 @@ def export(self, batch: Sequence[ReadableLogRecord]): exporter = Exporter() logger_provider = LoggerProvider() - logger_provider.add_log_record_processor( - SimpleLogRecordProcessor(exporter) - ) + logger_provider.add_log_record_processor(SimpleLogRecordProcessor(exporter)) root_logger = logging.getLogger() # Add the OTLP handler to the root logger like is done in auto instrumentation. # This causes logs generated from within SimpleLogRecordProcessor.on_emit (such as the above log in export) # to be sent back to SimpleLogRecordProcessor.on_emit - handler = LoggingHandler( - level=logging.DEBUG, logger_provider=logger_provider - ) + handler = LoggingHandler(level=logging.DEBUG, logger_provider=logger_provider) root_logger.addHandler(handler) - propagate_false_logger = logging.getLogger( - "opentelemetry.sdk._logs._internal.export.propagate.false" - ) + propagate_false_logger = logging.getLogger("opentelemetry.sdk._logs._internal.export.propagate.false") # This would cause a max recursion depth exceeded error.. try: with self.assertLogs(propagate_false_logger) as cm: root_logger.warning("hello!") - assert ( - "SimpleLogRecordProcessor.on_emit has entered a recursive loop" - in cm.output[0] - ) + assert "SimpleLogRecordProcessor.on_emit has entered a recursive loop" in cm.output[0] finally: root_logger.removeHandler(handler) @@ -108,9 +99,7 @@ def test_simple_log_record_processor_default_level(self): exporter = InMemoryLogRecordExporter() logger_provider = LoggerProvider() - logger_provider.add_log_record_processor( - SimpleLogRecordProcessor(exporter) - ) + logger_provider.add_log_record_processor(SimpleLogRecordProcessor(exporter)) logger = logging.getLogger("default_level") logger.propagate = False @@ -120,24 +109,16 @@ def test_simple_log_record_processor_default_level(self): finished_logs = exporter.get_finished_logs() self.assertEqual(len(finished_logs), 1) warning_log_record = finished_logs[0] - self.assertEqual( - warning_log_record.log_record.body, "Something is wrong" - ) + self.assertEqual(warning_log_record.log_record.body, "Something is wrong") self.assertEqual(warning_log_record.log_record.severity_text, "WARN") - self.assertEqual( - warning_log_record.log_record.severity_number, SeverityNumber.WARN - ) - self.assertEqual( - finished_logs[0].instrumentation_scope.name, "default_level" - ) + self.assertEqual(warning_log_record.log_record.severity_number, SeverityNumber.WARN) + self.assertEqual(finished_logs[0].instrumentation_scope.name, "default_level") def test_simple_log_record_processor_custom_level(self): exporter = InMemoryLogRecordExporter() logger_provider = LoggerProvider() - logger_provider.add_log_record_processor( - SimpleLogRecordProcessor(exporter) - ) + logger_provider.add_log_record_processor(SimpleLogRecordProcessor(exporter)) logger = logging.getLogger("custom_level") logger.propagate = False @@ -161,23 +142,15 @@ def test_simple_log_record_processor_custom_level(self): ) self.assertEqual(fatal_log_record.log_record.body, "Critical message") self.assertEqual(fatal_log_record.log_record.severity_text, "FATAL") - self.assertEqual( - fatal_log_record.log_record.severity_number, SeverityNumber.FATAL - ) - self.assertEqual( - finished_logs[0].instrumentation_scope.name, "custom_level" - ) - self.assertEqual( - finished_logs[1].instrumentation_scope.name, "custom_level" - ) + self.assertEqual(fatal_log_record.log_record.severity_number, SeverityNumber.FATAL) + self.assertEqual(finished_logs[0].instrumentation_scope.name, "custom_level") + self.assertEqual(finished_logs[1].instrumentation_scope.name, "custom_level") def test_simple_log_record_processor_trace_correlation(self): exporter = InMemoryLogRecordExporter() logger_provider = LoggerProvider() - logger_provider.add_log_record_processor( - SimpleLogRecordProcessor(exporter) - ) + logger_provider.add_log_record_processor(SimpleLogRecordProcessor(exporter)) logger = logging.getLogger("trace_correlation") logger.propagate = False @@ -189,21 +162,11 @@ def test_simple_log_record_processor_trace_correlation(self): sdk_record = finished_logs[0] self.assertEqual(sdk_record.log_record.body, "Warning message") self.assertEqual(sdk_record.log_record.severity_text, "WARN") - self.assertEqual( - sdk_record.log_record.severity_number, SeverityNumber.WARN - ) - self.assertEqual( - sdk_record.log_record.trace_id, INVALID_SPAN_CONTEXT.trace_id - ) - self.assertEqual( - sdk_record.log_record.span_id, INVALID_SPAN_CONTEXT.span_id - ) - self.assertEqual( - sdk_record.log_record.trace_flags, INVALID_SPAN_CONTEXT.trace_flags - ) - self.assertEqual( - finished_logs[0].instrumentation_scope.name, "trace_correlation" - ) + self.assertEqual(sdk_record.log_record.severity_number, SeverityNumber.WARN) + self.assertEqual(sdk_record.log_record.trace_id, INVALID_SPAN_CONTEXT.trace_id) + self.assertEqual(sdk_record.log_record.span_id, INVALID_SPAN_CONTEXT.span_id) + self.assertEqual(sdk_record.log_record.trace_flags, INVALID_SPAN_CONTEXT.trace_flags) + self.assertEqual(finished_logs[0].instrumentation_scope.name, "trace_correlation") exporter.clear() tracer = trace.TracerProvider().get_tracer(__name__) @@ -212,35 +175,23 @@ def test_simple_log_record_processor_trace_correlation(self): finished_logs = exporter.get_finished_logs() sdk_record = finished_logs[0] - self.assertEqual( - sdk_record.log_record.body, "Critical message within span" - ) + self.assertEqual(sdk_record.log_record.body, "Critical message within span") self.assertEqual(sdk_record.log_record.severity_text, "FATAL") - self.assertEqual( - sdk_record.log_record.severity_number, SeverityNumber.FATAL - ) + self.assertEqual(sdk_record.log_record.severity_number, SeverityNumber.FATAL) self.assertEqual( finished_logs[0].instrumentation_scope.name, "trace_correlation", ) span_context = span.get_span_context() - self.assertEqual( - sdk_record.log_record.trace_id, span_context.trace_id - ) - self.assertEqual( - sdk_record.log_record.span_id, span_context.span_id - ) - self.assertEqual( - sdk_record.log_record.trace_flags, span_context.trace_flags - ) + self.assertEqual(sdk_record.log_record.trace_id, span_context.trace_id) + self.assertEqual(sdk_record.log_record.span_id, span_context.span_id) + self.assertEqual(sdk_record.log_record.trace_flags, span_context.trace_flags) def test_simple_log_record_processor_shutdown(self): exporter = InMemoryLogRecordExporter() logger_provider = LoggerProvider() - logger_provider.add_log_record_processor( - SimpleLogRecordProcessor(exporter) - ) + logger_provider.add_log_record_processor(SimpleLogRecordProcessor(exporter)) logger = logging.getLogger("shutdown") logger.propagate = False @@ -250,16 +201,10 @@ def test_simple_log_record_processor_shutdown(self): finished_logs = exporter.get_finished_logs() self.assertEqual(len(finished_logs), 1) warning_log_record = finished_logs[0] - self.assertEqual( - warning_log_record.log_record.body, "Something is wrong" - ) + self.assertEqual(warning_log_record.log_record.body, "Something is wrong") self.assertEqual(warning_log_record.log_record.severity_text, "WARN") - self.assertEqual( - warning_log_record.log_record.severity_number, SeverityNumber.WARN - ) - self.assertEqual( - finished_logs[0].instrumentation_scope.name, "shutdown" - ) + self.assertEqual(warning_log_record.log_record.severity_number, SeverityNumber.WARN) + self.assertEqual(finished_logs[0].instrumentation_scope.name, "shutdown") exporter.clear() logger_provider.shutdown() logger.warning("Log after shutdown") @@ -294,15 +239,10 @@ def test_simple_log_record_processor_different_msg_types(self): (["list", "of", "strings"], "WARN"), ({"key": "value"}, "ERROR"), ] - emitted = [ - (item.log_record.body, item.log_record.severity_text) - for item in finished_logs - ] + emitted = [(item.log_record.body, item.log_record.severity_text) for item in finished_logs] self.assertEqual(expected, emitted) for item in finished_logs: - self.assertEqual( - item.instrumentation_scope.name, "different_msg_types" - ) + self.assertEqual(item.instrumentation_scope.name, "different_msg_types") def test_simple_log_record_processor_custom_single_obj(self): """ @@ -361,9 +301,7 @@ def test_simple_log_record_processor_different_msg_types_with_formatter( logger = logging.getLogger("different_msg_types") handler = LoggingHandler(logger_provider=provider) - handler.setFormatter( - logging.Formatter("%(name)s - %(levelname)s - %(message)s") - ) + handler.setFormatter(logging.Formatter("%(name)s - %(levelname)s - %(message)s")) logger.addHandler(handler) logger.warning("warning message: %s", "possible upcoming heatwave") @@ -393,15 +331,10 @@ def test_simple_log_record_processor_different_msg_types_with_formatter( ), ("different_msg_types - ERROR - {'key': 'value'}", "ERROR"), ] - emitted = [ - (item.log_record.body, item.log_record.severity_text) - for item in finished_logs - ] + emitted = [(item.log_record.body, item.log_record.severity_text) for item in finished_logs] self.assertEqual(expected, emitted) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_metrics(self): # pylint: disable=too-many-locals metric_reader = InMemoryMetricReader() meter_provider = MeterProvider(metric_readers=[metric_reader]) @@ -416,9 +349,7 @@ def export_logs(_logs): exporter = mock.MagicMock() exporter.export.side_effect = export_logs - processor = SimpleLogRecordProcessor( - exporter, meter_provider=meter_provider - ) + processor = SimpleLogRecordProcessor(exporter, meter_provider=meter_provider) provider = LoggerProvider() provider.add_log_record_processor(processor) logger = provider.get_logger("test_simple_metrics") @@ -444,11 +375,7 @@ def export_logs(_logs): processed_data_point0.attributes["otel.component.type"], "simple_log_processor", ) - self.assertTrue( - processed_data_point0.attributes["otel.component.name"].startswith( - "simple_log_processor/" - ) - ) + self.assertTrue(processed_data_point0.attributes["otel.component.name"].startswith("simple_log_processor/")) self.assertIsNone(processed_data_point0.attributes.get("error.type")) processed_data_point1 = processed_data_points[1] self.assertEqual(processed_data_point1.value, 1) @@ -456,14 +383,8 @@ def export_logs(_logs): processed_data_point1.attributes["otel.component.type"], "simple_log_processor", ) - self.assertTrue( - processed_data_point1.attributes["otel.component.name"].startswith( - "simple_log_processor/" - ) - ) - self.assertEqual( - processed_data_point1.attributes["error.type"], "RuntimeError" - ) + self.assertTrue(processed_data_point1.attributes["otel.component.name"].startswith("simple_log_processor/")) + self.assertEqual(processed_data_point1.attributes["error.type"], "RuntimeError") # Many more test cases for the BatchLogRecordProcessor exist under @@ -522,21 +443,11 @@ def test_args(self): max_export_batch_size=256, export_timeout_millis=15000, ) - self.assertEqual( - log_record_processor._batch_processor._exporter, exporter - ) - self.assertEqual( - log_record_processor._batch_processor._max_queue_size, 1024 - ) - self.assertEqual( - log_record_processor._batch_processor._schedule_delay, 2.5 - ) - self.assertEqual( - log_record_processor._batch_processor._max_export_batch_size, 256 - ) - self.assertEqual( - log_record_processor._batch_processor._export_timeout_millis, 15000 - ) + self.assertEqual(log_record_processor._batch_processor._exporter, exporter) + self.assertEqual(log_record_processor._batch_processor._max_queue_size, 1024) + self.assertEqual(log_record_processor._batch_processor._schedule_delay, 2.5) + self.assertEqual(log_record_processor._batch_processor._max_export_batch_size, 256) + self.assertEqual(log_record_processor._batch_processor._export_timeout_millis, 15000) log_record_processor.shutdown() @patch.dict( @@ -551,41 +462,21 @@ def test_args(self): def test_env_vars(self): exporter = InMemoryLogRecordExporter() log_record_processor = BatchLogRecordProcessor(exporter) - self.assertEqual( - log_record_processor._batch_processor._exporter, exporter - ) - self.assertEqual( - log_record_processor._batch_processor._max_queue_size, 1024 - ) - self.assertEqual( - log_record_processor._batch_processor._schedule_delay, 2.5 - ) - self.assertEqual( - log_record_processor._batch_processor._max_export_batch_size, 256 - ) - self.assertEqual( - log_record_processor._batch_processor._export_timeout_millis, 15000 - ) + self.assertEqual(log_record_processor._batch_processor._exporter, exporter) + self.assertEqual(log_record_processor._batch_processor._max_queue_size, 1024) + self.assertEqual(log_record_processor._batch_processor._schedule_delay, 2.5) + self.assertEqual(log_record_processor._batch_processor._max_export_batch_size, 256) + self.assertEqual(log_record_processor._batch_processor._export_timeout_millis, 15000) log_record_processor.shutdown() def test_args_defaults(self): exporter = InMemoryLogRecordExporter() log_record_processor = BatchLogRecordProcessor(exporter) - self.assertEqual( - log_record_processor._batch_processor._exporter, exporter - ) - self.assertEqual( - log_record_processor._batch_processor._max_queue_size, 2048 - ) - self.assertEqual( - log_record_processor._batch_processor._schedule_delay, 1 - ) - self.assertEqual( - log_record_processor._batch_processor._max_export_batch_size, 512 - ) - self.assertEqual( - log_record_processor._batch_processor._export_timeout_millis, 30000 - ) + self.assertEqual(log_record_processor._batch_processor._exporter, exporter) + self.assertEqual(log_record_processor._batch_processor._max_queue_size, 2048) + self.assertEqual(log_record_processor._batch_processor._schedule_delay, 1) + self.assertEqual(log_record_processor._batch_processor._max_export_batch_size, 512) + self.assertEqual(log_record_processor._batch_processor._export_timeout_millis, 30000) log_record_processor.shutdown() @patch.dict( @@ -602,21 +493,11 @@ def test_args_env_var_value_error(self): _logger.disabled = True log_record_processor = BatchLogRecordProcessor(exporter) _logger.disabled = False - self.assertEqual( - log_record_processor._batch_processor._exporter, exporter - ) - self.assertEqual( - log_record_processor._batch_processor._max_queue_size, 2048 - ) - self.assertEqual( - log_record_processor._batch_processor._schedule_delay, 1 - ) - self.assertEqual( - log_record_processor._batch_processor._max_export_batch_size, 512 - ) - self.assertEqual( - log_record_processor._batch_processor._export_timeout_millis, 30000 - ) + self.assertEqual(log_record_processor._batch_processor._exporter, exporter) + self.assertEqual(log_record_processor._batch_processor._max_queue_size, 2048) + self.assertEqual(log_record_processor._batch_processor._schedule_delay, 1) + self.assertEqual(log_record_processor._batch_processor._max_export_batch_size, 512) + self.assertEqual(log_record_processor._batch_processor._export_timeout_millis, 30000) log_record_processor.shutdown() def test_args_none_defaults(self): @@ -628,21 +509,11 @@ def test_args_none_defaults(self): max_export_batch_size=None, export_timeout_millis=None, ) - self.assertEqual( - log_record_processor._batch_processor._exporter, exporter - ) - self.assertEqual( - log_record_processor._batch_processor._max_queue_size, 2048 - ) - self.assertEqual( - log_record_processor._batch_processor._schedule_delay, 1 - ) - self.assertEqual( - log_record_processor._batch_processor._max_export_batch_size, 512 - ) - self.assertEqual( - log_record_processor._batch_processor._export_timeout_millis, 30000 - ) + self.assertEqual(log_record_processor._batch_processor._exporter, exporter) + self.assertEqual(log_record_processor._batch_processor._max_queue_size, 2048) + self.assertEqual(log_record_processor._batch_processor._schedule_delay, 1) + self.assertEqual(log_record_processor._batch_processor._max_export_batch_size, 512) + self.assertEqual(log_record_processor._batch_processor._export_timeout_millis, 30000) log_record_processor.shutdown() def test_validation_negative_max_queue_size(self): @@ -691,9 +562,7 @@ def test_validation_negative_max_queue_size(self): max_export_batch_size=101, ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_metrics(self): # pylint: disable=too-many-locals,too-many-statements metric_reader = InMemoryMetricReader() meter_provider = MeterProvider(metric_readers=[metric_reader]) @@ -753,17 +622,9 @@ def export_logs(_logs): processed_data_point0.attributes["otel.component.type"], "batching_log_processor", ) - self.assertTrue( - processed_data_point0.attributes["otel.component.name"].startswith( - "batching_log_processor/" - ) - ) - self.assertEqual( - processed_data_point0.attributes.get("error.type"), "queue_full" - ) - self.assertEqual( - metrics[1].name, "otel.sdk.processor.log.queue.capacity" - ) + self.assertTrue(processed_data_point0.attributes["otel.component.name"].startswith("batching_log_processor/")) + self.assertEqual(processed_data_point0.attributes.get("error.type"), "queue_full") + self.assertEqual(metrics[1].name, "otel.sdk.processor.log.queue.capacity") queue_capacity_data_point = metrics[1].data.data_points[0] self.assertEqual(queue_capacity_data_point.value, 1) self.assertEqual( @@ -771,9 +632,7 @@ def export_logs(_logs): "batching_log_processor", ) self.assertTrue( - queue_capacity_data_point.attributes[ - "otel.component.name" - ].startswith("batching_log_processor/") + queue_capacity_data_point.attributes["otel.component.name"].startswith("batching_log_processor/") ) self.assertEqual(metrics[2].name, "otel.sdk.processor.log.queue.size") queue_size_data_point = metrics[2].data.data_points[0] @@ -782,11 +641,7 @@ def export_logs(_logs): queue_size_data_point.attributes["otel.component.type"], "batching_log_processor", ) - self.assertTrue( - queue_size_data_point.attributes["otel.component.name"].startswith( - "batching_log_processor/" - ) - ) + self.assertTrue(queue_size_data_point.attributes["otel.component.name"].startswith("batching_log_processor/")) run_exports.set() provider.force_flush() @@ -813,11 +668,7 @@ def export_logs(_logs): processed_data_point0.attributes["otel.component.type"], "batching_log_processor", ) - self.assertTrue( - processed_data_point0.attributes["otel.component.name"].startswith( - "batching_log_processor/" - ) - ) + self.assertTrue(processed_data_point0.attributes["otel.component.name"].startswith("batching_log_processor/")) self.assertIsNone(processed_data_point0.attributes.get("error.type")) processed_data_point1 = processed_data_points[1] self.assertEqual(processed_data_point1.value, 1) @@ -825,11 +676,7 @@ def export_logs(_logs): processed_data_point1.attributes["otel.component.type"], "batching_log_processor", ) - self.assertTrue( - processed_data_point1.attributes["otel.component.name"].startswith( - "batching_log_processor/" - ) - ) + self.assertTrue(processed_data_point1.attributes["otel.component.name"].startswith("batching_log_processor/")) self.assertEqual( processed_data_point1.attributes.get("error.type"), "BrokenPipeError", @@ -840,17 +687,9 @@ def export_logs(_logs): processed_data_point2.attributes["otel.component.type"], "batching_log_processor", ) - self.assertTrue( - processed_data_point2.attributes["otel.component.name"].startswith( - "batching_log_processor/" - ) - ) - self.assertEqual( - processed_data_point2.attributes.get("error.type"), "queue_full" - ) - self.assertEqual( - metrics[1].name, "otel.sdk.processor.log.queue.capacity" - ) + self.assertTrue(processed_data_point2.attributes["otel.component.name"].startswith("batching_log_processor/")) + self.assertEqual(processed_data_point2.attributes.get("error.type"), "queue_full") + self.assertEqual(metrics[1].name, "otel.sdk.processor.log.queue.capacity") queue_capacity_data_point = metrics[1].data.data_points[0] self.assertEqual(queue_capacity_data_point.value, 1) self.assertEqual( @@ -858,9 +697,7 @@ def export_logs(_logs): "batching_log_processor", ) self.assertTrue( - queue_capacity_data_point.attributes[ - "otel.component.name" - ].startswith("batching_log_processor/") + queue_capacity_data_point.attributes["otel.component.name"].startswith("batching_log_processor/") ) self.assertEqual(metrics[2].name, "otel.sdk.processor.log.queue.size") queue_size_data_point = metrics[2].data.data_points[0] @@ -869,11 +706,7 @@ def export_logs(_logs): queue_size_data_point.attributes["otel.component.type"], "batching_log_processor", ) - self.assertTrue( - queue_size_data_point.attributes["otel.component.name"].startswith( - "batching_log_processor/" - ) - ) + self.assertTrue(queue_size_data_point.attributes["otel.component.name"].startswith("batching_log_processor/")) provider.shutdown() @@ -901,9 +734,7 @@ def test_export(self): # pylint: disable=no-self-use attributes={"a": 1, "b": "c"}, ), resource=SDKResource({"key": "value"}), - instrumentation_scope=InstrumentationScope( - "first_name", "first_version" - ), + instrumentation_scope=InstrumentationScope("first_name", "first_version"), ) exporter = ConsoleLogRecordExporter() # Mocking stdout interferes with debugging and test reporting, mock on @@ -911,9 +742,7 @@ def test_export(self): # pylint: disable=no-self-use with patch.object(exporter, "out") as mock_stdout: exporter.export([log_record]) - mock_stdout.write.assert_called_once_with( - log_record.to_json() + os.linesep - ) + mock_stdout.write.assert_called_once_with(log_record.to_json() + os.linesep) self.assertEqual(mock_stdout.write.call_count, 1) self.assertEqual(mock_stdout.flush.call_count, 1) @@ -926,9 +755,7 @@ def formatter(record): # pylint: disable=unused-argument return mock_record_str mock_stdout = Mock() - exporter = ConsoleLogRecordExporter( - out=mock_stdout, formatter=formatter - ) + exporter = ConsoleLogRecordExporter(out=mock_stdout, formatter=formatter) exporter.export([EMPTY_LOG]) mock_stdout.write.assert_called_once_with(mock_record_str) diff --git a/opentelemetry-sdk/tests/logs/test_handler.py b/opentelemetry-sdk/tests/logs/test_handler.py index 12dc9ad55c2..1c706cbe3b1 100644 --- a/opentelemetry-sdk/tests/logs/test_handler.py +++ b/opentelemetry-sdk/tests/logs/test_handler.py @@ -69,9 +69,7 @@ def test_handler_custom_log_level(self): # pylint: disable=protected-access def test_log_record_emit_noop(self): noop_logger_provder = NoOpLoggerProvider() - logger_mock = APIGetLogger( - __name__, logger_provider=noop_logger_provder - ) + logger_mock = APIGetLogger(__name__, logger_provider=noop_logger_provder) logger = logging.getLogger(__name__) handler_mock = Mock(spec=LoggingHandler) handler_mock._logger = logger_mock @@ -86,9 +84,7 @@ def test_log_flush_noop(self): no_op_logger_provider = NoOpLoggerProvider() logger = logging.getLogger("foo") - handler = LoggingHandler( - level=logging.NOTSET, logger_provider=no_op_logger_provider - ) + handler = LoggingHandler(level=logging.NOTSET, logger_provider=no_op_logger_provider) logger.addHandler(handler) with self.assertLogs(level=logging.WARNING): @@ -96,9 +92,7 @@ def test_log_flush_noop(self): # the LoggingHandler flush method will call the force_flush method of LoggerProvider in # a separate thread if present. NoOpLoggerProvider is not supposed to have that - with patch( - "opentelemetry.sdk._logs._internal.threading" - ) as threading_mock: + with patch("opentelemetry.sdk._logs._internal.threading") as threading_mock: logger.handlers[0].flush() threading_mock.Thread.assert_not_called() @@ -115,12 +109,8 @@ def test_log_record_no_span_context(self): record = processor.get_log_record(0) self.assertIsNotNone(record) - self.assertEqual( - record.log_record.trace_id, INVALID_SPAN_CONTEXT.trace_id - ) - self.assertEqual( - record.log_record.span_id, INVALID_SPAN_CONTEXT.span_id - ) + self.assertEqual(record.log_record.trace_id, INVALID_SPAN_CONTEXT.trace_id) + self.assertEqual(record.log_record.span_id, INVALID_SPAN_CONTEXT.span_id) self.assertEqual( record.log_record.trace_flags, INVALID_SPAN_CONTEXT.trace_flags, @@ -152,23 +142,15 @@ def test_log_record_user_attributes(self): self.assertIsNotNone(record) self.assertEqual(len(record.log_record.attributes), 4) self.assertEqual(record.log_record.attributes["http.status_code"], 200) - self.assertTrue( - record.log_record.attributes[ - code_attributes.CODE_FILE_PATH - ].endswith("test_handler.py") - ) + self.assertTrue(record.log_record.attributes[code_attributes.CODE_FILE_PATH].endswith("test_handler.py")) self.assertEqual( record.log_record.attributes[code_attributes.CODE_FUNCTION_NAME], "test_log_record_user_attributes", ) # The line of the log statement is not a constant (changing tests may change that), # so only check that the attribute is present. - self.assertTrue( - code_attributes.CODE_LINE_NUMBER in record.log_record.attributes - ) - self.assertTrue( - isinstance(record.log_record.attributes, BoundedAttributes) - ) + self.assertTrue(code_attributes.CODE_LINE_NUMBER in record.log_record.attributes) + self.assertTrue(isinstance(record.log_record.attributes, BoundedAttributes)) logger.removeHandler(handler) @@ -192,14 +174,10 @@ def test_log_record_exception(self): ZeroDivisionError.__name__, ) self.assertEqual( - record.log_record.attributes[ - exception_attributes.EXCEPTION_MESSAGE - ], + record.log_record.attributes[exception_attributes.EXCEPTION_MESSAGE], "division by zero", ) - stack_trace = record.log_record.attributes[ - exception_attributes.EXCEPTION_STACKTRACE - ] + stack_trace = record.log_record.attributes[exception_attributes.EXCEPTION_STACKTRACE] self.assertIsInstance(stack_trace, str) self.assertTrue("Traceback" in stack_trace) self.assertTrue("ZeroDivisionError" in stack_trace) @@ -213,9 +191,7 @@ def test_log_record_recursive_exception(self): processor, logger, handler = set_up_test_logging(logging.ERROR) try: - raise ZeroDivisionError( - ZeroDivisionError(ZeroDivisionError("division by zero")) - ) + raise ZeroDivisionError(ZeroDivisionError(ZeroDivisionError("division by zero"))) except ZeroDivisionError: with self.assertLogs(level=logging.ERROR): logger.exception("Zero Division Error") @@ -229,14 +205,10 @@ def test_log_record_recursive_exception(self): ZeroDivisionError.__name__, ) self.assertEqual( - record.log_record.attributes[ - exception_attributes.EXCEPTION_MESSAGE - ], + record.log_record.attributes[exception_attributes.EXCEPTION_MESSAGE], "division by zero", ) - stack_trace = record.log_record.attributes[ - exception_attributes.EXCEPTION_STACKTRACE - ] + stack_trace = record.log_record.attributes[exception_attributes.EXCEPTION_STACKTRACE] self.assertIsInstance(stack_trace, str) self.assertTrue("Traceback" in stack_trace) self.assertTrue("ZeroDivisionError" in stack_trace) @@ -297,14 +269,10 @@ def __str__(self): CustomException.__name__, ) self.assertEqual( - record.log_record.attributes[ - exception_attributes.EXCEPTION_MESSAGE - ], + record.log_record.attributes[exception_attributes.EXCEPTION_MESSAGE], "CustomException message", ) - stack_trace = record.log_record.attributes[ - exception_attributes.EXCEPTION_STACKTRACE - ] + stack_trace = record.log_record.attributes[exception_attributes.EXCEPTION_STACKTRACE] self.assertIsInstance(stack_trace, str) self.assertTrue("Traceback" in stack_trace) self.assertTrue("CustomException" in stack_trace) @@ -339,12 +307,8 @@ def test_log_record_trace_correlation(self): ) self.assertEqual(record.log_record.context, mock_context) span_context = span.get_span_context() - self.assertEqual( - record.log_record.trace_id, span_context.trace_id - ) - self.assertEqual( - record.log_record.span_id, span_context.span_id - ) + self.assertEqual(record.log_record.trace_id, span_context.trace_id) + self.assertEqual(record.log_record.span_id, span_context.span_id) self.assertEqual( record.log_record.trace_flags, span_context.trace_flags, @@ -362,19 +326,13 @@ def test_log_record_trace_correlation_deprecated(self): record = processor.get_log_record(0) - self.assertEqual( - record.log_record.body, "Critical message within span" - ) + self.assertEqual(record.log_record.body, "Critical message within span") self.assertEqual(record.log_record.severity_text, "FATAL") - self.assertEqual( - record.log_record.severity_number, SeverityNumber.FATAL - ) + self.assertEqual(record.log_record.severity_number, SeverityNumber.FATAL) span_context = span.get_span_context() self.assertEqual(record.log_record.trace_id, span_context.trace_id) self.assertEqual(record.log_record.span_id, span_context.span_id) - self.assertEqual( - record.log_record.trace_flags, span_context.trace_flags - ) + self.assertEqual(record.log_record.trace_flags, span_context.trace_flags) logger.removeHandler(handler) @@ -399,25 +357,19 @@ def test_exception_without_formatter(self): def test_warning_with_formatter(self): processor, logger, handler = set_up_test_logging( logging.WARNING, - formatter=logging.Formatter( - "%(name)s - %(levelname)s - %(message)s" - ), + formatter=logging.Formatter("%(name)s - %(levelname)s - %(message)s"), ) logger.warning("Test message") record = processor.get_log_record(0) - self.assertEqual( - record.log_record.body, "foo - WARNING - Test message" - ) + self.assertEqual(record.log_record.body, "foo - WARNING - Test message") logger.removeHandler(handler) def test_log_body_is_always_string_with_formatter(self): processor, logger, handler = set_up_test_logging( logging.WARNING, - formatter=logging.Formatter( - "%(name)s - %(levelname)s - %(message)s" - ), + formatter=logging.Formatter("%(name)s - %(levelname)s - %(message)s"), ) logger.warning(["something", "of", "note"]) @@ -430,9 +382,7 @@ def test_log_body_is_always_string_with_formatter(self): def test_handler_root_logger_with_disabled_sdk_does_not_go_into_recursion_error( self, ): - processor, logger, handler = set_up_test_logging( - logging.NOTSET, root_logger=True - ) + processor, logger, handler = set_up_test_logging(logging.NOTSET, root_logger=True) logger.warning("hello") self.assertEqual(processor.emit_count(), 0) @@ -448,18 +398,14 @@ def test_otel_attribute_count_limit_respected_in_logging_handler(self): processor = FakeProcessor() logger_provider.add_log_record_processor(processor) logger = logging.getLogger("env_test") - handler = LoggingHandler( - level=logging.WARNING, logger_provider=logger_provider - ) + handler = LoggingHandler(level=logging.WARNING, logger_provider=logger_provider) logger.addHandler(handler) # Create a log record with many extra attributes extra_attrs = {f"custom_attr_{i}": f"value_{i}" for i in range(10)} with self.assertLogs(level=logging.WARNING): - logger.warning( - "Test message with many attributes", extra=extra_attrs - ) + logger.warning("Test message with many attributes", extra=extra_attrs) record = processor.get_log_record(0) @@ -489,9 +435,7 @@ def test_otel_attribute_count_limit_includes_code_attributes(self): processor = FakeProcessor() logger_provider.add_log_record_processor(processor) logger = logging.getLogger("env_test_2") - handler = LoggingHandler( - level=logging.WARNING, logger_provider=logger_provider - ) + handler = LoggingHandler(level=logging.WARNING, logger_provider=logger_provider) logger.addHandler(handler) # Create a log record with some extra attributes @@ -527,9 +471,7 @@ def test_logging_handler_without_env_var_uses_default_limit(self): extra_attrs = {f"attr_{i}": f"value_{i}" for i in range(150)} with self.assertLogs(level=logging.WARNING): - logger.warning( - "Test message with many attributes", extra=extra_attrs - ) + logger.warning("Test message with many attributes", extra=extra_attrs) record = processor.get_log_record(0) diff --git a/opentelemetry-sdk/tests/logs/test_log_limits.py b/opentelemetry-sdk/tests/logs/test_log_limits.py index 3d1f69dc498..b98aac24ade 100644 --- a/opentelemetry-sdk/tests/logs/test_log_limits.py +++ b/opentelemetry-sdk/tests/logs/test_log_limits.py @@ -56,13 +56,9 @@ def test_logrecord_count_env_var(self): limits = LogRecordLimits() self.assertEqual(7, limits.max_log_record_attributes) - self.assertEqual( - _DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT, limits.max_attributes - ) + self.assertEqual(_DEFAULT_OTEL_ATTRIBUTE_COUNT_LIMIT, limits.max_attributes) - @patch.dict( - "os.environ", {OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: "20"} - ) + @patch.dict("os.environ", {OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT: "20"}) def test_logrecord_length_env_var(self): limits = LogRecordLimits() @@ -102,9 +98,7 @@ def test_global_count_env_applies_as_fallback(self): self.assertEqual(42, limits.max_attributes) self.assertEqual(42, limits.max_log_record_attributes) - @patch.dict( - "os.environ", {OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: "60"}, clear=True - ) + @patch.dict("os.environ", {OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: "60"}, clear=True) def test_global_length_env_applies_as_fallback(self): limits = LogRecordLimits() @@ -120,11 +114,7 @@ def test_invalid_env_vars_raise(self): ] bad_values = ["bad", "-1"] - test_cases = { - env_var: bad_value - for env_var in env_vars - for bad_value in bad_values - } + test_cases = {env_var: bad_value for env_var in env_vars for bad_value in bad_values} for env_var, bad_value in test_cases.items(): with self.subTest(f"Testing {env_var}={bad_value}"): diff --git a/opentelemetry-sdk/tests/logs/test_log_record.py b/opentelemetry-sdk/tests/logs/test_log_record.py index 89cb7b32dfc..78f24704b48 100644 --- a/opentelemetry-sdk/tests/logs/test_log_record.py +++ b/opentelemetry-sdk/tests/logs/test_log_record.py @@ -70,20 +70,14 @@ def test_log_record_to_json_serializes_null_severity_number(self): def test_log_record_bounded_attributes(self): attr = {"key": "value"} - result = ReadWriteLogRecord( - LogRecord(timestamp=0, body="a log line", attributes=attr) - ) + result = ReadWriteLogRecord(LogRecord(timestamp=0, body="a log line", attributes=attr)) - self.assertTrue( - isinstance(result.log_record.attributes, BoundedAttributes) - ) + self.assertTrue(isinstance(result.log_record.attributes, BoundedAttributes)) def test_log_record_dropped_attributes_empty_limits(self): attr = {"key": "value"} - result = ReadWriteLogRecord( - LogRecord(timestamp=0, body="a log line", attributes=attr) - ) + result = ReadWriteLogRecord(LogRecord(timestamp=0, body="a log line", attributes=attr)) self.assertTrue(result.dropped_attributes == 0) @@ -157,11 +151,7 @@ def test_log_record_dropped_attributes_set_limits_warning_once(self): ) # Check that at least one LogRecordDroppedAttributesWarning was emitted - dropped_attributes_warnings = [ - w - for w in cw - if isinstance(w.message, LogRecordDroppedAttributesWarning) - ] + dropped_attributes_warnings = [w for w in cw if isinstance(w.message, LogRecordDroppedAttributesWarning)] self.assertEqual( len(dropped_attributes_warnings), 1, @@ -204,9 +194,7 @@ def test_log_record_from_api_log_record(self): ) resource = Resource.create({}) - record = ReadWriteLogRecord._from_api_log_record( - record=api_log_record, resource=resource - ) + record = ReadWriteLogRecord._from_api_log_record(record=api_log_record, resource=resource) self.assertEqual(record.log_record.timestamp, 1) self.assertEqual(record.log_record.observed_timestamp, 2) @@ -216,9 +204,7 @@ def test_log_record_from_api_log_record(self): self.assertEqual(record.log_record.span_id, 0) self.assertEqual(record.log_record.trace_flags, TraceFlags(0x00)) self.assertEqual(record.log_record.severity_text, "WARN") - self.assertEqual( - record.log_record.severity_number, SeverityNumber.WARN - ) + self.assertEqual(record.log_record.severity_number, SeverityNumber.WARN) self.assertEqual(record.log_record.body, "a log line") self.assertEqual(record.log_record.attributes, {"a": "b"}) self.assertEqual(record.log_record.event_name, "an.event") diff --git a/opentelemetry-sdk/tests/logs/test_logs.py b/opentelemetry-sdk/tests/logs/test_logs.py index 8100a684411..47fa09e2385 100644 --- a/opentelemetry-sdk/tests/logs/test_logs.py +++ b/opentelemetry-sdk/tests/logs/test_logs.py @@ -64,9 +64,7 @@ def test_update_resource(self): updating_resource = Resource({"two": "new", "three": "three"}) logger_provider = LoggerProvider(resource=initial_resource) logger = logger_provider.get_logger("name") - other_logger = logger_provider.get_logger( - "other", attributes={"key": "value"} - ) + other_logger = logger_provider.get_logger("other", attributes={"key": "value"}) processor_mock = Mock() logger_provider.add_log_record_processor(processor_mock) @@ -93,11 +91,7 @@ def test_update_resource(self): def test_logger_provider_updates_process_dependent_resource_after_fork( self, ): - script_path = ( - Path(__file__).parent - / "scripts" - / "logger_provider_resource_after_fork.py" - ) + script_path = Path(__file__).parent / "scripts" / "logger_provider_resource_after_fork.py" result = subprocess.run( [sys.executable, str(script_path)], @@ -118,12 +112,8 @@ def test_logger_provider_updates_process_dependent_resource_after_fork( child_payload = json.loads(lines[0]) parent_payload = json.loads(lines[1]) - self.assertEqual( - parent_payload["parent_resource_pid"], parent_payload["parent_pid"] - ) - self.assertEqual( - parent_payload["parent_logger_pid"], parent_payload["parent_pid"] - ) + self.assertEqual(parent_payload["parent_resource_pid"], parent_payload["parent_pid"]) + self.assertEqual(parent_payload["parent_logger_pid"], parent_payload["parent_pid"]) self.assertEqual( parent_payload["parent_resource_pid_after_fork"], parent_payload["parent_pid"], @@ -133,18 +123,10 @@ def test_logger_provider_updates_process_dependent_resource_after_fork( parent_payload["parent_pid"], ) - self.assertNotEqual( - child_payload["child_pid"], parent_payload["parent_pid"] - ) - self.assertEqual( - child_payload["provider_pid"], child_payload["child_pid"] - ) - self.assertEqual( - child_payload["cached_logger_pid"], child_payload["child_pid"] - ) - self.assertEqual( - child_payload["new_logger_pid"], child_payload["child_pid"] - ) + self.assertNotEqual(child_payload["child_pid"], parent_payload["parent_pid"]) + self.assertEqual(child_payload["provider_pid"], child_payload["child_pid"]) + self.assertEqual(child_payload["cached_logger_pid"], child_payload["child_pid"]) + self.assertEqual(child_payload["new_logger_pid"], child_payload["child_pid"]) self.assertEqual( child_payload["exported_resource_pids"], [child_payload["child_pid"], child_payload["child_pid"]], @@ -166,12 +148,8 @@ def test_get_logger(self): self.assertEqual(logger._instrumentation_scope.name, "name") self.assertEqual(logger._instrumentation_scope.version, "version") - self.assertEqual( - logger._instrumentation_scope.schema_url, "schema_url" - ) - self.assertEqual( - logger._instrumentation_scope.attributes, {"key": "value"} - ) + self.assertEqual(logger._instrumentation_scope.schema_url, "schema_url") + self.assertEqual(logger._instrumentation_scope.attributes, {"key": "value"}) @patch.dict("os.environ", {OTEL_SDK_DISABLED: "true"}) def test_get_logger_with_sdk_disabled(self): @@ -195,16 +173,12 @@ def test_logger_provider_init(self, resource_patch): def test_default_logger_configurator(self): provider = LoggerProvider() logger = provider.get_logger("module_name", "1.0", "schema_url") - other_logger = provider.get_logger( - "other_module_name", "1.0", "schema_url" - ) + other_logger = provider.get_logger("other_module_name", "1.0", "schema_url") self.assertTrue(logger._is_enabled()) self.assertTrue(other_logger._is_enabled()) def test_logger_provider_with_disabled_configurator(self): - provider = LoggerProvider( - _logger_configurator=_disable_logger_configurator - ) + provider = LoggerProvider(_logger_configurator=_disable_logger_configurator) logger = provider.get_logger("test") self.assertFalse(logger._is_enabled()) @@ -225,31 +199,23 @@ def test_set_logger_configurator_updates_existing_loggers(self): logger = provider.get_logger("test") self.assertTrue(logger._is_enabled()) - provider._set_logger_configurator( - logger_configurator=_disable_logger_configurator - ) + provider._set_logger_configurator(logger_configurator=_disable_logger_configurator) self.assertFalse(logger._is_enabled()) def test_set_logger_configurator_affects_new_loggers(self): provider = LoggerProvider() - provider._set_logger_configurator( - logger_configurator=_disable_logger_configurator - ) + provider._set_logger_configurator(logger_configurator=_disable_logger_configurator) logger = provider.get_logger("new_logger") self.assertFalse(logger._is_enabled()) # pylint: disable-next=no-self-use def test_disabled_logger_skips_emit(self): - provider = LoggerProvider( - _logger_configurator=_disable_logger_configurator - ) + provider = LoggerProvider(_logger_configurator=_disable_logger_configurator) logger = provider.get_logger("test") processor_mock = Mock() provider.add_log_record_processor(processor_mock) - logger.emit( - LogRecord(observed_timestamp=0, body="should not be emitted") - ) + logger.emit(LogRecord(observed_timestamp=0, body="should not be emitted")) processor_mock.on_emit.assert_not_called() def test_rule_based_logger_configurator(self): @@ -263,15 +229,11 @@ def test_rule_based_logger_configurator(self): _LoggerConfig(is_enabled=False), ), ] - configurator = _RuleBasedLoggerConfigurator( - rules=rules, default_config=_LoggerConfig(is_enabled=True) - ) + configurator = _RuleBasedLoggerConfigurator(rules=rules, default_config=_LoggerConfig(is_enabled=True)) provider = LoggerProvider() logger = provider.get_logger("module_name", "1.0", "schema_url") - other_logger = provider.get_logger( - "other_module_name", "1.0", "schema_url" - ) + other_logger = provider.get_logger("other_module_name", "1.0", "schema_url") self.assertTrue(logger._is_enabled()) self.assertTrue(other_logger._is_enabled()) @@ -290,15 +252,11 @@ def test_rule_based_logger_configurator_default_when_rules_dont_match( _LoggerConfig(is_enabled=False), ), ] - configurator = _RuleBasedLoggerConfigurator( - rules=rules, default_config=_LoggerConfig(is_enabled=True) - ) + configurator = _RuleBasedLoggerConfigurator(rules=rules, default_config=_LoggerConfig(is_enabled=True)) provider = LoggerProvider() logger = provider.get_logger("module_name", "1.0", "schema_url") - other_logger = provider.get_logger( - "other_module_name", "1.0", "schema_url" - ) + other_logger = provider.get_logger("other_module_name", "1.0", "schema_url") self.assertTrue(logger._is_enabled()) self.assertTrue(other_logger._is_enabled()) @@ -343,21 +301,13 @@ def setUp(self): def test_readable_log_record_is_frozen(self): """Test that ReadableLogRecord is frozen and cannot be modified.""" with self.assertRaises((AttributeError, TypeError)): - self.readable_log_record.log_record = LogRecord( - timestamp=999, body="Modified" - ) + self.readable_log_record.log_record = LogRecord(timestamp=999, body="Modified") def test_readable_log_record_can_read_attributes(self): """Test that ReadableLogRecord provides read access to all fields.""" - self.assertEqual( - self.readable_log_record.log_record.timestamp, 1234567890 - ) - self.assertEqual( - self.readable_log_record.log_record.body, "Test log message" - ) - self.assertEqual( - self.readable_log_record.log_record.attributes["key"], "value" - ) + self.assertEqual(self.readable_log_record.log_record.timestamp, 1234567890) + self.assertEqual(self.readable_log_record.log_record.body, "Test log message") + self.assertEqual(self.readable_log_record.log_record.attributes["key"], "value") self.assertEqual( self.readable_log_record.resource.attributes["service.name"], "test-service", @@ -437,9 +387,7 @@ def test_can_emit_with_keywords_arguments(self): self.assertEqual(result_log_record.timestamp, 100) self.assertEqual(result_log_record.observed_timestamp, 101) self.assertIsNotNone(result_log_record.context) - self.assertEqual( - result_log_record.severity_number, SeverityNumber.WARN - ) + self.assertEqual(result_log_record.severity_number, SeverityNumber.WARN) self.assertEqual(result_log_record.severity_text, "warn") self.assertEqual(result_log_record.body, "a body") self.assertEqual(result_log_record.attributes, {"some": "attributes"}) @@ -454,12 +402,8 @@ def test_emit_with_exception_adds_attributes(self): log_record_processor_mock.on_emit.assert_called_once() log_data = log_record_processor_mock.on_emit.call_args.args[0] attributes = dict(log_data.log_record.attributes) - self.assertEqual( - attributes[exception_attributes.EXCEPTION_TYPE], "ValueError" - ) - self.assertEqual( - attributes[exception_attributes.EXCEPTION_MESSAGE], "boom" - ) + self.assertEqual(attributes[exception_attributes.EXCEPTION_TYPE], "ValueError") + self.assertEqual(attributes[exception_attributes.EXCEPTION_MESSAGE], "boom") self.assertIn( "ValueError: boom", attributes[exception_attributes.EXCEPTION_STACKTRACE], @@ -475,9 +419,7 @@ def test_emit_with_raised_exception_has_stacktrace(self): log_record_processor_mock.on_emit.assert_called_once() log_data = log_record_processor_mock.on_emit.call_args.args[0] - stacktrace = dict(log_data.log_record.attributes)[ - exception_attributes.EXCEPTION_STACKTRACE - ] + stacktrace = dict(log_data.log_record.attributes)[exception_attributes.EXCEPTION_STACKTRACE] self.assertIn("Traceback (most recent call last)", stacktrace) self.assertIn("raise ValueError", stacktrace) @@ -495,12 +437,8 @@ def test_emit_logrecord_exception_preserves_user_attributes(self): log_record_processor_mock.on_emit.assert_called_once() log_data = log_record_processor_mock.on_emit.call_args.args[0] attributes = dict(log_data.log_record.attributes) - self.assertEqual( - attributes[exception_attributes.EXCEPTION_TYPE], "custom" - ) - self.assertEqual( - attributes[exception_attributes.EXCEPTION_MESSAGE], "boom" - ) + self.assertEqual(attributes[exception_attributes.EXCEPTION_TYPE], "custom") + self.assertEqual(attributes[exception_attributes.EXCEPTION_MESSAGE], "boom") def test_emit_logrecord_exception_with_immutable_attributes(self): logger, log_record_processor_mock = self._get_logger() @@ -519,16 +457,12 @@ def test_emit_logrecord_exception_with_immutable_attributes(self): logger.emit(log_record) - self.assertNotIn( - exception_attributes.EXCEPTION_TYPE, log_record.attributes - ) + self.assertNotIn(exception_attributes.EXCEPTION_TYPE, log_record.attributes) log_record_processor_mock.on_emit.assert_called_once() log_data = log_record_processor_mock.on_emit.call_args.args[0] attributes = dict(log_data.log_record.attributes) self.assertEqual(attributes["custom"], "value") - self.assertEqual( - attributes[exception_attributes.EXCEPTION_TYPE], "ValueError" - ) + self.assertEqual(attributes[exception_attributes.EXCEPTION_TYPE], "ValueError") def test_emit_readwrite_logrecord_uses_exception(self): logger, log_record_processor_mock = self._get_logger() @@ -548,6 +482,4 @@ def test_emit_readwrite_logrecord_uses_exception(self): log_record_processor_mock.on_emit.assert_called_once() log_data = log_record_processor_mock.on_emit.call_args.args[0] attributes = dict(log_data.log_record.attributes) - self.assertEqual( - attributes[exception_attributes.EXCEPTION_TYPE], "RuntimeError" - ) + self.assertEqual(attributes[exception_attributes.EXCEPTION_TYPE], "RuntimeError") diff --git a/opentelemetry-sdk/tests/logs/test_multi_log_processor.py b/opentelemetry-sdk/tests/logs/test_multi_log_processor.py index 1bc1d4faae1..e88854fc7c4 100644 --- a/opentelemetry-sdk/tests/logs/test_multi_log_processor.py +++ b/opentelemetry-sdk/tests/logs/test_multi_log_processor.py @@ -138,9 +138,7 @@ def test_on_force_flush(self): self.assertEqual(1, mock_processor.force_flush.call_count) -class TestSynchronousMultiLogRecordProcessor( - MultiLogRecordProcessorTestBase, unittest.TestCase -): +class TestSynchronousMultiLogRecordProcessor(MultiLogRecordProcessorTestBase, unittest.TestCase): def _get_multi_log_record_processor(self): return SynchronousMultiLogRecordProcessor() @@ -192,9 +190,7 @@ def test_force_flush_processor_returns_none(self): self.assertEqual(mock_processor2.force_flush.call_count, 1) -class TestConcurrentMultiLogRecordProcessor( - MultiLogRecordProcessorTestBase, unittest.TestCase -): +class TestConcurrentMultiLogRecordProcessor(MultiLogRecordProcessorTestBase, unittest.TestCase): def _get_multi_log_record_processor(self): return ConcurrentMultiLogRecordProcessor() diff --git a/opentelemetry-sdk/tests/logs/test_sdk_metrics.py b/opentelemetry-sdk/tests/logs/test_sdk_metrics.py index 9b915a9add2..8191039f847 100644 --- a/opentelemetry-sdk/tests/logs/test_sdk_metrics.py +++ b/opentelemetry-sdk/tests/logs/test_sdk_metrics.py @@ -16,23 +16,17 @@ class TestLoggerProviderMetrics(TestCase): def setUp(self): self.metric_reader = InMemoryMetricReader() - self.meter_provider = MeterProvider( - metric_readers=[self.metric_reader] - ) + self.meter_provider = MeterProvider(metric_readers=[self.metric_reader]) def tearDown(self): self.meter_provider.shutdown() def assert_created_logs(self, metric_data, value, attrs): metrics = metric_data.resource_metrics[0].scope_metrics[0].metrics - created_logs_metric = next( - (m for m in metrics if m.name == "otel.sdk.log.created"), None - ) + created_logs_metric = next((m for m in metrics if m.name == "otel.sdk.log.created"), None) self.assertIsNotNone(created_logs_metric) self.assertEqual(created_logs_metric.data.data_points[0].value, value) - self.assertDictEqual( - created_logs_metric.data.data_points[0].attributes, attrs - ) + self.assertDictEqual(created_logs_metric.data.data_points[0].attributes, attrs) def test_create_logs(self): logger_provider = LoggerProvider(meter_provider=self.meter_provider) diff --git a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponent_mapping.py b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponent_mapping.py index 91edf38e46f..08bb0f4e891 100644 --- a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponent_mapping.py +++ b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponent_mapping.py @@ -37,14 +37,10 @@ def test_singleton(self): self.assertIsNot(ExponentMapping(-3), ExponentMapping(-5)) @patch( - "opentelemetry.sdk.metrics._internal.exponential_histogram.mapping." - "exponent_mapping.ExponentMapping._mappings", + "opentelemetry.sdk.metrics._internal.exponential_histogram.mapping.exponent_mapping.ExponentMapping._mappings", new={}, ) - @patch( - "opentelemetry.sdk.metrics._internal.exponential_histogram.mapping." - "exponent_mapping.ExponentMapping._init" - ) + @patch("opentelemetry.sdk.metrics._internal.exponential_histogram.mapping.exponent_mapping.ExponentMapping._init") def test_init_called_once(self, mock_init): # pylint: disable=no-self-use ExponentMapping(-3) ExponentMapping(-3) @@ -69,12 +65,8 @@ def test_exponent_mapping_zero(self): self.assertEqual(exponent_mapping.map_to_index(MAX_NORMAL_VALUE), 1023) self.assertEqual(exponent_mapping.map_to_index(2**1023), 1022) self.assertEqual(exponent_mapping.map_to_index(2**1022), 1021) - self.assertEqual( - exponent_mapping.map_to_index(hex_1_1 * (2**1023)), 1023 - ) - self.assertEqual( - exponent_mapping.map_to_index(hex_1_1 * (2**1022)), 1022 - ) + self.assertEqual(exponent_mapping.map_to_index(hex_1_1 * (2**1023)), 1023) + self.assertEqual(exponent_mapping.map_to_index(hex_1_1 * (2**1022)), 1022) # Testing with values near 1 self.assertEqual(exponent_mapping.map_to_index(4), 1) @@ -91,28 +83,18 @@ def test_exponent_mapping_zero(self): # Testing with values near 0 self.assertEqual(exponent_mapping.map_to_index(2**-1022), -1023) - self.assertEqual( - exponent_mapping.map_to_index(hex_1_1 * (2**-1022)), -1022 - ) + self.assertEqual(exponent_mapping.map_to_index(hex_1_1 * (2**-1022)), -1022) self.assertEqual(exponent_mapping.map_to_index(2**-1021), -1022) - self.assertEqual( - exponent_mapping.map_to_index(hex_1_1 * (2**-1021)), -1021 - ) - self.assertEqual( - exponent_mapping.map_to_index(2**-1022), MIN_NORMAL_EXPONENT - 1 - ) - self.assertEqual( - exponent_mapping.map_to_index(2**-1021), MIN_NORMAL_EXPONENT - ) + self.assertEqual(exponent_mapping.map_to_index(hex_1_1 * (2**-1021)), -1021) + self.assertEqual(exponent_mapping.map_to_index(2**-1022), MIN_NORMAL_EXPONENT - 1) + self.assertEqual(exponent_mapping.map_to_index(2**-1021), MIN_NORMAL_EXPONENT) # The smallest subnormal value is 2 ** -1074 = 5e-324. # This value is also the result of: # s = 1 # while s / 2: # s = s / 2 # s == 5e-324 - self.assertEqual( - exponent_mapping.map_to_index(2**-1074), MIN_NORMAL_EXPONENT - 1 - ) + self.assertEqual(exponent_mapping.map_to_index(2**-1074), MIN_NORMAL_EXPONENT - 1) def test_exponent_mapping_min_scale(self): exponent_mapping = ExponentMapping(ExponentMapping._min_scale) @@ -158,102 +140,46 @@ def test_exponent_mapping_neg_four(self): self.assertEqual(exponent_mapping.map_to_index(float(0x10)), 0) self.assertEqual(exponent_mapping.map_to_index(float(0x100)), 0) self.assertEqual(exponent_mapping.map_to_index(float(0x1000)), 0) - self.assertEqual( - exponent_mapping.map_to_index(float(0x10000)), 0 - ) # base == 2 ** 16 + self.assertEqual(exponent_mapping.map_to_index(float(0x10000)), 0) # base == 2 ** 16 self.assertEqual(exponent_mapping.map_to_index(float(0x100000)), 1) self.assertEqual(exponent_mapping.map_to_index(float(0x1000000)), 1) self.assertEqual(exponent_mapping.map_to_index(float(0x10000000)), 1) - self.assertEqual( - exponent_mapping.map_to_index(float(0x100000000)), 1 - ) # base == 2 ** 32 + self.assertEqual(exponent_mapping.map_to_index(float(0x100000000)), 1) # base == 2 ** 32 self.assertEqual(exponent_mapping.map_to_index(float(0x1000000000)), 2) - self.assertEqual( - exponent_mapping.map_to_index(float(0x10000000000)), 2 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x100000000000)), 2 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x1000000000000)), 2 - ) # base == 2 ** 48 + self.assertEqual(exponent_mapping.map_to_index(float(0x10000000000)), 2) + self.assertEqual(exponent_mapping.map_to_index(float(0x100000000000)), 2) + self.assertEqual(exponent_mapping.map_to_index(float(0x1000000000000)), 2) # base == 2 ** 48 - self.assertEqual( - exponent_mapping.map_to_index(float(0x10000000000000)), 3 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x100000000000000)), 3 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x1000000000000000)), 3 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x10000000000000000)), 3 - ) # base == 2 ** 64 + self.assertEqual(exponent_mapping.map_to_index(float(0x10000000000000)), 3) + self.assertEqual(exponent_mapping.map_to_index(float(0x100000000000000)), 3) + self.assertEqual(exponent_mapping.map_to_index(float(0x1000000000000000)), 3) + self.assertEqual(exponent_mapping.map_to_index(float(0x10000000000000000)), 3) # base == 2 ** 64 - self.assertEqual( - exponent_mapping.map_to_index(float(0x100000000000000000)), 4 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x1000000000000000000)), 4 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x10000000000000000000)), 4 - ) - self.assertEqual( - exponent_mapping.map_to_index(float(0x100000000000000000000)), 4 - ) # base == 2 ** 80 - self.assertEqual( - exponent_mapping.map_to_index(float(0x1000000000000000000000)), 5 - ) + self.assertEqual(exponent_mapping.map_to_index(float(0x100000000000000000)), 4) + self.assertEqual(exponent_mapping.map_to_index(float(0x1000000000000000000)), 4) + self.assertEqual(exponent_mapping.map_to_index(float(0x10000000000000000000)), 4) + self.assertEqual(exponent_mapping.map_to_index(float(0x100000000000000000000)), 4) # base == 2 ** 80 + self.assertEqual(exponent_mapping.map_to_index(float(0x1000000000000000000000)), 5) self.assertEqual(exponent_mapping.map_to_index(1 / float(0x1)), -1) self.assertEqual(exponent_mapping.map_to_index(1 / float(0x10)), -1) self.assertEqual(exponent_mapping.map_to_index(1 / float(0x100)), -1) self.assertEqual(exponent_mapping.map_to_index(1 / float(0x1000)), -1) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x10000)), -2 - ) # base == 2 ** -16 - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x100000)), -2 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x1000000)), -2 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x10000000)), -2 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x100000000)), -3 - ) # base == 2 ** -32 - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x1000000000)), -3 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x10000000000)), -3 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x100000000000)), -3 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x1000000000000)), -4 - ) # base == 2 ** -32 - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x10000000000000)), -4 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x100000000000000)), -4 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x1000000000000000)), -4 - ) - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x10000000000000000)), -5 - ) # base == 2 ** -64 - self.assertEqual( - exponent_mapping.map_to_index(1 / float(0x100000000000000000)), -5 - ) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x10000)), -2) # base == 2 ** -16 + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x100000)), -2) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x1000000)), -2) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x10000000)), -2) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x100000000)), -3) # base == 2 ** -32 + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x1000000000)), -3) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x10000000000)), -3) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x100000000000)), -3) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x1000000000000)), -4) # base == 2 ** -32 + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x10000000000000)), -4) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x100000000000000)), -4) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x1000000000000000)), -4) + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x10000000000000000)), -5) # base == 2 ** -64 + self.assertEqual(exponent_mapping.map_to_index(1 / float(0x100000000000000000)), -5) self.assertEqual(exponent_mapping.map_to_index(float_info.max), 63) self.assertEqual(exponent_mapping.map_to_index(2**1023), 63) @@ -288,9 +214,7 @@ def test_exponent_mapping_neg_four(self): self.assertEqual(exponent_mapping.map_to_index(2**-975), -61) def test_exponent_index_max(self): - for scale in range( - ExponentMapping._min_scale, ExponentMapping._max_scale - ): + for scale in range(ExponentMapping._min_scale, ExponentMapping._max_scale): exponent_mapping = ExponentMapping(scale) index = exponent_mapping.map_to_index(MAX_NORMAL_VALUE) @@ -307,9 +231,7 @@ def test_exponent_index_max(self): exponent_mapping.get_lower_boundary(index + 1) def test_exponent_index_min(self): - for scale in range( - ExponentMapping._min_scale, ExponentMapping._max_scale + 1 - ): + for scale in range(ExponentMapping._min_scale, ExponentMapping._max_scale + 1): exponent_mapping = ExponentMapping(scale) min_index = exponent_mapping.map_to_index(MIN_NORMAL_VALUE) @@ -328,9 +250,7 @@ def test_exponent_index_min(self): correct_boundary = right_boundary(scale, correct_min_index) self.assertEqual(correct_boundary, boundary) - self.assertGreater( - right_boundary(scale, correct_min_index + 1), boundary - ) + self.assertGreater(right_boundary(scale, correct_min_index + 1), boundary) self.assertEqual( correct_min_index, @@ -344,19 +264,13 @@ def test_exponent_index_min(self): correct_min_index, exponent_mapping.map_to_index(MIN_NORMAL_VALUE / 100), ) - self.assertEqual( - correct_min_index, exponent_mapping.map_to_index(2**-1050) - ) - self.assertEqual( - correct_min_index, exponent_mapping.map_to_index(2**-1073) - ) + self.assertEqual(correct_min_index, exponent_mapping.map_to_index(2**-1050)) + self.assertEqual(correct_min_index, exponent_mapping.map_to_index(2**-1073)) self.assertEqual( correct_min_index, exponent_mapping.map_to_index(1.1 * (2**-1073)), ) - self.assertEqual( - correct_min_index, exponent_mapping.map_to_index(2**-1074) - ) + self.assertEqual(correct_min_index, exponent_mapping.map_to_index(2**-1074)) with self.assertRaises(MappingUnderflowError): exponent_mapping.get_lower_boundary(min_index - 1) diff --git a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py index d17aabe6f4c..78f03890220 100644 --- a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponential_bucket_histogram_aggregation.py @@ -53,10 +53,7 @@ def get_counts(buckets: Buckets) -> int: def center_val(mapping: ExponentMapping, index: int) -> float: - return ( - mapping.get_lower_boundary(index) - + mapping.get_lower_boundary(index + 1) - ) / 2 + return (mapping.get_lower_boundary(index) + mapping.get_lower_boundary(index + 1)) / 2 def swap( @@ -81,23 +78,19 @@ def swap( class TestExponentialBucketHistogramAggregation(TestCase): @patch("opentelemetry.sdk.metrics._internal.aggregation.LogarithmMapping") def test_create_aggregation(self, mock_logarithm_mapping): - exponential_bucket_histogram_aggregation = ( - ExponentialBucketHistogramAggregation() - )._create_aggregation(Mock(), Mock(), Mock(), Mock()) - - self.assertEqual( - exponential_bucket_histogram_aggregation._max_scale, 20 + exponential_bucket_histogram_aggregation = (ExponentialBucketHistogramAggregation())._create_aggregation( + Mock(), Mock(), Mock(), Mock() ) + self.assertEqual(exponential_bucket_histogram_aggregation._max_scale, 20) + mock_logarithm_mapping.assert_called_with(20) exponential_bucket_histogram_aggregation = ( ExponentialBucketHistogramAggregation(max_scale=10) )._create_aggregation(Mock(), Mock(), Mock(), Mock()) - self.assertEqual( - exponential_bucket_histogram_aggregation._max_scale, 10 - ) + self.assertEqual(exponential_bucket_histogram_aggregation._max_scale, 10) mock_logarithm_mapping.assert_called_with(10) @@ -106,9 +99,7 @@ def test_create_aggregation(self, mock_logarithm_mapping): ExponentialBucketHistogramAggregation(max_scale=100) )._create_aggregation(Mock(), Mock(), Mock(), Mock()) - self.assertEqual( - exponential_bucket_histogram_aggregation._max_scale, 100 - ) + self.assertEqual(exponential_bucket_histogram_aggregation._max_scale, 100) mock_logarithm_mapping.assert_called_with(100) @@ -119,11 +110,7 @@ def test_create_aggregation_record_min_max(self): (False, False), ]: with self.subTest(record_min_max=record_min_max): - kwargs = ( - {} - if record_min_max is None - else {"record_min_max": record_min_max} - ) + kwargs = {} if record_min_max is None else {"record_min_max": record_min_max} exponential_bucket_histogram_aggregation = ( ExponentialBucketHistogramAggregation(**kwargs) )._create_aggregation(Mock(), Mock(), Mock(), Mock()) @@ -147,29 +134,19 @@ def test_min_max(self): ]: with self.subTest(record_min_max=record_min_max): ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.CUMULATIVE, - 0, - record_min_max=record_min_max, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.CUMULATIVE, + 0, + record_min_max=record_min_max, ) for value in [2, 4, 1, 9999]: - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) - self.assertEqual( - exponential_histogram_aggregation._min, expected_min - ) - self.assertEqual( - exponential_histogram_aggregation._max, expected_max - ) + self.assertEqual(exponential_histogram_aggregation._min, expected_min) + self.assertEqual(exponential_histogram_aggregation._max, expected_max) def assertInEpsilon(self, first, second, epsilon): self.assertLessEqual(first, (second * (1 + epsilon))) @@ -190,14 +167,10 @@ def require_equal(self, a, b): self.assertEqual(len(a._value_negative), len(b._value_negative)) for index in range(len(a._value_positive)): - self.assertEqual( - a._value_positive[index], b._value_positive[index] - ) + self.assertEqual(a._value_positive[index], b._value_positive[index]) for index in range(len(a._value_negative)): - self.assertEqual( - a._value_negative[index], b._value_negative[index] - ) + self.assertEqual(a._value_negative[index], b._value_negative[index]) def test_alternating_growth_0(self): """ @@ -213,33 +186,21 @@ def test_alternating_growth_0(self): # agg := NewFloat64(NewConfig(WithMaxSize(4))) # agg is an instance of github.com/lightstep/otel-launcher-go/lightstep/sdk/metric/aggregator/histogram/structure.Histogram[float64] - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=4, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=4, ) now = time_ns() ctx = Context() - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(4, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(1, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(4, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(1, now, Mock(), ctx)) - self.assertEqual( - exponential_histogram_aggregation._value_positive.offset, -1 - ) + self.assertEqual(exponential_histogram_aggregation._value_positive.offset, -1) self.assertEqual(exponential_histogram_aggregation._mapping.scale, 0) self.assertEqual( get_counts(exponential_histogram_aggregation._value_positive), @@ -254,42 +215,24 @@ def test_alternating_growth_1(self): holds range [4, 16).¶ """ - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=4, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=4, ) now = time_ns() ctx = Context() - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(1, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(8, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(0.5, now, Mock(), ctx) - ) - - self.assertEqual( - exponential_histogram_aggregation._value_positive.offset, -1 - ) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(1, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(8, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(0.5, now, Mock(), ctx)) + + self.assertEqual(exponential_histogram_aggregation._value_positive.offset, -1) self.assertEqual(exponential_histogram_aggregation._mapping.scale, -1) self.assertEqual( get_counts(exponential_histogram_aggregation._value_positive), @@ -337,22 +280,16 @@ def test_permutations(self): ], ]: for permutation in permutations(test_values): - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=2, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=2, ) for value in permutation: - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) self.assertEqual( exponential_histogram_aggregation._mapping.scale, @@ -382,22 +319,16 @@ def test_ascending_sequence(self): self.ascending_sequence_test(max_size, offset, init_scale) # pylint: disable=too-many-locals - def ascending_sequence_test( - self, max_size: int, offset: int, init_scale: int - ): + def ascending_sequence_test(self, max_size: int, offset: int, init_scale: int): now = time_ns() ctx = Context() for step in range(max_size, max_size * 4): - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=max_size, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=max_size, ) if init_scale <= 0: @@ -412,27 +343,19 @@ def ascending_sequence_test( for index in range(max_size): value = center_val(mapping, offset + index) - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) sum_ += value - self.assertEqual( - init_scale, exponential_histogram_aggregation._mapping._scale - ) + self.assertEqual(init_scale, exponential_histogram_aggregation._mapping._scale) self.assertEqual( offset, exponential_histogram_aggregation._value_positive.offset, ) - exponential_histogram_aggregation.aggregate( - Measurement(max_val, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(max_val, now, Mock(), ctx)) sum_ += max_val - self.assertNotEqual( - 0, exponential_histogram_aggregation._value_positive[0] - ) + self.assertNotEqual(0, exponential_histogram_aggregation._value_positive[0]) # The maximum-index filled bucket is at or # above the mid-point, (otherwise we @@ -441,16 +364,9 @@ def ascending_sequence_test( max_fill = 0 total_count = 0 - for index in range( - len(exponential_histogram_aggregation._value_positive) - ): - total_count += ( - exponential_histogram_aggregation._value_positive[index] - ) - if ( - exponential_histogram_aggregation._value_positive[index] - != 0 - ): + for index in range(len(exponential_histogram_aggregation._value_positive)): + total_count += exponential_histogram_aggregation._value_positive[index] + if exponential_histogram_aggregation._value_positive[index] != 0: max_fill = index # FIXME the corresponding Go code is @@ -459,26 +375,16 @@ def ascending_sequence_test( self.assertGreaterEqual(max_fill, int(max_size / 2)) self.assertGreaterEqual(max_size + 1, total_count) - self.assertGreaterEqual( - max_size + 1, exponential_histogram_aggregation._count - ) - self.assertGreaterEqual( - sum_, exponential_histogram_aggregation._sum - ) + self.assertGreaterEqual(max_size + 1, exponential_histogram_aggregation._count) + self.assertGreaterEqual(sum_, exponential_histogram_aggregation._sum) if init_scale <= 0: - mapping = ExponentMapping( - exponential_histogram_aggregation._mapping.scale - ) + mapping = ExponentMapping(exponential_histogram_aggregation._mapping.scale) else: - mapping = LogarithmMapping( - exponential_histogram_aggregation._mapping.scale - ) + mapping = LogarithmMapping(exponential_histogram_aggregation._mapping.scale) index = mapping.map_to_index(min_val) - self.assertEqual( - index, exponential_histogram_aggregation._value_positive.offset - ) + self.assertEqual(index, exponential_histogram_aggregation._value_positive.offset) index = mapping.map_to_index(max_val) @@ -501,16 +407,12 @@ def mock_increment(self, bucket_index: int) -> None: # pylint: disable=cell-var-from-loop self._counts[bucket_index] += increment - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=256, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=256, ) self.assertEqual( @@ -532,16 +434,12 @@ def mock_increment(self, bucket_index: int) -> None: exponential_histogram_aggregation._value_positive, ), ): - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) exponential_histogram_aggregation._count *= increment exponential_histogram_aggregation._sum *= increment self.assertEqual(expect, exponential_histogram_aggregation._sum) - self.assertEqual( - 255 * increment, exponential_histogram_aggregation._count - ) + self.assertEqual(255 * increment, exponential_histogram_aggregation._count) # See test_integer_aggregation about why scale is 5, len is # 256 - (1 << scale)- 1 and offset is (1 << scale) - 1. @@ -567,39 +465,27 @@ def test_move_into(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation_0 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=256, - ) + exponential_histogram_aggregation_0 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=256, ) - exponential_histogram_aggregation_1 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=256, - ) + exponential_histogram_aggregation_1 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=256, ) expect = 0 for index in range(2, 257): expect += index - exponential_histogram_aggregation_0.aggregate( - Measurement(index, now, Mock(), ctx) - ) - exponential_histogram_aggregation_0.aggregate( - Measurement(0, now, Mock(), ctx) - ) + exponential_histogram_aggregation_0.aggregate(Measurement(index, now, Mock(), ctx)) + exponential_histogram_aggregation_0.aggregate(Measurement(0, now, Mock(), ctx)) swap( exponential_histogram_aggregation_0, @@ -627,91 +513,53 @@ def test_move_into(self): ) for index in range(256): - self.assertLessEqual( - exponential_histogram_aggregation_1._value_positive[index], 6 - ) + self.assertLessEqual(exponential_histogram_aggregation_1._value_positive[index], 6) def test_very_large_numbers(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=2, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=2, ) def expect_balanced(count: int): - self.assertEqual( - 2, len(exponential_histogram_aggregation._value_positive) - ) - self.assertEqual( - -1, exponential_histogram_aggregation._value_positive.offset - ) - self.assertEqual( - count, exponential_histogram_aggregation._value_positive[0] - ) - self.assertEqual( - count, exponential_histogram_aggregation._value_positive[1] - ) + self.assertEqual(2, len(exponential_histogram_aggregation._value_positive)) + self.assertEqual(-1, exponential_histogram_aggregation._value_positive.offset) + self.assertEqual(count, exponential_histogram_aggregation._value_positive[0]) + self.assertEqual(count, exponential_histogram_aggregation._value_positive[1]) - exponential_histogram_aggregation.aggregate( - Measurement(2**-100, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(2**100, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(2**-100, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(2**100, now, Mock(), ctx)) - self.assertLessEqual( - 2**100, (exponential_histogram_aggregation._sum * (1 + 1e-5)) - ) - self.assertGreaterEqual( - 2**100, (exponential_histogram_aggregation._sum * (1 - 1e-5)) - ) + self.assertLessEqual(2**100, (exponential_histogram_aggregation._sum * (1 + 1e-5))) + self.assertGreaterEqual(2**100, (exponential_histogram_aggregation._sum * (1 - 1e-5))) self.assertEqual(2, exponential_histogram_aggregation._count) self.assertEqual(-7, exponential_histogram_aggregation._mapping.scale) expect_balanced(1) - exponential_histogram_aggregation.aggregate( - Measurement(2**-127, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(2**128, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(2**-127, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(2**128, now, Mock(), ctx)) - self.assertLessEqual( - 2**128, (exponential_histogram_aggregation._sum * (1 + 1e-5)) - ) - self.assertGreaterEqual( - 2**128, (exponential_histogram_aggregation._sum * (1 - 1e-5)) - ) + self.assertLessEqual(2**128, (exponential_histogram_aggregation._sum * (1 + 1e-5))) + self.assertGreaterEqual(2**128, (exponential_histogram_aggregation._sum * (1 - 1e-5))) self.assertEqual(4, exponential_histogram_aggregation._count) self.assertEqual(-7, exponential_histogram_aggregation._mapping.scale) expect_balanced(2) - exponential_histogram_aggregation.aggregate( - Measurement(2**-129, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(2**255, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(2**-129, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(2**255, now, Mock(), ctx)) - self.assertLessEqual( - 2**255, (exponential_histogram_aggregation._sum * (1 + 1e-5)) - ) - self.assertGreaterEqual( - 2**255, (exponential_histogram_aggregation._sum * (1 - 1e-5)) - ) + self.assertLessEqual(2**255, (exponential_histogram_aggregation._sum * (1 + 1e-5))) + self.assertGreaterEqual(2**255, (exponential_histogram_aggregation._sum * (1 - 1e-5))) self.assertEqual(6, exponential_histogram_aggregation._count) self.assertEqual(-8, exponential_histogram_aggregation._mapping.scale) @@ -721,31 +569,19 @@ def test_full_range(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=2, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=2, ) - exponential_histogram_aggregation.aggregate( - Measurement(float_info.max, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(1, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(2**-1074, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(float_info.max, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(1, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(2**-1074, now, Mock(), ctx)) - self.assertEqual( - float_info.max, exponential_histogram_aggregation._sum - ) + self.assertEqual(float_info.max, exponential_histogram_aggregation._sum) self.assertEqual(3, exponential_histogram_aggregation._count) self.assertEqual( ExponentMapping._min_scale, @@ -756,53 +592,35 @@ def test_full_range(self): _ExponentialBucketHistogramAggregation._min_max_size, len(exponential_histogram_aggregation._value_positive), ) - self.assertEqual( - -1, exponential_histogram_aggregation._value_positive.offset - ) - self.assertLessEqual( - exponential_histogram_aggregation._value_positive[0], 2 - ) - self.assertLessEqual( - exponential_histogram_aggregation._value_positive[1], 1 - ) + self.assertEqual(-1, exponential_histogram_aggregation._value_positive.offset) + self.assertLessEqual(exponential_histogram_aggregation._value_positive[0], 2) + self.assertLessEqual(exponential_histogram_aggregation._value_positive[1], 1) def test_aggregator_min_max(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) for value in [1, 3, 5, 7, 9]: - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) self.assertEqual(1, exponential_histogram_aggregation._min) self.assertEqual(9, exponential_histogram_aggregation._max) - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) for value in [-1, -3, -5, -7, -9]: - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) self.assertEqual(-9, exponential_histogram_aggregation._min) self.assertEqual(-1, exponential_histogram_aggregation._max) @@ -810,43 +628,27 @@ def test_aggregator_min_max(self): def test_aggregator_copy_swap(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation_0 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_0 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) for value in [1, 3, 5, 7, 9, -1, -3, -5]: - exponential_histogram_aggregation_0.aggregate( - Measurement(value, now, Mock(), ctx) - ) - exponential_histogram_aggregation_1 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_0.aggregate(Measurement(value, now, Mock(), ctx)) + exponential_histogram_aggregation_1 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) for value in [5, 4, 3, 2]: - exponential_histogram_aggregation_1.aggregate( - Measurement(value, now, Mock(), ctx) - ) - exponential_histogram_aggregation_2 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_1.aggregate(Measurement(value, now, Mock(), ctx)) + exponential_histogram_aggregation_2 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) swap( @@ -862,9 +664,7 @@ def test_aggregator_copy_swap(self): exponential_histogram_aggregation_2._zero_count = 0 exponential_histogram_aggregation_2._min = 0 exponential_histogram_aggregation_2._max = 0 - exponential_histogram_aggregation_2._mapping = LogarithmMapping( - LogarithmMapping._max_scale - ) + exponential_histogram_aggregation_2._mapping = LogarithmMapping(LogarithmMapping._max_scale) for attribute in [ "_value_positive", @@ -891,32 +691,22 @@ def test_zero_count_by_increment(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation_0 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_0 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) increment = 10 for _ in range(increment): - exponential_histogram_aggregation_0.aggregate( - Measurement(0, now, Mock(), ctx) - ) - exponential_histogram_aggregation_1 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_0.aggregate(Measurement(0, now, Mock(), ctx)) + exponential_histogram_aggregation_1 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) def mock_increment(self, bucket_index: int) -> None: @@ -936,9 +726,7 @@ def mock_increment(self, bucket_index: int) -> None: exponential_histogram_aggregation_1._value_positive, ), ): - exponential_histogram_aggregation_1.aggregate( - Measurement(0, now, Mock(), ctx) - ) + exponential_histogram_aggregation_1.aggregate(Measurement(0, now, Mock(), ctx)) exponential_histogram_aggregation_1._count *= increment exponential_histogram_aggregation_1._zero_count *= increment @@ -951,32 +739,22 @@ def test_one_count_by_increment(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation_0 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_0 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) increment = 10 for _ in range(increment): - exponential_histogram_aggregation_0.aggregate( - Measurement(1, now, Mock(), ctx) - ) - exponential_histogram_aggregation_1 = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation_0.aggregate(Measurement(1, now, Mock(), ctx)) + exponential_histogram_aggregation_1 = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) def mock_increment(self, bucket_index: int) -> None: @@ -996,9 +774,7 @@ def mock_increment(self, bucket_index: int) -> None: exponential_histogram_aggregation_1._value_positive, ), ): - exponential_histogram_aggregation_1.aggregate( - Measurement(1, now, Mock(), ctx) - ) + exponential_histogram_aggregation_1.aggregate(Measurement(1, now, Mock(), ctx)) exponential_histogram_aggregation_1._count *= increment exponential_histogram_aggregation_1._sum *= increment @@ -1010,9 +786,7 @@ def mock_increment(self, bucket_index: int) -> None: def test_boundary_statistics(self): total = MAX_NORMAL_EXPONENT - MIN_NORMAL_EXPONENT + 1 - for scale in range( - LogarithmMapping._min_scale, LogarithmMapping._max_scale + 1 - ): + for scale in range(LogarithmMapping._min_scale, LogarithmMapping._max_scale + 1): above = 0 below = 0 @@ -1042,16 +816,12 @@ def test_min_max_size(self): Tests that the minimum max_size is the right value. """ - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=_ExponentialBucketHistogramAggregation._min_max_size, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=_ExponentialBucketHistogramAggregation._min_max_size, ) # The minimum and maximum normal floating point values are used here to @@ -1073,72 +843,44 @@ def test_aggregate_collect(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, 0 - ) - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, 0 - ) - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) - exponential_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, 0) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, 0) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) + exponential_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, 0) def test_collect_results_cumulative(self) -> None: now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), ) self.maxDiff = None self.assertEqual(exponential_histogram_aggregation._mapping._scale, 20) - exponential_histogram_aggregation.aggregate( - Measurement(2, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(2, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping._scale, 20) - exponential_histogram_aggregation.aggregate( - Measurement(4, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(4, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping._scale, 7) - exponential_histogram_aggregation.aggregate( - Measurement(1, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(1, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping._scale, 6) - collection_0 = exponential_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, Mock() - ) + collection_0 = exponential_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, Mock()) self.assertEqual(len(collection_0.positive.bucket_counts), 160) @@ -1154,25 +896,13 @@ def test_collect_results_cumulative(self) -> None: self.assertEqual(collection_0.min, 1) self.assertEqual(collection_0.max, 4) - exponential_histogram_aggregation.aggregate( - Measurement(1, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(8, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(0.5, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(0.1, now, Mock(), ctx) - ) - exponential_histogram_aggregation.aggregate( - Measurement(0.045, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(1, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(8, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(0.5, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(0.1, now, Mock(), ctx)) + exponential_histogram_aggregation.aggregate(Measurement(0.045, now, Mock(), ctx)) - collection_1 = exponential_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, Mock() - ) + collection_1 = exponential_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, Mock()) previous_count = collection_1.positive.bucket_counts[0] @@ -1225,9 +955,7 @@ def test_cumulative_aggregation_with_random_data(self) -> None: ) def collect_and_validate(values, histogram) -> None: - result: ExponentialHistogramDataPoint = histogram.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + result: ExponentialHistogramDataPoint = histogram.collect(AggregationTemporality.CUMULATIVE, 0) buckets = result.positive.bucket_counts scale = result.scale index_start = result.positive.offset @@ -1279,27 +1007,19 @@ def test_merge_collect_cumulative(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=4, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=4, ) for value in [2, 4, 8, 16]: - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping.scale, 0) - self.assertEqual( - exponential_histogram_aggregation._value_positive.offset, 0 - ) + self.assertEqual(exponential_histogram_aggregation._value_positive.offset, 0) self.assertEqual( exponential_histogram_aggregation._value_positive.counts, [1, 1, 1, 1], @@ -1313,14 +1033,10 @@ def test_merge_collect_cumulative(self): self.assertEqual(result_0.scale, 0) for value in [1, 2, 4, 8]: - exponential_histogram_aggregation.aggregate( - Measurement(1 / value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(1 / value, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping.scale, 0) - self.assertEqual( - exponential_histogram_aggregation._value_positive.offset, -4 - ) + self.assertEqual(exponential_histogram_aggregation._value_positive.offset, -4) self.assertEqual( exponential_histogram_aggregation._value_positive.counts, [1, 1, 1, 1], @@ -1337,27 +1053,19 @@ def test_merge_collect_delta(self): now = time_ns() ctx = Context() - exponential_histogram_aggregation = ( - _ExponentialBucketHistogramAggregation( - Mock(), - _default_reservoir_factory( - _ExponentialBucketHistogramAggregation - ), - AggregationTemporality.DELTA, - Mock(), - max_size=4, - ) + exponential_histogram_aggregation = _ExponentialBucketHistogramAggregation( + Mock(), + _default_reservoir_factory(_ExponentialBucketHistogramAggregation), + AggregationTemporality.DELTA, + Mock(), + max_size=4, ) for value in [2, 4, 8, 16]: - exponential_histogram_aggregation.aggregate( - Measurement(value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(value, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping.scale, 0) - self.assertEqual( - exponential_histogram_aggregation._value_positive.offset, 0 - ) + self.assertEqual(exponential_histogram_aggregation._value_positive.offset, 0) self.assertEqual( exponential_histogram_aggregation._value_positive.counts, [1, 1, 1, 1], @@ -1369,14 +1077,10 @@ def test_merge_collect_delta(self): ) for value in [1, 2, 4, 8]: - exponential_histogram_aggregation.aggregate( - Measurement(1 / value, now, Mock(), ctx) - ) + exponential_histogram_aggregation.aggregate(Measurement(1 / value, now, Mock(), ctx)) self.assertEqual(exponential_histogram_aggregation._mapping.scale, 0) - self.assertEqual( - exponential_histogram_aggregation._value_positive.offset, -4 - ) + self.assertEqual(exponential_histogram_aggregation._value_positive.offset, -4) self.assertEqual( exponential_histogram_aggregation._value_positive.counts, [1, 1, 1, 1], diff --git a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_logarithm_mapping.py b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_logarithm_mapping.py index fc208d19b5f..8c1565385b2 100644 --- a/opentelemetry-sdk/tests/metrics/exponential_histogram/test_logarithm_mapping.py +++ b/opentelemetry-sdk/tests/metrics/exponential_histogram/test_logarithm_mapping.py @@ -53,10 +53,7 @@ def assertInEpsilon(self, first, second, epsilon): "logarithm_mapping.LogarithmMapping._mappings", new={}, ) - @patch( - "opentelemetry.sdk.metrics._internal.exponential_histogram.mapping." - "logarithm_mapping.LogarithmMapping._init" - ) + @patch("opentelemetry.sdk.metrics._internal.exponential_histogram.mapping.logarithm_mapping.LogarithmMapping._init") def test_init_called_once(self, mock_init): # pylint: disable=no-self-use LogarithmMapping(3) LogarithmMapping(3) @@ -80,72 +77,36 @@ def test_logarithm_mapping_scale_one(self): # 1, because we expect errors in that case (e.g., # MapToIndex(8) returns 5, an off-by-one. See the following # test. - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(15), 7 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(9), 6 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(7), 5 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(5), 4 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(3), 3 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(2.5), 2 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(1.5), 1 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(1.2), 0 - ) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(15), 7) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(9), 6) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(7), 5) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(5), 4) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(3), 3) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(2.5), 2) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(1.5), 1) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(1.2), 0) # This one is actually an exact test - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(1), -1 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(0.75), -1 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(0.55), -2 - ) - self.assertEqual( - logarithm_exponent_histogram_mapping.map_to_index(0.45), -3 - ) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(1), -1) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(0.75), -1) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(0.55), -2) + self.assertEqual(logarithm_exponent_histogram_mapping.map_to_index(0.45), -3) def test_logarithm_boundary(self): for scale in [1, 2, 3, 4, 10, 15]: logarithm_exponent_histogram_mapping = LogarithmMapping(scale) for index in [-100, -10, -1, 0, 1, 10, 100]: - lower_boundary = ( - logarithm_exponent_histogram_mapping.get_lower_boundary( - index - ) - ) - - mapped_index = ( - logarithm_exponent_histogram_mapping.map_to_index( - lower_boundary - ) - ) + lower_boundary = logarithm_exponent_histogram_mapping.get_lower_boundary(index) + + mapped_index = logarithm_exponent_histogram_mapping.map_to_index(lower_boundary) self.assertLessEqual(index - 1, mapped_index) self.assertGreaterEqual(index, mapped_index) - self.assertInEpsilon( - lower_boundary, left_boundary(scale, index), 1e-9 - ) + self.assertInEpsilon(lower_boundary, left_boundary(scale, index), 1e-9) def test_logarithm_index_max(self): - for scale in range( - LogarithmMapping._min_scale, LogarithmMapping._max_scale + 1 - ): + for scale in range(LogarithmMapping._min_scale, LogarithmMapping._max_scale + 1): logarithm_mapping = LogarithmMapping(scale) index = logarithm_mapping.map_to_index(MAX_NORMAL_VALUE) @@ -163,9 +124,7 @@ def test_logarithm_index_max(self): self.assertLess(boundary, MAX_NORMAL_VALUE) - self.assertInEpsilon( - (MAX_NORMAL_VALUE - boundary) / boundary, base - 1, 1e-6 - ) + self.assertInEpsilon((MAX_NORMAL_VALUE - boundary) / boundary, base - 1, 1e-6) with self.assertRaises(MappingOverflowError): logarithm_mapping.get_lower_boundary(index + 1) @@ -174,9 +133,7 @@ def test_logarithm_index_max(self): logarithm_mapping.get_lower_boundary(index + 2) def test_logarithm_index_min(self): - for scale in range( - LogarithmMapping._min_scale, LogarithmMapping._max_scale + 1 - ): + for scale in range(LogarithmMapping._min_scale, LogarithmMapping._max_scale + 1): logarithm_mapping = LogarithmMapping(scale) min_index = logarithm_mapping.map_to_index(MIN_NORMAL_VALUE) @@ -206,19 +163,13 @@ def test_logarithm_index_min(self): logarithm_mapping.map_to_index(MIN_NORMAL_VALUE / 100), correct_min_index, ) - self.assertEqual( - logarithm_mapping.map_to_index(2**-1050), correct_min_index - ) - self.assertEqual( - logarithm_mapping.map_to_index(2**-1073), correct_min_index - ) + self.assertEqual(logarithm_mapping.map_to_index(2**-1050), correct_min_index) + self.assertEqual(logarithm_mapping.map_to_index(2**-1073), correct_min_index) self.assertEqual( logarithm_mapping.map_to_index(1.1 * 2**-1073), correct_min_index, ) - self.assertEqual( - logarithm_mapping.map_to_index(2**-1074), correct_min_index - ) + self.assertEqual(logarithm_mapping.map_to_index(2**-1074), correct_min_index) mapped_lower = logarithm_mapping.get_lower_boundary(min_index) self.assertInEpsilon(correct_mapped, mapped_lower, 1e-6) diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py b/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py index a3b14e7dcf6..874ac6ceefb 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_console_exporter.py @@ -29,15 +29,11 @@ def tearDown(self): def test_console_exporter(self): output = StringIO() exporter = ConsoleMetricExporter(out=output) - reader = PeriodicExportingMetricReader( - exporter, export_interval_millis=100 - ) + reader = PeriodicExportingMetricReader(exporter, export_interval_millis=100) provider = MeterProvider(metric_readers=[reader]) set_meter_provider(provider) meter = get_meter(__name__) - counter = meter.create_counter( - "name", description="description", unit="unit" - ) + counter = meter.create_counter("name", description="description", unit="unit") counter.add(1, attributes={"a": "b"}) provider.shutdown() @@ -69,9 +65,7 @@ def test_console_exporter(self): def test_console_exporter_no_export(self): output = StringIO() exporter = ConsoleMetricExporter(out=output) - reader = PeriodicExportingMetricReader( - exporter, export_interval_millis=100 - ) + reader = PeriodicExportingMetricReader(exporter, export_interval_millis=100) provider = MeterProvider(metric_readers=[reader]) provider.shutdown() @@ -90,17 +84,11 @@ def test_console_exporter_with_exemplars(self): output = StringIO() exporter = ConsoleMetricExporter(out=output) - reader = PeriodicExportingMetricReader( - exporter, export_interval_millis=100 - ) - provider = MeterProvider( - metric_readers=[reader], exemplar_filter=AlwaysOnExemplarFilter() - ) + reader = PeriodicExportingMetricReader(exporter, export_interval_millis=100) + provider = MeterProvider(metric_readers=[reader], exemplar_filter=AlwaysOnExemplarFilter()) set_meter_provider(provider) meter = get_meter(__name__) - counter = meter.create_counter( - "name", description="description", unit="unit" - ) + counter = meter.create_counter("name", description="description", unit="unit") counter.add(1, attributes={"a": "b"}, context=ctx) provider.shutdown() diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py b/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py index a0fedc371cc..d9077875def 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_cpu_time.py @@ -181,33 +181,15 @@ def cpu_time_callback( if not line.startswith("cpu"): break cpu, *states = line.split() - yield Observation( - int(states[0]) / 100, {"cpu": cpu, "state": "user"} - ) - yield Observation( - int(states[1]) / 100, {"cpu": cpu, "state": "nice"} - ) - yield Observation( - int(states[2]) / 100, {"cpu": cpu, "state": "system"} - ) - yield Observation( - int(states[3]) / 100, {"cpu": cpu, "state": "idle"} - ) - yield Observation( - int(states[4]) / 100, {"cpu": cpu, "state": "iowait"} - ) - yield Observation( - int(states[5]) / 100, {"cpu": cpu, "state": "irq"} - ) - yield Observation( - int(states[6]) / 100, {"cpu": cpu, "state": "softirq"} - ) - yield Observation( - int(states[7]) / 100, {"cpu": cpu, "state": "guest"} - ) - yield Observation( - int(states[8]) / 100, {"cpu": cpu, "state": "guest_nice"} - ) + yield Observation(int(states[0]) / 100, {"cpu": cpu, "state": "user"}) + yield Observation(int(states[1]) / 100, {"cpu": cpu, "state": "nice"}) + yield Observation(int(states[2]) / 100, {"cpu": cpu, "state": "system"}) + yield Observation(int(states[3]) / 100, {"cpu": cpu, "state": "idle"}) + yield Observation(int(states[4]) / 100, {"cpu": cpu, "state": "iowait"}) + yield Observation(int(states[5]) / 100, {"cpu": cpu, "state": "irq"}) + yield Observation(int(states[6]) / 100, {"cpu": cpu, "state": "softirq"}) + yield Observation(int(states[7]) / 100, {"cpu": cpu, "state": "guest"}) + yield Observation(int(states[8]) / 100, {"cpu": cpu, "state": "guest_nice"}) meter = MeterProvider().get_meter("name") observable_counter = meter.create_observable_counter( @@ -217,14 +199,10 @@ def cpu_time_callback( description="CPU time", ) measurements = list(observable_counter.callback(CallbackOptions())) - self.assertEqual( - measurements, self.create_measurements_expected(observable_counter) - ) + self.assertEqual(measurements, self.create_measurements_expected(observable_counter)) def test_cpu_time_generator(self): - def cpu_time_generator() -> Generator[ - Iterable[Observation], None, None - ]: + def cpu_time_generator() -> Generator[Iterable[Observation], None, None]: options = yield while True: self.assertIsInstance(options, CallbackOptions) @@ -265,11 +243,7 @@ def cpu_time_generator() -> Generator[ {"cpu": cpu, "state": "iowait"}, ) ) - measurements.append( - Observation( - int(states[5]) / 100, {"cpu": cpu, "state": "irq"} - ) - ) + measurements.append(Observation(int(states[5]) / 100, {"cpu": cpu, "state": "irq"})) measurements.append( Observation( int(states[6]) / 100, @@ -298,8 +272,6 @@ def cpu_time_generator() -> Generator[ description="CPU time", ) measurements = list(observable_counter.callback(CallbackOptions())) - self.assertEqual( - measurements, self.create_measurements_expected(observable_counter) - ) + self.assertEqual(measurements, self.create_measurements_expected(observable_counter)) maxDiff = None diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_disable_default_views.py b/opentelemetry-sdk/tests/metrics/integration_test/test_disable_default_views.py index 7fcfd629bdb..0efeeed89a1 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_disable_default_views.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_disable_default_views.py @@ -42,9 +42,7 @@ def test_disable_default_views_add_custom(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) self.assertEqual( metrics.resource_metrics[0].scope_metrics[0].metrics[0].name, "testhist", diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_exemplars.py b/opentelemetry-sdk/tests/metrics/integration_test/test_exemplars.py index 859a1ec57c9..d6ebefb4451 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_exemplars.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_exemplars.py @@ -62,9 +62,7 @@ def test_always_on_exemplars(self): ], ) - @mock.patch.dict( - os.environ, {"OTEL_METRICS_EXEMPLAR_FILTER": "trace_based"} - ) + @mock.patch.dict(os.environ, {"OTEL_METRICS_EXEMPLAR_FILTER": "trace_based"}) def test_trace_based_exemplars(self): span_context = SpanContext( trace_id=self.TRACE_ID, @@ -258,9 +256,7 @@ def test_exemplar_trace_based_manual_context(self): ], ) - @mock.patch.dict( - os.environ, {"OTEL_METRICS_EXEMPLAR_FILTER": "always_off"} - ) + @mock.patch.dict(os.environ, {"OTEL_METRICS_EXEMPLAR_FILTER": "always_off"}) def test_always_off_exemplars(self): span_context = SpanContext( trace_id=self.TRACE_ID, diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py b/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py index 857daa940bc..3d23698f0a0 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_explicit_bucket_histogram_aggregation.py @@ -57,13 +57,7 @@ def test_synchronous_delta_temporality(self): histogram.record(test_value) results.append(reader.get_metrics_data()) - metric_data = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] previous_time_unix_nano = metric_data.time_unix_nano @@ -81,30 +75,16 @@ def test_synchronous_delta_temporality(self): self.assertEqual(metric_data.sum, self.test_values[0]) for index, metrics_data in enumerate(results[1:]): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] - self.assertEqual( - previous_time_unix_nano, metric_data.start_time_unix_nano - ) + self.assertEqual(previous_time_unix_nano, metric_data.start_time_unix_nano) previous_time_unix_nano = metric_data.time_unix_nano self.assertEqual( metric_data.bucket_counts, # pylint: disable=consider-using-generator - tuple( - [ - 1 if internal_index == index + 2 else 0 - for internal_index in range(16) - ] - ), - ) - self.assertLess( - metric_data.start_time_unix_nano, metric_data.time_unix_nano + tuple([1 if internal_index == index + 2 else 0 for internal_index in range(16)]), ) + self.assertLess(metric_data.start_time_unix_nano, metric_data.time_unix_nano) self.assertEqual(metric_data.min, self.test_values[index + 1]) self.assertEqual(metric_data.max, self.test_values[index + 1]) self.assertEqual(metric_data.sum, self.test_values[index + 1]) @@ -128,26 +108,12 @@ def test_synchronous_delta_temporality(self): histogram.record(2) results.append(reader.get_metrics_data()) - metric_data_0 = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - metric_data_2 = ( - results[2] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data_0 = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + metric_data_2 = results[2].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] self.assertIsNone(results[1]) - self.assertGreater( - metric_data_2.start_time_unix_nano, metric_data_0.time_unix_nano - ) + self.assertGreater(metric_data_2.start_time_unix_nano, metric_data_0.time_unix_nano) provider.shutdown() @@ -164,9 +130,7 @@ def test_synchronous_cumulative_temporality(self): reader = InMemoryMetricReader( preferred_aggregation={Histogram: aggregation}, - preferred_temporality={ - Histogram: AggregationTemporality.CUMULATIVE - }, + preferred_temporality={Histogram: AggregationTemporality.CUMULATIVE}, ) provider = MeterProvider(metric_readers=[reader]) @@ -192,44 +156,21 @@ def test_synchronous_cumulative_temporality(self): results.append(reader.get_metrics_data()) start_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano ) for index, metrics_data in enumerate(results): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] - self.assertEqual( - start_time_unix_nano, metric_data.start_time_unix_nano - ) + self.assertEqual(start_time_unix_nano, metric_data.start_time_unix_nano) self.assertEqual( metric_data.bucket_counts, # pylint: disable=consider-using-generator - tuple( - [ - ( - 0 - if internal_index < 1 or internal_index > index + 1 - else 1 - ) - for internal_index in range(16) - ] - ), + tuple([(0 if internal_index < 1 or internal_index > index + 1 else 1) for internal_index in range(16)]), ) self.assertEqual(metric_data.min, self.test_values[0]) self.assertEqual(metric_data.max, self.test_values[index]) - self.assertEqual( - metric_data.sum, sum(self.test_values[: index + 1]) - ) + self.assertEqual(metric_data.sum, sum(self.test_values[: index + 1])) results = [] @@ -239,25 +180,13 @@ def test_synchronous_cumulative_temporality(self): provider.shutdown() start_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano ) for metrics_data in results: - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] - self.assertEqual( - start_time_unix_nano, metric_data.start_time_unix_nano - ) + self.assertEqual(start_time_unix_nano, metric_data.start_time_unix_nano) self.assertEqual( metric_data.bucket_counts, (0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0), diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_exponential_bucket_histogram.py b/opentelemetry-sdk/tests/metrics/integration_test/test_exponential_bucket_histogram.py index 7da23dea759..6d435c5d7b4 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_exponential_bucket_histogram.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_exponential_bucket_histogram.py @@ -71,13 +71,7 @@ def test_synchronous_delta_temporality(self): histogram.record(test_value) results.append(reader.get_metrics_data()) - metric_data = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] previous_time_unix_nano = metric_data.time_unix_nano @@ -93,29 +87,18 @@ def test_synchronous_delta_temporality(self): self.assertEqual(metric_data.sum, self.test_values[0]) for index, metrics_data in enumerate(results[1:]): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] - self.assertEqual( - previous_time_unix_nano, metric_data.start_time_unix_nano - ) + self.assertEqual(previous_time_unix_nano, metric_data.start_time_unix_nano) previous_time_unix_nano = metric_data.time_unix_nano self.assertEqual(metric_data.positive.bucket_counts, [1]) self.assertEqual(metric_data.negative.bucket_counts, [0]) - self.assertLess( - metric_data.start_time_unix_nano, metric_data.time_unix_nano - ) + self.assertLess(metric_data.start_time_unix_nano, metric_data.time_unix_nano) self.assertEqual(metric_data.min, self.test_values[index + 1]) self.assertEqual(metric_data.max, self.test_values[index + 1]) # Using assertAlmostEqual here because in 3.12 resolution can cause # these checks to fail. - self.assertAlmostEqual( - metric_data.sum, self.test_values[index + 1] - ) + self.assertAlmostEqual(metric_data.sum, self.test_values[index + 1]) # The test scenario here is calling collect without calling aggregate # immediately before, but having aggregate being called before at some @@ -142,26 +125,12 @@ def test_synchronous_delta_temporality(self): histogram.record(2) results.append(reader.get_metrics_data()) - metric_data_0 = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - metric_data_2 = ( - results[2] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data_0 = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + metric_data_2 = results[2].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] self.assertIsNone(results[1]) - self.assertGreater( - metric_data_2.start_time_unix_nano, metric_data_0.time_unix_nano - ) + self.assertGreater(metric_data_2.start_time_unix_nano, metric_data_0.time_unix_nano) provider.shutdown() @@ -178,9 +147,7 @@ def test_synchronous_cumulative_temporality(self): reader = InMemoryMetricReader( preferred_aggregation={Histogram: aggregation}, - preferred_temporality={ - Histogram: AggregationTemporality.CUMULATIVE - }, + preferred_temporality={Histogram: AggregationTemporality.CUMULATIVE}, ) provider = MeterProvider(metric_readers=[reader]) @@ -205,13 +172,7 @@ def test_synchronous_cumulative_temporality(self): histogram.record(test_value) results.append(reader.get_metrics_data()) - metric_data = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] start_time_unix_nano = metric_data.start_time_unix_nano @@ -226,33 +187,18 @@ def test_synchronous_cumulative_temporality(self): previous_time_unix_nano = metric_data.time_unix_nano for index, metrics_data in enumerate(results[1:]): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] - self.assertEqual( - start_time_unix_nano, metric_data.start_time_unix_nano - ) + self.assertEqual(start_time_unix_nano, metric_data.start_time_unix_nano) self.assertLess( metric_data.start_time_unix_nano, metric_data.time_unix_nano, ) - self.assertEqual( - metric_data.min, min(self.test_values[: index + 2]) - ) - self.assertEqual( - metric_data.max, max(self.test_values[: index + 2]) - ) - self.assertAlmostEqual( - metric_data.sum, sum(self.test_values[: index + 2]) - ) + self.assertEqual(metric_data.min, min(self.test_values[: index + 2])) + self.assertEqual(metric_data.max, max(self.test_values[: index + 2])) + self.assertAlmostEqual(metric_data.sum, sum(self.test_values[: index + 2])) - self.assertGreater( - metric_data.time_unix_nano, previous_time_unix_nano - ) + self.assertGreater(metric_data.time_unix_nano, previous_time_unix_nano) previous_time_unix_nano = metric_data.time_unix_nano @@ -284,13 +230,7 @@ def test_synchronous_cumulative_temporality(self): provider.shutdown() - metric_data = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] start_time_unix_nano = metric_data.start_time_unix_nano @@ -305,12 +245,7 @@ def test_synchronous_cumulative_temporality(self): previous_metric_data = metric_data for index, metrics_data in enumerate(results[1:]): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] self.assertEqual( previous_metric_data.start_time_unix_nano, diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_exporter_concurrency.py b/opentelemetry-sdk/tests/metrics/integration_test/test_exporter_concurrency.py index 43d225b4e0d..5dd45df4ce5 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_exporter_concurrency.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_exporter_concurrency.py @@ -43,9 +43,7 @@ def export( time.sleep(0) with self._lock: - self.max_count_in_export = max( - self.max_count_in_export, self.count_in_export - ) + self.max_count_in_export = max(self.max_count_in_export, self.count_in_export) self.count_in_export -= 1 def force_flush(self, timeout_millis: float = 10_000) -> bool: @@ -89,9 +87,7 @@ def counter_cb(options: CallbackOptions): counter_cb_counter += 1 yield Observation(2) - meter_provider.get_meter(__name__).create_observable_counter( - "testcounter", callbacks=[counter_cb] - ) + meter_provider.get_meter(__name__).create_observable_counter("testcounter", callbacks=[counter_cb]) # call collect from a bunch of threads to try and enter export() concurrently def test_many_threads(): diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_advisory_explicit_buckets.py b/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_advisory_explicit_buckets.py index 80888751bc8..9665e2b0cb3 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_advisory_explicit_buckets.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_advisory_explicit_buckets.py @@ -33,14 +33,10 @@ def test_default(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) metric = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric.name, "testhistogram") - self.assertEqual( - metric.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0) - ) + self.assertEqual(metric.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0)) def test_empty_buckets(self): reader = InMemoryMetricReader() @@ -59,9 +55,7 @@ def test_empty_buckets(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) metric = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric.name, "testhistogram") self.assertEqual(metric.data.data_points[0].explicit_bounds, ()) @@ -85,22 +79,16 @@ def test_view_default_aggregation(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) metric = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric.name, "testhistogram") - self.assertEqual( - metric.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0) - ) + self.assertEqual(metric.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0)) def test_view_overrides_buckets(self): reader = InMemoryMetricReader() view = View( instrument_name="testhistogram", - aggregation=ExplicitBucketHistogramAggregation( - boundaries=[10.0, 100.0, 1000.0] - ), + aggregation=ExplicitBucketHistogramAggregation(boundaries=[10.0, 100.0, 1000.0]), ) meter_provider = MeterProvider( metric_readers=[reader], @@ -118,21 +106,13 @@ def test_view_overrides_buckets(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) metric = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric.name, "testhistogram") - self.assertEqual( - metric.data.data_points[0].explicit_bounds, (10.0, 100.0, 1000.0) - ) + self.assertEqual(metric.data.data_points[0].explicit_bounds, (10.0, 100.0, 1000.0)) def test_explicit_aggregation(self): - reader = InMemoryMetricReader( - preferred_aggregation={ - Histogram: ExplicitBucketHistogramAggregation() - } - ) + reader = InMemoryMetricReader(preferred_aggregation={Histogram: ExplicitBucketHistogramAggregation()}) meter_provider = MeterProvider( metric_readers=[reader], ) @@ -148,21 +128,13 @@ def test_explicit_aggregation(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) metric = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric.name, "testhistogram") - self.assertEqual( - metric.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0) - ) + self.assertEqual(metric.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0)) def test_explicit_aggregation_multiple_histograms(self): - reader = InMemoryMetricReader( - preferred_aggregation={ - Histogram: ExplicitBucketHistogramAggregation() - } - ) + reader = InMemoryMetricReader(preferred_aggregation={Histogram: ExplicitBucketHistogramAggregation()}) meter_provider = MeterProvider( metric_readers=[reader], ) @@ -187,26 +159,16 @@ def test_explicit_aggregation_multiple_histograms(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 2 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 2) metric1 = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric1.name, "testhistogram1") - self.assertEqual( - metric1.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0) - ) + self.assertEqual(metric1.data.data_points[0].explicit_bounds, (1.0, 2.0, 3.0)) metric2 = metrics.resource_metrics[0].scope_metrics[0].metrics[1] self.assertEqual(metric2.name, "testhistogram2") - self.assertEqual( - metric2.data.data_points[0].explicit_bounds, (4.0, 5.0, 6.0) - ) + self.assertEqual(metric2.data.data_points[0].explicit_bounds, (4.0, 5.0, 6.0)) def test_explicit_aggregation_default_boundaries(self): - reader = InMemoryMetricReader( - preferred_aggregation={ - Histogram: ExplicitBucketHistogramAggregation() - } - ) + reader = InMemoryMetricReader(preferred_aggregation={Histogram: ExplicitBucketHistogramAggregation()}) meter_provider = MeterProvider( metric_readers=[reader], ) @@ -222,9 +184,7 @@ def test_explicit_aggregation_default_boundaries(self): metrics = reader.get_metrics_data() self.assertEqual(len(metrics.resource_metrics), 1) self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) - self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 1) metric = metrics.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(metric.name, "testhistogram") self.assertEqual( diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_export.py b/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_export.py index 541be174364..f07b14e76cf 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_export.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_histogram_export.py @@ -30,54 +30,26 @@ def test_histogram_counter_collection(self): metric_data = in_memory_metric_reader.get_metrics_data() - self.assertEqual( - len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 2 - ) + self.assertEqual(len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 2) self.assertEqual( - ( - metric_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .bucket_counts - ), + (metric_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].bucket_counts), (0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ) self.assertEqual( - ( - metric_data.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points[0] - .value - ), + (metric_data.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points[0].value), 1, ) metric_data = in_memory_metric_reader.get_metrics_data() + self.assertEqual(len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 2) self.assertEqual( - len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 2 - ) - self.assertEqual( - ( - metric_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .bucket_counts - ), + (metric_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].bucket_counts), (0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ) self.assertEqual( - ( - metric_data.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points[0] - .value - ), + (metric_data.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points[0].value), 1, ) @@ -92,53 +64,29 @@ def test_histogram_with_exemplars(self): meter = provider.get_meter("my-meter") histogram = meter.create_histogram("my_histogram") - histogram.record( - 2, {"attribute": "value1"} - ) # Should go in the first bucket - histogram.record( - 7, {"attribute": "value2"} - ) # Should go in the second bucket - histogram.record( - 9, {"attribute": "value2"} - ) # Should also go in the second bucket - histogram.record( - 15, {"attribute": "value3"} - ) # Should go in the third bucket + histogram.record(2, {"attribute": "value1"}) # Should go in the first bucket + histogram.record(7, {"attribute": "value2"}) # Should go in the second bucket + histogram.record(9, {"attribute": "value2"}) # Should also go in the second bucket + histogram.record(15, {"attribute": "value3"}) # Should go in the third bucket metric_data = in_memory_metric_reader.get_metrics_data() - self.assertEqual( - len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 1 - ) - histogram_metric = ( - metric_data.resource_metrics[0].scope_metrics[0].metrics[0] - ) + self.assertEqual(len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 1) + histogram_metric = metric_data.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(len(histogram_metric.data.data_points), 3) - self.assertEqual( - len(histogram_metric.data.data_points[0].exemplars), 1 - ) - self.assertEqual( - len(histogram_metric.data.data_points[1].exemplars), 1 - ) - self.assertEqual( - len(histogram_metric.data.data_points[2].exemplars), 1 - ) + self.assertEqual(len(histogram_metric.data.data_points[0].exemplars), 1) + self.assertEqual(len(histogram_metric.data.data_points[1].exemplars), 1) + self.assertEqual(len(histogram_metric.data.data_points[2].exemplars), 1) self.assertEqual(histogram_metric.data.data_points[0].sum, 2) self.assertEqual(histogram_metric.data.data_points[1].sum, 16) self.assertEqual(histogram_metric.data.data_points[2].sum, 15) - self.assertEqual( - histogram_metric.data.data_points[0].exemplars[0].value, 2.0 - ) - self.assertEqual( - histogram_metric.data.data_points[1].exemplars[0].value, 9.0 - ) - self.assertEqual( - histogram_metric.data.data_points[2].exemplars[0].value, 15.0 - ) + self.assertEqual(histogram_metric.data.data_points[0].exemplars[0].value, 2.0) + self.assertEqual(histogram_metric.data.data_points[1].exemplars[0].value, 9.0) + self.assertEqual(histogram_metric.data.data_points[2].exemplars[0].value, 15.0) def test_filter_with_exemplars(self): in_memory_metric_reader = InMemoryMetricReader() @@ -151,27 +99,15 @@ def test_filter_with_exemplars(self): meter = provider.get_meter("my-meter") histogram = meter.create_histogram("my_histogram") - histogram.record( - 2, {"attribute": "value1"} - ) # Should go in the first bucket - histogram.record( - 7, {"attribute": "value2"} - ) # Should go in the second bucket + histogram.record(2, {"attribute": "value1"}) # Should go in the first bucket + histogram.record(7, {"attribute": "value2"}) # Should go in the second bucket metric_data = in_memory_metric_reader.get_metrics_data() - self.assertEqual( - len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 1 - ) - histogram_metric = ( - metric_data.resource_metrics[0].scope_metrics[0].metrics[0] - ) + self.assertEqual(len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 1) + histogram_metric = metric_data.resource_metrics[0].scope_metrics[0].metrics[0] self.assertEqual(len(histogram_metric.data.data_points), 2) - self.assertEqual( - len(histogram_metric.data.data_points[0].exemplars), 0 - ) - self.assertEqual( - len(histogram_metric.data.data_points[1].exemplars), 0 - ) + self.assertEqual(len(histogram_metric.data.data_points[0].exemplars), 0) + self.assertEqual(len(histogram_metric.data.data_points[1].exemplars), 0) diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_provider_shutdown.py b/opentelemetry-sdk/tests/metrics/integration_test/test_provider_shutdown.py index e8eda4dec11..40c965159b6 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_provider_shutdown.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_provider_shutdown.py @@ -17,9 +17,7 @@ class FakeMetricsExporter(MetricExporter): - def __init__( - self, wait=0, preferred_temporality=None, preferred_aggregation=None - ): + def __init__(self, wait=0, preferred_temporality=None, preferred_aggregation=None): self.wait = wait self.metrics = [] self._shutdown = False diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_sum_aggregation.py b/opentelemetry-sdk/tests/metrics/integration_test/test_sum_aggregation.py index a8badf2cd66..f279bfb3d19 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_sum_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_sum_aggregation.py @@ -51,9 +51,7 @@ def observable_counter_callback(callback_options): reader = InMemoryMetricReader( preferred_aggregation={ObservableCounter: aggregation}, - preferred_temporality={ - ObservableCounter: AggregationTemporality.DELTA - }, + preferred_temporality={ObservableCounter: AggregationTemporality.DELTA}, ) provider = MeterProvider(metric_readers=[reader]) @@ -62,9 +60,7 @@ def observable_counter_callback(callback_options): reader._set_meter_provider(NoOpMeterProvider()) meter = provider.get_meter("name", "version") - meter.create_observable_counter( - "observable_counter", [observable_counter_callback] - ) + meter.create_observable_counter("observable_counter", [observable_counter_callback]) results = [] @@ -85,54 +81,26 @@ def observable_counter_callback(callback_options): self.assertEqual(counter, 20) previous_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].time_unix_nano ) self.assertEqual( - ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .value - ), + (results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].value), 8, ) self.assertLess( - ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano - ), + (results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano), previous_time_unix_nano, ) for metrics_data in results[1:]: - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - - self.assertEqual( - previous_time_unix_nano, metric_data.start_time_unix_nano - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + + self.assertEqual(previous_time_unix_nano, metric_data.start_time_unix_nano) previous_time_unix_nano = metric_data.time_unix_nano self.assertEqual(metric_data.value, 8) - self.assertLess( - metric_data.start_time_unix_nano, metric_data.time_unix_nano - ) + self.assertLess(metric_data.start_time_unix_nano, metric_data.time_unix_nano) results = [] @@ -177,9 +145,7 @@ def observable_counter_callback(callback_options): reader = InMemoryMetricReader( preferred_aggregation={ObservableCounter: aggregation}, - preferred_temporality={ - ObservableCounter: AggregationTemporality.CUMULATIVE - }, + preferred_temporality={ObservableCounter: AggregationTemporality.CUMULATIVE}, ) provider = MeterProvider(metric_readers=[reader]) @@ -188,9 +154,7 @@ def observable_counter_callback(callback_options): reader._set_meter_provider(NoOpMeterProvider()) meter = provider.get_meter("name", "version") - meter.create_observable_counter( - "observable_counter", [observable_counter_callback] - ) + meter.create_observable_counter("observable_counter", [observable_counter_callback]) results = [] @@ -211,25 +175,13 @@ def observable_counter_callback(callback_options): self.assertEqual(counter, 20) start_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano ) for index, metrics_data in enumerate(results): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - - self.assertEqual( - start_time_unix_nano, metric_data.start_time_unix_nano - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + + self.assertEqual(start_time_unix_nano, metric_data.start_time_unix_nano) self.assertEqual(metric_data.value, 8 * (index + 1)) results = [] @@ -284,54 +236,26 @@ def test_synchronous_delta_temporality(self): results.append(reader.get_metrics_data()) previous_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].time_unix_nano ) self.assertEqual( - ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .value - ), + (results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].value), 8, ) self.assertLess( - ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano - ), + (results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano), previous_time_unix_nano, ) for metrics_data in results[1:]: - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - - self.assertEqual( - previous_time_unix_nano, metric_data.start_time_unix_nano - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + + self.assertEqual(previous_time_unix_nano, metric_data.start_time_unix_nano) previous_time_unix_nano = metric_data.time_unix_nano self.assertEqual(metric_data.value, 8) - self.assertLess( - metric_data.start_time_unix_nano, metric_data.time_unix_nano - ) + self.assertLess(metric_data.start_time_unix_nano, metric_data.time_unix_nano) results = [] @@ -352,26 +276,12 @@ def test_synchronous_delta_temporality(self): counter.add(2) results.append(reader.get_metrics_data()) - metric_data_0 = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - metric_data_2 = ( - results[2] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) + metric_data_0 = results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + metric_data_2 = results[2].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] self.assertIsNone(results[1]) - self.assertGreater( - metric_data_2.start_time_unix_nano, metric_data_0.time_unix_nano - ) + self.assertGreater(metric_data_2.start_time_unix_nano, metric_data_0.time_unix_nano) provider.shutdown() @@ -414,25 +324,13 @@ def test_synchronous_cumulative_temporality(self): results.append(reader.get_metrics_data()) start_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano ) for index, metrics_data in enumerate(results): - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - - self.assertEqual( - start_time_unix_nano, metric_data.start_time_unix_nano - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + + self.assertEqual(start_time_unix_nano, metric_data.start_time_unix_nano) self.assertEqual(metric_data.value, 8 * (index + 1)) results = [] @@ -443,25 +341,13 @@ def test_synchronous_cumulative_temporality(self): provider.shutdown() start_time_unix_nano = ( - results[0] - .resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - .start_time_unix_nano + results[0].resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0].start_time_unix_nano ) for metrics_data in results: - metric_data = ( - metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ) - - self.assertEqual( - start_time_unix_nano, metric_data.start_time_unix_nano - ) + metric_data = metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0] + + self.assertEqual(start_time_unix_nano, metric_data.start_time_unix_nano) self.assertEqual(metric_data.value, 80) def test_sum_aggregation_with_exemplars(self): @@ -481,13 +367,9 @@ def test_sum_aggregation_with_exemplars(self): metric_data = in_memory_metric_reader.get_metrics_data() - self.assertEqual( - len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metric_data.resource_metrics[0].scope_metrics[0].metrics), 1) - sum_metric = ( - metric_data.resource_metrics[0].scope_metrics[0].metrics[0] - ) + sum_metric = metric_data.resource_metrics[0].scope_metrics[0].metrics[0] data_points = sum_metric.data.data_points self.assertEqual(len(data_points), 3) diff --git a/opentelemetry-sdk/tests/metrics/integration_test/test_time_align.py b/opentelemetry-sdk/tests/metrics/integration_test/test_time_align.py index 88567eafd4e..a442bc0bbd9 100644 --- a/opentelemetry-sdk/tests/metrics/integration_test/test_time_align.py +++ b/opentelemetry-sdk/tests/metrics/integration_test/test_time_align.py @@ -38,18 +38,8 @@ def test_time_align_cumulative(self): metrics = reader.get_metrics_data() - data_points_0_0 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points - ) - data_points_0_1 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points - ) + data_points_0_0 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points) + data_points_0_1 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points) self.assertEqual(len(data_points_0_0), 2) self.assertEqual(len(data_points_0_1), 2) @@ -89,18 +79,8 @@ def test_time_align_cumulative(self): metrics = reader.get_metrics_data() - data_points_1_0 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points - ) - data_points_1_1 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points - ) + data_points_1_0 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points) + data_points_1_1 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points) self.assertEqual(len(data_points_1_0), 2) self.assertEqual(len(data_points_1_1), 2) @@ -148,13 +128,9 @@ def test_time_align_cumulative(self): data_points_1_1[1].start_time_unix_nano, ) - @mark.skipif( - system() != "Linux", reason="test failing in CI when run in Windows" - ) + @mark.skipif(system() != "Linux", reason="test failing in CI when run in Windows") def test_time_align_delta(self): - reader = InMemoryMetricReader( - preferred_temporality={Counter: AggregationTemporality.DELTA} - ) + reader = InMemoryMetricReader(preferred_temporality={Counter: AggregationTemporality.DELTA}) meter_provider = MeterProvider(metric_readers=[reader]) meter = meter_provider.get_meter("testmeter") @@ -172,18 +148,8 @@ def test_time_align_delta(self): metrics = reader.get_metrics_data() - data_points_0_0 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points - ) - data_points_0_1 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points - ) + data_points_0_0 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points) + data_points_0_1 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points) self.assertEqual(len(data_points_0_0), 2) self.assertEqual(len(data_points_0_1), 2) @@ -223,18 +189,8 @@ def test_time_align_delta(self): metrics = reader.get_metrics_data() - data_points_1_0 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points - ) - data_points_1_1 = list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points - ) + data_points_1_0 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points) + data_points_1_1 = list(metrics.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points) self.assertEqual(len(data_points_1_0), 2) self.assertEqual(len(data_points_1_1), 2) diff --git a/opentelemetry-sdk/tests/metrics/scripts/meter_provider_resource_after_fork.py b/opentelemetry-sdk/tests/metrics/scripts/meter_provider_resource_after_fork.py index dea20543193..45a3ef52afc 100644 --- a/opentelemetry-sdk/tests/metrics/scripts/meter_provider_resource_after_fork.py +++ b/opentelemetry-sdk/tests/metrics/scripts/meter_provider_resource_after_fork.py @@ -10,10 +10,7 @@ def _resource_pids(metrics_data) -> list[int]: - return [ - resource_metric.resource.attributes[PROCESS_PID] - for resource_metric in metrics_data.resource_metrics - ] + return [resource_metric.resource.attributes[PROCESS_PID] for resource_metric in metrics_data.resource_metrics] def _metric_names(metrics_data) -> list[str]: @@ -28,16 +25,12 @@ def _metric_names(metrics_data) -> list[str]: # pylint: disable-next=too-many-locals def main() -> None: reader = InMemoryMetricReader() - meter_provider = MeterProvider( - metric_readers=[reader], shutdown_on_exit=False - ) + meter_provider = MeterProvider(metric_readers=[reader], shutdown_on_exit=False) meter = meter_provider.get_meter("cached") counter = meter.create_counter("cached_counter") parent_pid = os.getpid() # pylint: disable-next=protected-access - parent_resource_pid = meter_provider._sdk_config.resource.attributes[ - PROCESS_PID - ] + parent_resource_pid = meter_provider._sdk_config.resource.attributes[PROCESS_PID] pid = os.fork() if not pid: @@ -52,9 +45,7 @@ def main() -> None: { "child_pid": child_pid, # pylint: disable-next=protected-access - "provider_pid": meter_provider._sdk_config.resource.attributes[ - PROCESS_PID - ], + "provider_pid": meter_provider._sdk_config.resource.attributes[PROCESS_PID], "exported_resource_pids": _resource_pids(metrics_data), "metric_names": _metric_names(metrics_data), } @@ -71,9 +62,7 @@ def main() -> None: "parent_pid": parent_pid, "parent_resource_pid": parent_resource_pid, # pylint: disable-next=protected-access - "parent_resource_pid_after_fork": meter_provider._sdk_config.resource.attributes[ - PROCESS_PID - ], + "parent_resource_pid_after_fork": meter_provider._sdk_config.resource.attributes[PROCESS_PID], } ), flush=True, diff --git a/opentelemetry-sdk/tests/metrics/test_aggregation.py b/opentelemetry-sdk/tests/metrics/test_aggregation.py index ba1d4757301..b85f022727d 100644 --- a/opentelemetry-sdk/tests/metrics/test_aggregation.py +++ b/opentelemetry-sdk/tests/metrics/test_aggregation.py @@ -135,24 +135,18 @@ def test_collect_delta(self): synchronous_sum_aggregation.aggregate(measurement(1)) # 1 is used here directly to simulate the instant the first # collection process starts. - first_sum = synchronous_sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + first_sum = synchronous_sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertEqual(first_sum.value, 1) synchronous_sum_aggregation.aggregate(measurement(1)) # 2 is used here directly to simulate the instant the first # collection process starts. - second_sum = synchronous_sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 2 - ) + second_sum = synchronous_sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 2) self.assertEqual(second_sum.value, 2) - self.assertEqual( - second_sum.start_time_unix_nano, first_sum.start_time_unix_nano - ) + self.assertEqual(second_sum.start_time_unix_nano, first_sum.start_time_unix_nano) synchronous_sum_aggregation = _SumAggregation( Mock(), @@ -165,24 +159,18 @@ def test_collect_delta(self): synchronous_sum_aggregation.aggregate(measurement(1)) # 1 is used here directly to simulate the instant the first # collection process starts. - first_sum = synchronous_sum_aggregation.collect( - AggregationTemporality.DELTA, 1 - ) + first_sum = synchronous_sum_aggregation.collect(AggregationTemporality.DELTA, 1) self.assertEqual(first_sum.value, 1) synchronous_sum_aggregation.aggregate(measurement(1)) # 2 is used here directly to simulate the instant the first # collection process starts. - second_sum = synchronous_sum_aggregation.collect( - AggregationTemporality.DELTA, 2 - ) + second_sum = synchronous_sum_aggregation.collect(AggregationTemporality.DELTA, 2) self.assertEqual(second_sum.value, 1) - self.assertGreater( - second_sum.start_time_unix_nano, first_sum.start_time_unix_nano - ) + self.assertGreater(second_sum.start_time_unix_nano, first_sum.start_time_unix_nano) def test_collect_cumulative(self): """ @@ -198,28 +186,20 @@ def test_collect_cumulative(self): ) sum_aggregation.aggregate(measurement(1)) - first_sum = sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + first_sum = sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertEqual(first_sum.value, 1) # should have been reset after first collect sum_aggregation.aggregate(measurement(1)) - second_sum = sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + second_sum = sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertEqual(second_sum.value, 1) - self.assertEqual( - second_sum.start_time_unix_nano, first_sum.start_time_unix_nano - ) + self.assertEqual(second_sum.start_time_unix_nano, first_sum.start_time_unix_nano) # if no point seen for a whole interval, should return None - third_sum = sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + third_sum = sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertIsNone(third_sum) @@ -230,9 +210,7 @@ def test_aggregate(self): temporality """ - last_value_aggregation = _LastValueAggregation( - Mock(), _default_reservoir_factory(_LastValueAggregation) - ) + last_value_aggregation = _LastValueAggregation(Mock(), _default_reservoir_factory(_LastValueAggregation)) last_value_aggregation.aggregate(measurement(1)) self.assertEqual(last_value_aggregation._value, 1) @@ -248,22 +226,14 @@ def test_collect(self): `LastValueAggregation` collects number data points """ - last_value_aggregation = _LastValueAggregation( - Mock(), _default_reservoir_factory(_LastValueAggregation) - ) + last_value_aggregation = _LastValueAggregation(Mock(), _default_reservoir_factory(_LastValueAggregation)) - self.assertIsNone( - last_value_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) - ) + self.assertIsNone(last_value_aggregation.collect(AggregationTemporality.CUMULATIVE, 1)) last_value_aggregation.aggregate(measurement(1)) # 1 is used here directly to simulate the instant the first # collection process starts. - first_number_data_point = last_value_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + first_number_data_point = last_value_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertIsInstance(first_number_data_point, NumberDataPoint) self.assertEqual(first_number_data_point.value, 1) @@ -277,9 +247,7 @@ def test_collect(self): # 2 is used here directly to simulate the instant the second # collection process starts. - second_number_data_point = last_value_aggregation.collect( - AggregationTemporality.CUMULATIVE, 2 - ) + second_number_data_point = last_value_aggregation.collect(AggregationTemporality.CUMULATIVE, 2) self.assertEqual(second_number_data_point.value, 1) @@ -292,9 +260,7 @@ def test_collect(self): # 3 is used here directly to simulate the instant the second # collection process starts. - third_number_data_point = last_value_aggregation.collect( - AggregationTemporality.CUMULATIVE, 3 - ) + third_number_data_point = last_value_aggregation.collect(AggregationTemporality.CUMULATIVE, 3) self.assertIsNone(third_number_data_point) @@ -304,16 +270,12 @@ def test_aggregate(self): Test `ExplicitBucketHistogramAggregation with custom boundaries """ - explicit_bucket_histogram_aggregation = ( - _ExplicitBucketHistogramAggregation( - Mock(), - AggregationTemporality.DELTA, - 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), - boundaries=[0, 2, 4], - ) + explicit_bucket_histogram_aggregation = _ExplicitBucketHistogramAggregation( + Mock(), + AggregationTemporality.DELTA, + 0, + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), + boundaries=[0, 2, 4], ) explicit_bucket_histogram_aggregation.aggregate(measurement(-1)) @@ -336,9 +298,7 @@ def test_aggregate(self): # The fourth bucket keeps count of values between (4, inf) (3 and 4) self.assertEqual(explicit_bucket_histogram_aggregation._value[3], 1) - histo = explicit_bucket_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + histo = explicit_bucket_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertEqual(histo.sum, 14) def test_min_max(self): @@ -347,15 +307,11 @@ def test_min_max(self): maximum value in the population """ - explicit_bucket_histogram_aggregation = ( - _ExplicitBucketHistogramAggregation( - Mock(), - AggregationTemporality.CUMULATIVE, - 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), - ) + explicit_bucket_histogram_aggregation = _ExplicitBucketHistogramAggregation( + Mock(), + AggregationTemporality.CUMULATIVE, + 0, + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), ) explicit_bucket_histogram_aggregation.aggregate(measurement(-1)) @@ -367,16 +323,12 @@ def test_min_max(self): self.assertEqual(explicit_bucket_histogram_aggregation._min, -1) self.assertEqual(explicit_bucket_histogram_aggregation._max, 9999) - explicit_bucket_histogram_aggregation = ( - _ExplicitBucketHistogramAggregation( - Mock(), - AggregationTemporality.CUMULATIVE, - 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), - record_min_max=False, - ) + explicit_bucket_histogram_aggregation = _ExplicitBucketHistogramAggregation( + Mock(), + AggregationTemporality.CUMULATIVE, + 0, + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), + record_min_max=False, ) explicit_bucket_histogram_aggregation.aggregate(measurement(-1)) @@ -393,24 +345,18 @@ def test_collect(self): `_ExplicitBucketHistogramAggregation` collects sum metric points """ - explicit_bucket_histogram_aggregation = ( - _ExplicitBucketHistogramAggregation( - Mock(), - AggregationTemporality.DELTA, - 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), - boundaries=[0, 1, 2], - ) + explicit_bucket_histogram_aggregation = _ExplicitBucketHistogramAggregation( + Mock(), + AggregationTemporality.DELTA, + 0, + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), + boundaries=[0, 1, 2], ) explicit_bucket_histogram_aggregation.aggregate(measurement(1)) # 1 is used here directly to simulate the instant the first # collection process starts. - first_histogram = explicit_bucket_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, 1 - ) + first_histogram = explicit_bucket_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, 1) self.assertEqual(first_histogram.bucket_counts, (0, 1, 0, 0)) self.assertEqual(first_histogram.sum, 1) @@ -422,16 +368,12 @@ def test_collect(self): # 2 is used here directly to simulate the instant the second # collection process starts. - second_histogram = explicit_bucket_histogram_aggregation.collect( - AggregationTemporality.CUMULATIVE, 2 - ) + second_histogram = explicit_bucket_histogram_aggregation.collect(AggregationTemporality.CUMULATIVE, 2) self.assertEqual(second_histogram.bucket_counts, (0, 2, 0, 0)) self.assertEqual(second_histogram.sum, 2) - self.assertGreater( - second_histogram.time_unix_nano, first_histogram.time_unix_nano - ) + self.assertGreater(second_histogram.time_unix_nano, first_histogram.time_unix_nano) def test_boundaries(self): self.assertEqual( @@ -439,9 +381,7 @@ def test_boundaries(self): Mock(), AggregationTemporality.CUMULATIVE, 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), )._boundaries, ( 0.0, @@ -481,9 +421,7 @@ def test_unsorted_boundaries_raise(self): Mock(), AggregationTemporality.DELTA, 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), boundaries=[100, 10, 50], ) @@ -493,9 +431,7 @@ def test_duplicate_boundaries_raise(self): Mock(), AggregationTemporality.DELTA, 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), boundaries=[10, 50, 50, 100], ) @@ -505,9 +441,7 @@ def test_nan_boundary_raises(self): Mock(), AggregationTemporality.DELTA, 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), boundaries=[10, float("nan"), 100], ) @@ -517,9 +451,7 @@ def test_inf_boundary_raises(self): Mock(), AggregationTemporality.DELTA, 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), boundaries=[10, 50, float("inf")], ) @@ -529,9 +461,7 @@ def test_negative_inf_boundary_raises(self): Mock(), AggregationTemporality.DELTA, 0, - _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ), + _default_reservoir_factory(_ExplicitBucketHistogramAggregation), boundaries=[float("-inf"), 50, 100], ) @@ -540,25 +470,19 @@ class TestAggregationFactory(TestCase): def test_sum_factory(self): counter = _Counter("name", Mock(), Mock()) factory = SumAggregation() - aggregation = factory._create_aggregation( - counter, Mock(), _default_reservoir_factory, 0 - ) + aggregation = factory._create_aggregation(counter, Mock(), _default_reservoir_factory, 0) self.assertIsInstance(aggregation, _SumAggregation) self.assertTrue(aggregation._instrument_is_monotonic) self.assertEqual( aggregation._instrument_aggregation_temporality, AggregationTemporality.DELTA, ) - aggregation2 = factory._create_aggregation( - counter, Mock(), _default_reservoir_factory, 0 - ) + aggregation2 = factory._create_aggregation(counter, Mock(), _default_reservoir_factory, 0) self.assertNotEqual(aggregation, aggregation2) counter = _UpDownCounter("name", Mock(), Mock()) factory = SumAggregation() - aggregation = factory._create_aggregation( - counter, Mock(), _default_reservoir_factory, 0 - ) + aggregation = factory._create_aggregation(counter, Mock(), _default_reservoir_factory, 0) self.assertIsInstance(aggregation, _SumAggregation) self.assertFalse(aggregation._instrument_is_monotonic) self.assertEqual( @@ -568,9 +492,7 @@ def test_sum_factory(self): counter = _ObservableCounter("name", Mock(), Mock(), None) factory = SumAggregation() - aggregation = factory._create_aggregation( - counter, Mock(), _default_reservoir_factory, 0 - ) + aggregation = factory._create_aggregation(counter, Mock(), _default_reservoir_factory, 0) self.assertIsInstance(aggregation, _SumAggregation) self.assertTrue(aggregation._instrument_is_monotonic) self.assertEqual( @@ -587,27 +509,19 @@ def test_explicit_bucket_histogram_factory(self): ), record_min_max=False, ) - aggregation = factory._create_aggregation( - histo, Mock(), _default_reservoir_factory, 0 - ) + aggregation = factory._create_aggregation(histo, Mock(), _default_reservoir_factory, 0) self.assertIsInstance(aggregation, _ExplicitBucketHistogramAggregation) self.assertFalse(aggregation._record_min_max) self.assertEqual(aggregation._boundaries, (0.0, 5.0)) - aggregation2 = factory._create_aggregation( - histo, Mock(), _default_reservoir_factory, 0 - ) + aggregation2 = factory._create_aggregation(histo, Mock(), _default_reservoir_factory, 0) self.assertNotEqual(aggregation, aggregation2) def test_last_value_factory(self): counter = _Counter("name", Mock(), Mock()) factory = LastValueAggregation() - aggregation = factory._create_aggregation( - counter, Mock(), _default_reservoir_factory, 0 - ) + aggregation = factory._create_aggregation(counter, Mock(), _default_reservoir_factory, 0) self.assertIsInstance(aggregation, _LastValueAggregation) - aggregation2 = factory._create_aggregation( - counter, Mock(), _default_reservoir_factory, 0 - ) + aggregation2 = factory._create_aggregation(counter, Mock(), _default_reservoir_factory, 0) self.assertNotEqual(aggregation, aggregation2) @@ -660,9 +574,7 @@ def test_observable_counter(self): def test_observable_up_down_counter(self): aggregation = self.default_aggregation._create_aggregation( - _ObservableUpDownCounter( - "name", Mock(), Mock(), callbacks=[Mock()] - ), + _ObservableUpDownCounter("name", Mock(), Mock(), callbacks=[Mock()]), Mock(), _default_reservoir_factory, 0, @@ -746,9 +658,7 @@ def test_collection_simple_fixed_size_reservoir(self): synchronous_sum_aggregation.aggregate(measurement(3)) self.assertEqual(synchronous_sum_aggregation._value, 6) - datapoint = synchronous_sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + datapoint = synchronous_sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 0) # As the reservoir as multiple buckets, it may store up to # 3 exemplars self.assertGreater(len(datapoint.exemplars), 0) @@ -770,9 +680,7 @@ def test_collection_simple_fixed_size_reservoir_with_default_reservoir( synchronous_sum_aggregation.aggregate(measurement(3)) self.assertEqual(synchronous_sum_aggregation._value, 6) - datapoint = synchronous_sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + datapoint = synchronous_sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 0) self.assertEqual(len(datapoint.exemplars), 1) def test_collection_aligned_histogram_bucket_reservoir(self): @@ -791,9 +699,7 @@ def test_collection_aligned_histogram_bucket_reservoir(self): synchronous_sum_aggregation.aggregate(measurement(15.0)) synchronous_sum_aggregation.aggregate(measurement(25.0)) - datapoint = synchronous_sum_aggregation.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + datapoint = synchronous_sum_aggregation.collect(AggregationTemporality.CUMULATIVE, 0) self.assertEqual(len(datapoint.exemplars), 4) # Verify that exemplars are associated with the correct boundaries @@ -813,9 +719,7 @@ def test_collection_aligned_histogram_bucket_reservoir(self): (25.0, None), # Last bucket, should hold the value > 20.0 ] - for exemplar, (value, boundary) in zip( - datapoint.exemplars, expected_buckets - ): + for exemplar, (value, boundary) in zip(datapoint.exemplars, expected_buckets): self.assertEqual(exemplar.value, value) if boundary is not None: self.assertLessEqual(exemplar.value, boundary) diff --git a/opentelemetry-sdk/tests/metrics/test_backward_compat.py b/opentelemetry-sdk/tests/metrics/test_backward_compat.py index f205c253aa3..62608ed1f18 100644 --- a/opentelemetry-sdk/tests/metrics/test_backward_compat.py +++ b/opentelemetry-sdk/tests/metrics/test_backward_compat.py @@ -66,9 +66,7 @@ def orig_callback(options: CallbackOptions) -> Iterable[Observation]: class TestBackwardCompat(TestCase): def test_metric_exporter(self): exporter = OrigMetricExporter() - meter_provider = MeterProvider( - metric_readers=[PeriodicExportingMetricReader(exporter)] - ) + meter_provider = MeterProvider(metric_readers=[PeriodicExportingMetricReader(exporter)]) # produce some data meter_provider.get_meter("foo").create_counter("mycounter").add(12) with self.assertNotRaises(Exception): @@ -91,9 +89,5 @@ def test_observable_callback(self): metrics_data = reader.get_metrics_data() self.assertEqual(len(metrics_data.resource_metrics), 1) - self.assertEqual( - len(metrics_data.resource_metrics[0].scope_metrics), 1 - ) - self.assertEqual( - len(metrics_data.resource_metrics[0].scope_metrics[0].metrics), 1 - ) + self.assertEqual(len(metrics_data.resource_metrics[0].scope_metrics), 1) + self.assertEqual(len(metrics_data.resource_metrics[0].scope_metrics[0].metrics), 1) diff --git a/opentelemetry-sdk/tests/metrics/test_exemplarreservoir.py b/opentelemetry-sdk/tests/metrics/test_exemplarreservoir.py index ce196f68306..aaf3d3a95df 100644 --- a/opentelemetry-sdk/tests/metrics/test_exemplarreservoir.py +++ b/opentelemetry-sdk/tests/metrics/test_exemplarreservoir.py @@ -57,9 +57,7 @@ def test_filter_attributes(self): ) span = trace.NonRecordingSpan(span_context) ctx = trace.set_span_in_context(span) - reservoir.offer( - 1, time_ns(), {"key1": "value1", "key2": "value2"}, ctx - ) + reservoir.offer(1, time_ns(), {"key1": "value1", "key2": "value2"}, ctx) exemplars = reservoir.collect({"key2": "value2"}) self.assertEqual(len(exemplars), 1) self.assertIn("key1", exemplars[0].filtered_attributes) @@ -91,9 +89,7 @@ class TestAlignedHistogramBucketExemplarReservoir(TestCase): SPAN_ID = int("6e0c63257de34c92", 16) def test_measurement_in_buckets(self): - reservoir = AlignedHistogramBucketExemplarReservoir( - [0, 5, 10, 25, 50, 75] - ) + reservoir = AlignedHistogramBucketExemplarReservoir([0, 5, 10, 25, 50, 75]) span_context = SpanContext( trace_id=self.TRACE_ID, span_id=self.SPAN_ID, @@ -131,9 +127,7 @@ def test_last_measurement_in_bucket(self): # Offer values to the reservoir reservoir.offer(2, time_ns(), {"bucket": "1"}, ctx) # Bucket 1 reservoir.offer(7, time_ns(), {"bucket": "2"}, ctx) # Bucket 2 - reservoir.offer( - 8, time_ns(), {"bucket": "2"}, ctx - ) # Bucket 2 - should replace the 7 + reservoir.offer(8, time_ns(), {"bucket": "2"}, ctx) # Bucket 2 - should replace the 7 reservoir.offer(15, time_ns(), {"bucket": "3"}, ctx) # Bucket 3 exemplars = reservoir.collect({}) @@ -155,12 +149,8 @@ def test_last_value_aggregation(self): self.assertEqual(exemplar_reservoir, SimpleFixedSizeExemplarReservoir) def test_explicit_histogram_aggregation(self): - exemplar_reservoir = _default_reservoir_factory( - _ExplicitBucketHistogramAggregation - ) - self.assertEqual( - exemplar_reservoir, AlignedHistogramBucketExemplarReservoir - ) + exemplar_reservoir = _default_reservoir_factory(_ExplicitBucketHistogramAggregation) + self.assertEqual(exemplar_reservoir, AlignedHistogramBucketExemplarReservoir) class TestExemplarReservoirConcurrency(ConcurrencyTestBase): @@ -178,11 +168,7 @@ def _run_concurrently(self, reservoir): def worker(): if next(threads) % 2: - return [ - exemplar - for _ in range(self.ITERATIONS) - for exemplar in reservoir.collect({}) - ] + return [exemplar for _ in range(self.ITERATIONS) for exemplar in reservoir.collect({})] for value in islice(values, self.ITERATIONS): reservoir.offer(value, value, {"v": value}, Context()) @@ -199,14 +185,10 @@ def test_offer_and_collect_are_mutually_exclusive(self): ), ( "aligned_histogram_bucket", - lambda: AlignedHistogramBucketExemplarReservoir( - [10.0, 20.0, 30.0] - ), + lambda: AlignedHistogramBucketExemplarReservoir([10.0, 20.0, 30.0]), ), ): with self.subTest(reservoir=name): for exemplar in self._run_concurrently(build_reservoir()): self.assertEqual(exemplar.value, exemplar.time_unix_nano) - self.assertEqual( - exemplar.filtered_attributes, {"v": exemplar.value} - ) + self.assertEqual(exemplar.filtered_attributes, {"v": exemplar.value}) diff --git a/opentelemetry-sdk/tests/metrics/test_in_memory_metric_reader.py b/opentelemetry-sdk/tests/metrics/test_in_memory_metric_reader.py index b4fb0eb2de5..d5ad7b161bf 100644 --- a/opentelemetry-sdk/tests/metrics/test_in_memory_metric_reader.py +++ b/opentelemetry-sdk/tests/metrics/test_in_memory_metric_reader.py @@ -27,14 +27,10 @@ class TestInMemoryMetricReader(TestCase): def test_no_metrics(self): - mock_collect_callback = Mock( - return_value=MetricsData(resource_metrics=[]) - ) + mock_collect_callback = Mock(return_value=MetricsData(resource_metrics=[])) reader = InMemoryMetricReader() reader._set_collect_callback(mock_collect_callback) - self.assertEqual( - reader.get_metrics_data(), MetricsData(resource_metrics=[]) - ) + self.assertEqual(reader.get_metrics_data(), MetricsData(resource_metrics=[])) mock_collect_callback.assert_called_once() def test_converts_metrics_to_list(self): @@ -101,36 +97,18 @@ def test_integration(self): # should be 3 number data points, one from the observable gauge and one # for each labelset from the counter self.assertEqual(len(metrics.resource_metrics[0].scope_metrics), 1) + self.assertEqual(len(metrics.resource_metrics[0].scope_metrics[0].metrics), 2) self.assertEqual( - len(metrics.resource_metrics[0].scope_metrics[0].metrics), 2 - ) - self.assertEqual( - len( - list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points - ) - ), + len(list(metrics.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points)), 2, ) self.assertEqual( - len( - list( - metrics.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points - ) - ), + len(list(metrics.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points)), 1, ) def test_cumulative_multiple_collect(self): - reader = InMemoryMetricReader( - preferred_temporality={Counter: AggregationTemporality.CUMULATIVE} - ) + reader = InMemoryMetricReader(preferred_temporality={Counter: AggregationTemporality.CUMULATIVE}) meter = MeterProvider(metric_readers=[reader]).get_meter("test_meter") counter = meter.create_counter("counter1") counter.add(1, attributes={"key": "value"}) @@ -138,10 +116,7 @@ def test_cumulative_multiple_collect(self): reader.collect() number_data_point_0 = list( - reader._metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points + reader._metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points )[0] # Windows tests fail without this sleep because both time_unix_nano @@ -150,15 +125,10 @@ def test_cumulative_multiple_collect(self): reader.collect() number_data_point_1 = list( - reader._metrics_data.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points + reader._metrics_data.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points )[0] - self.assertEqual( - number_data_point_0.attributes, number_data_point_1.attributes - ) + self.assertEqual(number_data_point_0.attributes, number_data_point_1.attributes) self.assertEqual( number_data_point_0.start_time_unix_nano, number_data_point_1.start_time_unix_nano, diff --git a/opentelemetry-sdk/tests/metrics/test_instrument.py b/opentelemetry-sdk/tests/metrics/test_instrument.py index d8fd813e0a7..b6fd8dfe889 100644 --- a/opentelemetry-sdk/tests/metrics/test_instrument.py +++ b/opentelemetry-sdk/tests/metrics/test_instrument.py @@ -157,9 +157,7 @@ def testname(self): self.assertEqual(_ObservableGauge("Name", Mock(), Mock()).name, "name") def test_callable_callback_0(self): - observable_gauge = _ObservableGauge( - "name", Mock(), Mock(), [callable_callback_0] - ) + observable_gauge = _ObservableGauge("name", Mock(), Mock(), [callable_callback_0]) assert list(observable_gauge.callback(CallbackOptions())) == ( [ @@ -188,9 +186,7 @@ def test_callable_callback_0(self): ) def test_callable_multiple_callable_callback(self): - observable_gauge = _ObservableGauge( - "name", Mock(), Mock(), [callable_callback_0, callable_callback_1] - ) + observable_gauge = _ObservableGauge("name", Mock(), Mock(), [callable_callback_0, callable_callback_1]) self.assertEqual( list(observable_gauge.callback(CallbackOptions())), @@ -241,9 +237,7 @@ def test_callable_multiple_callable_callback(self): ) def test_generator_callback_0(self): - observable_gauge = _ObservableGauge( - "name", Mock(), Mock(), [generator_callback_0()] - ) + observable_gauge = _ObservableGauge("name", Mock(), Mock(), [generator_callback_0()]) self.assertEqual( list(observable_gauge.callback(CallbackOptions())), @@ -335,9 +329,7 @@ def nan_callback(options: CallbackOptions): Observation(1, attributes=TEST_ATTRIBUTES), ] - observable_gauge = _ObservableGauge( - "name", Mock(), Mock(), [nan_callback] - ) + observable_gauge = _ObservableGauge("name", Mock(), Mock(), [nan_callback]) with self.assertLogs(level=WARNING): measurements = list(observable_gauge.callback(CallbackOptions())) self.assertEqual(len(measurements), 1) @@ -350,9 +342,7 @@ def inf_callback(options: CallbackOptions): Observation(1, attributes=TEST_ATTRIBUTES), ] - observable_gauge = _ObservableGauge( - "name", Mock(), Mock(), [inf_callback] - ) + observable_gauge = _ObservableGauge("name", Mock(), Mock(), [inf_callback]) with self.assertLogs(level=WARNING): measurements = list(observable_gauge.callback(CallbackOptions())) self.assertEqual(len(measurements), 1) @@ -370,9 +360,7 @@ def test_disallow_direct_observable_gauge_creation(self): ) class TestObservableCounter(TestCase): def test_callable_callback_0(self): - observable_counter = _ObservableCounter( - "name", Mock(), Mock(), [callable_callback_0] - ) + observable_counter = _ObservableCounter("name", Mock(), Mock(), [callable_callback_0]) self.assertEqual( list(observable_counter.callback(CallbackOptions())), @@ -402,9 +390,7 @@ def test_callable_callback_0(self): ) def test_generator_callback_0(self): - observable_counter = _ObservableCounter( - "name", Mock(), Mock(), [generator_callback_0()] - ) + observable_counter = _ObservableCounter("name", Mock(), Mock(), [generator_callback_0()]) self.assertEqual( list(observable_counter.callback(CallbackOptions())), @@ -476,9 +462,7 @@ def test_disallow_direct_counter_creation(self): ) class TestObservableUpDownCounter(TestCase): def test_callable_callback_0(self): - observable_up_down_counter = _ObservableUpDownCounter( - "name", Mock(), Mock(), [callable_callback_0] - ) + observable_up_down_counter = _ObservableUpDownCounter("name", Mock(), Mock(), [callable_callback_0]) self.assertEqual( list(observable_up_down_counter.callback(CallbackOptions())), @@ -508,9 +492,7 @@ def test_callable_callback_0(self): ) def test_generator_callback_0(self): - observable_up_down_counter = _ObservableUpDownCounter( - "name", Mock(), Mock(), [generator_callback_0()] - ) + observable_up_down_counter = _ObservableUpDownCounter("name", Mock(), Mock(), [generator_callback_0()]) self.assertEqual( list(observable_up_down_counter.callback(CallbackOptions())), diff --git a/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py b/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py index d09368c75dc..7633327d417 100644 --- a/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py +++ b/opentelemetry-sdk/tests/metrics/test_measurement_consumer.py @@ -17,10 +17,7 @@ ) -@patch( - "opentelemetry.sdk.metrics._internal." - "measurement_consumer.MetricReaderStorage" -) +@patch("opentelemetry.sdk.metrics._internal.measurement_consumer.MetricReaderStorage") class TestSynchronousMeasurementConsumer(TestCase): def test_parent(self, _): self.assertIsInstance( @@ -41,9 +38,7 @@ def test_creates_metric_reader_storages(self, MockMetricReaderStorage): ) self.assertEqual(len(MockMetricReaderStorage.mock_calls), 5) - def test_measurements_passed_to_each_reader_storage( - self, MockMetricReaderStorage - ): + def test_measurements_passed_to_each_reader_storage(self, MockMetricReaderStorage): reader_mocks = [Mock() for _ in range(5)] reader_storage_mocks = [Mock() for _ in range(5)] MockMetricReaderStorage.side_effect = reader_storage_mocks @@ -60,9 +55,7 @@ def test_measurements_passed_to_each_reader_storage( consumer.consume_measurement(measurement_mock) for rs_mock in reader_storage_mocks: - rs_mock.consume_measurement.assert_called_once_with( - measurement_mock, False - ) + rs_mock.consume_measurement.assert_called_once_with(measurement_mock, False) def test_collect_passed_to_reader_stage(self, MockMetricReaderStorage): """Its collect() method should defer to the underlying MetricReaderStorage""" @@ -109,9 +102,7 @@ def test_collect_calls_async_instruments(self, MockMetricReaderStorage): i_mock.callback.assert_called_once() # it should pass measurements to reader storage - self.assertEqual( - len(reader_storage_mock.consume_measurement.mock_calls), 5 - ) + self.assertEqual(len(reader_storage_mock.consume_measurement.mock_calls), 5) # assert consume_measurement was called with at least 2 arguments the second # matching the mocked exemplar filter self.assertFalse(reader_storage_mock.consume_measurement.call_args[1]) @@ -132,25 +123,16 @@ def test_collect_timeout(self, MockMetricReaderStorage): def sleep_1(*args, **kwargs): sleep(1) - consumer.register_asynchronous_instrument( - Mock(**{"callback.side_effect": sleep_1}) - ) + consumer.register_asynchronous_instrument(Mock(**{"callback.side_effect": sleep_1})) with self.assertRaises(Exception) as error: consumer.collect(reader_mock, timeout_millis=10) - self.assertIn( - "Timed out while executing callback", error.exception.args[0] - ) + self.assertIn("Timed out while executing callback", error.exception.args[0]) - @patch( - "opentelemetry.sdk.metrics._internal." - "measurement_consumer.CallbackOptions" - ) + @patch("opentelemetry.sdk.metrics._internal.measurement_consumer.CallbackOptions") @patch("opentelemetry.sdk.metrics._internal.measurement_consumer.time_ns") - def test_collect_deadline( - self, mock_time_ns, mock_callback_options, MockMetricReaderStorage - ): + def test_collect_deadline(self, mock_time_ns, mock_callback_options, MockMetricReaderStorage): reader_mock = Mock() reader_storage_mock = Mock() MockMetricReaderStorage.return_value = reader_storage_mock @@ -163,12 +145,8 @@ def test_collect_deadline( metric_readers=[reader_mock], ) - consumer.register_asynchronous_instrument( - Mock(**{"callback.return_value": []}) - ) - consumer.register_asynchronous_instrument( - Mock(**{"callback.return_value": []}) - ) + consumer.register_asynchronous_instrument(Mock(**{"callback.return_value": []})) + consumer.register_asynchronous_instrument(Mock(**{"callback.return_value": []})) # collect start, first remaining_time, post-first callback, # second remaining_time, post-second callback @@ -182,9 +160,7 @@ def test_collect_deadline( consumer.collect(reader_mock) - callback_options_time_call = mock_callback_options.mock_calls[ - -1 - ].kwargs["timeout_millis"] + callback_options_time_call = mock_callback_options.mock_calls[-1].kwargs["timeout_millis"] self.assertLess( callback_options_time_call, @@ -195,15 +171,10 @@ def test_collect_deadline( class TestSynchronousMeasurementConsumerConcurrency(TestCase): def test_consume_measurement_does_not_acquire_lock(self): """consume_measurement must stay lock free on the hot path.""" - with patch( - "opentelemetry.sdk.metrics._internal." - "measurement_consumer.MetricReaderStorage" - ): + with patch("opentelemetry.sdk.metrics._internal.measurement_consumer.MetricReaderStorage"): consumer = SynchronousMeasurementConsumer( SdkConfiguration( - exemplar_filter=Mock( - should_sample=Mock(return_value=False) - ), + exemplar_filter=Mock(should_sample=Mock(return_value=False)), resource=Mock(), views=Mock(), ), @@ -273,9 +244,7 @@ def mutate(): consumer.consume_measurement(MagicMock()) finally: t.join() - self.assertEqual( - "dictionary changed size during iteration", str(cm.exception) - ) + self.assertEqual("dictionary changed size during iteration", str(cm.exception)) self.assertIsNone(failure) # Reset the events for the second scenario diff --git a/opentelemetry-sdk/tests/metrics/test_metric_reader.py b/opentelemetry-sdk/tests/metrics/test_metric_reader.py index 48fd6810455..7a5f4037f6a 100644 --- a/opentelemetry-sdk/tests/metrics/test_metric_reader.py +++ b/opentelemetry-sdk/tests/metrics/test_metric_reader.py @@ -90,21 +90,15 @@ def test_configure_temporality(self): AggregationTemporality.DELTA, ) self.assertEqual( - dummy_metric_reader._instrument_class_temporality[ - _ObservableCounter - ], + dummy_metric_reader._instrument_class_temporality[_ObservableCounter], AggregationTemporality.CUMULATIVE, ) self.assertEqual( - dummy_metric_reader._instrument_class_temporality[ - _ObservableUpDownCounter - ], + dummy_metric_reader._instrument_class_temporality[_ObservableUpDownCounter], AggregationTemporality.CUMULATIVE, ) self.assertEqual( - dummy_metric_reader._instrument_class_temporality[ - _ObservableGauge - ], + dummy_metric_reader._instrument_class_temporality[_ObservableGauge], AggregationTemporality.DELTA, ) @@ -119,14 +113,10 @@ def test_configure_aggregation(self): dummy_metric_reader._instrument_class_aggregation.keys(), set(_expected_keys), ) - for ( - value - ) in dummy_metric_reader._instrument_class_aggregation.values(): + for value in dummy_metric_reader._instrument_class_aggregation.values(): self.assertIsInstance(value, DefaultAggregation) - dummy_metric_reader = DummyMetricReader( - preferred_aggregation={Counter: LastValueAggregation()} - ) + dummy_metric_reader = DummyMetricReader(preferred_aggregation={Counter: LastValueAggregation()}) self.assertEqual( dummy_metric_reader._instrument_class_aggregation.keys(), set(_expected_keys), diff --git a/opentelemetry-sdk/tests/metrics/test_metric_reader_storage.py b/opentelemetry-sdk/tests/metrics/test_metric_reader_storage.py index 281aae92158..acbfe1a4d4d 100644 --- a/opentelemetry-sdk/tests/metrics/test_metric_reader_storage.py +++ b/opentelemetry-sdk/tests/metrics/test_metric_reader_storage.py @@ -50,13 +50,8 @@ def mock_instrument() -> Mock: class TestMetricReaderStorage(ConcurrencyTestBase): - @patch( - "opentelemetry.sdk.metrics._internal" - ".metric_reader_storage._ViewInstrumentMatch" - ) - def test_creates_view_instrument_matches( - self, MockViewInstrumentMatch: Mock - ): + @patch("opentelemetry.sdk.metrics._internal.metric_reader_storage._ViewInstrumentMatch") + def test_creates_view_instrument_matches(self, MockViewInstrumentMatch: Mock): """It should create a MockViewInstrumentMatch when an instrument matches a view""" instrument1 = Mock(name="instrument1") @@ -70,55 +65,34 @@ def test_creates_view_instrument_matches( resource=Mock(), views=(view1, view2), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) # instrument1 matches view1 and view2, so should create two # ViewInstrumentMatch objects - storage.consume_measurement( - Measurement(1, time_ns(), instrument1, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument1, Context())) self.assertEqual( len(MockViewInstrumentMatch.call_args_list), 2, MockViewInstrumentMatch.mock_calls, ) # they should only be created the first time the instrument is seen - storage.consume_measurement( - Measurement(1, time_ns(), instrument1, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument1, Context())) self.assertEqual(len(MockViewInstrumentMatch.call_args_list), 2) # instrument2 matches view2, so should create a single # ViewInstrumentMatch MockViewInstrumentMatch.call_args_list.clear() with self.assertLogs(level=WARNING): - storage.consume_measurement( - Measurement(1, time_ns(), instrument2, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument2, Context())) self.assertEqual(len(MockViewInstrumentMatch.call_args_list), 1) - @patch( - "opentelemetry.sdk.metrics._internal." - "metric_reader_storage._ViewInstrumentMatch" - ) - def test_forwards_calls_to_view_instrument_match( - self, MockViewInstrumentMatch: Mock - ): - view_instrument_match1 = Mock( - _aggregation=_LastValueAggregation({}, Mock()) - ) - view_instrument_match2 = Mock( - _aggregation=_LastValueAggregation({}, Mock()) - ) - view_instrument_match3 = Mock( - _aggregation=_LastValueAggregation({}, Mock()) - ) + @patch("opentelemetry.sdk.metrics._internal.metric_reader_storage._ViewInstrumentMatch") + def test_forwards_calls_to_view_instrument_match(self, MockViewInstrumentMatch: Mock): + view_instrument_match1 = Mock(_aggregation=_LastValueAggregation({}, Mock())) + view_instrument_match2 = Mock(_aggregation=_LastValueAggregation({}, Mock())) + view_instrument_match3 = Mock(_aggregation=_LastValueAggregation({}, Mock())) MockViewInstrumentMatch.side_effect = [ view_instrument_match1, view_instrument_match2, @@ -136,11 +110,7 @@ def test_forwards_calls_to_view_instrument_match( resource=Mock(), views=(view1, view2), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) @@ -148,20 +118,14 @@ def test_forwards_calls_to_view_instrument_match( # ViewInstrumentMatch objects created for that instrument measurement = Measurement(1, time_ns(), instrument1, Context()) storage.consume_measurement(measurement) - view_instrument_match1.consume_measurement.assert_called_once_with( - measurement, True - ) - view_instrument_match2.consume_measurement.assert_called_once_with( - measurement, True - ) + view_instrument_match1.consume_measurement.assert_called_once_with(measurement, True) + view_instrument_match2.consume_measurement.assert_called_once_with(measurement, True) view_instrument_match3.consume_measurement.assert_not_called() measurement = Measurement(1, time_ns(), instrument2, Context()) with self.assertLogs(level=WARNING): storage.consume_measurement(measurement) - view_instrument_match3.consume_measurement.assert_called_once_with( - measurement, True - ) + view_instrument_match3.consume_measurement.assert_called_once_with(measurement, True) # collect() should call collect on all of its _ViewInstrumentMatch # objects and combine them together @@ -175,64 +139,31 @@ def test_forwards_calls_to_view_instrument_match( view_instrument_match2.collect.assert_called_once() view_instrument_match3.collect.assert_called_once() self.assertEqual( - ( - result.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[0] - ), + (result.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[0]), all_metrics[0], ) self.assertEqual( - ( - result.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points[1] - ), + (result.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points[1]), all_metrics[1], ) self.assertEqual( - ( - result.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points[0] - ), + (result.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points[0]), all_metrics[2], ) self.assertEqual( - ( - result.resource_metrics[0] - .scope_metrics[0] - .metrics[1] - .data.data_points[1] - ), + (result.resource_metrics[0].scope_metrics[0].metrics[1].data.data_points[1]), all_metrics[3], ) self.assertEqual( - ( - result.resource_metrics[0] - .scope_metrics[1] - .metrics[0] - .data.data_points[0] - ), + (result.resource_metrics[0].scope_metrics[1].metrics[0].data.data_points[0]), all_metrics[4], ) self.assertEqual( - ( - result.resource_metrics[0] - .scope_metrics[1] - .metrics[0] - .data.data_points[1] - ), + (result.resource_metrics[0].scope_metrics[1].metrics[0].data.data_points[1]), all_metrics[5], ) - @patch( - "opentelemetry.sdk.metrics._internal." - "metric_reader_storage._ViewInstrumentMatch" - ) + @patch("opentelemetry.sdk.metrics._internal.metric_reader_storage._ViewInstrumentMatch") def test_race_concurrent_measurements(self, MockViewInstrumentMatch: Mock): mock_view_instrument_match_ctor = MockFunc() MockViewInstrumentMatch.side_effect = mock_view_instrument_match_ctor @@ -245,18 +176,12 @@ def test_race_concurrent_measurements(self, MockViewInstrumentMatch: Mock): resource=Mock(), views=(view1,), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) def send_measurement(): - storage.consume_measurement( - Measurement(1, time_ns(), instrument1, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument1, Context())) # race sending many measurements concurrently self.run_with_many_threads(send_measurement) @@ -264,9 +189,7 @@ def send_measurement(): # Only one cached entry should exist for the instrument, with exactly # one view-instrument match — duplicate initialization is the bug we're guarding against self.assertIn(instrument1, storage._instrument_view_instrument_matches) - self.assertEqual( - len(storage._instrument_view_instrument_matches[instrument1]), 1 - ) + self.assertEqual(len(storage._instrument_view_instrument_matches[instrument1]), 1) def test_race_collect_with_new_instruments(self): storage = MetricReaderStorage( @@ -275,22 +198,14 @@ def test_race_collect_with_new_instruments(self): resource=Mock(), views=(View(instrument_name="test"),), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) counter = _Counter("counter", Mock(), Mock()) - storage.consume_measurement( - Measurement(1, time_ns(), counter, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), counter, Context())) - view_instrument_match = storage._instrument_view_instrument_matches[ - counter - ][0] + view_instrument_match = storage._instrument_view_instrument_matches[counter][0] original_collect = view_instrument_match.collect new_counter = _Counter("new_counter", Mock(), Mock()) @@ -305,10 +220,7 @@ def collect_with_modification(*args, **kwargs): self.assertIn(new_counter, storage._instrument_view_instrument_matches) - @patch( - "opentelemetry.sdk.metrics._internal." - "metric_reader_storage._ViewInstrumentMatch" - ) + @patch("opentelemetry.sdk.metrics._internal.metric_reader_storage._ViewInstrumentMatch") def test_default_view_enabled(self, MockViewInstrumentMatch: Mock): """Instruments should be matched with default views when enabled""" instrument1 = Mock(name="instrument1") @@ -320,31 +232,21 @@ def test_default_view_enabled(self, MockViewInstrumentMatch: Mock): resource=Mock(), views=(), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) - storage.consume_measurement( - Measurement(1, time_ns(), instrument1, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument1, Context())) self.assertEqual( len(MockViewInstrumentMatch.call_args_list), 1, MockViewInstrumentMatch.mock_calls, ) - storage.consume_measurement( - Measurement(1, time_ns(), instrument1, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument1, Context())) self.assertEqual(len(MockViewInstrumentMatch.call_args_list), 1) MockViewInstrumentMatch.call_args_list.clear() - storage.consume_measurement( - Measurement(1, time_ns(), instrument2, Context()) - ) + storage.consume_measurement(Measurement(1, time_ns(), instrument2, Context())) self.assertEqual(len(MockViewInstrumentMatch.call_args_list), 1) def test_drop_aggregation(self): @@ -353,22 +255,12 @@ def test_drop_aggregation(self): SdkConfiguration( exemplar_filter=Mock(), resource=Mock(), - views=( - View( - instrument_name="name", aggregation=DropAggregation() - ), - ), - ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } + views=(View(instrument_name="name", aggregation=DropAggregation()),), ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), counter, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), counter, Context())) self.assertIsNone(metric_reader_storage.collect()) @@ -382,36 +274,18 @@ def test_same_collection_start(self): resource=Mock(), views=(View(instrument_name="name"),), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), counter, Context()) - ) - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), up_down_counter, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), counter, Context())) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), up_down_counter, Context())) actual = metric_reader_storage.collect() self.assertEqual( - list( - actual.resource_metrics[0] - .scope_metrics[0] - .metrics[0] - .data.data_points - )[0].time_unix_nano, - list( - actual.resource_metrics[0] - .scope_metrics[1] - .metrics[0] - .data.data_points - )[0].time_unix_nano, + list(actual.resource_metrics[0].scope_metrics[0].metrics[0].data.data_points)[0].time_unix_nano, + list(actual.resource_metrics[0].scope_metrics[1].metrics[0].data.data_points)[0].time_unix_nano, ) def test_conflicting_view_configuration(self): @@ -433,23 +307,15 @@ def test_conflicting_view_configuration(self): ), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter, Context())) self.assertIs( - metric_reader_storage._instrument_view_instrument_matches[ - observable_counter - ][0]._view, + metric_reader_storage._instrument_view_instrument_matches[observable_counter][0]._view, _DEFAULT_VIEW, ) @@ -479,24 +345,16 @@ def test_view_instrument_match_conflict_0(self): View(instrument_name="observable_counter_1", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_0, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_0, Context())) with self.assertLogs(level=WARNING) as log: - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_1, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_1, Context())) self.assertIn( "will cause conflicting metrics", @@ -536,26 +394,16 @@ def test_view_instrument_match_conflict_1(self): View(instrument_name="baz", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement( - 1, time_ns(), observable_counter_foo, Context() - ) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_foo, Context())) with self.assertLogs(level=WARNING) as log: - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_bar, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_bar, Context())) self.assertIn( "will cause conflicting metrics", @@ -563,18 +411,14 @@ def test_view_instrument_match_conflict_1(self): ) with self.assertLogs(level=WARNING) as log: - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_baz, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_baz, Context())) self.assertIn( "will cause conflicting metrics", log.records[0].message, ) - for view_instrument_matches in ( - metric_reader_storage._instrument_view_instrument_matches.values() - ): + for view_instrument_matches in metric_reader_storage._instrument_view_instrument_matches.values(): for view_instrument_match in view_instrument_matches: self.assertEqual(view_instrument_match._name, "foo") @@ -604,29 +448,17 @@ def test_view_instrument_match_conflict_2(self): View(instrument_name="bar"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement( - 1, time_ns(), observable_counter_foo, Context() - ) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_foo, Context())) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement( - 1, time_ns(), observable_counter_bar, Context() - ) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_bar, Context())) def test_view_instrument_match_conflict_3(self): # There is no conflict because the aggregation temporality of the @@ -656,27 +488,17 @@ def test_view_instrument_match_conflict_3(self): View(instrument_name="baz", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), counter_bar, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), counter_bar, Context())) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement( - 1, time_ns(), observable_counter_baz, Context() - ) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_baz, Context())) def test_view_instrument_match_conflict_4(self): # There is no conflict because the monotonicity of the instruments is @@ -706,25 +528,17 @@ def test_view_instrument_match_conflict_4(self): View(instrument_name="baz", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), counter_bar, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), counter_bar, Context())) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), up_down_counter_baz, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), up_down_counter_baz, Context())) def test_view_instrument_match_conflict_5(self): # There is no conflict because the instrument units are different. @@ -752,25 +566,17 @@ def test_view_instrument_match_conflict_5(self): View(instrument_name="observable_counter_1", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_0, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_0, Context())) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_1, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_1, Context())) def test_view_instrument_match_conflict_6(self): # There is no conflict because the instrument data points are @@ -807,31 +613,21 @@ def test_view_instrument_match_conflict_6(self): View(instrument_name="gauge", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter, Context())) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), histogram, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), histogram, Context())) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), gauge, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), gauge, Context())) def test_view_instrument_match_conflict_7(self): # There is a conflict between views and instruments because the @@ -860,24 +656,16 @@ def test_view_instrument_match_conflict_7(self): View(instrument_name="observable_counter_1", name="foo"), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_0, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_0, Context())) with self.assertLogs(level=WARNING) as log: - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), observable_counter_1, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), observable_counter_1, Context())) self.assertIn( "will cause conflicting metrics", @@ -918,24 +706,16 @@ def test_view_instrument_match_conflict_8(self): ), ), ), - MagicMock( - **{ - "__getitem__.return_value": AggregationTemporality.CUMULATIVE - } - ), + MagicMock(**{"__getitem__.return_value": AggregationTemporality.CUMULATIVE}), MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) with self.assertRaises(AssertionError): with self.assertLogs(level=WARNING): - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), up_down_counter, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), up_down_counter, Context())) with self.assertLogs(level=WARNING) as log: - metric_reader_storage.consume_measurement( - Measurement(1, time_ns(), histogram, Context()) - ) + metric_reader_storage.consume_measurement(Measurement(1, time_ns(), histogram, Context())) self.assertIn( "will cause conflicting metrics", diff --git a/opentelemetry-sdk/tests/metrics/test_metrics.py b/opentelemetry-sdk/tests/metrics/test_metrics.py index 176c6a2aef3..b84088a54f2 100644 --- a/opentelemetry-sdk/tests/metrics/test_metrics.py +++ b/opentelemetry-sdk/tests/metrics/test_metrics.py @@ -126,17 +126,13 @@ def test_resource(self): self.assertIsInstance(meter_provider_1._sdk_config.resource, Resource) resource = Resource({"key": "value"}) - self.assertIs( - MeterProvider(resource=resource)._sdk_config.resource, resource - ) + self.assertIs(MeterProvider(resource=resource)._sdk_config.resource, resource) def test_update_resource(self): initial_resource = Resource({"one": "one", "two": "old"}) updating_resource = Resource({"two": "new", "three": "three"}) reader = InMemoryMetricReader() - meter_provider = MeterProvider( - metric_readers=[reader], resource=initial_resource - ) + meter_provider = MeterProvider(metric_readers=[reader], resource=initial_resource) meter = meter_provider.get_meter("name") counter = meter.create_counter("counter") @@ -170,11 +166,7 @@ def test_update_resource(self): def test_meter_provider_updates_process_dependent_resource_after_fork( self, ): - script_path = ( - Path(__file__).parent - / "scripts" - / "meter_provider_resource_after_fork.py" - ) + script_path = Path(__file__).parent / "scripts" / "meter_provider_resource_after_fork.py" result = subprocess.run( [sys.executable, str(script_path)], @@ -195,20 +187,14 @@ def test_meter_provider_updates_process_dependent_resource_after_fork( child_payload = json.loads(lines[0]) parent_payload = json.loads(lines[1]) - self.assertEqual( - parent_payload["parent_resource_pid"], parent_payload["parent_pid"] - ) + self.assertEqual(parent_payload["parent_resource_pid"], parent_payload["parent_pid"]) self.assertEqual( parent_payload["parent_resource_pid_after_fork"], parent_payload["parent_pid"], ) - self.assertNotEqual( - child_payload["child_pid"], parent_payload["parent_pid"] - ) - self.assertEqual( - child_payload["provider_pid"], child_payload["child_pid"] - ) + self.assertNotEqual(child_payload["child_pid"], parent_payload["parent_pid"]) + self.assertEqual(child_payload["provider_pid"], child_payload["child_pid"]) self.assertEqual( child_payload["exported_resource_pids"], [child_payload["child_pid"]], @@ -234,9 +220,7 @@ def test_get_meter(self): self.assertEqual(meter._instrumentation_scope.name, "name") self.assertEqual(meter._instrumentation_scope.version, "version") self.assertEqual(meter._instrumentation_scope.schema_url, "schema_url") - self.assertEqual( - meter._instrumentation_scope.attributes, {"key": "value"} - ) + self.assertEqual(meter._instrumentation_scope.attributes, {"key": "value"}) def test_get_meter_attributes(self): """ @@ -338,12 +322,8 @@ def test_get_meter_comparison_with_attributes(self): ) self.assertIs(meter1, meter2) self.assertIsNot(meter1, meter3) - self.assertTrue( - meter3._instrumentation_scope > meter4._instrumentation_scope - ) - self.assertIsInstance( - meter4._instrumentation_scope.attributes, BoundedAttributes - ) + self.assertTrue(meter3._instrumentation_scope > meter4._instrumentation_scope) + self.assertIsInstance(meter4._instrumentation_scope.attributes, BoundedAttributes) def test_shutdown(self): mock_metric_reader_0 = MagicMock( @@ -357,9 +337,7 @@ def test_shutdown(self): } ) - meter_provider = MeterProvider( - metric_readers=[mock_metric_reader_0, mock_metric_reader_1] - ) + meter_provider = MeterProvider(metric_readers=[mock_metric_reader_0, mock_metric_reader_1]) with self.assertRaises(Exception) as error: meter_provider.shutdown() @@ -382,9 +360,7 @@ def test_shutdown(self): mock_metric_reader_0 = Mock() mock_metric_reader_1 = Mock() - meter_provider = MeterProvider( - metric_readers=[mock_metric_reader_0, mock_metric_reader_1] - ) + meter_provider = MeterProvider(metric_readers=[mock_metric_reader_0, mock_metric_reader_1]) self.assertIsNone(meter_provider.shutdown()) mock_metric_reader_0.shutdown.assert_called_once() @@ -410,17 +386,11 @@ def test_shutdown_race(self, mock_logger): mock_logger.warning = MockFunc() meter_provider = MeterProvider() num_threads = 70 - self.run_with_many_threads( - meter_provider.shutdown, num_threads=num_threads - ) + self.run_with_many_threads(meter_provider.shutdown, num_threads=num_threads) self.assertEqual(mock_logger.warning.call_count, num_threads - 1) - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_measurement_collect_callback( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_measurement_collect_callback(self, mock_sync_measurement_consumer): metric_readers = [ DummyMetricReader(), DummyMetricReader(), @@ -434,47 +404,29 @@ def test_measurement_collect_callback( for reader in metric_readers: reader.collect() - self.assertEqual( - sync_consumer_instance.collect.call_count, len(metric_readers) - ) + self.assertEqual(sync_consumer_instance.collect.call_count, len(metric_readers)) - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_creates_sync_measurement_consumer( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_creates_sync_measurement_consumer(self, mock_sync_measurement_consumer): MeterProvider() mock_sync_measurement_consumer.assert_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_register_asynchronous_instrument( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_register_asynchronous_instrument(self, mock_sync_measurement_consumer): meter_provider = MeterProvider() # pylint: disable=no-member meter_provider._measurement_consumer.register_asynchronous_instrument.assert_called_with( - meter_provider.get_meter("name").create_observable_counter( - "name0", callbacks=[Mock()] - ) + meter_provider.get_meter("name").create_observable_counter("name0", callbacks=[Mock()]) ) meter_provider._measurement_consumer.register_asynchronous_instrument.assert_called_with( - meter_provider.get_meter("name").create_observable_up_down_counter( - "name1", callbacks=[Mock()] - ) + meter_provider.get_meter("name").create_observable_up_down_counter("name1", callbacks=[Mock()]) ) meter_provider._measurement_consumer.register_asynchronous_instrument.assert_called_with( - meter_provider.get_meter("name").create_observable_gauge( - "name2", callbacks=[Mock()] - ) + meter_provider.get_meter("name").create_observable_gauge("name2", callbacks=[Mock()]) ) - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") def test_consume_measurement_counter(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() meter_provider = MeterProvider() @@ -484,28 +436,18 @@ def test_consume_measurement_counter(self, mock_sync_measurement_consumer): sync_consumer_instance.consume_measurement.assert_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_consume_measurement_up_down_counter( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_consume_measurement_up_down_counter(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() meter_provider = MeterProvider() - counter = meter_provider.get_meter("name").create_up_down_counter( - "name" - ) + counter = meter_provider.get_meter("name").create_up_down_counter("name") counter.add(1) sync_consumer_instance.consume_measurement.assert_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_consume_measurement_histogram( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_consume_measurement_histogram(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() meter_provider = MeterProvider() counter = meter_provider.get_meter("name").create_histogram("name") @@ -536,16 +478,12 @@ def test_set_meter_configurator_updates_existing_meters(self): meter = mp.get_meter("test") self.assertTrue(meter._is_enabled()) - mp._set_meter_configurator( - meter_configurator=_disable_meter_configurator - ) + mp._set_meter_configurator(meter_configurator=_disable_meter_configurator) self.assertFalse(meter._is_enabled()) def test_set_meter_configurator_affects_new_meters(self): mp = MeterProvider() - mp._set_meter_configurator( - meter_configurator=_disable_meter_configurator - ) + mp._set_meter_configurator(meter_configurator=_disable_meter_configurator) meter = mp.get_meter("new_meter") self.assertFalse(meter._is_enabled()) @@ -573,9 +511,7 @@ def raising_configurator(_scope): # Should still be enabled (default config) despite the error self.assertTrue(meter._is_enabled()) - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") def test_consume_measurement_gauge(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() meter_provider = MeterProvider() @@ -640,16 +576,10 @@ def mocked_register(name: str, *args, **kwargs): sleep(0.25) return status - def make_create_instrument( - meter: Meter, method_name: str, args: list[Any] - ) -> Callable[[], Any]: - return lambda: getattr(meter, method_name)( - f"concurrent_{method_name}", *args - ) + def make_create_instrument(meter: Meter, method_name: str, args: list[Any]) -> Callable[[], Any]: + return lambda: getattr(meter, method_name)(f"concurrent_{method_name}", *args) - with patch.object( - meter, "_register_instrument", side_effect=mocked_register - ): + with patch.object(meter, "_register_instrument", side_effect=mocked_register): create_methods = [ ("create_counter", []), ("create_up_down_counter", []), @@ -679,17 +609,11 @@ def test_repeated_instrument_names(self): with self.assertNotRaises(Exception): self.meter.create_counter("counter") self.meter.create_up_down_counter("up_down_counter") - self.meter.create_observable_counter( - "observable_counter", callbacks=[Mock()] - ) + self.meter.create_observable_counter("observable_counter", callbacks=[Mock()]) self.meter.create_histogram("histogram") self.meter.create_gauge("gauge") - self.meter.create_observable_gauge( - "observable_gauge", callbacks=[Mock()] - ) - self.meter.create_observable_up_down_counter( - "observable_up_down_counter", callbacks=[Mock()] - ) + self.meter.create_observable_gauge("observable_gauge", callbacks=[Mock()]) + self.meter.create_observable_up_down_counter("observable_up_down_counter", callbacks=[Mock()]) for instrument_name in [ "counter", @@ -697,51 +621,35 @@ def test_repeated_instrument_names(self): "histogram", "gauge", ]: - with self.assertNoLogs( - "opentelemetry.sdk.metrics._internal", level="WARNING" - ): - getattr(self.meter, f"create_{instrument_name}")( - instrument_name - ) + with self.assertNoLogs("opentelemetry.sdk.metrics._internal", level="WARNING"): + getattr(self.meter, f"create_{instrument_name}")(instrument_name) for instrument_name in [ "observable_counter", "observable_gauge", "observable_up_down_counter", ]: - with self.assertNoLogs( - "opentelemetry.sdk.metrics._internal", level="WARNING" - ): - getattr(self.meter, f"create_{instrument_name}")( - instrument_name, callbacks=[Mock()] - ) + with self.assertNoLogs("opentelemetry.sdk.metrics._internal", level="WARNING"): + getattr(self.meter, f"create_{instrument_name}")(instrument_name, callbacks=[Mock()]) def test_repeated_instrument_names_with_different_advisory(self): with self.assertNotRaises(Exception): - self.meter.create_histogram( - "histogram", explicit_bucket_boundaries_advisory=[1.0] - ) + self.meter.create_histogram("histogram", explicit_bucket_boundaries_advisory=[1.0]) for instrument_name in [ "histogram", ]: with self.assertLogs(level=WARNING): - getattr(self.meter, f"create_{instrument_name}")( - instrument_name - ) + getattr(self.meter, f"create_{instrument_name}")(instrument_name) def test_create_counter(self): - counter = self.meter.create_counter( - "name", unit="unit", description="description" - ) + counter = self.meter.create_counter("name", unit="unit", description="description") self.assertIsInstance(counter, Counter) self.assertEqual(counter.name, "name") def test_create_up_down_counter(self): - up_down_counter = self.meter.create_up_down_counter( - "name", unit="unit", description="description" - ) + up_down_counter = self.meter.create_up_down_counter("name", unit="unit", description="description") self.assertIsInstance(up_down_counter, UpDownCounter) self.assertEqual(up_down_counter.name, "name") @@ -755,9 +663,7 @@ def test_create_observable_counter(self): self.assertEqual(observable_counter.name, "name") def test_create_histogram(self): - histogram = self.meter.create_histogram( - "name", unit="unit", description="description" - ) + histogram = self.meter.create_histogram("name", unit="unit", description="description") self.assertIsInstance(histogram, Histogram) self.assertEqual(histogram.name, "name") @@ -801,25 +707,19 @@ def test_create_observable_gauge(self): self.assertEqual(observable_gauge.name, "name") def test_create_gauge(self): - gauge = self.meter.create_gauge( - "name", unit="unit", description="description" - ) + gauge = self.meter.create_gauge("name", unit="unit", description="description") self.assertIsInstance(gauge, _Gauge) self.assertEqual(gauge.name, "name") def test_create_observable_up_down_counter(self): - observable_up_down_counter = ( - self.meter.create_observable_up_down_counter( - "name", - callbacks=[Mock()], - unit="unit", - description="description", - ) - ) - self.assertIsInstance( - observable_up_down_counter, ObservableUpDownCounter + observable_up_down_counter = self.meter.create_observable_up_down_counter( + "name", + callbacks=[Mock()], + unit="unit", + description="description", ) + self.assertIsInstance(observable_up_down_counter, ObservableUpDownCounter) self.assertEqual(observable_up_down_counter.name, "name") @patch.dict("os.environ", {OTEL_SDK_DISABLED: "true"}) @@ -896,14 +796,8 @@ def test_rule_based_configurator_with_glob_predicate(self): ], default_config=_MeterConfig.default(), ) - self.assertFalse( - configurator( - InstrumentationScope("opentelemetry.sdk", "1.0") - ).is_enabled - ) - self.assertTrue( - configurator(InstrumentationScope("custom.name", "1.0")).is_enabled - ) + self.assertFalse(configurator(InstrumentationScope("opentelemetry.sdk", "1.0")).is_enabled) + self.assertTrue(configurator(InstrumentationScope("custom.name", "1.0")).is_enabled) def test_scope_name_matches_glob_exact(self): predicate = _scope_name_matches_glob("my.meter") @@ -919,48 +813,32 @@ def test_scope_name_matches_glob_no_match(self): predicate = _scope_name_matches_glob("no.match") self.assertFalse(predicate(InstrumentationScope("my.meter", "1.0"))) - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_disabled_meter_counter_skips_measurement( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_disabled_meter_counter_skips_measurement(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) counter = mp.get_meter("test").create_counter("c") counter.add(1) sync_consumer_instance.consume_measurement.assert_not_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_disabled_meter_up_down_counter_skips_measurement( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_disabled_meter_up_down_counter_skips_measurement(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) counter = mp.get_meter("test").create_up_down_counter("udc") counter.add(1) sync_consumer_instance.consume_measurement.assert_not_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_disabled_meter_histogram_skips_measurement( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_disabled_meter_histogram_skips_measurement(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) histogram = mp.get_meter("test").create_histogram("h") histogram.record(1) sync_consumer_instance.consume_measurement.assert_not_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_disabled_meter_gauge_skips_measurement( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_disabled_meter_gauge_skips_measurement(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) gauge = mp.get_meter("test").create_gauge("g") @@ -970,9 +848,7 @@ def test_disabled_meter_gauge_skips_measurement( def test_disabled_meter_observable_counter_skips_callback(self): cb = Mock() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) - oc = mp.get_meter("test").create_observable_counter( - "oc", callbacks=[cb] - ) + oc = mp.get_meter("test").create_observable_counter("oc", callbacks=[cb]) # Trigger callback collection list(oc.callback(Mock())) cb.assert_not_called() @@ -987,50 +863,32 @@ def test_disabled_meter_observable_gauge_skips_callback(self): def test_disabled_meter_observable_up_down_counter_skips_callback(self): cb = Mock() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) - oudc = mp.get_meter("test").create_observable_up_down_counter( - "oudc", callbacks=[cb] - ) + oudc = mp.get_meter("test").create_observable_up_down_counter("oudc", callbacks=[cb]) list(oudc.callback(Mock())) cb.assert_not_called() - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_counter_noop_after_meter_disabled( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_counter_noop_after_meter_disabled(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() mp = MeterProvider() meter = mp.get_meter("test") counter = meter.create_counter("c") counter.add(1) - self.assertEqual( - sync_consumer_instance.consume_measurement.call_count, 1 - ) + self.assertEqual(sync_consumer_instance.consume_measurement.call_count, 1) counter.add(2) - self.assertEqual( - sync_consumer_instance.consume_measurement.call_count, 2 - ) + self.assertEqual(sync_consumer_instance.consume_measurement.call_count, 2) - mp._set_meter_configurator( - meter_configurator=_disable_meter_configurator - ) + mp._set_meter_configurator(meter_configurator=_disable_meter_configurator) self.assertFalse(meter._is_enabled()) counter.add(3) counter.add(4) - self.assertEqual( - sync_consumer_instance.consume_measurement.call_count, 2 - ) + self.assertEqual(sync_consumer_instance.consume_measurement.call_count, 2) - @patch( - "opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer" - ) - def test_reenable_meter_after_disable( - self, mock_sync_measurement_consumer - ): + @patch("opentelemetry.sdk.metrics._internal.SynchronousMeasurementConsumer") + def test_reenable_meter_after_disable(self, mock_sync_measurement_consumer): sync_consumer_instance = mock_sync_measurement_consumer() mp = MeterProvider(_meter_configurator=_disable_meter_configurator) meter = mp.get_meter("test") @@ -1039,9 +897,7 @@ def test_reenable_meter_after_disable( counter.add(1) sync_consumer_instance.consume_measurement.assert_not_called() - mp._set_meter_configurator( - meter_configurator=_default_meter_configurator - ) + mp._set_meter_configurator(meter_configurator=_default_meter_configurator) self.assertTrue(meter._is_enabled()) counter.add(1) sync_consumer_instance.consume_measurement.assert_called_once() @@ -1073,9 +929,7 @@ def force_flush(self, timeout_millis: float = 10_000) -> bool: class TestDuplicateInstrumentAggregateData(TestCase): def test_duplicate_instrument_aggregate_data(self): exporter = InMemoryMetricExporter() - reader = PeriodicExportingMetricReader( - exporter, export_interval_millis=500 - ) + reader = PeriodicExportingMetricReader(exporter, export_interval_millis=500) view = View( instrument_type=Counter, attribute_keys=[], @@ -1097,15 +951,9 @@ def test_duplicate_instrument_aggregate_data(self): version="version", schema_url="schema_url", ) - counter_0_0 = meter_0.create_counter( - "counter", unit="unit", description="description" - ) - counter_0_1 = meter_0.create_counter( - "counter", unit="unit", description="description" - ) - counter_1_0 = meter_1.create_counter( - "counter", unit="unit", description="description" - ) + counter_0_0 = meter_0.create_counter("counter", unit="unit", description="description") + counter_0_1 = meter_0.create_counter("counter", unit="unit", description="description") + counter_1_0 = meter_1.create_counter("counter", unit="unit", description="description") self.assertIs(counter_0_0, counter_0_1) self.assertIsNot(counter_0_0, counter_1_0) diff --git a/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py b/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py index ab8877c21c3..60700f8b371 100644 --- a/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py +++ b/opentelemetry-sdk/tests/metrics/test_periodic_exporting_metric_reader.py @@ -48,9 +48,7 @@ class FakeMetricsExporter(MetricExporter): - def __init__( - self, wait=0, preferred_temporality=None, preferred_aggregation=None - ): + def __init__(self, wait=0, preferred_temporality=None, preferred_aggregation=None): self.wait = wait self.metrics: list[MetricsData] = [] self._shutdown = False @@ -76,9 +74,7 @@ def force_flush(self, timeout_millis: float = 10_000) -> bool: return True -class ExceptionAtCollectionPeriodicExportingMetricReader( - PeriodicExportingMetricReader -): +class ExceptionAtCollectionPeriodicExportingMetricReader(PeriodicExportingMetricReader): def __init__( self, exporter: MetricExporter, @@ -86,9 +82,7 @@ def __init__( export_interval_millis: float | None = None, export_timeout_millis: float | None = None, ) -> None: - super().__init__( - exporter, export_interval_millis, export_timeout_millis - ) + super().__init__(exporter, export_interval_millis, export_timeout_millis) self._collect_exception = exception # pylint: disable=overridden-final-method @@ -190,9 +184,7 @@ def test_ticker_not_called_on_infinity(self): collect_mock = Mock() exporter = FakeMetricsExporter() exporter.export = Mock() - pmr = PeriodicExportingMetricReader( - exporter, export_interval_millis=math.inf - ) + pmr = PeriodicExportingMetricReader(exporter, export_interval_millis=math.inf) pmr._set_collect_callback(collect_mock) sleep(0.1) self.assertTrue(collect_mock.assert_not_called) @@ -230,18 +222,14 @@ def test_ticker_collects_metrics(self): def test_shutdown(self): exporter = FakeMetricsExporter() - pmr = self._create_periodic_reader( - MetricsData(resource_metrics=[]), exporter - ) + pmr = self._create_periodic_reader(MetricsData(resource_metrics=[]), exporter) pmr.shutdown() self.assertEqual(exporter.metrics[0], MetricsData(resource_metrics=[])) self.assertTrue(pmr._shutdown) self.assertTrue(exporter._shutdown) def test_shutdown_multiple_times(self): - pmr = self._create_periodic_reader( - MetricsData(resource_metrics=[]), FakeMetricsExporter() - ) + pmr = self._create_periodic_reader(MetricsData(resource_metrics=[]), FakeMetricsExporter()) with self.assertLogs(level="WARNING") as w: self.run_with_many_threads(pmr.shutdown) self.assertTrue("Can't shutdown multiple times" in w.output[0]) @@ -307,14 +295,10 @@ def test_metric_exporer_gc(self): "The PeriodicExportingMetricReader object created by this test wasn't garbage collected", ) - @patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_metric_reader_metrics(self): exporter = FakeMetricsExporter() - pmr = PeriodicExportingMetricReader( - exporter, export_interval_millis=100000 - ) + pmr = PeriodicExportingMetricReader(exporter, export_interval_millis=100000) mp = MeterProvider(metric_readers=[pmr]) counter = mp.get_meter("test").create_counter("test_counter") @@ -329,16 +313,10 @@ def test_metric_reader_metrics(self): metric_data = exporter.metrics[0] scope_metrics = [ - sm - for sm in metric_data.resource_metrics[0].scope_metrics - if sm.scope.name == "opentelemetry-sdk" + sm for sm in metric_data.resource_metrics[0].scope_metrics if sm.scope.name == "opentelemetry-sdk" ] self.assertEqual(len(scope_metrics), 1) - reader_metrics = [ - m - for m in scope_metrics[0].metrics - if m.name == "otel.sdk.metric_reader.collection.duration" - ] + reader_metrics = [m for m in scope_metrics[0].metrics if m.name == "otel.sdk.metric_reader.collection.duration"] self.assertEqual(len(reader_metrics), 1) metric = reader_metrics[0] @@ -347,9 +325,7 @@ def test_metric_reader_metrics(self): self.assertEqual(histogram.count, 1) attrs = histogram.attributes assert attrs is not None - self.assertEqual( - attrs["otel.component.type"], "periodic_metric_reader" - ) + self.assertEqual(attrs["otel.component.type"], "periodic_metric_reader") name = attrs["otel.component.name"] assert isinstance(name, str) self.assertTrue(name.startswith("periodic_metric_reader/")) diff --git a/opentelemetry-sdk/tests/metrics/test_point.py b/opentelemetry-sdk/tests/metrics/test_point.py index 18fa05c151d..b399363cc16 100644 --- a/opentelemetry-sdk/tests/metrics/test_point.py +++ b/opentelemetry-sdk/tests/metrics/test_point.py @@ -35,7 +35,9 @@ def setUpClass(cls): "g": [1, 2], "h": [1.1, 2.2], } - cls.attributes_0_str = '{"a": "b", "b": true, "c": 1, "d": 1.1, "e": ["a", "b"], "f": [true, false], "g": [1, 2], "h": [1.1, 2.2]}' + cls.attributes_0_str = ( + '{"a": "b", "b": true, "c": 1, "d": 1.1, "e": ["a", "b"], "f": [true, false], "g": [1, 2], "h": [1.1, 2.2]}' + ) cls.attributes_1 = { "i": "a", @@ -134,7 +136,9 @@ def setUpClass(cls): ], aggregation_temporality=AggregationTemporality.CUMULATIVE, ) - cls.exp_histogram_0_str = f'{{"data_points": [{cls.exp_histogram_data_point_0_str}], "aggregation_temporality": 2}}' + cls.exp_histogram_0_str = ( + f'{{"data_points": [{cls.exp_histogram_data_point_0_str}], "aggregation_temporality": 2}}' + ) cls.metric_0 = Metric( name="metric_0", @@ -142,11 +146,11 @@ def setUpClass(cls): unit="unit_0", data=cls.sum_0, ) - cls.metric_0_str = f'{{"name": "metric_0", "description": "description_0", "unit": "unit_0", "data": {cls.sum_0_str}}}' - - cls.metric_1 = Metric( - name="metric_1", description=None, unit="unit_1", data=cls.gauge_0 + cls.metric_0_str = ( + f'{{"name": "metric_0", "description": "description_0", "unit": "unit_0", "data": {cls.sum_0_str}}}' ) + + cls.metric_1 = Metric(name="metric_1", description=None, unit="unit_1", data=cls.gauge_0) cls.metric_1_str = f'{{"name": "metric_1", "description": "", "unit": "unit_1", "data": {cls.gauge_0_str}}}' cls.metric_2 = Metric( @@ -155,7 +159,9 @@ def setUpClass(cls): unit=None, data=cls.histogram_0, ) - cls.metric_2_str = f'{{"name": "metric_2", "description": "description_2", "unit": "", "data": {cls.histogram_0_str}}}' + cls.metric_2_str = ( + f'{{"name": "metric_2", "description": "description_2", "unit": "", "data": {cls.histogram_0_str}}}' + ) cls.scope_metrics_0 = ScopeMetrics( scope=InstrumentationScope( @@ -180,26 +186,20 @@ def setUpClass(cls): cls.scope_metrics_1_str = f'{{"scope": {{"name": "name_1", "version": "version_1", "schema_url": "schema_url_1", "attributes": null}}, "metrics": [{cls.metric_0_str}, {cls.metric_1_str}, {cls.metric_2_str}], "schema_url": "schema_url_1"}}' cls.resource_metrics_0 = ResourceMetrics( - resource=Resource( - attributes=cls.attributes_0, schema_url="schema_url_0" - ), + resource=Resource(attributes=cls.attributes_0, schema_url="schema_url_0"), scope_metrics=[cls.scope_metrics_0, cls.scope_metrics_1], schema_url="schema_url_0", ) cls.resource_metrics_0_str = f'{{"resource": {{"attributes": {cls.attributes_0_str}, "schema_url": "schema_url_0"}}, "scope_metrics": [{cls.scope_metrics_0_str}, {cls.scope_metrics_1_str}], "schema_url": "schema_url_0"}}' cls.resource_metrics_1 = ResourceMetrics( - resource=Resource( - attributes=cls.attributes_1, schema_url="schema_url_1" - ), + resource=Resource(attributes=cls.attributes_1, schema_url="schema_url_1"), scope_metrics=[cls.scope_metrics_0, cls.scope_metrics_1], schema_url="schema_url_1", ) cls.resource_metrics_1_str = f'{{"resource": {{"attributes": {cls.attributes_1_str}, "schema_url": "schema_url_1"}}, "scope_metrics": [{cls.scope_metrics_0_str}, {cls.scope_metrics_1_str}], "schema_url": "schema_url_1"}}' - cls.metrics_data_0 = MetricsData( - resource_metrics=[cls.resource_metrics_0, cls.resource_metrics_1] - ) + cls.metrics_data_0 = MetricsData(resource_metrics=[cls.resource_metrics_0, cls.resource_metrics_1]) cls.metrics_data_0_str = f'{{"resource_metrics": [{cls.resource_metrics_0_str}, {cls.resource_metrics_1_str}]}}' def test_number_data_point(self): @@ -235,14 +235,10 @@ def test_gauge(self): self.assertEqual(self.gauge_0.to_json(indent=None), self.gauge_0_str) def test_histogram(self): - self.assertEqual( - self.histogram_0.to_json(indent=None), self.histogram_0_str - ) + self.assertEqual(self.histogram_0.to_json(indent=None), self.histogram_0_str) def test_exp_histogram(self): - self.assertEqual( - self.exp_histogram_0.to_json(indent=None), self.exp_histogram_0_str - ) + self.assertEqual(self.exp_histogram_0.to_json(indent=None), self.exp_histogram_0_str) def test_metric(self): self.assertEqual(self.metric_0.to_json(indent=None), self.metric_0_str) @@ -252,12 +248,8 @@ def test_metric(self): self.assertEqual(self.metric_2.to_json(indent=None), self.metric_2_str) def test_scope_metrics(self): - self.assertEqual( - self.scope_metrics_0.to_json(indent=None), self.scope_metrics_0_str - ) - self.assertEqual( - self.scope_metrics_1.to_json(indent=None), self.scope_metrics_1_str - ) + self.assertEqual(self.scope_metrics_0.to_json(indent=None), self.scope_metrics_0_str) + self.assertEqual(self.scope_metrics_1.to_json(indent=None), self.scope_metrics_1_str) def test_resource_metrics(self): self.assertEqual( @@ -270,6 +262,4 @@ def test_resource_metrics(self): ) def test_metrics_data(self): - self.assertEqual( - self.metrics_data_0.to_json(indent=None), self.metrics_data_0_str - ) + self.assertEqual(self.metrics_data_0.to_json(indent=None), self.metrics_data_0_str) diff --git a/opentelemetry-sdk/tests/metrics/test_view.py b/opentelemetry-sdk/tests/metrics/test_view.py index a1c0ff4bdc7..75ea41ade04 100644 --- a/opentelemetry-sdk/tests/metrics/test_view.py +++ b/opentelemetry-sdk/tests/metrics/test_view.py @@ -21,54 +21,36 @@ def test_instrument_name(self): mock_instrument = Mock() mock_instrument.configure_mock(name="instrument_name") - self.assertTrue( - View(instrument_name="instrument_name")._match(mock_instrument) - ) + self.assertTrue(View(instrument_name="instrument_name")._match(mock_instrument)) def test_instrument_unit(self): mock_instrument = Mock() mock_instrument.configure_mock(unit="instrument_unit") - self.assertTrue( - View(instrument_unit="instrument_unit")._match(mock_instrument) - ) + self.assertTrue(View(instrument_unit="instrument_unit")._match(mock_instrument)) def test_meter_name(self): - self.assertTrue( - View(meter_name="meter_name")._match( - Mock(**{"instrumentation_scope.name": "meter_name"}) - ) - ) + self.assertTrue(View(meter_name="meter_name")._match(Mock(**{"instrumentation_scope.name": "meter_name"}))) def test_meter_version(self): self.assertTrue( - View(meter_version="meter_version")._match( - Mock(**{"instrumentation_scope.version": "meter_version"}) - ) + View(meter_version="meter_version")._match(Mock(**{"instrumentation_scope.version": "meter_version"})) ) def test_meter_schema_url(self): self.assertTrue( View(meter_schema_url="meter_schema_url")._match( - Mock( - **{"instrumentation_scope.schema_url": "meter_schema_url"} - ) + Mock(**{"instrumentation_scope.schema_url": "meter_schema_url"}) ) ) self.assertFalse( View(meter_schema_url="meter_schema_url")._match( - Mock( - **{ - "instrumentation_scope.schema_url": "meter_schema_urlabc" - } - ) + Mock(**{"instrumentation_scope.schema_url": "meter_schema_urlabc"}) ) ) self.assertTrue( View(meter_schema_url="meter_schema_url")._match( - Mock( - **{"instrumentation_scope.schema_url": "meter_schema_url"} - ) + Mock(**{"instrumentation_scope.schema_url": "meter_schema_url"}) ) ) diff --git a/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py b/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py index 73b0e6e24a5..6ea757c1b4a 100644 --- a/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py +++ b/opentelemetry-sdk/tests/metrics/test_view_instrument_match.py @@ -63,9 +63,7 @@ class Test_ViewInstrumentMatch(TestCase): # pylint: disable=invalid-name @classmethod def setUpClass(cls): cls.mock_aggregation_factory = Mock() - cls.mock_created_aggregation = ( - cls.mock_aggregation_factory._create_aggregation() - ) + cls.mock_created_aggregation = cls.mock_aggregation_factory._create_aggregation() cls.mock_resource = Mock() cls.mock_instrumentation_scope = Mock() cls.sdk_configuration = SdkConfiguration( @@ -85,9 +83,7 @@ def test_consume_measurement(self): attribute_keys={"a", "c"}, ), instrument=instrument1, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) view_instrument_match.consume_measurement( @@ -130,9 +126,7 @@ def test_consume_measurement(self): aggregation=self.mock_aggregation_factory, ), instrument=instrument1, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) view_instrument_match.consume_measurement( @@ -146,11 +140,7 @@ def test_consume_measurement(self): ) self.assertEqual( view_instrument_match._attributes_aggregation, - { - frozenset( - [("c", "d"), ("f", "g")] - ): self.mock_created_aggregation - }, + {frozenset([("c", "d"), ("f", "g")]): self.mock_created_aggregation}, ) # empty set attribute_keys will drop all labels and aggregate @@ -163,9 +153,7 @@ def test_consume_measurement(self): attribute_keys={}, ), instrument=instrument1, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) view_instrument_match.consume_measurement( Measurement( @@ -193,9 +181,7 @@ def test_consume_measurement(self): attribute_keys={}, ), instrument=instrument1, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) view_instrument_match.consume_measurement( Measurement( @@ -228,9 +214,7 @@ def test_collect(self): attribute_keys={"a", "c"}, ), instrument=instrument1, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) view_instrument_match.consume_measurement( @@ -243,9 +227,7 @@ def test_collect(self): ) ) - number_data_points = view_instrument_match.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + number_data_points = view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) number_data_points = list(number_data_points) self.assertEqual(len(number_data_points), 1) @@ -271,9 +253,7 @@ def test_consume_measurement_attributes_are_copied(self): aggregation=DefaultAggregation(), ), instrument=instrument1, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) attributes = {"key": "original"} @@ -290,9 +270,7 @@ def test_consume_measurement_attributes_are_copied(self): # Mutate the original dict after recording attributes["key"] = "mutated" - number_data_points = view_instrument_match.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + number_data_points = view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) number_data_points = list(number_data_points) self.assertEqual(len(number_data_points), 1) self.assertEqual(number_data_points[0].attributes, {"key": "original"}) @@ -311,9 +289,7 @@ def test_collect_resets_start_time_unix_nano(self, mock_time_ns): aggregation=self.mock_aggregation_factory, ), instrument=instrument, - instrument_class_aggregation=MagicMock( - **{"__getitem__.return_value": DefaultAggregation()} - ), + instrument_class_aggregation=MagicMock(**{"__getitem__.return_value": DefaultAggregation()}), ) start_time_unix_nano = 0 self.assertEqual(mock_time_ns.call_count, 0) @@ -477,9 +453,7 @@ def test_data_point_check(self): ) ) - result = view_instrument_match.collect( - AggregationTemporality.CUMULATIVE, 0 - ) + result = view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) self.assertEqual(len(list(result)), 3) @@ -514,9 +488,7 @@ def test_setting_aggregation(self): ) self.assertIsInstance( - view_instrument_match._attributes_aggregation[ - frozenset({("c", "d")}) - ], + view_instrument_match._attributes_aggregation[frozenset({("c", "d")})], _LastValueAggregation, ) @@ -576,9 +548,7 @@ def test_consume_measurement_with_custom_reservoir_factory(self): ) ) - data_points = list( - view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) - ) + data_points = list(view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0)) # Ensure only one data point is collected self.assertEqual(len(data_points), 2) @@ -633,9 +603,7 @@ def test_consume_measurement_with_exemplars(self): ) # Collect the data points - data_points = list( - view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) - ) + data_points = list(view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0)) # Ensure only one data point is collected self.assertEqual(len(data_points), 1) @@ -679,9 +647,7 @@ def test_consume_measurement_with_exemplars_and_view_attributes_filter( ) # Collect the data points - data_points = list( - view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) - ) + data_points = list(view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0)) # Ensure only one data point is collected self.assertEqual(len(data_points), 1) @@ -698,9 +664,7 @@ def test_consume_measurement_with_exemplars_and_view_attributes_filter( class TestAlignedHistogramBucketExemplarReservoir(TestCase): def test_consume_measurement_with_custom_reservoir_factory(self): # Custom factory for AlignedHistogramBucketExemplarReservoir with specific boundaries - histogram_reservoir_factory = generalized_reservoir_factory( - boundaries=[0, 5, 10, 25] - ) + histogram_reservoir_factory = generalized_reservoir_factory(boundaries=[0, 5, 10, 25]) # Create an instance of _Histogram instrument1 = _Histogram( @@ -764,9 +728,7 @@ def test_consume_measurement_with_custom_reservoir_factory(self): ) # Collect the data points - data_points = list( - view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0) - ) + data_points = list(view_instrument_match.collect(AggregationTemporality.CUMULATIVE, 0)) # Ensure three data points are collected, one for each bucket self.assertEqual(len(data_points), 3) @@ -776,12 +738,6 @@ def test_consume_measurement_with_custom_reservoir_factory(self): self.assertEqual(len(data_points[1].exemplars), 1) self.assertEqual(len(data_points[2].exemplars), 1) - self.assertEqual( - data_points[0].exemplars[0].value, 2.0 - ) # First bucket - self.assertEqual( - data_points[1].exemplars[0].value, 8.0 - ) # Second bucket - self.assertEqual( - data_points[2].exemplars[0].value, 15.0 - ) # Third bucket + self.assertEqual(data_points[0].exemplars[0].value, 2.0) # First bucket + self.assertEqual(data_points[1].exemplars[0].value, 8.0) # Second bucket + self.assertEqual(data_points[2].exemplars[0].value, 15.0) # Third bucket diff --git a/opentelemetry-sdk/tests/resources/test_resources.py b/opentelemetry-sdk/tests/resources/test_resources.py index 3513254d391..12f6beb5526 100644 --- a/opentelemetry-sdk/tests/resources/test_resources.py +++ b/opentelemetry-sdk/tests/resources/test_resources.py @@ -70,9 +70,7 @@ def detect(self) -> Resource: class ProcessDependentResourceDetector(ResourceDetector): - def __init__( - self, resource: Resource, process_dependent: bool = False - ) -> None: + def __init__(self, resource: Resource, process_dependent: bool = False) -> None: super().__init__() self.resource = resource self.process_dependent = process_dependent @@ -88,11 +86,7 @@ def is_process_dependent(self) -> bool: class TestResources(unittest.TestCase): def setUp(self) -> None: environ[OTEL_RESOURCE_ATTRIBUTES] = "" - self._service_instance_id = ( - ServiceInstanceIdResourceDetector() - .detect() - .attributes[SERVICE_INSTANCE_ID] - ) + self._service_instance_id = ServiceInstanceIdResourceDetector().detect().attributes[SERVICE_INSTANCE_ID] def tearDown(self) -> None: environ.pop(OTEL_RESOURCE_ATTRIBUTES) @@ -262,9 +256,7 @@ def test_invalid_resource_attribute_values(self): { SERVICE_NAME: "test", "non-primitive-data-type": {}, - "invalid-byte-type-attribute": ( - b"\xd8\xe1\xb7\xeb\xa8\xe5 \xd2\xb7\xe1" - ), + "invalid-byte-type-attribute": (b"\xd8\xe1\xb7\xeb\xa8\xe5 \xd2\xb7\xe1"), "": "empty-key-value", None: "null-key-value", "another-non-primitive": uuid.uuid4(), @@ -308,9 +300,7 @@ def test_aggregated_resources_with_default_destroying_static_resource( {"static_key": "try_to_overwrite_existing_value", "key": "value"} ) self.assertEqual( - get_aggregated_resources( - [resource_detector], initial_resource=static_resource - ), + get_aggregated_resources([resource_detector], initial_resource=static_resource), Resource( { "static_key": "try_to_overwrite_existing_value", @@ -323,9 +313,7 @@ def test_aggregated_resources_multiple_detectors(self): resource_detector1 = Mock(spec=ResourceDetector) resource_detector1.detect.return_value = Resource({"key1": "value1"}) resource_detector2 = Mock(spec=ResourceDetector) - resource_detector2.detect.return_value = Resource( - {"key2": "value2", "key3": "value3"} - ) + resource_detector2.detect.return_value = Resource({"key2": "value2", "key3": "value3"}) resource_detector3 = Mock(spec=ResourceDetector) resource_detector3.detect.return_value = Resource( { @@ -336,9 +324,7 @@ def test_aggregated_resources_multiple_detectors(self): ) self.assertEqual( - get_aggregated_resources( - [resource_detector1, resource_detector2, resource_detector3] - ), + get_aggregated_resources([resource_detector1, resource_detector2, resource_detector3]), _DEFAULT_RESOURCE.merge( Resource( { @@ -361,13 +347,9 @@ def test_aggregated_resources_multiple_detectors(self): def test_aggregated_resources_different_schema_urls(self): resource_detector1 = Mock(spec=ResourceDetector) - resource_detector1.detect.return_value = Resource( - {"key1": "value1"}, "" - ) + resource_detector1.detect.return_value = Resource({"key1": "value1"}, "") resource_detector2 = Mock(spec=ResourceDetector) - resource_detector2.detect.return_value = Resource( - {"key2": "value2", "key3": "value3"}, "url1" - ) + resource_detector2.detect.return_value = Resource({"key2": "value2", "key3": "value3"}, "url1") resource_detector3 = Mock(spec=ResourceDetector) resource_detector3.detect.return_value = Resource( { @@ -405,9 +387,7 @@ def test_aggregated_resources_different_schema_urls(self): ) with self.assertLogs(level=ERROR) as log_entry: self.assertEqual( - get_aggregated_resources( - [resource_detector2, resource_detector3] - ), + get_aggregated_resources([resource_detector2, resource_detector3]), _DEFAULT_RESOURCE.merge( Resource( { @@ -416,9 +396,7 @@ def test_aggregated_resources_different_schema_urls(self): }, "", ) - ).merge( - Resource({"key2": "value2", "key3": "value3"}, "url1") - ), + ).merge(Resource({"key2": "value2", "key3": "value3"}, "url1")), ) self.assertIn("url1", log_entry.output[0]) self.assertIn("url2", log_entry.output[0]) @@ -477,9 +455,7 @@ def test_resource_detector_raise_error(self): resource_detector = Mock(spec=ResourceDetector) resource_detector.detect.side_effect = Exception() resource_detector.raise_on_error = True - self.assertRaises( - Exception, get_aggregated_resources, [resource_detector] - ) + self.assertRaises(Exception, get_aggregated_resources, [resource_detector]) def test_resource_detector_is_not_process_dependent_by_default(self): self.assertFalse(DefaultResourceDetector().is_process_dependent()) @@ -488,14 +464,10 @@ def test_process_resource_detector_is_process_dependent(self): self.assertTrue(ProcessResourceDetector().is_process_dependent()) @patch("opentelemetry.sdk.resources._build_resource_detectors") - def test_get_process_dependent_resource( - self, build_resource_detectors_mock - ): + def test_get_process_dependent_resource(self, build_resource_detectors_mock): build_resource_detectors_mock.return_value = [ ProcessDependentResourceDetector(Resource({"ignored": "ignored"})), - ProcessDependentResourceDetector( - Resource({"one": "one", "two": "old"}), process_dependent=True - ), + ProcessDependentResourceDetector(Resource({"one": "one", "two": "old"}), process_dependent=True), ProcessDependentResourceDetector( Resource({"two": "new", "three": "three"}), process_dependent=True, @@ -508,16 +480,12 @@ def test_get_process_dependent_resource( ) @patch("opentelemetry.sdk.resources._build_resource_detectors") - def test_get_process_dependent_resource_empty( - self, build_resource_detectors_mock - ): + def test_get_process_dependent_resource_empty(self, build_resource_detectors_mock): build_resource_detectors_mock.return_value = [ ProcessDependentResourceDetector(Resource({"ignored": "ignored"})), ] - self.assertEqual( - _get_process_dependent_resource(), Resource.get_empty() - ) + self.assertEqual(_get_process_dependent_resource(), Resource.get_empty()) @patch("opentelemetry.sdk.resources.logger") def test_resource_detector_timeout(self, mock_logger): @@ -551,9 +519,7 @@ def test_env_priority(self): self.assertEqual(resource_env.attributes["key1"], "env_value1") self.assertEqual(resource_env.attributes["key2"], "env_value2") - resource_env_override = Resource.create( - {"key1": "value1", "key2": "value2"} - ) + resource_env_override = Resource.create({"key1": "value1", "key2": "value2"}) self.assertEqual(resource_env_override.attributes["key1"], "value1") self.assertEqual(resource_env_override.attributes["key2"], "value2") @@ -574,13 +540,7 @@ def test_service_name_env(self): # pylint: disable=too-many-public-methods def _make_detector_ep(resource): - return Mock( - **{ - "load.return_value": Mock( - return_value=Mock(**{"detect.return_value": resource}) - ) - } - ) + return Mock(**{"load.return_value": Mock(return_value=Mock(**{"detect.return_value": resource}))}) class TestOTELResourceDetector(unittest.TestCase): @@ -626,9 +586,7 @@ def test_invalid_key_value_pairs(self): def test_multiple_with_url_decode(self): detector = OTELResourceDetector() - environ[OTEL_RESOURCE_ATTRIBUTES] = ( - "key=value%20test%0A, key2=value+%202" - ) + environ[OTEL_RESOURCE_ATTRIBUTES] = "key=value%20test%0A, key2=value+%202" self.assertEqual( detector.detect(), Resource({"key": "value test\n", "key2": "value+ 2"}), @@ -674,9 +632,7 @@ def test_service_name_env_precedence(self): ) def test_process_detector(self): initial_resource = Resource({"foo": "bar"}) - aggregated_resource = get_aggregated_resources( - [ProcessResourceDetector()], initial_resource - ) + aggregated_resource = get_aggregated_resources([ProcessResourceDetector()], initial_resource) self.assertIn( PROCESS_RUNTIME_NAME, @@ -691,9 +647,7 @@ def test_process_detector(self): aggregated_resource.attributes.keys(), ) - self.assertEqual( - aggregated_resource.attributes[PROCESS_PID], os.getpid() - ) + self.assertEqual(aggregated_resource.attributes[PROCESS_PID], os.getpid()) if hasattr(os, "getppid"): self.assertEqual( aggregated_resource.attributes[PROCESS_PARENT_PID], @@ -714,9 +668,7 @@ def test_process_detector(self): aggregated_resource.attributes[PROCESS_EXECUTABLE_PATH], os.path.dirname(sys.executable), ) - self.assertEqual( - aggregated_resource.attributes[PROCESS_COMMAND], sys.orig_argv[0] - ) + self.assertEqual(aggregated_resource.attributes[PROCESS_COMMAND], sys.orig_argv[0]) self.assertNotIn( PROCESS_COMMAND_LINE, aggregated_resource.attributes, @@ -782,9 +734,7 @@ def test_process_detector_uses_orig_argv_for_python_m(self): sys.orig_argv preserves the original invocation and must be preferred. See https://github.com/open-telemetry/opentelemetry-python/issues/4518. """ - aggregated_resource = get_aggregated_resources( - [ProcessResourceDetector()], Resource({"foo": "bar"}) - ) + aggregated_resource = get_aggregated_resources([ProcessResourceDetector()], Resource({"foo": "bar"})) self.assertEqual( aggregated_resource.attributes[PROCESS_COMMAND], @@ -822,86 +772,50 @@ def test_process_detector_uses_orig_argv_for_python_m_on_opt_in(self): def test_resource_detector_entry_points_default(self): resource = Resource({}).create() - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) - self.assertEqual( - resource.attributes["telemetry.sdk.name"], "opentelemetry" - ) - self.assertEqual( - resource.attributes["service.name"], "unknown_service" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") + self.assertEqual(resource.attributes["telemetry.sdk.name"], "opentelemetry") + self.assertEqual(resource.attributes["service.name"], "unknown_service") self.assertEqual(resource.schema_url, "") resource = Resource({}).create({"a": "b", "c": "d"}) - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) - self.assertEqual( - resource.attributes["telemetry.sdk.name"], "opentelemetry" - ) - self.assertEqual( - resource.attributes["service.name"], "unknown_service" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") + self.assertEqual(resource.attributes["telemetry.sdk.name"], "opentelemetry") + self.assertEqual(resource.attributes["service.name"], "unknown_service") self.assertEqual(resource.attributes["a"], "b") self.assertEqual(resource.attributes["c"], "d") self.assertEqual(resource.schema_url, "") - @patch.dict( - environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "mock"}, clear=True - ) + @patch.dict(environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "mock"}, clear=True) @patch( "opentelemetry.util._importlib_metadata.entry_points", Mock( return_value=[ - Mock( - **{ - "load.return_value": Mock( - return_value=Mock( - **{"detect.return_value": Resource({"a": "b"})} - ) - ) - } - ) + Mock(**{"load.return_value": Mock(return_value=Mock(**{"detect.return_value": Resource({"a": "b"})}))}) ] ), ) def test_resource_detector_entry_points_non_default(self): resource = Resource({}).create() - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) - self.assertEqual( - resource.attributes["telemetry.sdk.name"], "opentelemetry" - ) - self.assertEqual( - resource.attributes["service.name"], "unknown_service" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") + self.assertEqual(resource.attributes["telemetry.sdk.name"], "opentelemetry") + self.assertEqual(resource.attributes["service.name"], "unknown_service") self.assertEqual(resource.attributes["a"], "b") self.assertEqual(resource.schema_url, "") - @patch.dict( - environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: ""}, clear=True - ) + @patch.dict(environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: ""}, clear=True) def test_resource_detector_entry_points_empty(self): resource = Resource({}).create() - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") - @patch.dict( - environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "os"}, clear=True - ) + @patch.dict(environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "os"}, clear=True) def test_resource_detector_entry_points_os(self): resource = Resource({}).create() self.assertIn(OS_TYPE, resource.attributes) self.assertIn(OS_VERSION, resource.attributes) - @patch.dict( - environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "*"}, clear=True - ) + @patch.dict(environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "*"}, clear=True) def test_resource_detector_entry_points_all(self): resource = Resource({}).create() @@ -910,9 +824,7 @@ def test_resource_detector_entry_points_all(self): resource.attributes, "'otel' resource detector not enabled", ) - self.assertIn( - OS_TYPE, resource.attributes, "'os' resource detector not enabled" - ) + self.assertIn(OS_TYPE, resource.attributes, "'os' resource detector not enabled") self.assertIn( HOST_ARCH, resource.attributes, @@ -929,19 +841,11 @@ def test_resource_detector_entry_points_otel(self): Test that OTELResourceDetector-resource-generated attributes are always being added. """ - with patch.dict( - environ, {OTEL_RESOURCE_ATTRIBUTES: "a=b,c=d"}, clear=True - ): + with patch.dict(environ, {OTEL_RESOURCE_ATTRIBUTES: "a=b,c=d"}, clear=True): resource = Resource({}).create() - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) - self.assertEqual( - resource.attributes["telemetry.sdk.name"], "opentelemetry" - ) - self.assertEqual( - resource.attributes["service.name"], "unknown_service" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") + self.assertEqual(resource.attributes["telemetry.sdk.name"], "opentelemetry") + self.assertEqual(resource.attributes["service.name"], "unknown_service") self.assertEqual(resource.attributes["a"], "b") self.assertEqual(resource.attributes["c"], "d") self.assertEqual(resource.schema_url, "") @@ -955,23 +859,16 @@ def test_resource_detector_entry_points_otel(self): clear=True, ): resource = Resource({}).create() - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) - self.assertEqual( - resource.attributes["telemetry.sdk.name"], "opentelemetry" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") + self.assertEqual(resource.attributes["telemetry.sdk.name"], "opentelemetry") self.assertEqual( resource.attributes["service.name"], - "unknown_service:" - + resource.attributes["process.executable.name"], + "unknown_service:" + resource.attributes["process.executable.name"], ) self.assertEqual(resource.attributes["a"], "b") self.assertEqual(resource.attributes["c"], "d") self.assertIn(PROCESS_RUNTIME_NAME, resource.attributes.keys()) - self.assertIn( - PROCESS_RUNTIME_DESCRIPTION, resource.attributes.keys() - ) + self.assertIn(PROCESS_RUNTIME_DESCRIPTION, resource.attributes.keys()) self.assertIn(PROCESS_RUNTIME_VERSION, resource.attributes.keys()) self.assertEqual(resource.schema_url, "") @@ -986,9 +883,7 @@ def test_resource_detector_ordering_last_wins(self): ep_b = _make_detector_ep(Resource({"conflict_key": "from_b"})) def side_effect(*args, **kwargs): - return {"mock_a": [ep_a], "mock_b": [ep_b]}.get( - kwargs.get("name", ""), [] - ) + return {"mock_a": [ep_a], "mock_b": [ep_b]}.get(kwargs.get("name", ""), []) with patch( "opentelemetry.util._importlib_metadata.entry_points", @@ -1068,9 +963,7 @@ def test_host_resource_detector(self): self.assertEqual(resource.attributes[HOST_NAME], "foo") self.assertEqual(resource.attributes[HOST_ARCH], "AMD64") - @patch.dict( - environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "host"}, clear=True - ) + @patch.dict(environ, {OTEL_EXPERIMENTAL_RESOURCE_DETECTORS: "host"}, clear=True) def test_resource_detector_entry_points_host(self): resource = Resource({}).create() self.assertIn(HOST_NAME, resource.attributes) @@ -1083,9 +976,7 @@ def test_resource_detector_entry_points_host(self): ) def test_resource_detector_entry_points_tolerate_missing_detector(self): resource = Resource({}).create() - self.assertEqual( - resource.attributes["telemetry.sdk.language"], "python" - ) + self.assertEqual(resource.attributes["telemetry.sdk.language"], "python") self.assertIn(HOST_NAME, resource.attributes) @@ -1100,9 +991,7 @@ def tearDown(self) -> None: _resources_module._service_instance_id_pid = self._orig_instance_pid def test_is_process_dependent(self): - self.assertTrue( - ServiceInstanceIdResourceDetector().is_process_dependent() - ) + self.assertTrue(ServiceInstanceIdResourceDetector().is_process_dependent()) def test_detect_value_is_valid_uuid4(self): _resources_module._service_instance_id = None @@ -1123,41 +1012,23 @@ def test_detect_stable_within_instance(self): def test_detect_shared_across_instances(self): _resources_module._service_instance_id = None _resources_module._service_instance_id_pid = None - id1 = ( - ServiceInstanceIdResourceDetector() - .detect() - .attributes[SERVICE_INSTANCE_ID] - ) - id2 = ( - ServiceInstanceIdResourceDetector() - .detect() - .attributes[SERVICE_INSTANCE_ID] - ) + id1 = ServiceInstanceIdResourceDetector().detect().attributes[SERVICE_INSTANCE_ID] + id2 = ServiceInstanceIdResourceDetector().detect().attributes[SERVICE_INSTANCE_ID] self.assertEqual(id1, id2) def test_detect_pid_change_generates_new_id(self): _resources_module._service_instance_id = "old-id" _resources_module._service_instance_id_pid = os.getpid() - 1 - new_id = ( - ServiceInstanceIdResourceDetector() - .detect() - .attributes[SERVICE_INSTANCE_ID] - ) + new_id = ServiceInstanceIdResourceDetector().detect().attributes[SERVICE_INSTANCE_ID] self.assertNotEqual(new_id, "old-id") - self.assertEqual( - _resources_module._service_instance_id_pid, os.getpid() - ) + self.assertEqual(_resources_module._service_instance_id_pid, os.getpid()) uuid.UUID(new_id) def test_detect_pid_unchanged_returns_same_id(self): known_id = "known-stable-id" _resources_module._service_instance_id = known_id _resources_module._service_instance_id_pid = os.getpid() - result = ( - ServiceInstanceIdResourceDetector() - .detect() - .attributes[SERVICE_INSTANCE_ID] - ) + result = ServiceInstanceIdResourceDetector().detect().attributes[SERVICE_INSTANCE_ID] self.assertEqual(result, known_id) @unittest.skipUnless(hasattr(os, "fork"), "requires os.fork") @@ -1185,9 +1056,7 @@ def test_detect_fork_generates_new_id(self): text=True, check=True, ) - ids = dict( - line.split(":", 1) for line in result.stdout.strip().splitlines() - ) + ids = dict(line.split(":", 1) for line in result.stdout.strip().splitlines()) parent_id, child_id = ids["parent"], ids["child"] self.assertNotEqual(parent_id, child_id) self.assertEqual(uuid.UUID(parent_id).version, 4) diff --git a/opentelemetry-sdk/tests/shared_internal/test_batch_processor.py b/opentelemetry-sdk/tests/shared_internal/test_batch_processor.py index 02337757073..0b287d6e9ff 100644 --- a/opentelemetry-sdk/tests/shared_internal/test_batch_processor.py +++ b/opentelemetry-sdk/tests/shared_internal/test_batch_processor.py @@ -79,9 +79,7 @@ def shutdown(self): ) class TestBatchProcessor: # pylint: disable=no-self-use - def test_telemetry_exported_once_batch_size_reached( - self, batch_processor_class, telemetry - ): + def test_telemetry_exported_once_batch_size_reached(self, batch_processor_class, telemetry): exporter = Mock() batch_processor = batch_processor_class( exporter, @@ -103,9 +101,7 @@ def test_telemetry_exported_once_batch_size_reached( batch_processor.shutdown() # pylint: disable=no-self-use - def test_telemetry_exported_once_schedule_delay_reached( - self, batch_processor_class, telemetry - ): + def test_telemetry_exported_once_schedule_delay_reached(self, batch_processor_class, telemetry): exporter = Mock() batch_processor = batch_processor_class( exporter, @@ -119,9 +115,7 @@ def test_telemetry_exported_once_schedule_delay_reached( exporter.export.assert_called_once_with([telemetry]) batch_processor.shutdown() - def test_telemetry_flushed_before_shutdown_and_dropped_after_shutdown( - self, batch_processor_class, telemetry - ): + def test_telemetry_flushed_before_shutdown_and_dropped_after_shutdown(self, batch_processor_class, telemetry): exporter = Mock() batch_processor = batch_processor_class( exporter, @@ -142,9 +136,7 @@ def test_telemetry_flushed_before_shutdown_and_dropped_after_shutdown( exporter.export.assert_called_once() # pylint: disable=no-self-use - def test_force_flush_flushes_telemetry( - self, batch_processor_class, telemetry - ): + def test_force_flush_flushes_telemetry(self, batch_processor_class, telemetry): exporter = Mock() batch_processor = batch_processor_class( exporter, @@ -164,9 +156,7 @@ def test_force_flush_flushes_telemetry( hasattr(os, "fork"), "needs *nix", ) - def test_batch_telemetry_record_processor_fork( - self, batch_processor_class, telemetry - ): + def test_batch_telemetry_record_processor_fork(self, batch_processor_class, telemetry): exporter = Mock() batch_processor = batch_processor_class( exporter, @@ -200,9 +190,7 @@ def child(conn): assert exporter.export.call_count == 1 batch_processor.shutdown() - def test_record_processor_is_garbage_collected( - self, batch_processor_class, telemetry - ): + def test_record_processor_is_garbage_collected(self, batch_processor_class, telemetry): exporter = Mock() processor = batch_processor_class(exporter) weak_ref = weakref.ref(processor) @@ -215,9 +203,7 @@ def test_record_processor_is_garbage_collected( # Then the reference to the processor should no longer exist assert weak_ref() is None - def test_shutdown_allows_1_export_to_finish( - self, batch_processor_class, telemetry - ): + def test_shutdown_allows_1_export_to_finish(self, batch_processor_class, telemetry): # This exporter throws an exception if it's export sleep cannot finish. exporter = MockExporterForTesting(export_sleep=2) processor = batch_processor_class( diff --git a/opentelemetry-sdk/tests/test_configurator.py b/opentelemetry-sdk/tests/test_configurator.py index 97d075d4ea1..800c594281c 100644 --- a/opentelemetry-sdk/tests/test_configurator.py +++ b/opentelemetry-sdk/tests/test_configurator.py @@ -173,8 +173,7 @@ class DummyMetricReader(MetricReader): def __init__( self, exporter: MetricExporter, - preferred_temporality: dict[type, AggregationTemporality] - | None = None, + preferred_temporality: dict[type, AggregationTemporality] | None = None, preferred_aggregation: dict[type, Aggregation] | None = None, export_interval_millis: float | None = None, export_timeout_millis: float | None = None, @@ -283,9 +282,7 @@ def should_sample( class CustomRatioSampler(TraceIdRatioBased): def __init__(self, ratio): if not isinstance(ratio, float): - raise ValueError( - "CustomRatioSampler ratio argument is not a float." - ) + raise ValueError("CustomRatioSampler ratio argument is not a float.") self.ratio = ratio super().__init__(ratio) @@ -337,15 +334,9 @@ def is_trace_id_random(self): class TestTraceInit(TestCase): def setUp(self): super() - self.get_provider_patcher = patch( - "opentelemetry.sdk._configuration.TracerProvider", Provider - ) - self.get_processor_patcher = patch( - "opentelemetry.sdk._configuration.BatchSpanProcessor", Processor - ) - self.set_provider_patcher = patch( - "opentelemetry.sdk._configuration.set_tracer_provider" - ) + self.get_provider_patcher = patch("opentelemetry.sdk._configuration.TracerProvider", Provider) + self.get_processor_patcher = patch("opentelemetry.sdk._configuration.BatchSpanProcessor", Processor) + self.set_provider_patcher = patch("opentelemetry.sdk._configuration.set_tracer_provider") self.get_provider_mock = self.get_provider_patcher.start() self.get_processor_mock = self.get_processor_patcher.start() @@ -358,9 +349,7 @@ def tearDown(self): self.set_provider_patcher.stop() # pylint: disable=protected-access - @patch.dict( - environ, {"OTEL_RESOURCE_ATTRIBUTES": "service.name=my-test-service"} - ) + @patch.dict(environ, {"OTEL_RESOURCE_ATTRIBUTES": "service.name=my-test-service"}) def test_trace_init_default(self): auto_resource = Resource.create( { @@ -380,9 +369,7 @@ def test_trace_init_default(self): self.assertEqual(len(provider.processors), 1) self.assertIsInstance(provider.processors[0], Processor) self.assertIsInstance(provider.processors[0].exporter, Exporter) - self.assertEqual( - provider.processors[0].exporter.service_name, "my-test-service" - ) + self.assertEqual(provider.processors[0].exporter.service_name, "my-test-service") self.assertEqual( provider.resource.attributes.get("telemetry.auto.version"), "test-version", @@ -393,9 +380,7 @@ def test_trace_init_default(self): {"OTEL_RESOURCE_ATTRIBUTES": "service.name=my-otlp-test-service"}, ) def test_trace_init_otlp(self): - _init_tracing( - {"otlp": OTLPSpanExporter}, id_generator=RandomIdGenerator() - ) + _init_tracing({"otlp": OTLPSpanExporter}, id_generator=RandomIdGenerator()) self.assertEqual(self.set_provider_mock.call_count, 1) provider = self.set_provider_mock.call_args[0][0] @@ -403,9 +388,7 @@ def test_trace_init_otlp(self): self.assertIsInstance(provider.id_generator, RandomIdGenerator) self.assertEqual(len(provider.processors), 1) self.assertIsInstance(provider.processors[0], Processor) - self.assertIsInstance( - provider.processors[0].exporter, OTLPSpanExporter - ) + self.assertIsInstance(provider.processors[0].exporter, OTLPSpanExporter) self.assertIsInstance(provider.resource, Resource) self.assertEqual( provider.resource.attributes.get("service.name"), @@ -439,19 +422,13 @@ def test_trace_init_custom_span_processors(self): provider = self.set_provider_mock.call_args[0][0] self.assertEqual(len(provider.processors), 2) self.assertEqual(provider.processors[0], span_processor) - self.assertTrue( - isinstance(provider.processors[1], SimpleSpanProcessor) - ) + self.assertTrue(isinstance(provider.processors[1], SimpleSpanProcessor)) @patch.dict(environ, {OTEL_PYTHON_ID_GENERATOR: "custom_id_generator"}) @patch("opentelemetry.sdk._configuration.IdGenerator", new=IdGenerator) @patch("opentelemetry.sdk._configuration.entry_points") def test_trace_init_custom_id_generator(self, mock_entry_points): - mock_entry_points.configure_mock( - return_value=[ - IterEntryPoint("custom_id_generator", CustomIdGenerator) - ] - ) + mock_entry_points.configure_mock(return_value=[IterEntryPoint("custom_id_generator", CustomIdGenerator)]) id_generator_name = _get_id_generator() id_generator = _import_id_generator(id_generator_name) @@ -459,9 +436,7 @@ def test_trace_init_custom_id_generator(self, mock_entry_points): provider = self.set_provider_mock.call_args[0][0] self.assertIsInstance(provider.id_generator, CustomIdGenerator) - @patch.dict( - "os.environ", {OTEL_TRACES_SAMPLER: "non_existent_entry_point"} - ) + @patch.dict("os.environ", {OTEL_TRACES_SAMPLER: "non_existent_entry_point"}) def test_trace_init_custom_sampler_with_env_non_existent_entry_point(self): sampler_name = _get_sampler() with self.assertLogs(level=WARNING): @@ -490,9 +465,7 @@ def test_trace_init_custom_sampler_with_env(self, mock_entry_points): @patch("opentelemetry.sdk._configuration.entry_points") @patch.dict("os.environ", {OTEL_TRACES_SAMPLER: "custom_sampler_factory"}) - def test_trace_init_custom_sampler_with_env_bad_factory( - self, mock_entry_points - ): + def test_trace_init_custom_sampler_with_env_bad_factory(self, mock_entry_points): mock_entry_points.configure_mock( return_value=[ IterEntryPoint( @@ -517,9 +490,7 @@ def test_trace_init_custom_sampler_with_env_bad_factory( OTEL_TRACES_SAMPLER_ARG: "0.5", }, ) - def test_trace_init_custom_sampler_with_env_unused_arg( - self, mock_entry_points - ): + def test_trace_init_custom_sampler_with_env_unused_arg(self, mock_entry_points): mock_entry_points.configure_mock( return_value=[ IterEntryPoint( @@ -568,9 +539,7 @@ def test_trace_init_custom_ratio_sampler_with_env(self, mock_entry_points): OTEL_TRACES_SAMPLER_ARG: "foobar", }, ) - def test_trace_init_custom_ratio_sampler_with_env_bad_arg( - self, mock_entry_points - ): + def test_trace_init_custom_ratio_sampler_with_env_bad_arg(self, mock_entry_points): mock_entry_points.configure_mock( return_value=[ IterEntryPoint( @@ -594,9 +563,7 @@ def test_trace_init_custom_ratio_sampler_with_env_bad_arg( OTEL_TRACES_SAMPLER: "custom_ratio_sampler_factory", }, ) - def test_trace_init_custom_ratio_sampler_with_env_missing_arg( - self, mock_entry_points - ): + def test_trace_init_custom_ratio_sampler_with_env_missing_arg(self, mock_entry_points): mock_entry_points.configure_mock( return_value=[ IterEntryPoint( @@ -621,9 +588,7 @@ def test_trace_init_custom_ratio_sampler_with_env_missing_arg( OTEL_TRACES_SAMPLER_ARG: "0.5", }, ) - def test_trace_init_custom_ratio_sampler_with_env_multiple_entry_points( - self, mock_entry_points - ): + def test_trace_init_custom_ratio_sampler_with_env_multiple_entry_points(self, mock_entry_points): mock_entry_points.configure_mock( return_value=[ IterEntryPoint( @@ -653,9 +618,7 @@ def test_trace_init_custom_tracer_configurator_with_env_non_existent_entry_point ): tracer_configurator_name = _get_tracer_configurator() with self.assertLogs(level=WARNING): - tracer_configurator = _import_tracer_configurator( - tracer_configurator_name - ) + tracer_configurator = _import_tracer_configurator(tracer_configurator_name) _init_tracing({}, tracer_configurator=tracer_configurator) @patch("opentelemetry.sdk._configuration.entry_points") @@ -663,9 +626,7 @@ def test_trace_init_custom_tracer_configurator_with_env_non_existent_entry_point "os.environ", {"OTEL_PYTHON_TRACER_CONFIGURATOR": "custom_tracer_configurator"}, ) - def test_trace_init_custom_tracer_configurator_with_env( - self, mock_entry_points - ): + def test_trace_init_custom_tracer_configurator_with_env(self, mock_entry_points): def custom_tracer_configurator(tracer_scope): return mock.Mock(spec=_RuleBasedTracerConfigurator)(tracer_scope) @@ -679,14 +640,10 @@ def custom_tracer_configurator(tracer_scope): ) tracer_configurator_name = _get_tracer_configurator() - tracer_configurator = _import_tracer_configurator( - tracer_configurator_name - ) + tracer_configurator = _import_tracer_configurator(tracer_configurator_name) _init_tracing({}, tracer_configurator=tracer_configurator) provider = self.set_provider_mock.call_args[0][0] - self.assertEqual( - provider._tracer_configurator, custom_tracer_configurator - ) + self.assertEqual(provider._tracer_configurator, custom_tracer_configurator) class TestLoggingInit(TestCase): @@ -699,9 +656,7 @@ def setUp(self): "opentelemetry.sdk._configuration.LoggerProvider", DummyLoggerProvider, ) - self.set_provider_patch = patch( - "opentelemetry.sdk._configuration.set_logger_provider" - ) + self.set_provider_patch = patch("opentelemetry.sdk._configuration.set_logger_provider") self.processor_mock = self.processor_patch.start() self.provider_mock = self.provider_patch.start() @@ -712,11 +667,7 @@ def tearDown(self): self.set_provider_patch.stop() self.provider_patch.stop() root_logger = getLogger("root") - root_logger.handlers = [ - handler - for handler in root_logger.handlers - if not isinstance(handler, LoggingHandler) - ] + root_logger.handlers = [handler for handler in root_logger.handlers if not isinstance(handler, LoggingHandler)] def test_logging_init_empty(self): with ResetGlobalLoggingState(): @@ -752,12 +703,8 @@ def test_logging_init_exporter(self): "otlp-service", ) self.assertEqual(len(provider.processors), 1) - self.assertIsInstance( - provider.processors[0], DummyLogRecordProcessor - ) - self.assertIsInstance( - provider.processors[0].exporter, DummyOTLPLogExporter - ) + self.assertIsInstance(provider.processors[0], DummyLogRecordProcessor) + self.assertIsInstance(provider.processors[0].exporter, DummyOTLPLogExporter) getLogger(__name__).error("hello") self.assertEqual(len(provider.processors), 1) self.assertTrue(provider.processors[0].exporter.export_called) @@ -776,9 +723,7 @@ def test_logging_init_exporter_uses_exporter_args_map(self): self.assertEqual(self.set_provider_mock.call_count, 1) provider = self.set_provider_mock.call_args[0][0] self.assertEqual(len(provider.processors), 1) - self.assertEqual( - provider.processors[0].exporter.compression, "gzip" - ) + self.assertEqual(provider.processors[0].exporter.compression, "gzip") def test_logging_init_custom_log_record_processors(self): log_record_processor = mock.Mock(spec=LogRecordProcessor) @@ -793,9 +738,7 @@ def test_logging_init_custom_log_record_processors(self): provider = self.set_provider_mock.call_args[0][0] self.assertEqual(len(provider.processors), 2) self.assertEqual(provider.processors[0], log_record_processor) - self.assertIsInstance( - provider.processors[1], SimpleLogRecordProcessor - ) + self.assertIsInstance(provider.processors[1], SimpleLogRecordProcessor) @patch.dict( environ, @@ -818,9 +761,7 @@ def test_logging_init_exporter_without_handler_setup(self): ) self.assertEqual(len(provider.processors), 1) self.assertIsInstance(provider.processors[0], DummyLogRecordProcessor) - self.assertIsInstance( - provider.processors[0].exporter, DummyOTLPLogExporter - ) + self.assertIsInstance(provider.processors[0].exporter, DummyOTLPLogExporter) getLogger(__name__).error("hello") self.assertFalse(provider.processors[0].exporter.export_called) @@ -889,9 +830,7 @@ def test_logging_init_enable_env(self, logging_mock, tracing_mock): @patch("opentelemetry.sdk._configuration._init_tracing") @patch("opentelemetry.sdk._configuration._init_logging") @patch("opentelemetry.sdk._configuration._init_metrics") - def test_initialize_components_resource( - self, metrics_mock, logging_mock, tracing_mock - ): + def test_initialize_components_resource(self, metrics_mock, logging_mock, tracing_mock): _initialize_components(auto_instrumentation_version="auto-version") self.assertEqual(logging_mock.call_count, 1) self.assertEqual(tracing_mock.call_count, 1) @@ -1031,11 +970,7 @@ def test_basicConfig_works_with_otel_handler(self): logging.basicConfig(level=logging.INFO) root_logger = logging.getLogger() - stream_handlers = [ - h - for h in root_logger.handlers - if isinstance(h, logging.StreamHandler) - ] + stream_handlers = [h for h in root_logger.handlers if isinstance(h, logging.StreamHandler)] self.assertEqual( len(stream_handlers), 1, @@ -1062,11 +997,7 @@ def test_basicConfig_preserves_otel_handler(self): self.assertGreater(len(root_logger.handlers), 1) - logging_handlers = [ - h - for h in root_logger.handlers - if isinstance(h, LoggingHandler) - ] + logging_handlers = [h for h in root_logger.handlers if isinstance(h, LoggingHandler)] self.assertEqual( len(logging_handlers), 1, @@ -1107,9 +1038,7 @@ def test_dictConfig_preserves_otel_handler(self): ) self.assertEqual(len(root.handlers), 2) - logging_handlers = [ - h for h in root.handlers if isinstance(h, LoggingHandler) - ] + logging_handlers = [h for h in root.handlers if isinstance(h, LoggingHandler)] self.assertEqual( len(logging_handlers), 1, @@ -1140,9 +1069,7 @@ def test_logging_init_custom_logger_configurator_with_env_non_existent_entry_poi ): logger_configurator_name = _get_logger_configurator() with self.assertLogs(level=WARNING): - logger_configurator = _import_logger_configurator( - logger_configurator_name - ) + logger_configurator = _import_logger_configurator(logger_configurator_name) with ResetGlobalLoggingState(): _init_logging({}, logger_configurator=logger_configurator) @@ -1151,9 +1078,7 @@ def test_logging_init_custom_logger_configurator_with_env_non_existent_entry_poi "os.environ", {OTEL_PYTHON_LOGGER_CONFIGURATOR: "custom_logger_configurator"}, ) - def test_logging_init_custom_logger_configurator_with_env( - self, mock_entry_points - ): + def test_logging_init_custom_logger_configurator_with_env(self, mock_entry_points): def custom_logger_configurator(logger_scope): return mock.Mock(spec=_RuleBasedLoggerConfigurator)(logger_scope) @@ -1167,15 +1092,11 @@ def custom_logger_configurator(logger_scope): ) logger_configurator_name = _get_logger_configurator() - logger_configurator = _import_logger_configurator( - logger_configurator_name - ) + logger_configurator = _import_logger_configurator(logger_configurator_name) with ResetGlobalLoggingState(): _init_logging({}, logger_configurator=logger_configurator) provider = self.set_provider_mock.call_args[0][0] - self.assertEqual( - provider._logger_configurator, custom_logger_configurator - ) + self.assertEqual(provider._logger_configurator, custom_logger_configurator) class TestMetricsInit(TestCase): @@ -1188,9 +1109,7 @@ def setUp(self): "opentelemetry.sdk._configuration.MeterProvider", DummyMeterProvider, ) - self.set_provider_patch = patch( - "opentelemetry.sdk._configuration.set_meter_provider" - ) + self.set_provider_patch = patch("opentelemetry.sdk._configuration.set_meter_provider") self.metric_reader_mock = self.metric_reader_patch.start() self.provider_mock = self.provider_patch.start() @@ -1213,9 +1132,7 @@ def test_metrics_init_empty(self): self.assertIsInstance(provider, DummyMeterProvider) self.assertIsInstance(provider._sdk_config.resource, Resource) self.assertEqual( - provider._sdk_config.resource.attributes.get( - "telemetry.auto.version" - ), + provider._sdk_config.resource.attributes.get("telemetry.auto.version"), "auto-version", ) @@ -1268,9 +1185,7 @@ def test_metrics_init_meter_configurator_none_by_default(self): _init_metrics({}) provider = self.set_provider_mock.call_args[0][0] self.assertIsInstance(provider, DummyMeterProvider) - self.assertEqual( - provider._meter_configurator, _default_meter_configurator - ) + self.assertEqual(provider._meter_configurator, _default_meter_configurator) def test_metrics_init_meter_configurator_passed_directly(self): mock_configurator = Mock() @@ -1288,9 +1203,7 @@ def test_metrics_init_custom_meter_configurator_with_env_non_existent_entry_poin ): meter_configurator_name = _get_meter_configurator() with self.assertLogs(level=WARNING): - meter_configurator = _import_meter_configurator( - meter_configurator_name - ) + meter_configurator = _import_meter_configurator(meter_configurator_name) _init_metrics({}, meter_configurator=meter_configurator) @patch("opentelemetry.sdk._configuration.entry_points") @@ -1298,9 +1211,7 @@ def test_metrics_init_custom_meter_configurator_with_env_non_existent_entry_poin "os.environ", {OTEL_PYTHON_METER_CONFIGURATOR: "custom_meter_configurator"}, ) - def test_metrics_init_custom_meter_configurator_with_env( - self, mock_entry_points - ): + def test_metrics_init_custom_meter_configurator_with_env(self, mock_entry_points): def custom_meter_configurator(meter_scope): return mock.Mock(spec=_RuleBasedMeterConfigurator)(meter_scope) @@ -1314,14 +1225,10 @@ def custom_meter_configurator(meter_scope): ) meter_configurator_name = _get_meter_configurator() - meter_configurator = _import_meter_configurator( - meter_configurator_name - ) + meter_configurator = _import_meter_configurator(meter_configurator_name) _init_metrics({}, meter_configurator=meter_configurator) provider = self.set_provider_mock.call_args[0][0] - self.assertEqual( - provider._meter_configurator, custom_meter_configurator - ) + self.assertEqual(provider._meter_configurator, custom_meter_configurator) class TestExporterNames(TestCase): @@ -1334,15 +1241,9 @@ class TestExporterNames(TestCase): }, ) def test_otlp_exporter(self): - self.assertEqual( - _get_exporter_names("traces"), [_EXPORTER_OTLP_PROTO_GRPC] - ) - self.assertEqual( - _get_exporter_names("metrics"), [_EXPORTER_OTLP_PROTO_GRPC] - ) - self.assertEqual( - _get_exporter_names("logs"), [_EXPORTER_OTLP_PROTO_HTTP] - ) + self.assertEqual(_get_exporter_names("traces"), [_EXPORTER_OTLP_PROTO_GRPC]) + self.assertEqual(_get_exporter_names("metrics"), [_EXPORTER_OTLP_PROTO_GRPC]) + self.assertEqual(_get_exporter_names("logs"), [_EXPORTER_OTLP_PROTO_HTTP]) @patch.dict( environ, @@ -1354,12 +1255,8 @@ def test_otlp_exporter(self): }, ) def test_otlp_custom_exporter(self): - self.assertEqual( - _get_exporter_names("traces"), [_EXPORTER_OTLP_PROTO_HTTP] - ) - self.assertEqual( - _get_exporter_names("metrics"), [_EXPORTER_OTLP_PROTO_GRPC] - ) + self.assertEqual(_get_exporter_names("traces"), [_EXPORTER_OTLP_PROTO_HTTP]) + self.assertEqual(_get_exporter_names("metrics"), [_EXPORTER_OTLP_PROTO_GRPC]) @patch.dict( environ, @@ -1373,15 +1270,11 @@ def test_otlp_custom_exporter(self): def test_otlp_exporter_conflict(self): # Verify that OTEL_*_EXPORTER is used, and a warning is logged with self.assertLogs(level="WARNING") as logs_context: - self.assertEqual( - _get_exporter_names("traces"), [_EXPORTER_OTLP_PROTO_HTTP] - ) + self.assertEqual(_get_exporter_names("traces"), [_EXPORTER_OTLP_PROTO_HTTP]) assert len(logs_context.output) == 1 with self.assertLogs(level="WARNING") as logs_context: - self.assertEqual( - _get_exporter_names("metrics"), [_EXPORTER_OTLP_PROTO_GRPC] - ) + self.assertEqual(_get_exporter_names("metrics"), [_EXPORTER_OTLP_PROTO_GRPC]) assert len(logs_context.output) == 1 @patch.dict(environ, {"OTEL_TRACES_EXPORTER": "zipkin"}) @@ -1402,12 +1295,8 @@ def test_empty_exporters(self): class TestImportExporters(TestCase): def test_console_exporters(self): - trace_exporters, metric_exporterts, logs_exporters = _import_exporters( - ["console"], ["console"], ["console"] - ) - self.assertEqual( - trace_exporters["console"].__class__, ConsoleSpanExporter.__class__ - ) + trace_exporters, metric_exporterts, logs_exporters = _import_exporters(["console"], ["console"], ["console"]) + self.assertEqual(trace_exporters["console"].__class__, ConsoleSpanExporter.__class__) self.assertEqual( logs_exporters["console"].__class__, ConsoleLogRecordExporter.__class__, @@ -1423,17 +1312,11 @@ def test_console_exporters(self): def test_metric_pull_exporter(self, mock_entry_points: Mock): def mock_entry_points_impl(group, name): if name == "dummy_pull_exporter": - return [ - IterEntryPoint( - name=name, class_type=DummyMetricReaderPullExporter - ) - ] + return [IterEntryPoint(name=name, class_type=DummyMetricReaderPullExporter)] return [] mock_entry_points.side_effect = mock_entry_points_impl - _, metric_exporters, _ = _import_exporters( - [], ["dummy_pull_exporter"], [] - ) + _, metric_exporters, _ = _import_exporters([], ["dummy_pull_exporter"], []) self.assertIs( metric_exporters["dummy_pull_exporter"], DummyMetricReaderPullExporter, @@ -1445,22 +1328,16 @@ class TestImportConfigComponents(TestCase): "opentelemetry.sdk._configuration.entry_points", side_effect=KeyError, ) - def test__import_config_components_missing_entry_point( - self, mock_entry_points - ): + def test__import_config_components_missing_entry_point(self, mock_entry_points): with raises(RuntimeError) as error: _import_config_components(["a", "b", "c"], "name") - self.assertEqual( - str(error.value), "Requested entry point 'name' not found" - ) + self.assertEqual(str(error.value), "Requested entry point 'name' not found") @patch( "opentelemetry.sdk._configuration.entry_points", side_effect=StopIteration, ) - def test__import_config_components_missing_component( - self, mock_entry_points - ): + def test__import_config_components_missing_component(self, mock_entry_points): with raises(RuntimeError) as error: _import_config_components(["a", "b", "c"], "name") self.assertEqual( @@ -1478,9 +1355,7 @@ def _configure(self, **kwargs): @patch("opentelemetry.sdk._configuration._initialize_components") def test_custom_configurator(self, mock_init_comp): custom_configurator = TestConfigurator.CustomConfigurator() - custom_configurator._configure( - auto_instrumentation_version="TEST_VERSION2" - ) + custom_configurator._configure(auto_instrumentation_version="TEST_VERSION2") kwargs = { "auto_instrumentation_version": "TEST_VERSION2", "sampler": "TEST_SAMPLER", @@ -1568,16 +1443,8 @@ def test_pre_sdk_init_function_found( _initialize_components(id_generator=1) - mock_entry_points.assert_has_calls( - [ - mock.call( - group="_opentelemetry_opamp", name="pre_sdk_init_function" - ) - ] - ) - init_function.assert_called_once_with( - mock_resource.create.return_value - ) + mock_entry_points.assert_has_calls([mock.call(group="_opentelemetry_opamp", name="pre_sdk_init_function")]) + init_function.assert_called_once_with(mock_resource.create.return_value) @patch("opentelemetry.sdk._configuration._init_metrics") @patch("opentelemetry.sdk._configuration._init_tracing") @@ -1600,28 +1467,16 @@ def test_post_sdk_init_function_found( _initialize_components(id_generator=1) - mock_entry_points.assert_has_calls( - [ - mock.call( - group="_opentelemetry_opamp", name="post_sdk_init_function" - ) - ] - ) - init_function.assert_called_once_with( - mock_resource.create.return_value - ) + mock_entry_points.assert_has_calls([mock.call(group="_opentelemetry_opamp", name="post_sdk_init_function")]) + init_function.assert_called_once_with(mock_resource.create.return_value) @patch("opentelemetry.sdk._configuration._init_metrics") @patch("opentelemetry.sdk._configuration._init_tracing") @patch("opentelemetry.sdk._configuration._init_logging") @patch("opentelemetry.sdk._configuration.entry_points") - def test_init_function_load_failure( - self, mock_entry_points, mock_logging, mock_tracing, mock_metrics - ): + def test_init_function_load_failure(self, mock_entry_points, mock_logging, mock_tracing, mock_metrics): entry_point_mock = mock.Mock() - entry_point_mock.load.side_effect = AttributeError( - "module 'foo' has no attribute 'OpampInit'" - ) + entry_point_mock.load.side_effect = AttributeError("module 'foo' has no attribute 'OpampInit'") mock_entry_points.configure_mock( return_value=[entry_point_mock], ) @@ -1630,13 +1485,7 @@ def test_init_function_load_failure( with self.assertLogs(level="WARNING") as cm: _initialize_components(id_generator=1) - mock_entry_points.assert_has_calls( - [ - mock.call( - group="_opentelemetry_opamp", name="pre_sdk_init_function" - ) - ] - ) + mock_entry_points.assert_has_calls([mock.call(group="_opentelemetry_opamp", name="pre_sdk_init_function")]) self.assertIn( "WARNING:opentelemetry.sdk._configuration:Failed to load OpAMP init function from entry point," @@ -1648,9 +1497,7 @@ def test_init_function_load_failure( @patch("opentelemetry.sdk._configuration._init_tracing") @patch("opentelemetry.sdk._configuration._init_logging") @patch("opentelemetry.sdk._configuration.entry_points") - def test_init_function_not_found( - self, mock_entry_points, mock_logging, mock_tracing, mock_metrics - ): + def test_init_function_not_found(self, mock_entry_points, mock_logging, mock_tracing, mock_metrics): mock_entry_points.configure_mock(return_value=[]) with self.assertLogs(level="DEBUG") as cm: diff --git a/opentelemetry-sdk/tests/test_environment_variables_internal.py b/opentelemetry-sdk/tests/test_environment_variables_internal.py index e261703d499..4445bf8528a 100644 --- a/opentelemetry-sdk/tests/test_environment_variables_internal.py +++ b/opentelemetry-sdk/tests/test_environment_variables_internal.py @@ -18,9 +18,7 @@ def test_unset_returns_default(self): with self.subTest(default=default): with patch.dict("os.environ", {}, clear=True): self.assertEqual( - parse_boolean_environment_variable( - "TEST_BOOL", default=default - ), + parse_boolean_environment_variable("TEST_BOOL", default=default), expected, ) @@ -50,9 +48,7 @@ def test_invalid_value_warns_and_returns_default(self): level="WARNING", ) as logs: self.assertEqual( - parse_boolean_environment_variable( - "TEST_BOOL", default=default - ), + parse_boolean_environment_variable("TEST_BOOL", default=default), expected, ) diff --git a/opentelemetry-sdk/tests/trace/composite_sampler/test_always_off.py b/opentelemetry-sdk/tests/trace/composite_sampler/test_always_off.py index 0b5fe34b37a..0e8ba88016d 100644 --- a/opentelemetry-sdk/tests/trace/composite_sampler/test_always_off.py +++ b/opentelemetry-sdk/tests/trace/composite_sampler/test_always_off.py @@ -14,12 +14,7 @@ def test_description(): def test_threshold(): - assert ( - composable_always_off() - .sampling_intent(None, "test", None, {}, None, None) - .threshold - == -1 - ) + assert composable_always_off().sampling_intent(None, "test", None, {}, None, None).threshold == -1 def test_sampling(): diff --git a/opentelemetry-sdk/tests/trace/composite_sampler/test_always_on.py b/opentelemetry-sdk/tests/trace/composite_sampler/test_always_on.py index 9b9673adc67..be0291b04cf 100644 --- a/opentelemetry-sdk/tests/trace/composite_sampler/test_always_on.py +++ b/opentelemetry-sdk/tests/trace/composite_sampler/test_always_on.py @@ -14,12 +14,7 @@ def test_description(): def test_threshold(): - assert ( - composable_always_on() - .sampling_intent(None, "test", None, {}, None, None) - .threshold - == 0 - ) + assert composable_always_on().sampling_intent(None, "test", None, {}, None, None).threshold == 0 def test_sampling(): diff --git a/opentelemetry-sdk/tests/trace/composite_sampler/test_rule_based.py b/opentelemetry-sdk/tests/trace/composite_sampler/test_rule_based.py index 0a398f2fefd..73976dc1544 100644 --- a/opentelemetry-sdk/tests/trace/composite_sampler/test_rule_based.py +++ b/opentelemetry-sdk/tests/trace/composite_sampler/test_rule_based.py @@ -77,10 +77,7 @@ def _parent_context(is_remote: bool): def test_description_with_no_rules(): - assert ( - composable_rule_based(rules=[]).get_description() - == "ComposableRuleBased{[]}" - ) + assert composable_rule_based(rules=[]).get_description() == "ComposableRuleBased{[]}" def test_always_match_predicate(): @@ -125,10 +122,7 @@ def test_all_predicate_does_not_match_when_any_predicate_does_not_match(): def test_attribute_values_predicate_no_attributes(): - assert ( - _predicate_result(AttributeValuesPredicate("http.route", ["/users"])) - is False - ) + assert _predicate_result(AttributeValuesPredicate("http.route", ["/users"])) is False def test_attribute_values_predicate_stringifies_values(): @@ -178,16 +172,8 @@ def test_attribute_patterns_predicate_include_exclude_precedence(): excluded=["/api/private/*"], ) - assert ( - _predicate_result(predicate, attributes={"http.route": "/api/users"}) - is True - ) - assert ( - _predicate_result( - predicate, attributes={"http.route": "/api/private/user"} - ) - is False - ) + assert _predicate_result(predicate, attributes={"http.route": "/api/users"}) is True + assert _predicate_result(predicate, attributes={"http.route": "/api/private/user"}) is False def test_attribute_patterns_predicate_is_case_sensitive(): @@ -226,35 +212,15 @@ def test_parent_predicate_matches_no_parent(): def test_parent_predicate_matches_local_parent(): local_parent_ctx = _parent_context(is_remote=False) - assert ( - _predicate_result( - ParentPredicate(["local"]), parent_ctx=local_parent_ctx - ) - is True - ) - assert ( - _predicate_result( - ParentPredicate(["remote"]), parent_ctx=local_parent_ctx - ) - is False - ) + assert _predicate_result(ParentPredicate(["local"]), parent_ctx=local_parent_ctx) is True + assert _predicate_result(ParentPredicate(["remote"]), parent_ctx=local_parent_ctx) is False def test_parent_predicate_matches_remote_parent(): remote_parent_ctx = _parent_context(is_remote=True) - assert ( - _predicate_result( - ParentPredicate(["remote"]), parent_ctx=remote_parent_ctx - ) - is True - ) - assert ( - _predicate_result( - ParentPredicate(["local"]), parent_ctx=remote_parent_ctx - ) - is False - ) + assert _predicate_result(ParentPredicate(["remote"]), parent_ctx=remote_parent_ctx) is True + assert _predicate_result(ParentPredicate(["local"]), parent_ctx=remote_parent_ctx) is False def test_description_with_rules(): @@ -272,24 +238,14 @@ def test_sampling_intent_match(): rules = [ (NameIsFooPredicate(), composable_always_on()), ] - assert ( - composable_rule_based(rules=rules) - .sampling_intent(None, "foo", None, {}, None, None) - .threshold - == 0 - ) + assert composable_rule_based(rules=rules).sampling_intent(None, "foo", None, {}, None, None).threshold == 0 def test_sampling_intent_no_match(): rules = [ (NameIsFooPredicate(), composable_always_on()), ] - assert ( - composable_rule_based(rules=rules) - .sampling_intent(None, "test", None, {}, None, None) - .threshold - == -1 - ) + assert composable_rule_based(rules=rules).sampling_intent(None, "test", None, {}, None, None).threshold == -1 def test_should_sample_match(): @@ -359,12 +315,7 @@ def test_attribute_predicate_no_attributes(): rules = [ (AttributePredicate("foo", "bar"), composable_always_on()), ] - assert ( - composable_rule_based(rules=rules) - .sampling_intent(None, "span", None, None, None, None) - .threshold - == -1 - ) + assert composable_rule_based(rules=rules).sampling_intent(None, "span", None, None, None, None).threshold == -1 def test_attribute_predicate_no_match(): @@ -372,9 +323,7 @@ def test_attribute_predicate_no_match(): (AttributePredicate("foo", "bar"), composable_always_on()), ] assert ( - composable_rule_based(rules=rules) - .sampling_intent(None, "span", None, {"foo": "foo"}, None, None) - .threshold + composable_rule_based(rules=rules).sampling_intent(None, "span", None, {"foo": "foo"}, None, None).threshold == -1 ) @@ -384,8 +333,6 @@ def test_attribute_predicate_match(): (AttributePredicate("foo", "bar"), composable_always_on()), ] assert ( - composable_rule_based(rules=rules) - .sampling_intent(None, "span", None, {"foo": "bar"}, None, None) - .threshold + composable_rule_based(rules=rules).sampling_intent(None, "span", None, {"foo": "bar"}, None, None).threshold == 0 ) diff --git a/opentelemetry-sdk/tests/trace/composite_sampler/test_sampler.py b/opentelemetry-sdk/tests/trace/composite_sampler/test_sampler.py index 967defa4e33..f95bbc949f3 100644 --- a/opentelemetry-sdk/tests/trace/composite_sampler/test_sampler.py +++ b/opentelemetry-sdk/tests/trace/composite_sampler/test_sampler.py @@ -61,9 +61,7 @@ class Output: threshold=None, random_value=None, ), - Output( - sampled=True, threshold=0, random_value=INVALID_RANDOM_VALUE - ), + Output(sampled=True, threshold=0, random_value=INVALID_RANDOM_VALUE), id="min threshold no parent random value", ), p( @@ -165,17 +163,9 @@ def test_sample(input: Input, output: Output): if input.random_value is not None: parent_state.random_value = input.random_value parent_state_str = parent_state.serialize() - parent_trace_state = ( - TraceState((("ot", parent_state_str),)) if parent_state_str else None - ) - flags = ( - TraceFlags(TraceFlags.SAMPLED) - if input.sampled - else TraceFlags.get_default() - ) - parent_span_context = SpanContext( - TRACE_ID, SPAN_ID, False, flags, parent_trace_state - ) + parent_trace_state = TraceState((("ot", parent_state_str),)) if parent_state_str else None + flags = TraceFlags(TraceFlags.SAMPLED) if input.sampled else TraceFlags.get_default() + parent_span_context = SpanContext(TRACE_ID, SPAN_ID, False, flags, parent_trace_state) parent_span = NonRecordingSpan(parent_span_context) parent_context = set_span_in_context(parent_span) diff --git a/opentelemetry-sdk/tests/trace/export/test_export.py b/opentelemetry-sdk/tests/trace/export/test_export.py index 49ae36c15db..8d165d049ad 100644 --- a/opentelemetry-sdk/tests/trace/export/test_export.py +++ b/opentelemetry-sdk/tests/trace/export/test_export.py @@ -44,10 +44,7 @@ def __init__( self.export_event = export_event def export(self, spans: trace.Span) -> export.SpanExportResult: - if ( - self.max_export_batch_size is not None - and len(spans) > self.max_export_batch_size - ): + if self.max_export_batch_size is not None and len(spans) > self.max_export_batch_size: raise ValueError("Batch is too big") time.sleep(self.export_timeout) self.destination.extend(span.name for span in spans) @@ -112,14 +109,10 @@ def test_on_start_accepts_context(self): context = Context() span = tracer.start_span("foo", context=context) - span_processor.on_start.assert_called_once_with( - span, parent_context=context - ) + span_processor.on_start.assert_called_once_with(span, parent_context=context) def test_simple_span_processor_not_sampled(self): - tracer_provider = trace.TracerProvider( - sampler=trace.sampling.ALWAYS_OFF - ) + tracer_provider = trace.TracerProvider(sampler=trace.sampling.ALWAYS_OFF) tracer = tracer_provider.get_tracer(__name__) spans_names_list = [] @@ -135,9 +128,7 @@ def test_simple_span_processor_not_sampled(self): self.assertListEqual([], spans_names_list) - @mock.patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @mock.patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_metrics(self): metric_reader = InMemoryMetricReader() meter_provider = MeterProvider(metric_readers=[metric_reader]) @@ -152,9 +143,7 @@ def export_spans(_spans): exporter = mock.MagicMock() exporter.export.side_effect = export_spans - span_processor = export.SimpleSpanProcessor( - exporter, meter_provider=meter_provider - ) + span_processor = export.SimpleSpanProcessor(exporter, meter_provider=meter_provider) tracer_provider = trace.TracerProvider() tracer = tracer_provider.get_tracer(__name__) tracer_provider.add_span_processor(span_processor) @@ -182,11 +171,7 @@ def export_spans(_spans): processed_data_point0.attributes["otel.component.type"], "simple_span_processor", ) - self.assertTrue( - processed_data_point0.attributes["otel.component.name"].startswith( - "simple_span_processor/" - ) - ) + self.assertTrue(processed_data_point0.attributes["otel.component.name"].startswith("simple_span_processor/")) self.assertIsNone(processed_data_point0.attributes.get("error.type")) processed_data_point1 = processed_data_points[1] self.assertEqual(processed_data_point1.value, 1) @@ -194,14 +179,8 @@ def export_spans(_spans): processed_data_point1.attributes["otel.component.type"], "simple_span_processor", ) - self.assertTrue( - processed_data_point1.attributes["otel.component.name"].startswith( - "simple_span_processor/" - ) - ) - self.assertEqual( - processed_data_point1.attributes["error.type"], "RuntimeError" - ) + self.assertTrue(processed_data_point1.attributes["otel.component.name"].startswith("simple_span_processor/")) + self.assertEqual(processed_data_point1.attributes["error.type"], "RuntimeError") # Many more test cases for the BatchSpanProcessor exist under @@ -225,41 +204,21 @@ def test_get_span_exporter(self): }, ) def test_args_env_var(self): - batch_span_processor = export.BatchSpanProcessor( - MySpanExporter(destination=[]) - ) + batch_span_processor = export.BatchSpanProcessor(MySpanExporter(destination=[])) - self.assertEqual( - batch_span_processor._batch_processor._max_queue_size, 10 - ) - self.assertEqual( - batch_span_processor._batch_processor._schedule_delay_millis, 2 - ) - self.assertEqual( - batch_span_processor._batch_processor._max_export_batch_size, 3 - ) - self.assertEqual( - batch_span_processor._batch_processor._export_timeout_millis, 4 - ) + self.assertEqual(batch_span_processor._batch_processor._max_queue_size, 10) + self.assertEqual(batch_span_processor._batch_processor._schedule_delay_millis, 2) + self.assertEqual(batch_span_processor._batch_processor._max_export_batch_size, 3) + self.assertEqual(batch_span_processor._batch_processor._export_timeout_millis, 4) batch_span_processor.shutdown() def test_args_env_var_defaults(self): - batch_span_processor = export.BatchSpanProcessor( - MySpanExporter(destination=[]) - ) + batch_span_processor = export.BatchSpanProcessor(MySpanExporter(destination=[])) - self.assertEqual( - batch_span_processor._batch_processor._max_queue_size, 2048 - ) - self.assertEqual( - batch_span_processor._batch_processor._schedule_delay_millis, 5000 - ) - self.assertEqual( - batch_span_processor._batch_processor._max_export_batch_size, 512 - ) - self.assertEqual( - batch_span_processor._batch_processor._export_timeout_millis, 30000 - ) + self.assertEqual(batch_span_processor._batch_processor._max_queue_size, 2048) + self.assertEqual(batch_span_processor._batch_processor._schedule_delay_millis, 5000) + self.assertEqual(batch_span_processor._batch_processor._max_export_batch_size, 512) + self.assertEqual(batch_span_processor._batch_processor._export_timeout_millis, 30000) batch_span_processor.shutdown() @mock.patch.dict( @@ -273,31 +232,19 @@ def test_args_env_var_defaults(self): ) def test_args_env_var_value_error(self): logger.disabled = True - batch_span_processor = export.BatchSpanProcessor( - MySpanExporter(destination=[]) - ) + batch_span_processor = export.BatchSpanProcessor(MySpanExporter(destination=[])) logger.disabled = False - self.assertEqual( - batch_span_processor._batch_processor._max_queue_size, 2048 - ) - self.assertEqual( - batch_span_processor._batch_processor._schedule_delay_millis, 5000 - ) - self.assertEqual( - batch_span_processor._batch_processor._max_export_batch_size, 512 - ) - self.assertEqual( - batch_span_processor._batch_processor._export_timeout_millis, 30000 - ) + self.assertEqual(batch_span_processor._batch_processor._max_queue_size, 2048) + self.assertEqual(batch_span_processor._batch_processor._schedule_delay_millis, 5000) + self.assertEqual(batch_span_processor._batch_processor._max_export_batch_size, 512) + self.assertEqual(batch_span_processor._batch_processor._export_timeout_millis, 30000) batch_span_processor.shutdown() def test_on_start_accepts_parent_context(self): # pylint: disable=no-self-use my_exporter = MySpanExporter(destination=[]) - span_processor = mock.Mock( - wraps=export.BatchSpanProcessor(my_exporter) - ) + span_processor = mock.Mock(wraps=export.BatchSpanProcessor(my_exporter)) tracer_provider = trace.TracerProvider() tracer_provider.add_span_processor(span_processor) tracer = tracer_provider.get_tracer(__name__) @@ -305,20 +252,14 @@ def test_on_start_accepts_parent_context(self): context = Context() span = tracer.start_span("foo", context=context) - span_processor.on_start.assert_called_once_with( - span, parent_context=context - ) + span_processor.on_start.assert_called_once_with(span, parent_context=context) def test_batch_span_processor_not_sampled(self): - tracer_provider = trace.TracerProvider( - sampler=trace.sampling.ALWAYS_OFF - ) + tracer_provider = trace.TracerProvider(sampler=trace.sampling.ALWAYS_OFF) tracer = tracer_provider.get_tracer(__name__) spans_names_list = [] - my_exporter = MySpanExporter( - destination=spans_names_list, max_export_batch_size=128 - ) + my_exporter = MySpanExporter(destination=spans_names_list, max_export_batch_size=128) span_processor = export.BatchSpanProcessor( my_exporter, max_queue_size=256, @@ -336,9 +277,7 @@ def test_batch_span_processor_not_sampled(self): def test_batch_span_processor_parameters(self): # zero max_queue_size - self.assertRaises( - ValueError, export.BatchSpanProcessor, None, max_queue_size=0 - ) + self.assertRaises(ValueError, export.BatchSpanProcessor, None, max_queue_size=0) # negative max_queue_size self.assertRaises( @@ -389,9 +328,7 @@ def test_batch_span_processor_parameters(self): max_export_batch_size=512, ) - @mock.patch.dict( - "os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"} - ) + @mock.patch.dict("os.environ", {OTEL_PYTHON_SDK_INTERNAL_METRICS_ENABLED: "true"}) def test_metrics(self): # pylint: disable=too-many-locals,too-many-statements metric_reader = InMemoryMetricReader() meter_provider = MeterProvider(metric_readers=[metric_reader]) @@ -453,17 +390,9 @@ def export_spans(_spans): processed_data_point0.attributes["otel.component.type"], "batching_span_processor", ) - self.assertTrue( - processed_data_point0.attributes["otel.component.name"].startswith( - "batching_span_processor/" - ) - ) - self.assertEqual( - processed_data_point0.attributes.get("error.type"), "queue_full" - ) - self.assertEqual( - metrics[1].name, "otel.sdk.processor.span.queue.capacity" - ) + self.assertTrue(processed_data_point0.attributes["otel.component.name"].startswith("batching_span_processor/")) + self.assertEqual(processed_data_point0.attributes.get("error.type"), "queue_full") + self.assertEqual(metrics[1].name, "otel.sdk.processor.span.queue.capacity") queue_capacity_data_point = metrics[1].data.data_points[0] self.assertEqual(queue_capacity_data_point.value, 1) self.assertEqual( @@ -471,9 +400,7 @@ def export_spans(_spans): "batching_span_processor", ) self.assertTrue( - queue_capacity_data_point.attributes[ - "otel.component.name" - ].startswith("batching_span_processor/") + queue_capacity_data_point.attributes["otel.component.name"].startswith("batching_span_processor/") ) self.assertEqual(metrics[2].name, "otel.sdk.processor.span.queue.size") queue_size_data_point = metrics[2].data.data_points[0] @@ -482,11 +409,7 @@ def export_spans(_spans): queue_size_data_point.attributes["otel.component.type"], "batching_span_processor", ) - self.assertTrue( - queue_size_data_point.attributes["otel.component.name"].startswith( - "batching_span_processor/" - ) - ) + self.assertTrue(queue_size_data_point.attributes["otel.component.name"].startswith("batching_span_processor/")) run_exports.set() provider.force_flush() @@ -514,11 +437,7 @@ def export_spans(_spans): processed_data_point0.attributes["otel.component.type"], "batching_span_processor", ) - self.assertTrue( - processed_data_point0.attributes["otel.component.name"].startswith( - "batching_span_processor/" - ) - ) + self.assertTrue(processed_data_point0.attributes["otel.component.name"].startswith("batching_span_processor/")) self.assertIsNone(processed_data_point0.attributes.get("error.type")) processed_data_point1 = processed_data_points[1] self.assertEqual(processed_data_point1.value, 1) @@ -526,31 +445,17 @@ def export_spans(_spans): processed_data_point1.attributes["otel.component.type"], "batching_span_processor", ) - self.assertTrue( - processed_data_point1.attributes["otel.component.name"].startswith( - "batching_span_processor/" - ) - ) - self.assertEqual( - processed_data_point1.attributes.get("error.type"), "ValueError" - ) + self.assertTrue(processed_data_point1.attributes["otel.component.name"].startswith("batching_span_processor/")) + self.assertEqual(processed_data_point1.attributes.get("error.type"), "ValueError") processed_data_point2 = processed_data_points[2] self.assertEqual(processed_data_point2.value, 1) self.assertEqual( processed_data_point2.attributes["otel.component.type"], "batching_span_processor", ) - self.assertTrue( - processed_data_point2.attributes["otel.component.name"].startswith( - "batching_span_processor/" - ) - ) - self.assertEqual( - processed_data_point2.attributes.get("error.type"), "queue_full" - ) - self.assertEqual( - metrics[1].name, "otel.sdk.processor.span.queue.capacity" - ) + self.assertTrue(processed_data_point2.attributes["otel.component.name"].startswith("batching_span_processor/")) + self.assertEqual(processed_data_point2.attributes.get("error.type"), "queue_full") + self.assertEqual(metrics[1].name, "otel.sdk.processor.span.queue.capacity") queue_capacity_data_point = metrics[1].data.data_points[0] self.assertEqual(queue_capacity_data_point.value, 1) self.assertEqual( @@ -558,9 +463,7 @@ def export_spans(_spans): "batching_span_processor", ) self.assertTrue( - queue_capacity_data_point.attributes[ - "otel.component.name" - ].startswith("batching_span_processor/") + queue_capacity_data_point.attributes["otel.component.name"].startswith("batching_span_processor/") ) self.assertEqual(metrics[2].name, "otel.sdk.processor.span.queue.size") queue_size_data_point = metrics[2].data.data_points[0] @@ -569,11 +472,7 @@ def export_spans(_spans): queue_size_data_point.attributes["otel.component.type"], "batching_span_processor", ) - self.assertTrue( - queue_size_data_point.attributes["otel.component.name"].startswith( - "batching_span_processor/" - ) - ) + self.assertTrue(queue_size_data_point.attributes["otel.component.name"].startswith("batching_span_processor/")) provider.shutdown() @@ -601,8 +500,6 @@ def formatter(span): # pylint: disable=unused-argument return mock_span_str mock_stdout = mock.Mock() - exporter = export.ConsoleSpanExporter( - out=mock_stdout, formatter=formatter - ) + exporter = export.ConsoleSpanExporter(out=mock_stdout, formatter=formatter) exporter.export([trace._Span("span name", mock.Mock())]) mock_stdout.write.assert_called_once_with(mock_span_str) diff --git a/opentelemetry-sdk/tests/trace/scripts/tracer_provider_resource_after_fork.py b/opentelemetry-sdk/tests/trace/scripts/tracer_provider_resource_after_fork.py index 0eff1b3f4b1..4fd2a3d2028 100644 --- a/opentelemetry-sdk/tests/trace/scripts/tracer_provider_resource_after_fork.py +++ b/opentelemetry-sdk/tests/trace/scripts/tracer_provider_resource_after_fork.py @@ -24,15 +24,9 @@ def main() -> None: json.dumps( { "child_pid": child_pid, - "provider_pid": tracer_provider.resource.attributes[ - PROCESS_PID - ], - "cached_tracer_pid": tracer.resource.attributes[ - PROCESS_PID - ], - "new_tracer_pid": new_tracer.resource.attributes[ - PROCESS_PID - ], + "provider_pid": tracer_provider.resource.attributes[PROCESS_PID], + "cached_tracer_pid": tracer.resource.attributes[PROCESS_PID], + "new_tracer_pid": new_tracer.resource.attributes[PROCESS_PID], "span_pid": span.resource.attributes[PROCESS_PID], } ), @@ -48,12 +42,8 @@ def main() -> None: "parent_pid": parent_pid, "parent_resource_pid": parent_resource_pid, "parent_tracer_pid": parent_tracer_pid, - "parent_resource_pid_after_fork": tracer_provider.resource.attributes[ - PROCESS_PID - ], - "parent_tracer_pid_after_fork": tracer.resource.attributes[ - PROCESS_PID - ], + "parent_resource_pid_after_fork": tracer_provider.resource.attributes[PROCESS_PID], + "parent_tracer_pid_after_fork": tracer.resource.attributes[PROCESS_PID], } ), flush=True, diff --git a/opentelemetry-sdk/tests/trace/test_globals.py b/opentelemetry-sdk/tests/trace/test_globals.py index 28accb745aa..49564c5a016 100644 --- a/opentelemetry-sdk/tests/trace/test_globals.py +++ b/opentelemetry-sdk/tests/trace/test_globals.py @@ -18,11 +18,6 @@ def test_tracer_provider_override_warning(self): trace.set_tracer_provider(TracerProvider()) self.assertEqual( test.output, - [ - ( - "WARNING:opentelemetry.trace:Overriding of current " - "TracerProvider is not allowed" - ) - ], + [("WARNING:opentelemetry.trace:Overriding of current TracerProvider is not allowed")], ) self.assertIs(tracer_provider, trace.get_tracer_provider()) diff --git a/opentelemetry-sdk/tests/trace/test_implementation.py b/opentelemetry-sdk/tests/trace/test_implementation.py index e7fc51a3ed9..8578154227e 100644 --- a/opentelemetry-sdk/tests/trace/test_implementation.py +++ b/opentelemetry-sdk/tests/trace/test_implementation.py @@ -22,9 +22,7 @@ def test_tracer(self): self.assertNotEqual(span, INVALID_SPAN) self.assertIs(span.is_recording(), True) with tracer.start_span("test2") as span2: - self.assertNotEqual( - span2.get_span_context(), INVALID_SPAN_CONTEXT - ) + self.assertNotEqual(span2.get_span_context(), INVALID_SPAN_CONTEXT) self.assertNotEqual(span2, INVALID_SPAN) self.assertIs(span2.is_recording(), True) diff --git a/opentelemetry-sdk/tests/trace/test_sampling.py b/opentelemetry-sdk/tests/trace/test_sampling.py index 1d33a1a2c2c..7b0a73c76bb 100644 --- a/opentelemetry-sdk/tests/trace/test_sampling.py +++ b/opentelemetry-sdk/tests/trace/test_sampling.py @@ -15,23 +15,13 @@ class TestDecision(unittest.TestCase): def test_is_recording(self): - self.assertTrue( - sampling.Decision.is_recording(sampling.Decision.RECORD_ONLY) - ) - self.assertTrue( - sampling.Decision.is_recording(sampling.Decision.RECORD_AND_SAMPLE) - ) - self.assertFalse( - sampling.Decision.is_recording(sampling.Decision.DROP) - ) + self.assertTrue(sampling.Decision.is_recording(sampling.Decision.RECORD_ONLY)) + self.assertTrue(sampling.Decision.is_recording(sampling.Decision.RECORD_AND_SAMPLE)) + self.assertFalse(sampling.Decision.is_recording(sampling.Decision.DROP)) def test_is_sampled(self): - self.assertFalse( - sampling.Decision.is_sampled(sampling.Decision.RECORD_ONLY) - ) - self.assertTrue( - sampling.Decision.is_sampled(sampling.Decision.RECORD_AND_SAMPLE) - ) + self.assertFalse(sampling.Decision.is_sampled(sampling.Decision.RECORD_ONLY)) + self.assertTrue(sampling.Decision.is_sampled(sampling.Decision.RECORD_AND_SAMPLE)) self.assertFalse(sampling.Decision.is_sampled(sampling.Decision.DROP)) @@ -41,9 +31,7 @@ def test_ctr(self): trace_state = {} # pylint: disable=E1137 trace_state["test"] = "123" - result = sampling.SamplingResult( - sampling.Decision.RECORD_ONLY, attributes, trace_state - ) + result = sampling.SamplingResult(sampling.Decision.RECORD_ONLY, attributes, trace_state) self.assertIs(result.decision, sampling.Decision.RECORD_ONLY) with self.assertRaises(TypeError): result.attributes["test"] = "mess-this-up" @@ -58,14 +46,10 @@ def _create_parent( ) -> context_api.Context | None: if trace_flags is None: return None - return trace.set_span_in_context( - self._create_parent_span(trace_flags, is_remote, trace_state) - ) + return trace.set_span_in_context(self._create_parent_span(trace_flags, is_remote, trace_state)) @staticmethod - def _create_parent_span( - trace_flags: trace.TraceFlags, is_remote=False, trace_state=None - ) -> trace.NonRecordingSpan: + def _create_parent_span(trace_flags: trace.TraceFlags, is_remote=False, trace_state=None) -> trace.NonRecordingSpan: return trace.NonRecordingSpan( trace.SpanContext( 0xDEADBEEF, @@ -92,9 +76,7 @@ def test_always_on(self): ) self.assertTrue(sample_result.decision.is_sampled()) - self.assertEqual( - sample_result.attributes, {"sampled.expect": "true"} - ) + self.assertEqual(sample_result.attributes, {"sampled.expect": "true"}) if context is not None: self.assertEqual(sample_result.trace_state, trace_state) else: @@ -224,38 +206,20 @@ def test_probability_sampler(self): def test_probability_sampler_zero(self): default_off = sampling.TraceIdRatioBased(0.0) - self.assertFalse( - default_off.should_sample( - None, 0x0, "span name" - ).decision.is_sampled() - ) + self.assertFalse(default_off.should_sample(None, 0x0, "span name").decision.is_sampled()) def test_probability_sampler_one(self): default_off = sampling.TraceIdRatioBased(1.0) - self.assertTrue( - default_off.should_sample( - None, 0xFFFFFFFFFFFFFFFF, "span name" - ).decision.is_sampled() - ) + self.assertTrue(default_off.should_sample(None, 0xFFFFFFFFFFFFFFFF, "span name").decision.is_sampled()) def test_probability_sampler_limits(self): # Sample one of every 2^64 (= 5e-20) traces. This is the lowest # possible meaningful sampling rate, only traces with trace ID 0x0 # should get sampled. almost_always_off = sampling.TraceIdRatioBased(2**-64) - self.assertTrue( - almost_always_off.should_sample( - None, 0x0, "span name" - ).decision.is_sampled() - ) - self.assertFalse( - almost_always_off.should_sample( - None, 0x1, "span name" - ).decision.is_sampled() - ) - self.assertEqual( - sampling.TraceIdRatioBased.get_bound_for_rate(2**-64), 0x1 - ) + self.assertTrue(almost_always_off.should_sample(None, 0x0, "span name").decision.is_sampled()) + self.assertFalse(almost_always_off.should_sample(None, 0x1, "span name").decision.is_sampled()) + self.assertEqual(sampling.TraceIdRatioBased.get_bound_for_rate(2**-64), 0x1) # Sample every trace with trace ID less than 0xffffffffffffffff. In # principle this is the highest possible sampling rate less than 1, but @@ -266,11 +230,7 @@ def test_probability_sampler_limits(self): # 1 - sys.float_info.epsilon almost_always_on = sampling.TraceIdRatioBased(1 - 2**-64) - self.assertTrue( - almost_always_on.should_sample( - None, 0xFFFFFFFFFFFFFFFE, "span name" - ).decision.is_sampled() - ) + self.assertTrue(almost_always_on.should_sample(None, 0xFFFFFFFFFFFFFFFE, "span name").decision.is_sampled()) # These tests are logically consistent, but fail because of the float # precision issue above. Changing the sampler to check fewer bytes of @@ -290,13 +250,9 @@ def test_probability_sampler_limits(self): # Check that a sampler with the highest effective sampling rate < 1 # refuses to sample traces with trace ID 0xffffffffffffffff. - almost_almost_always_on = sampling.TraceIdRatioBased( - 1 - sys.float_info.epsilon - ) + almost_almost_always_on = sampling.TraceIdRatioBased(1 - sys.float_info.epsilon) self.assertFalse( - almost_almost_always_on.should_sample( - None, 0xFFFFFFFFFFFFFFFF, "span name" - ).decision.is_sampled() + almost_almost_always_on.should_sample(None, 0xFFFFFFFFFFFFFFFF, "span name").decision.is_sampled() ) # Check that the highest effective sampling rate is actually lower than # the highest theoretical sampling rate. If this test fails the test diff --git a/opentelemetry-sdk/tests/trace/test_sdk_metrics.py b/opentelemetry-sdk/tests/trace/test_sdk_metrics.py index cd1d91c27e7..a9253c41a40 100644 --- a/opentelemetry-sdk/tests/trace/test_sdk_metrics.py +++ b/opentelemetry-sdk/tests/trace/test_sdk_metrics.py @@ -24,42 +24,30 @@ class TestTracerProviderMetrics(TestCase): def setUp(self): self.metric_reader = InMemoryMetricReader() - self.meter_provider = MeterProvider( - metric_readers=[self.metric_reader] - ) + self.meter_provider = MeterProvider(metric_readers=[self.metric_reader]) def tearDown(self): self.meter_provider.shutdown() def assert_started_spans(self, metric_data, value, attrs): metrics = metric_data.resource_metrics[0].scope_metrics[0].metrics - started_spans_metric = next( - (m for m in metrics if m.name == "otel.sdk.span.started"), None - ) + started_spans_metric = next((m for m in metrics if m.name == "otel.sdk.span.started"), None) self.assertIsNotNone(started_spans_metric) self.assertEqual(started_spans_metric.data.data_points[0].value, value) - self.assertDictEqual( - started_spans_metric.data.data_points[0].attributes, attrs - ) + self.assertDictEqual(started_spans_metric.data.data_points[0].attributes, attrs) def assert_live_spans(self, metric_data, value, attrs): metrics = metric_data.resource_metrics[0].scope_metrics[0].metrics - live_spans_metric = next( - (m for m in metrics if m.name == "otel.sdk.span.live"), None - ) + live_spans_metric = next((m for m in metrics if m.name == "otel.sdk.span.live"), None) if value is None: self.assertIsNone(live_spans_metric) return self.assertIsNotNone(live_spans_metric) self.assertEqual(live_spans_metric.data.data_points[0].value, value) - self.assertDictEqual( - live_spans_metric.data.data_points[0].attributes, attrs - ) + self.assertDictEqual(live_spans_metric.data.data_points[0].attributes, attrs) def test_sampled(self): - tracer_provider = TracerProvider( - sampler=ALWAYS_ON, meter_provider=self.meter_provider - ) + tracer_provider = TracerProvider(sampler=ALWAYS_ON, meter_provider=self.meter_provider) tracer = tracer_provider.get_tracer("test") span = tracer.start_span("span") metric_data = self.metric_reader.get_metrics_data() @@ -138,9 +126,7 @@ def test_record_only(self): ) def test_dropped(self): - tracer_provider = TracerProvider( - sampler=ALWAYS_OFF, meter_provider=self.meter_provider - ) + tracer_provider = TracerProvider(sampler=ALWAYS_OFF, meter_provider=self.meter_provider) tracer = tracer_provider.get_tracer("test") span = tracer.start_span("span") metric_data = self.metric_reader.get_metrics_data() @@ -167,18 +153,14 @@ def test_dropped(self): self.assert_live_spans(metric_data, None, {}) def test_dropped_remote_parent(self): - tracer_provider = TracerProvider( - sampler=ALWAYS_OFF, meter_provider=self.meter_provider - ) + tracer_provider = TracerProvider(sampler=ALWAYS_OFF, meter_provider=self.meter_provider) tracer = tracer_provider.get_tracer("test") parent_span_context = SpanContext( trace_id=1, span_id=2, is_remote=True, ) - parent_context = trace_api.set_span_in_context( - trace_api.NonRecordingSpan(parent_span_context) - ) + parent_context = trace_api.set_span_in_context(trace_api.NonRecordingSpan(parent_span_context)) span = tracer.start_span("span", context=parent_context) metric_data = self.metric_reader.get_metrics_data() self.assert_started_spans( @@ -203,18 +185,14 @@ def test_dropped_remote_parent(self): self.assert_live_spans(metric_data, None, {}) def test_dropped_local_parent(self): - tracer_provider = TracerProvider( - sampler=ALWAYS_OFF, meter_provider=self.meter_provider - ) + tracer_provider = TracerProvider(sampler=ALWAYS_OFF, meter_provider=self.meter_provider) tracer = tracer_provider.get_tracer("test") parent_span_context = SpanContext( trace_id=1, span_id=2, is_remote=False, ) - parent_context = trace_api.set_span_in_context( - trace_api.NonRecordingSpan(parent_span_context) - ) + parent_context = trace_api.set_span_in_context(trace_api.NonRecordingSpan(parent_span_context)) span = tracer.start_span("span", context=parent_context) metric_data = self.metric_reader.get_metrics_data() self.assert_started_spans( @@ -243,9 +221,7 @@ class TestTracerProviderMetricsDisabled(TestCase): def test_disabled_by_default(self): metric_reader = InMemoryMetricReader() meter_provider = MeterProvider(metric_readers=[metric_reader]) - tracer_provider = TracerProvider( - sampler=ALWAYS_ON, meter_provider=meter_provider - ) + tracer_provider = TracerProvider(sampler=ALWAYS_ON, meter_provider=meter_provider) tracer = tracer_provider.get_tracer("test") with tracer.start_as_current_span("span"): diff --git a/opentelemetry-sdk/tests/trace/test_span_processor.py b/opentelemetry-sdk/tests/trace/test_span_processor.py index f334ec05408..8a8ac7eb57c 100644 --- a/opentelemetry-sdk/tests/trace/test_span_processor.py +++ b/opentelemetry-sdk/tests/trace/test_span_processor.py @@ -37,9 +37,7 @@ def __init__(self, name, span_list): self.name = name self.span_list = span_list - def on_start( - self, span: "trace.Span", parent_context: Context | None = None - ) -> None: + def on_start(self, span: "trace.Span", parent_context: Context | None = None) -> None: self.span_list.append(span_event_start_fmt(self.name, span.name)) def on_end(self, span: "trace.Span") -> None: @@ -243,9 +241,7 @@ def test_on_ending_not_implemented_does_not_raise(self): expected_list.append(span_event_start_fmt("SP1", "bar")) with tracer.start_as_current_span("baz"): - expected_list.append( - span_event_start_fmt("SP1", "baz") - ) + expected_list.append(span_event_start_fmt("SP1", "baz")) expected_list.append(span_event_end_fmt("SP1", "baz")) expected_list.append(span_event_end_fmt("SP1", "bar")) @@ -260,10 +256,7 @@ class MultiSpanProcessorTestBase(abc.ABC): @abc.abstractmethod def create_multi_span_processor( self, - ) -> ( - trace.SynchronousMultiSpanProcessor - | trace.ConcurrentMultiSpanProcessor - ): + ) -> trace.SynchronousMultiSpanProcessor | trace.ConcurrentMultiSpanProcessor: pass @staticmethod @@ -283,9 +276,7 @@ def test_on_start(self): multi_processor.on_start(span, parent_context=context) for mock_processor in mocks: - mock_processor.on_start.assert_called_once_with( - span, parent_context=context - ) + mock_processor.on_start.assert_called_once_with(span, parent_context=context) multi_processor.shutdown() def test_on_ending(self): @@ -356,9 +347,7 @@ def test_on_ending_not_implemented_does_not_raise(self): multi_processor = self.create_multi_span_processor() # Does not implement _on_ending - multi_processor.add_span_processor( - MySpanProcessor("SP1", spans_calls_list) - ) + multi_processor.add_span_processor(MySpanProcessor("SP1", spans_calls_list)) tracer_provider.add_span_processor(multi_processor) @@ -370,9 +359,7 @@ def test_on_ending_not_implemented_does_not_raise(self): expected_list.append(span_event_start_fmt("SP1", "bar")) with tracer.start_as_current_span("baz"): - expected_list.append( - span_event_start_fmt("SP1", "baz") - ) + expected_list.append(span_event_start_fmt("SP1", "baz")) expected_list.append(span_event_end_fmt("SP1", "baz")) expected_list.append(span_event_end_fmt("SP1", "bar")) @@ -385,9 +372,7 @@ def test_on_ending_not_implemented_does_not_raise(self): self.assertListEqual(spans_calls_list, expected_list) -class TestSynchronousMultiSpanProcessor( - MultiSpanProcessorTestBase, unittest.TestCase -): +class TestSynchronousMultiSpanProcessor(MultiSpanProcessorTestBase, unittest.TestCase): def create_multi_span_processor( self, ) -> trace.SynchronousMultiSpanProcessor: @@ -454,9 +439,7 @@ def test_force_flush_default_processor(self): self.assertEqual(1, mock_processor.force_flush.call_count) -class TestConcurrentMultiSpanProcessor( - MultiSpanProcessorTestBase, unittest.TestCase -): +class TestConcurrentMultiSpanProcessor(MultiSpanProcessorTestBase, unittest.TestCase): def create_multi_span_processor( self, ) -> trace.ConcurrentMultiSpanProcessor: @@ -551,10 +534,7 @@ def test_batch_span_processor_fork(self): # This is necessary in this test to start using the underlying ThreadPoolExecutor and avoid false positive: with tracer.start_as_current_span("main process before fork span"): pass - assert ( - exporter.get_finished_spans()[-1].name - == "main process before fork span" - ) + assert exporter.get_finished_spans()[-1].name == "main process before fork span" # The forked ConcurrentMultiSpanProcessor is usable in the child process: def child(conn): @@ -564,23 +544,16 @@ def child(conn): conn.close() parent_conn, child_conn = multiprocessing_context.Pipe() - process = multiprocessing_context.Process( - target=child, args=(child_conn,) - ) + process = multiprocessing_context.Process(target=child, args=(child_conn,)) process.start() has_response = parent_conn.poll(timeout=5) if not has_response: process.kill() - self.fail( - "The child process did not send any message after 5 seconds, it's very probably locked" - ) + self.fail("The child process did not send any message after 5 seconds, it's very probably locked") process.join(timeout=5) assert parent_conn.recv() == "child process span" # The ConcurrentMultiSpanProcessor is still usable in the main process after the child process termination: with tracer.start_as_current_span("main process after fork span"): pass - assert ( - exporter.get_finished_spans()[-1].name - == "main process after fork span" - ) + assert exporter.get_finished_spans()[-1].name == "main process after fork span" diff --git a/opentelemetry-sdk/tests/trace/test_trace.py b/opentelemetry-sdk/tests/trace/test_trace.py index 611e1302929..03a80b5727c 100644 --- a/opentelemetry-sdk/tests/trace/test_trace.py +++ b/opentelemetry-sdk/tests/trace/test_trace.py @@ -159,14 +159,10 @@ def run_general_code(shutdown_on_exit, explicit_shutdown): def test_tracer_provider_accepts_concurrent_multi_span_processor(self): span_processor = trace.ConcurrentMultiSpanProcessor(2) - tracer_provider = trace.TracerProvider( - active_span_processor=span_processor - ) + tracer_provider = trace.TracerProvider(active_span_processor=span_processor) # pylint: disable=protected-access - self.assertEqual( - span_processor, tracer_provider._active_span_processor - ) + self.assertEqual(span_processor, tracer_provider._active_span_processor) @unittest.skipUnless( hasattr(os, "fork") and hasattr(os, "register_at_fork"), @@ -175,11 +171,7 @@ def test_tracer_provider_accepts_concurrent_multi_span_processor(self): def test_tracer_provider_updates_process_dependent_resource_after_fork( self, ): - script_path = ( - Path(__file__).parent - / "scripts" - / "tracer_provider_resource_after_fork.py" - ) + script_path = Path(__file__).parent / "scripts" / "tracer_provider_resource_after_fork.py" result = subprocess.run( [sys.executable, str(script_path)], @@ -200,12 +192,8 @@ def test_tracer_provider_updates_process_dependent_resource_after_fork( child_payload = json.loads(lines[0]) parent_payload = json.loads(lines[1]) - self.assertEqual( - parent_payload["parent_resource_pid"], parent_payload["parent_pid"] - ) - self.assertEqual( - parent_payload["parent_tracer_pid"], parent_payload["parent_pid"] - ) + self.assertEqual(parent_payload["parent_resource_pid"], parent_payload["parent_pid"]) + self.assertEqual(parent_payload["parent_tracer_pid"], parent_payload["parent_pid"]) self.assertEqual( parent_payload["parent_resource_pid_after_fork"], parent_payload["parent_pid"], @@ -215,18 +203,10 @@ def test_tracer_provider_updates_process_dependent_resource_after_fork( parent_payload["parent_pid"], ) - self.assertNotEqual( - child_payload["child_pid"], parent_payload["parent_pid"] - ) - self.assertEqual( - child_payload["provider_pid"], child_payload["child_pid"] - ) - self.assertEqual( - child_payload["cached_tracer_pid"], child_payload["child_pid"] - ) - self.assertEqual( - child_payload["new_tracer_pid"], child_payload["child_pid"] - ) + self.assertNotEqual(child_payload["child_pid"], parent_payload["parent_pid"]) + self.assertEqual(child_payload["provider_pid"], child_payload["child_pid"]) + self.assertEqual(child_payload["cached_tracer_pid"], child_payload["child_pid"]) + self.assertEqual(child_payload["new_tracer_pid"], child_payload["child_pid"]) self.assertEqual(child_payload["span_pid"], child_payload["child_pid"]) def test_get_tracer_sdk(self): @@ -240,13 +220,9 @@ def test_get_tracer_sdk(self): # pylint: disable=protected-access self.assertEqual(tracer._instrumentation_scope._name, "module_name") # pylint: disable=protected-access - self.assertEqual( - tracer._instrumentation_scope._version, "library_version" - ) + self.assertEqual(tracer._instrumentation_scope._version, "library_version") # pylint: disable=protected-access - self.assertEqual( - tracer._instrumentation_scope._schema_url, "schema_url" - ) + self.assertEqual(tracer._instrumentation_scope._schema_url, "schema_url") # pylint: disable=protected-access self.assertEqual( tracer._instrumentation_scope._attributes, @@ -280,9 +256,7 @@ def test_get_tracer_sdk_sets_default_tracer_config_if_configurator_raises( def raising_tracer_configurator(tracer_scope): raise ValueError() - tracer_provider = trace.TracerProvider( - _tracer_configurator=raising_tracer_configurator - ) + tracer_provider = trace.TracerProvider(_tracer_configurator=raising_tracer_configurator) tracer = tracer_provider.get_tracer( "module_name", "library_version", @@ -293,9 +267,7 @@ def raising_tracer_configurator(tracer_scope): @mock.patch.dict("os.environ", {OTEL_SDK_DISABLED: "true"}) def test_get_tracer_with_sdk_disabled(self): tracer_provider = trace.TracerProvider() - self.assertIsInstance( - tracer_provider.get_tracer(Mock()), trace_api.NoOpTracer - ) + self.assertIsInstance(tracer_provider.get_tracer(Mock()), trace_api.NoOpTracer) def test_start_span_returns_invalid_span_if_not_enabled(self): # pylint: disable=protected-access @@ -309,9 +281,7 @@ def test_start_span_returns_invalid_span_if_not_enabled(self): self.assertEqual(tracer._is_enabled(), True) - tracer_provider._set_tracer_configurator( - tracer_configurator=trace._disable_tracer_configurator - ) + tracer_provider._set_tracer_configurator(tracer_configurator=trace._disable_tracer_configurator) self.assertEqual(tracer._is_enabled(), False) span = tracer.start_span(name="invalid span") @@ -398,9 +368,7 @@ def test_start_span_invalid_spancontext(self): eliminates redundant error handling logic in exporters. """ tracer = new_tracer() - parent_context = trace_api.set_span_in_context( - trace_api.INVALID_SPAN_CONTEXT - ) + parent_context = trace_api.set_span_in_context(trace_api.INVALID_SPAN_CONTEXT) new_span = tracer.start_span("root", context=parent_context) self.assertTrue(new_span.context.is_valid) self.assertIsNone(new_span.parent) @@ -413,9 +381,7 @@ def test_instrumentation_info(self): span1 = tracer1.start_span("s1") span2 = tracer2.start_span("s2") with self.assertWarns(DeprecationWarning): - self.assertEqual( - span1.instrumentation_info, InstrumentationInfo("instr1", "") - ) + self.assertEqual(span1.instrumentation_info, InstrumentationInfo("instr1", "")) with self.assertWarns(DeprecationWarning): self.assertEqual( span2.instrumentation_info, @@ -430,9 +396,7 @@ def test_instrumentation_info(self): self.assertEqual(span2.instrumentation_info.name, "instr2") with self.assertWarns(DeprecationWarning): - self.assertLess( - span1.instrumentation_info, span2.instrumentation_info - ) # Check sortability. + self.assertLess(span1.instrumentation_info, span2.instrumentation_info) # Check sortability. def test_invalid_instrumentation_info(self): tracer_provider = trace.TracerProvider() @@ -441,27 +405,21 @@ def test_invalid_instrumentation_info(self): with self.assertLogs(level=ERROR): tracer2 = tracer_provider.get_tracer(None) - self.assertIsInstance( - tracer1.instrumentation_info, InstrumentationInfo - ) + self.assertIsInstance(tracer1.instrumentation_info, InstrumentationInfo) span1 = tracer1.start_span("foo") self.assertTrue(span1.is_recording()) self.assertEqual(tracer1.instrumentation_info.schema_url, "") self.assertEqual(tracer1.instrumentation_info.version, "") self.assertEqual(tracer1.instrumentation_info.name, "") - self.assertIsInstance( - tracer2.instrumentation_info, InstrumentationInfo - ) + self.assertIsInstance(tracer2.instrumentation_info, InstrumentationInfo) span2 = tracer2.start_span("bar") self.assertTrue(span2.is_recording()) self.assertEqual(tracer2.instrumentation_info.schema_url, "") self.assertEqual(tracer2.instrumentation_info.version, "") self.assertEqual(tracer2.instrumentation_info.name, "") - self.assertEqual( - tracer1.instrumentation_info, tracer2.instrumentation_info - ) + self.assertEqual(tracer1.instrumentation_info, tracer2.instrumentation_info) def test_span_processor_for_source(self): tracer_provider = trace.TracerProvider() @@ -471,12 +429,8 @@ def test_span_processor_for_source(self): span2 = tracer2.start_span("s2") # pylint:disable=protected-access - self.assertIs( - span1._span_processor, tracer_provider._active_span_processor - ) - self.assertIs( - span2._span_processor, tracer_provider._active_span_processor - ) + self.assertIs(span1._span_processor, tracer_provider._active_span_processor) + self.assertIs(span2._span_processor, tracer_provider._active_span_processor) def test_start_span_implicit(self): tracer = new_tracer() @@ -491,9 +445,7 @@ def test_start_span_implicit(self): with trace_api.use_span(root, True): self.assertIs(trace_api.get_current_span(), root) - with tracer.start_span( - "child", kind=trace_api.SpanKind.CLIENT - ) as child: + with tracer.start_span("child", kind=trace_api.SpanKind.CLIENT) as child: self.assertIs(child.parent, root.get_span_context()) self.assertEqual(child.kind, trace_api.SpanKind.CLIENT) @@ -505,15 +457,9 @@ def test_start_span_implicit(self): root_context = root.get_span_context() child_context = child.get_span_context() self.assertEqual(root_context.trace_id, child_context.trace_id) - self.assertNotEqual( - root_context.span_id, child_context.span_id - ) - self.assertEqual( - root_context.trace_state, child_context.trace_state - ) - self.assertEqual( - root_context.trace_flags, child_context.trace_flags - ) + self.assertNotEqual(root_context.span_id, child_context.span_id) + self.assertEqual(root_context.trace_state, child_context.trace_state) + self.assertEqual(root_context.trace_flags, child_context.trace_flags) # Verify start_span() did not set the current span. self.assertIs(trace_api.get_current_span(), root) @@ -572,9 +518,7 @@ def test_start_span_explicit(self): other_parent.get_span_context().trace_state, child_context.trace_state, ) - self.assertTrue( - other_parent.get_span_context().trace_flags.sampled - ) + self.assertTrue(other_parent.get_span_context().trace_flags.sampled) # Verify start_span() did not set the current span. self.assertIs(trace_api.get_current_span(), root) @@ -588,10 +532,7 @@ def test_start_span_preserves_parent_random_trace_id_flag(self): for parent_trace_flags in ( trace_api.TraceFlags(trace_api.TraceFlags.SAMPLED), - trace_api.TraceFlags( - trace_api.TraceFlags.SAMPLED - | trace_api.TraceFlags.RANDOM_TRACE_ID - ), + trace_api.TraceFlags(trace_api.TraceFlags.SAMPLED | trace_api.TraceFlags.RANDOM_TRACE_ID), ): with self.subTest(parent_trace_flags=parent_trace_flags): parent_context = trace_api.SpanContext( @@ -600,9 +541,7 @@ def test_start_span_preserves_parent_random_trace_id_flag(self): is_remote=True, trace_flags=parent_trace_flags, ) - context = trace_api.set_span_in_context( - trace_api.NonRecordingSpan(parent_context) - ) + context = trace_api.set_span_in_context(trace_api.NonRecordingSpan(parent_context)) child = tracer.start_span("child", context) child_trace_flags = child.get_span_context().trace_flags @@ -655,9 +594,7 @@ def test_start_as_current_span_explicit(self): self.assertIsNotNone(root.start_time) self.assertIsNone(root.end_time) - with tracer.start_as_current_span( - "stepchild", other_parent_ctx - ) as child: + with tracer.start_as_current_span("stepchild", other_parent_ctx) as child: # The child should become the current span as usual, but its # parent should be the one passed in, not the # previously-current span. @@ -719,9 +656,7 @@ def test_explicit_span_resource(self): def test_update_resource(self): initial_resource = resources.Resource({"one": "one", "two": "old"}) - updating_resource = resources.Resource( - {"two": "new", "three": "three"} - ) + updating_resource = resources.Resource({"two": "new", "three": "three"}) tracer_provider = trace.TracerProvider(resource=initial_resource) tracer = tracer_provider.get_tracer(__name__) other_tracer = tracer_provider.get_tracer("other") @@ -783,10 +718,7 @@ def test_disallow_direct_span_creation(self): def test_surplus_span_links(self): # pylint: disable=protected-access max_links = trace.SpanLimits().max_links - links = [ - trace_api.Link(trace_api.SpanContext(0x1, idx, is_remote=False)) - for idx in range(16 + max_links) - ] + links = [trace_api.Link(trace_api.SpanContext(0x1, idx, is_remote=False)) for idx in range(16 + max_links)] tracer = new_tracer() with tracer.start_as_current_span("span", links=links) as root: self.assertEqual(len(root.links), max_links) @@ -796,9 +728,7 @@ def test_surplus_span_attributes(self): max_attrs = trace.SpanLimits().max_span_attributes attributes = {str(idx): idx for idx in range(16 + max_attrs)} tracer = new_tracer() - with tracer.start_as_current_span( - "span", attributes=attributes - ) as root: + with tracer.start_as_current_span("span", attributes=attributes) as root: self.assertEqual(len(root.attributes), max_attrs) @@ -826,9 +756,7 @@ def test_events(self): self.assertEqual(span.events, tuple(events)) def test_event_dropped_attributes(self): - event1 = trace.Event( - "foo1", BoundedAttributes(0, attributes={"bar1": "baz1"}) - ) + event1 = trace.Event("foo1", BoundedAttributes(0, attributes={"bar1": "baz1"})) self.assertEqual(event1.dropped_attributes, 1) event2 = trace.Event("foo2", {"bar2": "baz2"}) @@ -853,9 +781,7 @@ def test_deepcopy(self): span_id=0x00000000DEADBEF0, is_remote=False, ) - attributes = BoundedAttributes( - 10, {"key1": "value1", "key2": 42}, immutable=False - ) + attributes = BoundedAttributes(10, {"key1": "value1", "key2": 42}, immutable=False) events = BoundedList(10) events.extend( ( @@ -889,21 +815,15 @@ def test_deepcopy(self): self.assertEqual(dict(span_copy.attributes), dict(span.attributes)) attributes["key1"] = "mutated" - self.assertNotEqual( - span_copy.attributes["key1"], span.attributes["key1"] - ) + self.assertNotEqual(span_copy.attributes["key1"], span.attributes["key1"]) self.assertEqual(len(span_copy.events), len(span.events)) self.assertIsNot(span_copy.events, span.events) self.assertEqual(span_copy.events[0].name, span.events[0].name) - self.assertEqual( - span_copy.events[0].attributes, span.events[0].attributes - ) + self.assertEqual(span_copy.events[0].attributes, span.events[0].attributes) self.assertEqual(len(span_copy.links), len(span.links)) - self.assertEqual( - span_copy.links[0].attributes, span.links[0].attributes - ) + self.assertEqual(span_copy.links[0].attributes, span.links[0].attributes) links[0] = trace_api.Link( context=trace_api.INVALID_SPAN_CONTEXT, attributes={"mutated": "link"}, @@ -960,29 +880,19 @@ def test_attributes(self): self.assertEqual(root.attributes["misc.pi"], 3.14) self.assertEqual(root.attributes["attr-key"], "attr-value2") self.assertEqual(root.attributes["empty-list"], ()) - self.assertEqual( - root.attributes["list-of-bools"], (True, True, False) - ) + self.assertEqual(root.attributes["list-of-bools"], (True, True, False)) list_of_bools.append(False) - self.assertEqual( - root.attributes["list-of-bools"], (True, True, False) - ) - self.assertEqual( - root.attributes["list-of-numerics"], (123, 314, 0) - ) + self.assertEqual(root.attributes["list-of-bools"], (True, True, False)) + self.assertEqual(root.attributes["list-of-numerics"], (123, 314, 0)) list_of_numerics.append(227) - self.assertEqual( - root.attributes["list-of-numerics"], (123, 314, 0) - ) + self.assertEqual(root.attributes["list-of-numerics"], (123, 314, 0)) attributes = { "attr-key": "val", "attr-key2": "val2", "attr-in-both": "span-attr", } - with self.tracer.start_as_current_span( - "root2", attributes=attributes - ) as root: + with self.tracer.start_as_current_span("root2", attributes=attributes) as root: self.assertEqual(len(root.attributes), 3) self.assertEqual(root.attributes["attr-key"], "val") self.assertEqual(root.attributes["attr-key2"], "val2") @@ -991,9 +901,7 @@ def test_attributes(self): def test_invalid_attribute_values(self): with self.tracer.start_as_current_span("root") as root: with self.assertLogs(level=WARNING): - root.set_attributes( - {"correct-value": "foo", "non-primitive-data-type": {}} - ) + root.set_attributes({"correct-value": "foo", "non-primitive-data-type": {}}) with self.assertLogs(level=WARNING): root.set_attribute("non-primitive-data-type", {}) @@ -1008,9 +916,7 @@ def test_invalid_attribute_values(self): [False, 123, "string"], ) with self.assertLogs(level=WARNING): - root.set_attribute( - "list-with-non-primitive-data-type", [{}, 123] - ) + root.set_attribute("list-with-non-primitive-data-type", [{}, 123]) with self.assertLogs(level=WARNING): root.set_attribute("list-with-numeric-and-bool", [1, True]) @@ -1029,29 +935,21 @@ def test_byte_type_attribute_value(self): "invalid-byte-type-attribute", b"\xd8\xe1\xb7\xeb\xa8\xe5 \xd2\xb7\xe1", ) - self.assertFalse( - "invalid-byte-type-attribute" in root.attributes - ) + self.assertFalse("invalid-byte-type-attribute" in root.attributes) root.set_attribute("valid-byte-type-attribute", b"valid byte") - self.assertTrue( - isinstance(root.attributes["valid-byte-type-attribute"], str) - ) + self.assertTrue(isinstance(root.attributes["valid-byte-type-attribute"], str)) def test_sampling_attributes(self): sampling_attributes = { "sampler-attr": "sample-val", "attr-in-both": "decision-attr", } - tracer_provider = trace.TracerProvider( - StaticSampler(Decision.RECORD_AND_SAMPLE) - ) + tracer_provider = trace.TracerProvider(StaticSampler(Decision.RECORD_AND_SAMPLE)) self.tracer = tracer_provider.get_tracer(__name__) - with self.tracer.start_as_current_span( - name="root2", attributes=sampling_attributes - ) as root: + with self.tracer.start_as_current_span(name="root2", attributes=sampling_attributes) as root: self.assertEqual(len(root.attributes), 2) self.assertEqual(root.attributes["sampler-attr"], "sample-val") self.assertEqual(root.attributes["attr-in-both"], "decision-attr") @@ -1065,9 +963,7 @@ def test_events(self): root.add_event("event0") # event name and attributes - root.add_event( - "event1", {"name": "pluto", "some_bools": [True, False]} - ) + root.add_event("event1", {"name": "pluto", "some_bools": [True, False]}) # event name, attributes and timestamp now = time_ns() @@ -1088,24 +984,16 @@ def test_events(self): ) self.assertEqual(root.events[2].name, "event2") - self.assertEqual( - root.events[2].attributes, {"name": ("birthday",)} - ) + self.assertEqual(root.events[2].attributes, {"name": ("birthday",)}) self.assertEqual(root.events[2].timestamp, now) self.assertEqual(root.events[3].name, "event3") - self.assertEqual( - root.events[3].attributes, {"name": ("original_contents",)} - ) + self.assertEqual(root.events[3].attributes, {"name": ("original_contents",)}) mutable_list = ["new_contents"] - self.assertEqual( - root.events[3].attributes, {"name": ("original_contents",)} - ) + self.assertEqual(root.events[3].attributes, {"name": ("original_contents",)}) def test_events_are_immutable(self): - event_properties = [ - prop for prop in dir(trace.EventBase) if not prop.startswith("_") - ] + event_properties = [prop for prop in dir(trace.EventBase) if not prop.startswith("_")] with self.tracer.start_as_current_span("root") as root: root.add_event("event0", {"name": ["birthday"]}) @@ -1131,9 +1019,7 @@ def test_invalid_event_attributes(self): with self.tracer.start_as_current_span("root") as root: with self.assertLogs(level=WARNING): - root.add_event( - "event0", {"attr1": True, "attr2": ["hi", False]} - ) + root.add_event("event0", {"attr1": True, "attr2": ["hi", False]}) with self.assertLogs(level=WARNING): root.add_event("event0", {"attr1": {}}) with self.assertLogs(level=WARNING): @@ -1166,19 +1052,11 @@ def test_links(self): ) with self.tracer.start_as_current_span("root", links=links) as root: self.assertEqual(len(root.links), 2) - self.assertEqual( - root.links[0].context.trace_id, other_context1.trace_id - ) - self.assertEqual( - root.links[0].context.span_id, other_context1.span_id - ) + self.assertEqual(root.links[0].context.trace_id, other_context1.trace_id) + self.assertEqual(root.links[0].context.span_id, other_context1.span_id) self.assertEqual(0, len(root.links[0].attributes)) - self.assertEqual( - root.links[1].context.trace_id, other_context2.trace_id - ) - self.assertEqual( - root.links[1].context.span_id, other_context2.span_id - ) + self.assertEqual(root.links[1].context.trace_id, other_context2.trace_id) + self.assertEqual(root.links[1].context.span_id, other_context2.span_id) self.assertEqual(root.links[1].attributes, {"name": "neighbor"}) with self.assertRaises(TypeError): @@ -1196,12 +1074,8 @@ def test_add_link(self): root.add_link(other_context, {"name": "neighbor"}) self.assertEqual(len(root.links), 1) - self.assertEqual( - root.links[0].context.trace_id, other_context.trace_id - ) - self.assertEqual( - root.links[0].context.span_id, other_context.span_id - ) + self.assertEqual(root.links[0].context.trace_id, other_context.trace_id) + self.assertEqual(root.links[0].context.span_id, other_context.span_id) self.assertEqual(root.links[0].attributes, {"name": "neighbor"}) with self.assertRaises(TypeError): @@ -1215,9 +1089,7 @@ def test_add_link_with_invalid_span_context(self): root.add_link(None) self.assertEqual(len(root.links), 0) - with self.tracer.start_as_current_span( - "root", links=[trace_api.Link(other_context), None] - ) as root: + with self.tracer.start_as_current_span("root", links=[trace_api.Link(other_context), None]) as root: self.assertEqual(len(root.links), 0) def test_add_link_with_invalid_span_context_with_attributes(self): @@ -1284,9 +1156,7 @@ def test_start_span(self): self.assertIs(span.status.status_code, trace_api.StatusCode.UNSET) # status - new_status = trace_api.status.Status( - trace_api.StatusCode.ERROR, "Test description" - ) + new_status = trace_api.status.Status(trace_api.StatusCode.ERROR, "Test description") span.set_status(new_status) self.assertIs(span.status.status_code, trace_api.StatusCode.ERROR) self.assertIs(span.status.description, "Test description") @@ -1301,9 +1171,7 @@ def test_start_accepts_context(self): ) context = Context() span.start(parent_context=context) - span_processor.on_start.assert_called_once_with( - span, parent_context=context - ) + span_processor.on_start.assert_called_once_with(span, parent_context=context) def test_span_override_start_and_end_time(self): """Span sending custom start_time and end_time values""" @@ -1322,9 +1190,7 @@ def test_span_set_status(self): self.assertEqual(span1.status.description, None) span2 = self.tracer.start_span("span2") - span2.set_status( - Status(status_code=StatusCode.ERROR, description="desc") - ) + span2.set_status(Status(status_code=StatusCode.ERROR, description="desc")) self.assertEqual(span2.status.status_code, StatusCode.ERROR) self.assertEqual(span2.status.description, "desc") @@ -1379,9 +1245,7 @@ def test_ended_span(self): root.update_name("xxx") self.assertEqual(root.name, "root") - new_status = trace_api.status.Status( - trace_api.StatusCode.ERROR, "Test description" - ) + new_status = trace_api.status.Status(trace_api.StatusCode.ERROR, "Test description") with self.assertLogs(level=WARNING): root.set_status(new_status) @@ -1393,18 +1257,10 @@ def error_status_test(context): with context as root: raise AssertionError("unknown") self.assertIs(root.status.status_code, StatusCode.ERROR) - self.assertEqual( - root.status.description, "AssertionError: unknown" - ) + self.assertEqual(root.status.description, "AssertionError: unknown") - error_status_test( - trace.TracerProvider().get_tracer(__name__).start_span("root") - ) - error_status_test( - trace.TracerProvider() - .get_tracer(__name__) - .start_as_current_span("root") - ) + error_status_test(trace.TracerProvider().get_tracer(__name__).start_span("root")) + error_status_test(trace.TracerProvider().get_tracer(__name__).start_as_current_span("root")) def test_status_cannot_override_ok(self): def error_status_test(context): @@ -1415,14 +1271,8 @@ def error_status_test(context): self.assertIs(root.status.status_code, StatusCode.OK) self.assertIsNone(root.status.description) - error_status_test( - trace.TracerProvider().get_tracer(__name__).start_span("root") - ) - error_status_test( - trace.TracerProvider() - .get_tracer(__name__) - .start_as_current_span("root") - ) + error_status_test(trace.TracerProvider().get_tracer(__name__).start_span("root")) + error_status_test(trace.TracerProvider().get_tracer(__name__).start_as_current_span("root")) def test_status_cannot_set_unset(self): def unset_status_test(context): @@ -1431,20 +1281,12 @@ def unset_status_test(context): raise AssertionError("unknown") root.set_status(trace_api.status.Status(StatusCode.UNSET)) self.assertIs(root.status.status_code, StatusCode.ERROR) - self.assertEqual( - root.status.description, "AssertionError: unknown" - ) + self.assertEqual(root.status.description, "AssertionError: unknown") with self.assertLogs(level=WARNING): - unset_status_test( - trace.TracerProvider().get_tracer(__name__).start_span("root") - ) + unset_status_test(trace.TracerProvider().get_tracer(__name__).start_span("root")) with self.assertLogs(level=WARNING): - unset_status_test( - trace.TracerProvider() - .get_tracer(__name__) - .start_as_current_span("root") - ) + unset_status_test(trace.TracerProvider().get_tracer(__name__).start_as_current_span("root")) def test_last_status_wins(self): def error_status_test(context): @@ -1455,14 +1297,8 @@ def error_status_test(context): self.assertIs(root.status.status_code, StatusCode.OK) self.assertIsNone(root.status.description) - error_status_test( - trace.TracerProvider().get_tracer(__name__).start_span("root") - ) - error_status_test( - trace.TracerProvider() - .get_tracer(__name__) - .start_as_current_span("root") - ) + error_status_test(trace.TracerProvider().get_tracer(__name__).start_span("root")) + error_status_test(trace.TracerProvider().get_tracer(__name__).start_as_current_span("root")) def test_record_exception_fqn(self): span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext)) @@ -1471,9 +1307,7 @@ def test_record_exception_fqn(self): span.record_exception(exception) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "error", exception_event.attributes["exception.message"] - ) + self.assertEqual("error", exception_event.attributes["exception.message"]) self.assertEqual( exception_type, exception_event.attributes["exception.type"], @@ -1491,12 +1325,8 @@ def test_record_exception(self): span.record_exception(err) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "invalid", exception_event.attributes["exception.message"] - ) - self.assertEqual( - "ValueError", exception_event.attributes["exception.type"] - ) + self.assertEqual("invalid", exception_event.attributes["exception.message"]) + self.assertEqual("ValueError", exception_event.attributes["exception.type"]) self.assertIn( "ValueError: invalid", exception_event.attributes["exception.stacktrace"], @@ -1511,23 +1341,15 @@ def test_record_exception_with_attributes(self): span.record_exception(err, attributes) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "error", exception_event.attributes["exception.message"] - ) - self.assertEqual( - "RuntimeError", exception_event.attributes["exception.type"] - ) - self.assertEqual( - "False", exception_event.attributes["exception.escaped"] - ) + self.assertEqual("error", exception_event.attributes["exception.message"]) + self.assertEqual("RuntimeError", exception_event.attributes["exception.type"]) + self.assertEqual("False", exception_event.attributes["exception.escaped"]) self.assertIn( "RuntimeError: error", exception_event.attributes["exception.stacktrace"], ) self.assertIn("has_additional_attributes", exception_event.attributes) - self.assertEqual( - True, exception_event.attributes["has_additional_attributes"] - ) + self.assertEqual(True, exception_event.attributes["has_additional_attributes"]) def test_record_exception_escaped(self): span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext)) @@ -1537,19 +1359,13 @@ def test_record_exception_escaped(self): span.record_exception(exception=err, escaped=True) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "error", exception_event.attributes["exception.message"] - ) - self.assertEqual( - "RuntimeError", exception_event.attributes["exception.type"] - ) + self.assertEqual("error", exception_event.attributes["exception.message"]) + self.assertEqual("RuntimeError", exception_event.attributes["exception.type"]) self.assertIn( "RuntimeError: error", exception_event.attributes["exception.stacktrace"], ) - self.assertEqual( - "True", exception_event.attributes["exception.escaped"] - ) + self.assertEqual("True", exception_event.attributes["exception.escaped"]) def test_record_exception_with_timestamp(self): span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext)) @@ -1560,12 +1376,8 @@ def test_record_exception_with_timestamp(self): span.record_exception(err, timestamp=timestamp) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "error", exception_event.attributes["exception.message"] - ) - self.assertEqual( - "RuntimeError", exception_event.attributes["exception.type"] - ) + self.assertEqual("error", exception_event.attributes["exception.message"]) + self.assertEqual("RuntimeError", exception_event.attributes["exception.type"]) self.assertIn( "RuntimeError: error", exception_event.attributes["exception.stacktrace"], @@ -1582,20 +1394,14 @@ def test_record_exception_with_attributes_and_timestamp(self): span.record_exception(err, attributes, timestamp) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "error", exception_event.attributes["exception.message"] - ) - self.assertEqual( - "RuntimeError", exception_event.attributes["exception.type"] - ) + self.assertEqual("error", exception_event.attributes["exception.message"]) + self.assertEqual("RuntimeError", exception_event.attributes["exception.type"]) self.assertIn( "RuntimeError: error", exception_event.attributes["exception.stacktrace"], ) self.assertIn("has_additional_attributes", exception_event.attributes) - self.assertEqual( - True, exception_event.attributes["has_additional_attributes"] - ) + self.assertEqual(True, exception_event.attributes["has_additional_attributes"]) self.assertEqual(1604238587112021089, exception_event.timestamp) def test_record_exception_context_manager(self): @@ -1609,12 +1415,8 @@ def test_record_exception_context_manager(self): self.assertEqual(len(span.events), 1) event = span.events[0] self.assertEqual("exception", event.name) - self.assertEqual( - "RuntimeError", event.attributes["exception.type"] - ) - self.assertEqual( - "example error", event.attributes["exception.message"] - ) + self.assertEqual("RuntimeError", event.attributes["exception.type"]) + self.assertEqual("example error", event.attributes["exception.message"]) stacktrace = """in test_record_exception_context_manager raise RuntimeError("example error") @@ -1622,9 +1424,7 @@ def test_record_exception_context_manager(self): self.assertIn(stacktrace, event.attributes["exception.stacktrace"]) try: - with self.tracer.start_as_current_span( - "span", record_exception=False - ) as span: + with self.tracer.start_as_current_span("span", record_exception=False) as span: raise RuntimeError("example error") except RuntimeError: pass @@ -1637,12 +1437,8 @@ def test_record_exception_out_of_scope(self): span.record_exception(out_of_scope_exception) exception_event = span.events[0] self.assertEqual("exception", exception_event.name) - self.assertEqual( - "invalid", exception_event.attributes["exception.message"] - ) - self.assertEqual( - "ValueError", exception_event.attributes["exception.type"] - ) + self.assertEqual("invalid", exception_event.attributes["exception.message"]) + self.assertEqual("ValueError", exception_event.attributes["exception.type"]) self.assertIn( "ValueError: invalid", exception_event.attributes["exception.stacktrace"], @@ -1666,9 +1462,7 @@ def __init__(self, name, span_list): self.name = name self.span_list = span_list - def on_start( - self, span: "trace.Span", parent_context: Context | None = None - ) -> None: + def on_start(self, span: "trace.Span", parent_context: Context | None = None) -> None: self.span_list.append(span_event_start_fmt(self.name, span.name)) def _on_ending(self, span: "trace.ReadableSpan") -> None: @@ -1793,9 +1587,7 @@ def test_to_json(self): trace_flags=trace_api.TraceFlags(trace_api.TraceFlags.SAMPLED), ) parent = trace._Span("parent-name", context, resource=Resource({})) - span = trace._Span( - "span-name", context, resource=Resource({}), parent=parent.context - ) + span = trace._Span("span-name", context, resource=Resource({}), parent=parent.context) self.assertEqual( span.to_json(), @@ -1876,12 +1668,8 @@ def test_limits_defaults(self): limits.max_link_attributes, trace._DEFAULT_OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, ) - self.assertEqual( - limits.max_events, trace._DEFAULT_OTEL_SPAN_EVENT_COUNT_LIMIT - ) - self.assertEqual( - limits.max_links, trace._DEFAULT_OTEL_SPAN_LINK_COUNT_LIMIT - ) + self.assertEqual(limits.max_events, trace._DEFAULT_OTEL_SPAN_EVENT_COUNT_LIMIT) + self.assertEqual(limits.max_links, trace._DEFAULT_OTEL_SPAN_LINK_COUNT_LIMIT) self.assertIsNone(limits.max_attribute_length) self.assertIsNone(limits.max_span_attribute_length) @@ -1897,9 +1685,7 @@ def test_limits_attribute_length_limits_code(self): self.assertEqual(limits.max_span_attribute_length, 22) # global and span limits set to different values - limits = trace.SpanLimits( - max_attribute_length=22, max_span_attribute_length=33 - ) + limits = trace.SpanLimits(max_attribute_length=22, max_span_attribute_length=33) self.assertEqual(limits.max_attribute_length, 22) self.assertEqual(limits.max_span_attribute_length, 33) @@ -1940,9 +1726,7 @@ def test_limits_values_code(self): self.assertEqual(limits.max_event_attributes, max_event_attributes) self.assertEqual(limits.max_link_attributes, max_link_attributes) self.assertEqual(limits.max_attribute_length, max_attr_length) - self.assertEqual( - limits.max_span_attribute_length, max_span_attr_length - ) + self.assertEqual(limits.max_span_attribute_length, max_span_attr_length) def test_limits_values_env(self): ( @@ -1974,9 +1758,7 @@ def test_limits_values_env(self): OTEL_SPAN_EVENT_COUNT_LIMIT: str(max_events), OTEL_SPAN_LINK_COUNT_LIMIT: str(max_links), OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT: str(max_attr_length), - OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: str( - max_span_attr_length - ), + OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT: str(max_span_attr_length), }, ): limits = trace.SpanLimits() @@ -1987,9 +1769,7 @@ def test_limits_values_env(self): self.assertEqual(limits.max_event_attributes, max_event_attributes) self.assertEqual(limits.max_link_attributes, max_link_attributes) self.assertEqual(limits.max_attribute_length, max_attr_length) - self.assertEqual( - limits.max_span_attribute_length, max_span_attr_length - ) + self.assertEqual(limits.max_span_attribute_length, max_span_attr_length) @mock.patch.dict( "os.environ", @@ -2177,25 +1957,15 @@ def _test_span_limits( for _ in range(100) ] - some_attrs = { - f"init_attribute_{idx}": self.long_val for idx in range(100) - } - with tracer.start_as_current_span( - "root", links=some_links, attributes=some_attrs - ) as root: + some_attrs = {f"init_attribute_{idx}": self.long_val for idx in range(100)} + with tracer.start_as_current_span("root", links=some_links, attributes=some_attrs) as root: self.assertEqual(len(root.links), max_links) self.assertEqual(len(root.attributes), max_attrs) for idx in range(100): root.set_attribute(f"my_str_attribute_{idx}", self.long_val) - root.set_attribute( - f"my_byte_attribute_{idx}", self.long_val.encode() - ) - root.set_attribute( - f"my_int_attribute_{idx}", self.long_val.encode() - ) - root.add_event( - f"my_event_{idx}", attributes={"k": self.long_val} - ) + root.set_attribute(f"my_byte_attribute_{idx}", self.long_val.encode()) + root.set_attribute(f"my_int_attribute_{idx}", self.long_val.encode()) + root.add_event(f"my_event_{idx}", attributes={"k": self.long_val}) self.assertEqual(len(root.attributes), max_attrs) self.assertEqual(len(root.events), max_events) @@ -2212,9 +1982,7 @@ def _test_span_limits( self._assert_attr_length(attr_val, max_span_attr_len) def _test_span_no_limits(self, tracer): - num_links = int(trace._DEFAULT_OTEL_SPAN_LINK_COUNT_LIMIT) + randint( - 1, 100 - ) + num_links = int(trace._DEFAULT_OTEL_SPAN_LINK_COUNT_LIMIT) + randint(1, 100) id_generator = RandomIdGenerator() some_links = [ @@ -2230,20 +1998,14 @@ def _test_span_no_limits(self, tracer): with tracer.start_as_current_span("root", links=some_links) as root: self.assertEqual(len(root.links), num_links) - num_events = int(trace._DEFAULT_OTEL_SPAN_EVENT_COUNT_LIMIT) + randint( - 1, 100 - ) + num_events = int(trace._DEFAULT_OTEL_SPAN_EVENT_COUNT_LIMIT) + randint(1, 100) with tracer.start_as_current_span("root") as root: for idx in range(num_events): - root.add_event( - f"my_event_{idx}", attributes={"k": self.long_val} - ) + root.add_event(f"my_event_{idx}", attributes={"k": self.long_val}) self.assertEqual(len(root.events), num_events) - num_attributes = int( - trace._DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT - ) + randint(1, 100) + num_attributes = int(trace._DEFAULT_OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT) + randint(1, 100) with tracer.start_as_current_span("root") as root: for idx in range(num_attributes): root.set_attribute(f"my_attribute_{idx}", self.long_val) @@ -2263,11 +2025,7 @@ def test_invalid_env_vars_raise(self): OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, ] bad_values = ["bad", "-1"] - test_cases = { - env_var: bad_value - for env_var in env_vars - for bad_value in bad_values - } + test_cases = {env_var: bad_value for env_var in env_vars for bad_value in bad_values} for env_var, bad_value in test_cases.items(): with self.subTest(f"Testing {env_var}={bad_value}"): @@ -2296,9 +2054,7 @@ def test_constant_random_trace_id(self): self.assertEqual(trace_api.TraceFlags.RANDOM_TRACE_ID, 2) def test_get_default(self): - self.assertEqual( - trace_api.TraceFlags.get_default(), trace_api.TraceFlags.DEFAULT - ) + self.assertEqual(trace_api.TraceFlags.get_default(), trace_api.TraceFlags.DEFAULT) def test_sampled_true(self): self.assertTrue(trace_api.TraceFlags(0xF1).sampled) @@ -2315,9 +2071,7 @@ def test_random_trace_id_false(self): self.assertFalse(trace_api.TraceFlags(0xF1).random_trace_id) def test_constant_default_trace_options(self): - self.assertEqual( - trace_api.DEFAULT_TRACE_OPTIONS, trace_api.TraceFlags.DEFAULT - ) + self.assertEqual(trace_api.DEFAULT_TRACE_OPTIONS, trace_api.TraceFlags.DEFAULT) class TestParentChildSpanException(unittest.TestCase): @@ -2365,9 +2119,7 @@ def test_parent_child_span_exception(self): parent_span.status.description, f"{exception_type}: {exception_message}", ) - self.assertEqual( - parent_span.events[0].attributes["exception.type"], exception_type - ) + self.assertEqual(parent_span.events[0].attributes["exception.type"], exception_type) self.assertEqual( parent_span.events[0].attributes["exception.message"], exception_message, @@ -2436,9 +2188,7 @@ class TestTracerProvider(unittest.TestCase): @patch.object(Resource, "create") def test_tracer_provider_init_default(self, resource_patch, sample_patch): tracer_provider = trace.TracerProvider() - self.assertTrue( - isinstance(tracer_provider.id_generator, RandomIdGenerator) - ) + self.assertTrue(isinstance(tracer_provider.id_generator, RandomIdGenerator)) resource_patch.assert_called_once() self.assertIsNotNone(tracer_provider._resource) sample_patch.assert_called_once() @@ -2461,9 +2211,7 @@ def test_default_tracer_configurator(self): {}, ) self.assertEqual(tracer._instrumentation_scope.name, "module_name") - self.assertEqual( - other_tracer._instrumentation_scope.name, "other_module_name" - ) + self.assertEqual(other_tracer._instrumentation_scope.name, "other_module_name") self.assertEqual(tracer._is_enabled(), True) self.assertEqual(other_tracer._is_enabled(), True) @@ -2479,9 +2227,7 @@ def raising_tracer_configurator(tracer_scope): "module_name", "library_version", ) - tracer_provider._set_tracer_configurator( - tracer_configurator=raising_tracer_configurator - ) + tracer_provider._set_tracer_configurator(tracer_configurator=raising_tracer_configurator) # pylint: disable=protected-access self.assertEqual( dataclasses.asdict(tracer._tracer_config), @@ -2500,9 +2246,7 @@ def test_rule_based_tracer_configurator(self): _TracerConfig(is_enabled=False), ), ] - configurator = _RuleBasedTracerConfigurator( - rules=rules, default_config=_TracerConfig(is_enabled=True) - ) + configurator = _RuleBasedTracerConfigurator(rules=rules, default_config=_TracerConfig(is_enabled=True)) tracer_provider = trace.TracerProvider() tracer = tracer_provider.get_tracer( @@ -2518,16 +2262,12 @@ def test_rule_based_tracer_configurator(self): {}, ) self.assertEqual(tracer._instrumentation_scope.name, "module_name") - self.assertEqual( - other_tracer._instrumentation_scope.name, "other_module_name" - ) + self.assertEqual(other_tracer._instrumentation_scope.name, "other_module_name") self.assertEqual(tracer._is_enabled(), True) self.assertEqual(other_tracer._is_enabled(), True) - tracer_provider._set_tracer_configurator( - tracer_configurator=configurator - ) + tracer_provider._set_tracer_configurator(tracer_configurator=configurator) self.assertEqual(tracer._is_enabled(), True) self.assertEqual(other_tracer._is_enabled(), False) @@ -2542,9 +2282,7 @@ def test_rule_based_tracer_configurator_default_when_rules_dont_match( _TracerConfig(is_enabled=False), ), ] - configurator = _RuleBasedTracerConfigurator( - rules=rules, default_config=_TracerConfig(is_enabled=True) - ) + configurator = _RuleBasedTracerConfigurator(rules=rules, default_config=_TracerConfig(is_enabled=True)) tracer_provider = trace.TracerProvider() tracer = tracer_provider.get_tracer( @@ -2560,16 +2298,12 @@ def test_rule_based_tracer_configurator_default_when_rules_dont_match( {}, ) self.assertEqual(tracer._instrumentation_scope.name, "module_name") - self.assertEqual( - other_tracer._instrumentation_scope.name, "other_module_name" - ) + self.assertEqual(other_tracer._instrumentation_scope.name, "other_module_name") self.assertEqual(tracer._is_enabled(), True) self.assertEqual(other_tracer._is_enabled(), True) - tracer_provider._set_tracer_configurator( - tracer_configurator=configurator - ) + tracer_provider._set_tracer_configurator(tracer_configurator=configurator) self.assertEqual(tracer._is_enabled(), False) self.assertEqual(other_tracer._is_enabled(), True) diff --git a/opentelemetry-semantic-conventions/.pylintrc b/opentelemetry-semantic-conventions/.pylintrc index a918ba2e15c..b034d8c75ad 100644 --- a/opentelemetry-semantic-conventions/.pylintrc +++ b/opentelemetry-semantic-conventions/.pylintrc @@ -263,7 +263,7 @@ indent-after-paren=4 indent-string=' ' # Maximum number of characters on a single line. -max-line-length=79 +max-line-length=120 # Maximum number of lines in a module. max-module-lines=1000 diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/aws_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/aws_attributes.py index 464de70356c..e9113aa9c01 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/aws_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/aws_attributes.py @@ -14,9 +14,7 @@ The unique identifier of the AWS Bedrock Knowledge base. A [knowledge base](https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html) is a bank of information that can be queried by models to generate more relevant responses and augment prompts. """ -AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: Final = ( - "aws.dynamodb.attribute_definitions" -) +AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS: Final = "aws.dynamodb.attribute_definitions" """ The JSON-serialized value of each item in the `AttributeDefinitions` request field. """ @@ -41,23 +39,17 @@ The value of the `Count` response parameter. """ -AWS_DYNAMODB_EXCLUSIVE_START_TABLE: Final = ( - "aws.dynamodb.exclusive_start_table" -) +AWS_DYNAMODB_EXCLUSIVE_START_TABLE: Final = "aws.dynamodb.exclusive_start_table" """ The value of the `ExclusiveStartTableName` request parameter. """ -AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: Final = ( - "aws.dynamodb.global_secondary_index_updates" -) +AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES: Final = "aws.dynamodb.global_secondary_index_updates" """ The JSON-serialized value of each item in the `GlobalSecondaryIndexUpdates` request field. """ -AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: Final = ( - "aws.dynamodb.global_secondary_indexes" -) +AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES: Final = "aws.dynamodb.global_secondary_indexes" """ The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. """ @@ -67,9 +59,7 @@ The value of the `IndexName` request parameter. """ -AWS_DYNAMODB_ITEM_COLLECTION_METRICS: Final = ( - "aws.dynamodb.item_collection_metrics" -) +AWS_DYNAMODB_ITEM_COLLECTION_METRICS: Final = "aws.dynamodb.item_collection_metrics" """ The JSON-serialized value of the `ItemCollectionMetrics` response field. """ @@ -79,9 +69,7 @@ The value of the `Limit` request parameter. """ -AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: Final = ( - "aws.dynamodb.local_secondary_indexes" -) +AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES: Final = "aws.dynamodb.local_secondary_indexes" """ The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. """ @@ -91,16 +79,12 @@ The value of the `ProjectionExpression` request parameter. """ -AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: Final = ( - "aws.dynamodb.provisioned_read_capacity" -) +AWS_DYNAMODB_PROVISIONED_READ_CAPACITY: Final = "aws.dynamodb.provisioned_read_capacity" """ The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. """ -AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: Final = ( - "aws.dynamodb.provisioned_write_capacity" -) +AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY: Final = "aws.dynamodb.provisioned_write_capacity" """ The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. """ @@ -319,9 +303,7 @@ The ARN of the AWS Step Functions Activity. """ -AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN: Final = ( - "aws.step_functions.state_machine.arn" -) +AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN: Final = "aws.step_functions.state_machine.arn" """ The ARN of the AWS Step Functions State Machine. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/azure_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/azure_attributes.py index e6f59ed5ddf..fb1a7f1ed50 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/azure_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/azure_attributes.py @@ -19,17 +19,13 @@ Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). """ -AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS: Final = ( - "azure.cosmosdb.operation.contacted_regions" -) +AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS: Final = "azure.cosmosdb.operation.contacted_regions" """ List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. Note: Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations). """ -AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = ( - "azure.cosmosdb.operation.request_charge" -) +AZURE_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = "azure.cosmosdb.operation.request_charge" """ The number of request units consumed by the operation. """ @@ -39,9 +35,7 @@ Request payload size in bytes. """ -AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE: Final = ( - "azure.cosmosdb.response.sub_status_code" -) +AZURE_COSMOSDB_RESPONSE_SUB_STATUS_CODE: Final = "azure.cosmosdb.response.sub_status_code" """ Cosmos DB sub status code. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cassandra_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cassandra_attributes.py index 5084407eff9..976a5f74fb8 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cassandra_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/cassandra_attributes.py @@ -29,9 +29,7 @@ Whether or not the query is idempotent. """ -CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = ( - "cassandra.speculative_execution.count" -) +CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = "cassandra.speculative_execution.count" """ The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/container_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/container_attributes.py index fd9de402c49..c8cdd01e366 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/container_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/container_attributes.py @@ -104,9 +104,7 @@ """ -@deprecated( - "The attribute container.cpu.state is deprecated - Replaced by `cpu.mode`" -) +@deprecated("The attribute container.cpu.state is deprecated - Replaced by `cpu.mode`") class ContainerCpuStateValues(Enum): USER = "user" """When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows).""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/db_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/db_attributes.py index 39097bce1bb..790f61c71c9 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/db_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/db_attributes.py @@ -31,9 +31,7 @@ Deprecated: Replaced by `cassandra.page.size`. """ -DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = ( - "db.cassandra.speculative_execution_count" -) +DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT: Final = "db.cassandra.speculative_execution_count" """ Deprecated: Replaced by `cassandra.speculative_execution.count`. """ @@ -108,9 +106,7 @@ Deprecated: Replaced by `azure.cosmosdb.operation.request_charge`. """ -DB_COSMOSDB_REQUEST_CONTENT_LENGTH: Final = ( - "db.cosmosdb.request_content_length" -) +DB_COSMOSDB_REQUEST_CONTENT_LENGTH: Final = "db.cosmosdb.request_content_length" """ Deprecated: Replaced by `azure.cosmosdb.request.body.size`. """ @@ -274,9 +270,7 @@ """ -@deprecated( - "The attribute db.cassandra.consistency_level is deprecated - Replaced by `cassandra.consistency.level`" -) +@deprecated("The attribute db.cassandra.consistency_level is deprecated - Replaced by `cassandra.consistency.level`") class DbCassandraConsistencyLevelValues(Enum): ALL = "all" """all.""" @@ -309,9 +303,7 @@ class DbClientConnectionStateValues(Enum): """used.""" -@deprecated( - "The attribute db.client.connections.state is deprecated - Replaced by `db.client.connection.state`" -) +@deprecated("The attribute db.client.connections.state is deprecated - Replaced by `db.client.connection.state`") class DbClientConnectionsStateValues(Enum): IDLE = "idle" """idle.""" @@ -319,9 +311,7 @@ class DbClientConnectionsStateValues(Enum): """used.""" -@deprecated( - "The attribute db.cosmosdb.connection_mode is deprecated - Replaced by `azure.cosmosdb.connection.mode`" -) +@deprecated("The attribute db.cosmosdb.connection_mode is deprecated - Replaced by `azure.cosmosdb.connection.mode`") class DbCosmosdbConnectionModeValues(Enum): GATEWAY = "gateway" """Gateway (HTTP) connection.""" @@ -345,9 +335,7 @@ class DbCosmosdbConsistencyLevelValues(Enum): """consistent_prefix.""" -@deprecated( - "The attribute db.cosmosdb.operation_type is deprecated - Removed, no replacement at this time" -) +@deprecated("The attribute db.cosmosdb.operation_type is deprecated - Removed, no replacement at this time") class DbCosmosdbOperationTypeValues(Enum): BATCH = "batch" """batch.""" @@ -381,9 +369,7 @@ class DbCosmosdbOperationTypeValues(Enum): """upsert.""" -@deprecated( - "The attribute db.system is deprecated - Replaced by `db.system.name`" -) +@deprecated("The attribute db.system is deprecated - Replaced by `db.system.name`") class DbSystemValues(Enum): OTHER_SQL = "other_sql" """Some other SQL database. Fallback only. See notes.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py index f6a79f0e42d..414e6d210e9 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/feature_flag_attributes.py @@ -16,9 +16,7 @@ A message providing more detail about an error that occurred during feature flag evaluation in human-readable form. """ -FEATURE_FLAG_EVALUATION_ERROR_MESSAGE: Final = ( - "feature_flag.evaluation.error.message" -) +FEATURE_FLAG_EVALUATION_ERROR_MESSAGE: Final = "feature_flag.evaluation.error.message" """ Deprecated: Replaced by `feature_flag.error.message`. """ @@ -78,9 +76,7 @@ """ -@deprecated( - "The attribute feature_flag.evaluation.reason is deprecated - Replaced by `feature_flag.result.reason`" -) +@deprecated("The attribute feature_flag.evaluation.reason is deprecated - Replaced by `feature_flag.result.reason`") class FeatureFlagEvaluationReasonValues(Enum): STATIC = "static" """The resolved value is static (no dynamic evaluation).""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py index 74ddfa77e45..b472e4cea5b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gcp_attributes.py @@ -19,17 +19,13 @@ The GCP zone or region where the application is defined. """ -GCP_APPHUB_SERVICE_CRITICALITY_TYPE: Final = ( - "gcp.apphub.service.criticality_type" -) +GCP_APPHUB_SERVICE_CRITICALITY_TYPE: Final = "gcp.apphub.service.criticality_type" """ Criticality of a service indicates its importance to the business. Note: [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type). """ -GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE: Final = ( - "gcp.apphub.service.environment_type" -) +GCP_APPHUB_SERVICE_ENVIRONMENT_TYPE: Final = "gcp.apphub.service.environment_type" """ Environment of a service is the stage of a software lifecycle. Note: [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1). @@ -40,17 +36,13 @@ The name of the service as configured in AppHub. """ -GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE: Final = ( - "gcp.apphub.workload.criticality_type" -) +GCP_APPHUB_WORKLOAD_CRITICALITY_TYPE: Final = "gcp.apphub.workload.criticality_type" """ Criticality of a workload indicates its importance to the business. Note: [See AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type). """ -GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE: Final = ( - "gcp.apphub.workload.environment_type" -) +GCP_APPHUB_WORKLOAD_ENVIRONMENT_TYPE: Final = "gcp.apphub.workload.environment_type" """ Environment of a workload is the stage of a software lifecycle. Note: [See AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1). @@ -61,37 +53,27 @@ The name of the workload as configured in AppHub. """ -GCP_APPHUB_DESTINATION_APPLICATION_CONTAINER: Final = ( - "gcp.apphub_destination.application.container" -) +GCP_APPHUB_DESTINATION_APPLICATION_CONTAINER: Final = "gcp.apphub_destination.application.container" """ The container within GCP where the AppHub destination application is defined. """ -GCP_APPHUB_DESTINATION_APPLICATION_ID: Final = ( - "gcp.apphub_destination.application.id" -) +GCP_APPHUB_DESTINATION_APPLICATION_ID: Final = "gcp.apphub_destination.application.id" """ The name of the destination application as configured in AppHub. """ -GCP_APPHUB_DESTINATION_APPLICATION_LOCATION: Final = ( - "gcp.apphub_destination.application.location" -) +GCP_APPHUB_DESTINATION_APPLICATION_LOCATION: Final = "gcp.apphub_destination.application.location" """ The GCP zone or region where the destination application is defined. """ -GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE: Final = ( - "gcp.apphub_destination.service.criticality_type" -) +GCP_APPHUB_DESTINATION_SERVICE_CRITICALITY_TYPE: Final = "gcp.apphub_destination.service.criticality_type" """ Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type). """ -GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE: Final = ( - "gcp.apphub_destination.service.environment_type" -) +GCP_APPHUB_DESTINATION_SERVICE_ENVIRONMENT_TYPE: Final = "gcp.apphub_destination.service.environment_type" """ Software lifecycle stage of a destination service as defined [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1). """ @@ -101,23 +83,17 @@ The name of the destination service as configured in AppHub. """ -GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE: Final = ( - "gcp.apphub_destination.workload.criticality_type" -) +GCP_APPHUB_DESTINATION_WORKLOAD_CRITICALITY_TYPE: Final = "gcp.apphub_destination.workload.criticality_type" """ Criticality of a destination workload indicates its importance to the business as specified in [AppHub type enum](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type). """ -GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE: Final = ( - "gcp.apphub_destination.workload.environment_type" -) +GCP_APPHUB_DESTINATION_WORKLOAD_ENVIRONMENT_TYPE: Final = "gcp.apphub_destination.workload.environment_type" """ Environment of a destination workload is the stage of a software lifecycle as provided in the [AppHub environment type](https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1). """ -GCP_APPHUB_DESTINATION_WORKLOAD_ID: Final = ( - "gcp.apphub_destination.workload.id" -) +GCP_APPHUB_DESTINATION_WORKLOAD_ID: Final = "gcp.apphub_destination.workload.id" """ The name of the destination workload as configured in AppHub. """ @@ -154,23 +130,17 @@ The instance name of a GCE instance. This is the value provided by `host.name`, the visible name of the instance in the Cloud Console UI, and the prefix for the default hostname of the instance as defined by the [default internal DNS name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). """ -GCP_GCE_INSTANCE_GROUP_MANAGER_NAME: Final = ( - "gcp.gce.instance_group_manager.name" -) +GCP_GCE_INSTANCE_GROUP_MANAGER_NAME: Final = "gcp.gce.instance_group_manager.name" """ The name of the Instance Group Manager (IGM) that manages this VM, if any. """ -GCP_GCE_INSTANCE_GROUP_MANAGER_REGION: Final = ( - "gcp.gce.instance_group_manager.region" -) +GCP_GCE_INSTANCE_GROUP_MANAGER_REGION: Final = "gcp.gce.instance_group_manager.region" """ The region of a **regional** Instance Group Manager (e.g., `us-central1`). Set this **only** when the IGM is regional. """ -GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE: Final = ( - "gcp.gce.instance_group_manager.zone" -) +GCP_GCE_INSTANCE_GROUP_MANAGER_ZONE: Final = "gcp.gce.instance_group_manager.zone" """ The zone of a **zonal** Instance Group Manager (e.g., `us-central1-a`). Set this **only** when the IGM is zonal. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py index 640babc5679..b4635b76735 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/gen_ai_attributes.py @@ -71,9 +71,7 @@ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT: Final = ( - "gen_ai.openai.request.response_format" -) +GEN_AI_OPENAI_REQUEST_RESPONSE_FORMAT: Final = "gen_ai.openai.request.response_format" """ Deprecated: Replaced by `gen_ai.output.type`, which has moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ @@ -83,23 +81,17 @@ Deprecated: Replaced by `gen_ai.request.seed`, which has moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_OPENAI_REQUEST_SERVICE_TIER: Final = ( - "gen_ai.openai.request.service_tier" -) +GEN_AI_OPENAI_REQUEST_SERVICE_TIER: Final = "gen_ai.openai.request.service_tier" """ Deprecated: Replaced by `openai.request.service_tier`, which has moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_OPENAI_RESPONSE_SERVICE_TIER: Final = ( - "gen_ai.openai.response.service_tier" -) +GEN_AI_OPENAI_RESPONSE_SERVICE_TIER: Final = "gen_ai.openai.response.service_tier" """ Deprecated: Replaced by `openai.response.service_tier`, which has moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT: Final = ( - "gen_ai.openai.response.system_fingerprint" -) +GEN_AI_OPENAI_RESPONSE_SYSTEM_FINGERPRINT: Final = "gen_ai.openai.response.system_fingerprint" """ Deprecated: Replaced by `openai.response.system_fingerprint`, which has moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ @@ -209,9 +201,7 @@ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK: Final = ( - "gen_ai.response.time_to_first_chunk" -) +GEN_AI_RESPONSE_TIME_TO_FIRST_CHUNK: Final = "gen_ai.response.time_to_first_chunk" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ @@ -276,16 +266,12 @@ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS: Final = ( - "gen_ai.usage.cache_creation.input_tokens" -) +GEN_AI_USAGE_CACHE_CREATION_INPUT_TOKENS: Final = "gen_ai.usage.cache_creation.input_tokens" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS: Final = ( - "gen_ai.usage.cache_read.input_tokens" -) +GEN_AI_USAGE_CACHE_READ_INPUT_TOKENS: Final = "gen_ai.usage.cache_read.input_tokens" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ @@ -310,9 +296,7 @@ Deprecated: Replaced by `gen_ai.usage.input_tokens`, which has moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -GEN_AI_USAGE_REASONING_OUTPUT_TOKENS: Final = ( - "gen_ai.usage.reasoning.output_tokens" -) +GEN_AI_USAGE_REASONING_OUTPUT_TOKENS: Final = "gen_ai.usage.reasoning.output_tokens" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/http_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/http_attributes.py index 7b27c36d48d..f9f77d198c6 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/http_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/http_attributes.py @@ -66,9 +66,7 @@ Deprecated: Replaced by `http.request.header.content-length`. """ -HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: Final = ( - "http.request_content_length_uncompressed" -) +HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED: Final = "http.request_content_length_uncompressed" """ Deprecated: Replaced by `http.request.body.size`. """ @@ -98,9 +96,7 @@ Deprecated: Replaced by `http.response.header.content-length`. """ -HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: Final = ( - "http.response_content_length_uncompressed" -) +HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED: Final = "http.response_content_length_uncompressed" """ Deprecated: Replaced by `http.response.body.size`. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py index 782475f88e2..0b2eed32e52 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/k8s_attributes.py @@ -14,9 +14,7 @@ Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.k8s_attributes.K8S_CLUSTER_UID`. """ -K8S_CONTAINER_EPHEMERAL_STORAGE_FS_TYPE: Final = ( - "k8s.container.ephemeral_storage.fs_type" -) +K8S_CONTAINER_EPHEMERAL_STORAGE_FS_TYPE: Final = "k8s.container.ephemeral_storage.fs_type" """ The type of file system component for ephemeral storage. Note: Eviction decisions based on ephemeral-storage resource limits are made based on the total container usage. @@ -32,9 +30,7 @@ Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.k8s_attributes.K8S_CONTAINER_RESTART_COUNT`. """ -K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON: Final = ( - "k8s.container.status.last_terminated_reason" -) +K8S_CONTAINER_STATUS_LAST_TERMINATED_REASON: Final = "k8s.container.status.last_terminated_reason" """ Last terminated reason of the Container. """ @@ -120,9 +116,7 @@ The name of the horizontal pod autoscaler. """ -K8S_HPA_SCALETARGETREF_API_VERSION: Final = ( - "k8s.hpa.scaletargetref.api_version" -) +K8S_HPA_SCALETARGETREF_API_VERSION: Final = "k8s.hpa.scaletargetref.api_version" """ The API version of the target resource to scale for the HorizontalPodAutoscaler. Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA spec. @@ -238,9 +232,7 @@ Deprecated in favor of stable :py:const:`opentelemetry.semconv.attributes.k8s_attributes.K8S_NODE_UID`. """ -K8S_PERSISTENTVOLUME_ANNOTATION_TEMPLATE: Final = ( - "k8s.persistentvolume.annotation" -) +K8S_PERSISTENTVOLUME_ANNOTATION_TEMPLATE: Final = "k8s.persistentvolume.annotation" """ The annotation placed on the PersistentVolume, the `` being the annotation name, the value being the annotation value, even if the value is empty. Note: Examples: @@ -267,9 +259,7 @@ The name of the PersistentVolume. """ -K8S_PERSISTENTVOLUME_RECLAIM_POLICY: Final = ( - "k8s.persistentvolume.reclaim_policy" -) +K8S_PERSISTENTVOLUME_RECLAIM_POLICY: Final = "k8s.persistentvolume.reclaim_policy" """ The reclaim policy of the PersistentVolume. Note: This attribute aligns with the `persistentVolumeReclaimPolicy` field of the @@ -288,9 +278,7 @@ The UID of the PersistentVolume. """ -K8S_PERSISTENTVOLUMECLAIM_ANNOTATION_TEMPLATE: Final = ( - "k8s.persistentvolumeclaim.annotation" -) +K8S_PERSISTENTVOLUMECLAIM_ANNOTATION_TEMPLATE: Final = "k8s.persistentvolumeclaim.annotation" """ The annotation placed on the PersistentVolumeClaim, the `` being the annotation name, the value being the annotation value, even if the value is empty. Note: Examples: @@ -301,9 +289,7 @@ the `k8s.persistentvolumeclaim.annotation.data` attribute with value `""`. """ -K8S_PERSISTENTVOLUMECLAIM_LABEL_TEMPLATE: Final = ( - "k8s.persistentvolumeclaim.label" -) +K8S_PERSISTENTVOLUMECLAIM_LABEL_TEMPLATE: Final = "k8s.persistentvolumeclaim.label" """ The label placed on the PersistentVolumeClaim, the `` being the label name, the value being the label value, even if the value is empty. Note: Examples: @@ -319,9 +305,7 @@ The name of the PersistentVolumeClaim. """ -K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE: Final = ( - "k8s.persistentvolumeclaim.status.phase" -) +K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE: Final = "k8s.persistentvolumeclaim.status.phase" """ The phase of the PersistentVolumeClaim. Note: This attribute aligns with the `phase` field of the @@ -487,9 +471,7 @@ The name of the Service. """ -K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES: Final = ( - "k8s.service.publish_not_ready_addresses" -) +K8S_SERVICE_PUBLISH_NOT_READY_ADDRESSES: Final = "k8s.service.publish_not_ready_addresses" """ Whether the Service publishes not-ready endpoints. Note: Whether the Service is configured to publish endpoints before the pods are ready. diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/linux_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/linux_attributes.py index 2c651cbed22..6a8ffb4199b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/linux_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/linux_attributes.py @@ -12,9 +12,7 @@ """ -@deprecated( - "The attribute linux.memory.slab.state is deprecated - Replaced by `system.memory.linux.slab.state`" -) +@deprecated("The attribute linux.memory.slab.state is deprecated - Replaced by `system.memory.linux.slab.state`") class LinuxMemorySlabStateValues(Enum): RECLAIMABLE = "reclaimable" """reclaimable.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/mcp_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/mcp_attributes.py index 75cc9af5394..4f48aff6e14 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/mcp_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/mcp_attributes.py @@ -47,9 +47,7 @@ class McpMethodNameValues(Enum): """Request to list resource templates available on server.""" RESOURCES_READ = "resources/read" """Request to read a resource.""" - NOTIFICATIONS_RESOURCES_LIST_CHANGED = ( - "notifications/resources/list_changed" - ) + NOTIFICATIONS_RESOURCES_LIST_CHANGED = "notifications/resources/list_changed" """Notification indicating that the list of resources has changed.""" RESOURCES_SUBSCRIBE = "resources/subscribe" """Request to subscribe to a resource.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py index 31741dce2c9..07f9f3eca03 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/message_attributes.py @@ -27,9 +27,7 @@ """ -@deprecated( - "The attribute message.type is deprecated - Deprecated, no replacement at this time" -) +@deprecated("The attribute message.type is deprecated - Deprecated, no replacement at this time") class MessageTypeValues(Enum): SENT = "SENT" """sent.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/messaging_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/messaging_attributes.py index 032638f8f85..e652d6cd3ce 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/messaging_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/messaging_attributes.py @@ -33,16 +33,12 @@ the broker doesn't have such notion, the destination name SHOULD uniquely identify the broker. """ -MESSAGING_DESTINATION_PARTITION_ID: Final = ( - "messaging.destination.partition.id" -) +MESSAGING_DESTINATION_PARTITION_ID: Final = "messaging.destination.partition.id" """ The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. """ -MESSAGING_DESTINATION_SUBSCRIPTION_NAME: Final = ( - "messaging.destination.subscription.name" -) +MESSAGING_DESTINATION_SUBSCRIPTION_NAME: Final = "messaging.destination.subscription.name" """ The name of the destination subscription from which a message is consumed. Note: Semantic conventions for individual messaging systems SHOULD document whether `messaging.destination.subscription.name` is applicable and what it means in the context of that system. @@ -59,58 +55,42 @@ A boolean that is true if the message destination is temporary and might not exist anymore after messages are processed. """ -MESSAGING_DESTINATION_PUBLISH_ANONYMOUS: Final = ( - "messaging.destination_publish.anonymous" -) +MESSAGING_DESTINATION_PUBLISH_ANONYMOUS: Final = "messaging.destination_publish.anonymous" """ Deprecated: Removed. No replacement at this time. """ -MESSAGING_DESTINATION_PUBLISH_NAME: Final = ( - "messaging.destination_publish.name" -) +MESSAGING_DESTINATION_PUBLISH_NAME: Final = "messaging.destination_publish.name" """ Deprecated: Removed. No replacement at this time. """ -MESSAGING_EVENTHUBS_CONSUMER_GROUP: Final = ( - "messaging.eventhubs.consumer.group" -) +MESSAGING_EVENTHUBS_CONSUMER_GROUP: Final = "messaging.eventhubs.consumer.group" """ Deprecated: Replaced by `messaging.consumer.group.name`. """ -MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME: Final = ( - "messaging.eventhubs.message.enqueued_time" -) +MESSAGING_EVENTHUBS_MESSAGE_ENQUEUED_TIME: Final = "messaging.eventhubs.message.enqueued_time" """ The UTC epoch seconds at which the message has been accepted and stored in the entity. """ -MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE: Final = ( - "messaging.gcp_pubsub.message.ack_deadline" -) +MESSAGING_GCP_PUBSUB_MESSAGE_ACK_DEADLINE: Final = "messaging.gcp_pubsub.message.ack_deadline" """ The ack deadline in seconds set for the modify ack deadline request. """ -MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID: Final = ( - "messaging.gcp_pubsub.message.ack_id" -) +MESSAGING_GCP_PUBSUB_MESSAGE_ACK_ID: Final = "messaging.gcp_pubsub.message.ack_id" """ The ack id for a given message. """ -MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT: Final = ( - "messaging.gcp_pubsub.message.delivery_attempt" -) +MESSAGING_GCP_PUBSUB_MESSAGE_DELIVERY_ATTEMPT: Final = "messaging.gcp_pubsub.message.delivery_attempt" """ The delivery attempt for a given message. """ -MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY: Final = ( - "messaging.gcp_pubsub.message.ordering_key" -) +MESSAGING_GCP_PUBSUB_MESSAGE_ORDERING_KEY: Final = "messaging.gcp_pubsub.message.ordering_key" """ The ordering key for a given message. If the attribute is not present, the message does not have an ordering key. """ @@ -120,9 +100,7 @@ Deprecated: Replaced by `messaging.consumer.group.name`. """ -MESSAGING_KAFKA_DESTINATION_PARTITION: Final = ( - "messaging.kafka.destination.partition" -) +MESSAGING_KAFKA_DESTINATION_PARTITION: Final = "messaging.kafka.destination.partition" """ Deprecated: Record string representation of the partition id in `messaging.destination.partition.id` attribute. """ @@ -188,16 +166,12 @@ Note: If a custom value is used, it MUST be of low cardinality. """ -MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY: Final = ( - "messaging.rabbitmq.destination.routing_key" -) +MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY: Final = "messaging.rabbitmq.destination.routing_key" """ RabbitMQ message routing key. """ -MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG: Final = ( - "messaging.rabbitmq.message.delivery_tag" -) +MESSAGING_RABBITMQ_MESSAGE_DELIVERY_TAG: Final = "messaging.rabbitmq.message.delivery_tag" """ RabbitMQ message delivery tag. """ @@ -207,23 +181,17 @@ Deprecated: Replaced by `messaging.consumer.group.name` on the consumer spans. No replacement for producer spans. """ -MESSAGING_ROCKETMQ_CONSUMPTION_MODEL: Final = ( - "messaging.rocketmq.consumption_model" -) +MESSAGING_ROCKETMQ_CONSUMPTION_MODEL: Final = "messaging.rocketmq.consumption_model" """ Model of message consumption. This only applies to consumer spans. """ -MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL: Final = ( - "messaging.rocketmq.message.delay_time_level" -) +MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL: Final = "messaging.rocketmq.message.delay_time_level" """ The delay time level for delay message, which determines the message delay time. """ -MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP: Final = ( - "messaging.rocketmq.message.delivery_timestamp" -) +MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP: Final = "messaging.rocketmq.message.delivery_timestamp" """ The timestamp in milliseconds that the delay message is expected to be delivered to consumer. """ @@ -253,30 +221,22 @@ Namespace of RocketMQ resources, resources in different namespaces are individual. """ -MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME: Final = ( - "messaging.servicebus.destination.subscription_name" -) +MESSAGING_SERVICEBUS_DESTINATION_SUBSCRIPTION_NAME: Final = "messaging.servicebus.destination.subscription_name" """ Deprecated: Replaced by `messaging.destination.subscription.name`. """ -MESSAGING_SERVICEBUS_DISPOSITION_STATUS: Final = ( - "messaging.servicebus.disposition_status" -) +MESSAGING_SERVICEBUS_DISPOSITION_STATUS: Final = "messaging.servicebus.disposition_status" """ Describes the [settlement type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). """ -MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT: Final = ( - "messaging.servicebus.message.delivery_count" -) +MESSAGING_SERVICEBUS_MESSAGE_DELIVERY_COUNT: Final = "messaging.servicebus.message.delivery_count" """ Number of deliveries that have been attempted for this message. """ -MESSAGING_SERVICEBUS_MESSAGE_ENQUEUED_TIME: Final = ( - "messaging.servicebus.message.enqueued_time" -) +MESSAGING_SERVICEBUS_MESSAGE_ENQUEUED_TIME: Final = "messaging.servicebus.message.enqueued_time" """ The UTC epoch seconds at which the message has been accepted and stored in the entity. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/net_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/net_attributes.py index 7c34ac3d997..25304531a82 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/net_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/net_attributes.py @@ -82,9 +82,7 @@ """ -@deprecated( - "The attribute net.sock.family is deprecated - Split to `network.transport` and `network.type`" -) +@deprecated("The attribute net.sock.family is deprecated - Split to `network.transport` and `network.type`") class NetSockFamilyValues(Enum): INET = "inet" """IPv4 address.""" @@ -94,9 +92,7 @@ class NetSockFamilyValues(Enum): """Unix domain socket path.""" -@deprecated( - "The attribute net.transport is deprecated - Replaced by `network.transport`" -) +@deprecated("The attribute net.transport is deprecated - Replaced by `network.transport`") class NetTransportValues(Enum): IP_TCP = "ip_tcp" """ip_tcp.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py index 460395fc698..50558205bab 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/openai_attributes.py @@ -21,9 +21,7 @@ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ -OPENAI_RESPONSE_SYSTEM_FINGERPRINT: Final = ( - "openai.response.system_fingerprint" -) +OPENAI_RESPONSE_SYSTEM_FINGERPRINT: Final = "openai.response.system_fingerprint" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/otel_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/otel_attributes.py index 6973d4bdf59..af58882caf1 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/otel_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/otel_attributes.py @@ -113,9 +113,7 @@ class OtelComponentTypeValues(Enum): """OTLP metric exporter over HTTP with protobuf serialization.""" OTLP_HTTP_JSON_METRIC_EXPORTER = "otlp_http_json_metric_exporter" """OTLP metric exporter over HTTP with JSON serialization.""" - PROMETHEUS_HTTP_TEXT_METRIC_EXPORTER = ( - "prometheus_http_text_metric_exporter" - ) + PROMETHEUS_HTTP_TEXT_METRIC_EXPORTER = "prometheus_http_text_metric_exporter" """Prometheus metric exporter over HTTP with the default text-based format.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/other_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/other_attributes.py index 754dd8e0077..ef9a5a9af16 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/other_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/other_attributes.py @@ -12,9 +12,7 @@ """ -@deprecated( - "The attribute state is deprecated - Replaced by `db.client.connection.state`" -) +@deprecated("The attribute state is deprecated - Replaced by `db.client.connection.state`") class StateValues(Enum): IDLE = "idle" """idle.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/process_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/process_attributes.py index 4dea13dbddd..84d151c1be8 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/process_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/process_attributes.py @@ -65,9 +65,7 @@ The Go build ID as retrieved by `go tool buildid `. """ -PROCESS_EXECUTABLE_BUILD_ID_HTLHASH: Final = ( - "process.executable.build_id.htlhash" -) +PROCESS_EXECUTABLE_BUILD_ID_HTLHASH: Final = "process.executable.build_id.htlhash" """ Deterministic build ID for executables. Note: GNU and Go build IDs may be stripped or unavailable in some environments @@ -85,9 +83,7 @@ represented as a hex string. """ -PROCESS_EXECUTABLE_BUILD_ID_PROFILING: Final = ( - "process.executable.build_id.profiling" -) +PROCESS_EXECUTABLE_BUILD_ID_PROFILING: Final = "process.executable.build_id.profiling" """ Deprecated: Replaced by `process.executable.build_id.htlhash`. """ @@ -228,9 +224,7 @@ class ProcessContextSwitchTypeValues(Enum): """involuntary.""" -@deprecated( - "The attribute process.cpu.state is deprecated - Replaced by `cpu.mode`" -) +@deprecated("The attribute process.cpu.state is deprecated - Replaced by `cpu.mode`") class ProcessCpuStateValues(Enum): SYSTEM = "system" """system.""" @@ -240,9 +234,7 @@ class ProcessCpuStateValues(Enum): """wait.""" -@deprecated( - "The attribute process.paging.fault_type is deprecated - Replaced by `system.paging.fault.type`" -) +@deprecated("The attribute process.paging.fault_type is deprecated - Replaced by `system.paging.fault.type`") class ProcessPagingFaultTypeValues(Enum): MAJOR = "major" """major.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py index e05dd09e27d..56a42ba1b1d 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/rpc_attributes.py @@ -11,16 +11,12 @@ Deprecated: Replaced by `rpc.response.status_code`. """ -RPC_CONNECT_RPC_REQUEST_METADATA_TEMPLATE: Final = ( - "rpc.connect_rpc.request.metadata" -) +RPC_CONNECT_RPC_REQUEST_METADATA_TEMPLATE: Final = "rpc.connect_rpc.request.metadata" """ Deprecated: Replaced by `rpc.request.metadata`. """ -RPC_CONNECT_RPC_RESPONSE_METADATA_TEMPLATE: Final = ( - "rpc.connect_rpc.response.metadata" -) +RPC_CONNECT_RPC_RESPONSE_METADATA_TEMPLATE: Final = "rpc.connect_rpc.response.metadata" """ Deprecated: Replaced by `rpc.response.metadata`. """ @@ -157,9 +153,7 @@ """ -@deprecated( - "The attribute rpc.connect_rpc.error_code is deprecated - Replaced by `rpc.response.status_code`" -) +@deprecated("The attribute rpc.connect_rpc.error_code is deprecated - Replaced by `rpc.response.status_code`") class RpcConnectRpcErrorCodeValues(Enum): CANCELLED = "cancelled" """cancelled.""" @@ -235,9 +229,7 @@ class RpcGrpcStatusCodeValues(Enum): """UNAUTHENTICATED.""" -@deprecated( - "The attribute rpc.message.type is deprecated - Deprecated, no replacement at this time" -) +@deprecated("The attribute rpc.message.type is deprecated - Deprecated, no replacement at this time") class RpcMessageTypeValues(Enum): SENT = "SENT" """sent.""" @@ -245,9 +237,7 @@ class RpcMessageTypeValues(Enum): """received.""" -@deprecated( - "The attribute rpc.system is deprecated - Replaced by `rpc.system.name`" -) +@deprecated("The attribute rpc.system is deprecated - Replaced by `rpc.system.name`") class RpcSystemValues(Enum): GRPC = "grpc" """gRPC.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py index fe5cec3ada9..4873f7a5f53 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/system_attributes.py @@ -41,9 +41,7 @@ The filesystem type. """ -SYSTEM_MEMORY_LINUX_HUGEPAGES_STATE: Final = ( - "system.memory.linux.hugepages.state" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_STATE: Final = "system.memory.linux.hugepages.state" """ The Linux HugePages memory state. """ @@ -94,9 +92,7 @@ """ -@deprecated( - "The attribute system.cpu.state is deprecated - Replaced by `cpu.mode`" -) +@deprecated("The attribute system.cpu.state is deprecated - Replaced by `cpu.mode`") class SystemCpuStateValues(Enum): USER = "user" """user.""" @@ -165,9 +161,7 @@ class SystemMemoryStateValues(Enum): """cached.""" -@deprecated( - "The attribute system.network.state is deprecated - Replaced by `network.connection.state`" -) +@deprecated("The attribute system.network.state is deprecated - Replaced by `network.connection.state`") class SystemNetworkStateValues(Enum): CLOSE = "close" """close.""" @@ -216,9 +210,7 @@ class SystemPagingStateValues(Enum): """free.""" -@deprecated( - "The attribute system.paging.type is deprecated - Replaced by `system.paging.fault.type`" -) +@deprecated("The attribute system.paging.type is deprecated - Replaced by `system.paging.fault.type`") class SystemPagingTypeValues(Enum): MAJOR = "major" """major.""" @@ -226,9 +218,7 @@ class SystemPagingTypeValues(Enum): """minor.""" -@deprecated( - "The attribute system.process.status is deprecated - Replaced by `process.state`" -) +@deprecated("The attribute system.process.status is deprecated - Replaced by `process.state`") class SystemProcessStatusValues(Enum): RUNNING = "running" """running.""" @@ -240,9 +230,7 @@ class SystemProcessStatusValues(Enum): """defunct.""" -@deprecated( - "The attribute system.processes.status is deprecated - Replaced by `process.state`" -) +@deprecated("The attribute system.processes.status is deprecated - Replaced by `process.state`") class SystemProcessesStatusValues(Enum): RUNNING = "running" """running.""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/vcs_attributes.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/vcs_attributes.py index 0180d06c89a..b56f26c9f4a 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/vcs_attributes.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/attributes/vcs_attributes.py @@ -203,9 +203,7 @@ class VcsRefTypeValues(Enum): """[tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag).""" -@deprecated( - "The attribute vcs.repository.ref.type is deprecated - Replaced by `vcs.ref.head.type`" -) +@deprecated("The attribute vcs.repository.ref.type is deprecated - Replaced by `vcs.ref.head.type`") class VcsRepositoryRefTypeValues(Enum): BRANCH = "branch" """[branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch).""" diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/azure_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/azure_metrics.py index 80fa43fabe4..f107448e50a 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/azure_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/azure_metrics.py @@ -6,9 +6,7 @@ from opentelemetry.metrics import Histogram, Meter, UpDownCounter -AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT: Final = ( - "azure.cosmosdb.client.active_instance.count" -) +AZURE_COSMOSDB_CLIENT_ACTIVE_INSTANCE_COUNT: Final = "azure.cosmosdb.client.active_instance.count" """ Number of active client instances Instrument: updowncounter @@ -27,9 +25,7 @@ def create_azure_cosmosdb_client_active_instance_count( ) -AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE: Final = ( - "azure.cosmosdb.client.operation.request_charge" -) +AZURE_COSMOSDB_CLIENT_OPERATION_REQUEST_CHARGE: Final = "azure.cosmosdb.client.operation.request_charge" """ [Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation Instrument: histogram diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/container_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/container_metrics.py index c80c6fed954..a5d650d49de 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/container_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/container_metrics.py @@ -15,10 +15,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] CONTAINER_CPU_TIME: Final = "container.cpu.time" @@ -48,9 +45,7 @@ def create_container_cpu_time(meter: Meter) -> Counter: """ -def create_container_cpu_usage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_container_cpu_usage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs""" return meter.create_observable_gauge( name=CONTAINER_CPU_USAGE, @@ -266,9 +261,7 @@ def create_container_network_io(meter: Meter) -> Counter: """ -def create_container_uptime( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_container_uptime(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The time the container has been running""" return meter.create_observable_gauge( name=CONTAINER_UPTIME, diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/cpu_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/cpu_metrics.py index a1cb372c597..0771a38a72f 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/cpu_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/cpu_metrics.py @@ -14,10 +14,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] CPU_FREQUENCY: Final = "cpu.frequency" @@ -26,9 +23,7 @@ """ -def create_cpu_frequency( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_cpu_frequency(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Deprecated. Use `system.cpu.frequency` instead""" return meter.create_observable_gauge( name=CPU_FREQUENCY, @@ -59,9 +54,7 @@ def create_cpu_time(meter: Meter) -> Counter: """ -def create_cpu_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_cpu_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Deprecated. Use `system.cpu.utilization` instead""" return meter.create_observable_gauge( name=CPU_UTILIZATION, diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/db_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/db_metrics.py index 020360dcb8b..d9d13d9db85 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/db_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/db_metrics.py @@ -91,9 +91,7 @@ def create_db_client_connection_max(meter: Meter) -> UpDownCounter: ) -DB_CLIENT_CONNECTION_PENDING_REQUESTS: Final = ( - "db.client.connection.pending_requests" -) +DB_CLIENT_CONNECTION_PENDING_REQUESTS: Final = "db.client.connection.pending_requests" """ The number of current pending requests for an open connection Instrument: updowncounter @@ -223,9 +221,7 @@ def create_db_client_connections_max(meter: Meter) -> UpDownCounter: ) -DB_CLIENT_CONNECTIONS_PENDING_REQUESTS: Final = ( - "db.client.connections.pending_requests" -) +DB_CLIENT_CONNECTIONS_PENDING_REQUESTS: Final = "db.client.connections.pending_requests" """ Deprecated: Replaced by `db.client.connection.pending_requests`. """ @@ -302,9 +298,7 @@ def create_db_client_connections_wait_time(meter: Meter) -> Histogram: ) -DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT: Final = ( - "db.client.cosmosdb.active_instance.count" -) +DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNT: Final = "db.client.cosmosdb.active_instance.count" """ Deprecated: Replaced by `azure.cosmosdb.client.active_instance.count`. """ @@ -321,9 +315,7 @@ def create_db_client_cosmosdb_active_instance_count( ) -DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = ( - "db.client.cosmosdb.operation.request_charge" -) +DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGE: Final = "db.client.cosmosdb.operation.request_charge" """ Deprecated: Replaced by `azure.cosmosdb.client.operation.request_charge`. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/gen_ai_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/gen_ai_metrics.py index eb50267cf0f..1586cc8bfd2 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/gen_ai_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/gen_ai_metrics.py @@ -21,9 +21,7 @@ def create_gen_ai_client_operation_duration(meter: Meter) -> Histogram: ) -GEN_AI_CLIENT_OPERATION_TIME_PER_OUTPUT_CHUNK: Final = ( - "gen_ai.client.operation.time_per_output_chunk" -) +GEN_AI_CLIENT_OPERATION_TIME_PER_OUTPUT_CHUNK: Final = "gen_ai.client.operation.time_per_output_chunk" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ @@ -40,9 +38,7 @@ def create_gen_ai_client_operation_time_per_output_chunk( ) -GEN_AI_CLIENT_OPERATION_TIME_TO_FIRST_CHUNK: Final = ( - "gen_ai.client.operation.time_to_first_chunk" -) +GEN_AI_CLIENT_OPERATION_TIME_TO_FIRST_CHUNK: Final = "gen_ai.client.operation.time_to_first_chunk" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ @@ -89,9 +85,7 @@ def create_gen_ai_server_request_duration(meter: Meter) -> Histogram: ) -GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: Final = ( - "gen_ai.server.time_per_output_token" -) +GEN_AI_SERVER_TIME_PER_OUTPUT_TOKEN: Final = "gen_ai.server.time_per_output_token" """ Deprecated: Moved to the [OpenTelemetry GenAI semantic conventions repository](https://github.com/open-telemetry/semantic-conventions-genai). """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/hw_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/hw_metrics.py index 9bebb26311b..1b71698f3db 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/hw_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/hw_metrics.py @@ -15,10 +15,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] HW_BATTERY_CHARGE: Final = "hw.battery.charge" @@ -29,9 +26,7 @@ """ -def create_hw_battery_charge( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_battery_charge(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Remaining fraction of battery charge""" return meter.create_observable_gauge( name=HW_BATTERY_CHARGE, @@ -49,9 +44,7 @@ def create_hw_battery_charge( """ -def create_hw_battery_charge_limit( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_battery_charge_limit(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Lower limit of battery charge fraction to ensure proper operation""" return meter.create_observable_gauge( name=HW_BATTERY_CHARGE_LIMIT, @@ -69,9 +62,7 @@ def create_hw_battery_charge_limit( """ -def create_hw_battery_time_left( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_battery_time_left(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Time left before battery is completely charged or discharged""" return meter.create_observable_gauge( name=HW_BATTERY_TIME_LEFT, @@ -89,9 +80,7 @@ def create_hw_battery_time_left( """ -def create_hw_cpu_speed( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_cpu_speed(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """CPU current frequency""" return meter.create_observable_gauge( name=HW_CPU_SPEED, @@ -109,9 +98,7 @@ def create_hw_cpu_speed( """ -def create_hw_cpu_speed_limit( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_cpu_speed_limit(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """CPU maximum frequency""" return meter.create_observable_gauge( name=HW_CPU_SPEED_LIMIT, @@ -163,9 +150,7 @@ def create_hw_errors(meter: Meter) -> Counter: """ -def create_hw_fan_speed( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_fan_speed(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Fan speed in revolutions per minute""" return meter.create_observable_gauge( name=HW_FAN_SPEED, @@ -183,9 +168,7 @@ def create_hw_fan_speed( """ -def create_hw_fan_speed_limit( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_fan_speed_limit(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Speed limit in rpm""" return meter.create_observable_gauge( name=HW_FAN_SPEED_LIMIT, @@ -203,9 +186,7 @@ def create_hw_fan_speed_limit( """ -def create_hw_fan_speed_ratio( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_fan_speed_ratio(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Fan speed expressed as a fraction of its maximum speed""" return meter.create_observable_gauge( name=HW_FAN_SPEED_RATIO, @@ -274,9 +255,7 @@ def create_hw_gpu_memory_usage(meter: Meter) -> UpDownCounter: """ -def create_hw_gpu_memory_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_gpu_memory_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Fraction of GPU memory used""" return meter.create_observable_gauge( name=HW_GPU_MEMORY_UTILIZATION, @@ -294,9 +273,7 @@ def create_hw_gpu_memory_utilization( """ -def create_hw_gpu_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_gpu_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Fraction of time spent in a specific task""" return meter.create_observable_gauge( name=HW_GPU_UTILIZATION, @@ -314,9 +291,7 @@ def create_hw_gpu_utilization( """ -def create_hw_host_ambient_temperature( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_host_ambient_temperature(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Ambient (external) temperature of the physical host""" return meter.create_observable_gauge( name=HW_HOST_AMBIENT_TEMPERATURE, @@ -352,9 +327,7 @@ def create_hw_host_energy(meter: Meter) -> Counter: """ -def create_hw_host_heating_margin( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_host_heating_margin(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """By how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors""" return meter.create_observable_gauge( name=HW_HOST_HEATING_MARGIN, @@ -373,9 +346,7 @@ def create_hw_host_heating_margin( """ -def create_hw_host_power( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_host_power(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Instantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred)""" return meter.create_observable_gauge( name=HW_HOST_POWER, @@ -427,9 +398,7 @@ def create_hw_logical_disk_usage(meter: Meter) -> UpDownCounter: """ -def create_hw_logical_disk_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_logical_disk_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Logical disk space utilization as a fraction""" return meter.create_observable_gauge( name=HW_LOGICAL_DISK_UTILIZATION, @@ -481,9 +450,7 @@ def create_hw_network_bandwidth_limit(meter: Meter) -> UpDownCounter: """ -def create_hw_network_bandwidth_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_network_bandwidth_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Utilization of the network bandwidth as a fraction""" return meter.create_observable_gauge( name=HW_NETWORK_BANDWIDTH_UTILIZATION, @@ -544,9 +511,7 @@ def create_hw_network_up(meter: Meter) -> UpDownCounter: ) -HW_PHYSICAL_DISK_ENDURANCE_UTILIZATION: Final = ( - "hw.physical_disk.endurance_utilization" -) +HW_PHYSICAL_DISK_ENDURANCE_UTILIZATION: Final = "hw.physical_disk.endurance_utilization" """ Endurance remaining for this SSD disk Instrument: gauge @@ -591,9 +556,7 @@ def create_hw_physical_disk_size(meter: Meter) -> UpDownCounter: """ -def create_hw_physical_disk_smart( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_physical_disk_smart(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Value of the corresponding [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attribute""" return meter.create_observable_gauge( name=HW_PHYSICAL_DISK_SMART, @@ -612,9 +575,7 @@ def create_hw_physical_disk_smart( """ -def create_hw_power( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_power(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Instantaneous power consumed by the component""" return meter.create_observable_gauge( name=HW_POWER, @@ -666,9 +627,7 @@ def create_hw_power_supply_usage(meter: Meter) -> UpDownCounter: """ -def create_hw_power_supply_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_power_supply_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Utilization of the power supply as a fraction of its maximum output""" return meter.create_observable_gauge( name=HW_POWER_SUPPLY_UTILIZATION, @@ -721,9 +680,7 @@ def create_hw_tape_drive_operations(meter: Meter) -> Counter: """ -def create_hw_temperature( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_temperature(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Temperature in degrees Celsius""" return meter.create_observable_gauge( name=HW_TEMPERATURE, @@ -741,9 +698,7 @@ def create_hw_temperature( """ -def create_hw_temperature_limit( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_temperature_limit(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Temperature limit in degrees Celsius""" return meter.create_observable_gauge( name=HW_TEMPERATURE_LIMIT, @@ -761,9 +716,7 @@ def create_hw_temperature_limit( """ -def create_hw_voltage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_voltage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Voltage measured by the sensor""" return meter.create_observable_gauge( name=HW_VOLTAGE, @@ -781,9 +734,7 @@ def create_hw_voltage( """ -def create_hw_voltage_limit( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_voltage_limit(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Voltage limit in Volts""" return meter.create_observable_gauge( name=HW_VOLTAGE_LIMIT, @@ -801,9 +752,7 @@ def create_hw_voltage_limit( """ -def create_hw_voltage_nominal( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_hw_voltage_nominal(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Nominal (expected) voltage""" return meter.create_observable_gauge( name=HW_VOLTAGE_NOMINAL, diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py index 014a25446e9..28aea9632e0 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/k8s_metrics.py @@ -15,10 +15,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] K8S_CONTAINER_CPU_LIMIT: Final = "k8s.container.cpu.limit" @@ -80,9 +77,7 @@ def create_k8s_container_cpu_limit_desired(meter: Meter) -> UpDownCounter: ) -K8S_CONTAINER_CPU_LIMIT_UTILIZATION: Final = ( - "k8s.container.cpu.limit.utilization" -) +K8S_CONTAINER_CPU_LIMIT_UTILIZATION: Final = "k8s.container.cpu.limit.utilization" """ The ratio of container CPU usage to its current CPU limit Instrument: gauge @@ -94,9 +89,7 @@ def create_k8s_container_cpu_limit_desired(meter: Meter) -> UpDownCounter: """ -def create_k8s_container_cpu_limit_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_container_cpu_limit_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The ratio of container CPU usage to its current CPU limit""" return meter.create_observable_gauge( name=K8S_CONTAINER_CPU_LIMIT_UTILIZATION, @@ -165,9 +158,7 @@ def create_k8s_container_cpu_request_desired(meter: Meter) -> UpDownCounter: ) -K8S_CONTAINER_CPU_REQUEST_UTILIZATION: Final = ( - "k8s.container.cpu.request.utilization" -) +K8S_CONTAINER_CPU_REQUEST_UTILIZATION: Final = "k8s.container.cpu.request.utilization" """ The ratio of container CPU usage to its current CPU request Instrument: gauge @@ -191,9 +182,7 @@ def create_k8s_container_cpu_request_utilization( ) -K8S_CONTAINER_EPHEMERAL_STORAGE_LIMIT: Final = ( - "k8s.container.ephemeral_storage.limit" -) +K8S_CONTAINER_EPHEMERAL_STORAGE_LIMIT: Final = "k8s.container.ephemeral_storage.limit" """ Maximum ephemeral storage resource limit set for the container Instrument: updowncounter @@ -213,9 +202,7 @@ def create_k8s_container_ephemeral_storage_limit( ) -K8S_CONTAINER_EPHEMERAL_STORAGE_REQUEST: Final = ( - "k8s.container.ephemeral_storage.request" -) +K8S_CONTAINER_EPHEMERAL_STORAGE_REQUEST: Final = "k8s.container.ephemeral_storage.request" """ Ephemeral storage resource requested for the container Instrument: updowncounter @@ -235,9 +222,7 @@ def create_k8s_container_ephemeral_storage_request( ) -K8S_CONTAINER_EPHEMERAL_STORAGE_USAGE: Final = ( - "k8s.container.ephemeral_storage.usage" -) +K8S_CONTAINER_EPHEMERAL_STORAGE_USAGE: Final = "k8s.container.ephemeral_storage.usage" """ The ephemeral storage used by a container Instrument: updowncounter @@ -272,9 +257,7 @@ def create_k8s_container_memory_limit(meter: Meter) -> UpDownCounter: ) -K8S_CONTAINER_MEMORY_LIMIT_CURRENT: Final = ( - "k8s.container.memory.limit.current" -) +K8S_CONTAINER_MEMORY_LIMIT_CURRENT: Final = "k8s.container.memory.limit.current" """ Maximum memory resource limit currently configured for a running container Instrument: updowncounter @@ -296,9 +279,7 @@ def create_k8s_container_memory_limit_current(meter: Meter) -> UpDownCounter: ) -K8S_CONTAINER_MEMORY_LIMIT_DESIRED: Final = ( - "k8s.container.memory.limit.desired" -) +K8S_CONTAINER_MEMORY_LIMIT_DESIRED: Final = "k8s.container.memory.limit.desired" """ Maximum memory resource limit as defined by the container spec Instrument: updowncounter @@ -335,9 +316,7 @@ def create_k8s_container_memory_request(meter: Meter) -> UpDownCounter: ) -K8S_CONTAINER_MEMORY_REQUEST_CURRENT: Final = ( - "k8s.container.memory.request.current" -) +K8S_CONTAINER_MEMORY_REQUEST_CURRENT: Final = "k8s.container.memory.request.current" """ Memory resource request currently configured for a running container Instrument: updowncounter @@ -359,9 +338,7 @@ def create_k8s_container_memory_request_current(meter: Meter) -> UpDownCounter: ) -K8S_CONTAINER_MEMORY_REQUEST_DESIRED: Final = ( - "k8s.container.memory.request.desired" -) +K8S_CONTAINER_MEMORY_REQUEST_DESIRED: Final = "k8s.container.memory.request.desired" """ Memory resource requested as defined by the container spec Instrument: updowncounter @@ -532,9 +509,7 @@ def create_k8s_cronjob_job_active(meter: Meter) -> UpDownCounter: ) -K8S_DAEMONSET_CURRENT_SCHEDULED_NODES: Final = ( - "k8s.daemonset.current_scheduled_nodes" -) +K8S_DAEMONSET_CURRENT_SCHEDULED_NODES: Final = "k8s.daemonset.current_scheduled_nodes" """ Deprecated: Replaced by `k8s.daemonset.node.current_scheduled`. """ @@ -551,9 +526,7 @@ def create_k8s_daemonset_current_scheduled_nodes( ) -K8S_DAEMONSET_DESIRED_SCHEDULED_NODES: Final = ( - "k8s.daemonset.desired_scheduled_nodes" -) +K8S_DAEMONSET_DESIRED_SCHEDULED_NODES: Final = "k8s.daemonset.desired_scheduled_nodes" """ Deprecated: Replaced by `k8s.daemonset.node.desired_scheduled`. """ @@ -585,9 +558,7 @@ def create_k8s_daemonset_misscheduled_nodes(meter: Meter) -> UpDownCounter: ) -K8S_DAEMONSET_NODE_CURRENT_SCHEDULED: Final = ( - "k8s.daemonset.node.current_scheduled" -) +K8S_DAEMONSET_NODE_CURRENT_SCHEDULED: Final = "k8s.daemonset.node.current_scheduled" """ Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod Instrument: updowncounter @@ -606,9 +577,7 @@ def create_k8s_daemonset_node_current_scheduled(meter: Meter) -> UpDownCounter: ) -K8S_DAEMONSET_NODE_DESIRED_SCHEDULED: Final = ( - "k8s.daemonset.node.desired_scheduled" -) +K8S_DAEMONSET_NODE_DESIRED_SCHEDULED: Final = "k8s.daemonset.node.desired_scheduled" """ Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod) Instrument: updowncounter @@ -793,9 +762,7 @@ def create_k8s_hpa_max_pods(meter: Meter) -> UpDownCounter: ) -K8S_HPA_METRIC_TARGET_CPU_AVERAGE_UTILIZATION: Final = ( - "k8s.hpa.metric.target.cpu.average_utilization" -) +K8S_HPA_METRIC_TARGET_CPU_AVERAGE_UTILIZATION: Final = "k8s.hpa.metric.target.cpu.average_utilization" """ Target average utilization, in percentage, for CPU resource in HPA config Instrument: gauge @@ -819,9 +786,7 @@ def create_k8s_hpa_metric_target_cpu_average_utilization( ) -K8S_HPA_METRIC_TARGET_CPU_AVERAGE_VALUE: Final = ( - "k8s.hpa.metric.target.cpu.average_value" -) +K8S_HPA_METRIC_TARGET_CPU_AVERAGE_VALUE: Final = "k8s.hpa.metric.target.cpu.average_value" """ Target average value for CPU resource in HPA config Instrument: gauge @@ -857,9 +822,7 @@ def create_k8s_hpa_metric_target_cpu_average_value( """ -def create_k8s_hpa_metric_target_cpu_value( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_hpa_metric_target_cpu_value(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Target value for CPU resource in HPA config""" return meter.create_observable_gauge( name=K8S_HPA_METRIC_TARGET_CPU_VALUE, @@ -1162,9 +1125,7 @@ def create_k8s_node_allocatable_cpu(meter: Meter) -> UpDownCounter: ) -K8S_NODE_ALLOCATABLE_EPHEMERAL_STORAGE: Final = ( - "k8s.node.allocatable.ephemeral_storage" -) +K8S_NODE_ALLOCATABLE_EPHEMERAL_STORAGE: Final = "k8s.node.allocatable.ephemeral_storage" """ Deprecated: Replaced by `k8s.node.ephemeral_storage.allocatable`. """ @@ -1273,9 +1234,7 @@ def create_k8s_node_cpu_time(meter: Meter) -> Counter: """ -def create_k8s_node_cpu_usage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_node_cpu_usage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs""" return meter.create_observable_gauge( name=K8S_NODE_CPU_USAGE, @@ -1285,9 +1244,7 @@ def create_k8s_node_cpu_usage( ) -K8S_NODE_EPHEMERAL_STORAGE_ALLOCATABLE: Final = ( - "k8s.node.ephemeral_storage.allocatable" -) +K8S_NODE_EPHEMERAL_STORAGE_ALLOCATABLE: Final = "k8s.node.ephemeral_storage.allocatable" """ Amount of ephemeral-storage allocatable on the node Instrument: updowncounter @@ -1454,9 +1411,7 @@ def create_k8s_node_memory_rss(meter: Meter) -> UpDownCounter: """ -def create_k8s_node_memory_usage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_node_memory_usage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Memory usage of the Node""" return meter.create_observable_gauge( name=K8S_NODE_MEMORY_USAGE, @@ -1536,9 +1491,7 @@ def create_k8s_node_pod_allocatable(meter: Meter) -> UpDownCounter: ) -K8S_NODE_SYSTEM_CONTAINER_CPU_TIME: Final = ( - "k8s.node.system_container.cpu.time" -) +K8S_NODE_SYSTEM_CONTAINER_CPU_TIME: Final = "k8s.node.system_container.cpu.time" """ Node's system container CPU time Instrument: counter @@ -1556,9 +1509,7 @@ def create_k8s_node_system_container_cpu_time(meter: Meter) -> Counter: ) -K8S_NODE_SYSTEM_CONTAINER_CPU_USAGE: Final = ( - "k8s.node.system_container.cpu.usage" -) +K8S_NODE_SYSTEM_CONTAINER_CPU_USAGE: Final = "k8s.node.system_container.cpu.usage" """ Node's system container CPU usage, measured in cpus Instrument: gauge @@ -1567,9 +1518,7 @@ def create_k8s_node_system_container_cpu_time(meter: Meter) -> Counter: """ -def create_k8s_node_system_container_cpu_usage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_node_system_container_cpu_usage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Node's system container CPU usage, measured in cpus""" return meter.create_observable_gauge( name=K8S_NODE_SYSTEM_CONTAINER_CPU_USAGE, @@ -1579,9 +1528,7 @@ def create_k8s_node_system_container_cpu_usage( ) -K8S_NODE_SYSTEM_CONTAINER_MEMORY_USAGE: Final = ( - "k8s.node.system_container.memory.usage" -) +K8S_NODE_SYSTEM_CONTAINER_MEMORY_USAGE: Final = "k8s.node.system_container.memory.usage" """ Node's system container memory usage Instrument: updowncounter @@ -1601,9 +1548,7 @@ def create_k8s_node_system_container_memory_usage( ) -K8S_NODE_SYSTEM_CONTAINER_MEMORY_WORKING_SET: Final = ( - "k8s.node.system_container.memory.working_set" -) +K8S_NODE_SYSTEM_CONTAINER_MEMORY_WORKING_SET: Final = "k8s.node.system_container.memory.working_set" """ The amount of working set memory Instrument: updowncounter @@ -1633,9 +1578,7 @@ def create_k8s_node_system_container_memory_working_set( """ -def create_k8s_node_uptime( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_node_uptime(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The time the Node has been running""" return meter.create_observable_gauge( name=K8S_NODE_UPTIME, @@ -1665,9 +1608,7 @@ def create_k8s_persistentvolume_status_phase(meter: Meter) -> UpDownCounter: ) -K8S_PERSISTENTVOLUME_STORAGE_CAPACITY: Final = ( - "k8s.persistentvolume.storage.capacity" -) +K8S_PERSISTENTVOLUME_STORAGE_CAPACITY: Final = "k8s.persistentvolume.storage.capacity" """ The storage capacity of the PersistentVolume Instrument: updowncounter @@ -1687,9 +1628,7 @@ def create_k8s_persistentvolume_storage_capacity( ) -K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE: Final = ( - "k8s.persistentvolumeclaim.status.phase" -) +K8S_PERSISTENTVOLUMECLAIM_STATUS_PHASE: Final = "k8s.persistentvolumeclaim.status.phase" """ Number of PersistentVolumeClaims in a given phase Instrument: updowncounter @@ -1711,9 +1650,7 @@ def create_k8s_persistentvolumeclaim_status_phase( ) -K8S_PERSISTENTVOLUMECLAIM_STORAGE_CAPACITY: Final = ( - "k8s.persistentvolumeclaim.storage.capacity" -) +K8S_PERSISTENTVOLUMECLAIM_STORAGE_CAPACITY: Final = "k8s.persistentvolumeclaim.storage.capacity" """ The actual storage capacity provisioned for the PersistentVolumeClaim Instrument: updowncounter @@ -1735,9 +1672,7 @@ def create_k8s_persistentvolumeclaim_storage_capacity( ) -K8S_PERSISTENTVOLUMECLAIM_STORAGE_REQUEST: Final = ( - "k8s.persistentvolumeclaim.storage.request" -) +K8S_PERSISTENTVOLUMECLAIM_STORAGE_REQUEST: Final = "k8s.persistentvolumeclaim.storage.request" """ The storage requested by the PersistentVolumeClaim Instrument: updowncounter @@ -1784,9 +1719,7 @@ def create_k8s_pod_cpu_time(meter: Meter) -> Counter: """ -def create_k8s_pod_cpu_usage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_pod_cpu_usage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs""" return meter.create_observable_gauge( name=K8S_POD_CPU_USAGE, @@ -1927,9 +1860,7 @@ def create_k8s_pod_memory_rss(meter: Meter) -> UpDownCounter: """ -def create_k8s_pod_memory_usage( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_pod_memory_usage(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Memory usage of the Pod""" return meter.create_observable_gauge( name=K8S_POD_MEMORY_USAGE, @@ -2040,9 +1971,7 @@ def create_k8s_pod_status_reason(meter: Meter) -> UpDownCounter: """ -def create_k8s_pod_uptime( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_pod_uptime(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The time the Pod has been running""" return meter.create_observable_gauge( name=K8S_POD_UPTIME, @@ -2250,9 +2179,7 @@ def create_k8s_replicaset_pod_desired(meter: Meter) -> UpDownCounter: ) -K8S_REPLICATION_CONTROLLER_AVAILABLE_PODS: Final = ( - "k8s.replication_controller.available_pods" -) +K8S_REPLICATION_CONTROLLER_AVAILABLE_PODS: Final = "k8s.replication_controller.available_pods" """ Deprecated: Replaced by `k8s.replicationcontroller.pod.available`. """ @@ -2269,9 +2196,7 @@ def create_k8s_replication_controller_available_pods( ) -K8S_REPLICATION_CONTROLLER_DESIRED_PODS: Final = ( - "k8s.replication_controller.desired_pods" -) +K8S_REPLICATION_CONTROLLER_DESIRED_PODS: Final = "k8s.replication_controller.desired_pods" """ Deprecated: Replaced by `k8s.replicationcontroller.pod.desired`. """ @@ -2288,9 +2213,7 @@ def create_k8s_replication_controller_desired_pods( ) -K8S_REPLICATIONCONTROLLER_AVAILABLE_PODS: Final = ( - "k8s.replicationcontroller.available_pods" -) +K8S_REPLICATIONCONTROLLER_AVAILABLE_PODS: Final = "k8s.replicationcontroller.available_pods" """ Deprecated: Replaced by `k8s.replicationcontroller.pod.available`. """ @@ -2307,9 +2230,7 @@ def create_k8s_replicationcontroller_available_pods( ) -K8S_REPLICATIONCONTROLLER_DESIRED_PODS: Final = ( - "k8s.replicationcontroller.desired_pods" -) +K8S_REPLICATIONCONTROLLER_DESIRED_PODS: Final = "k8s.replicationcontroller.desired_pods" """ Deprecated: Replaced by `k8s.replicationcontroller.pod.desired`. """ @@ -2326,9 +2247,7 @@ def create_k8s_replicationcontroller_desired_pods( ) -K8S_REPLICATIONCONTROLLER_POD_AVAILABLE: Final = ( - "k8s.replicationcontroller.pod.available" -) +K8S_REPLICATIONCONTROLLER_POD_AVAILABLE: Final = "k8s.replicationcontroller.pod.available" """ Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller Instrument: updowncounter @@ -2349,9 +2268,7 @@ def create_k8s_replicationcontroller_pod_available( ) -K8S_REPLICATIONCONTROLLER_POD_DESIRED: Final = ( - "k8s.replicationcontroller.pod.desired" -) +K8S_REPLICATIONCONTROLLER_POD_DESIRED: Final = "k8s.replicationcontroller.pod.desired" """ Number of desired replica pods in this replication controller Instrument: updowncounter @@ -2414,9 +2331,7 @@ def create_k8s_resourcequota_cpu_limit_used(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_CPU_REQUEST_HARD: Final = ( - "k8s.resourcequota.cpu.request.hard" -) +K8S_RESOURCEQUOTA_CPU_REQUEST_HARD: Final = "k8s.resourcequota.cpu.request.hard" """ The CPU requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace @@ -2437,9 +2352,7 @@ def create_k8s_resourcequota_cpu_request_hard(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_CPU_REQUEST_USED: Final = ( - "k8s.resourcequota.cpu.request.used" -) +K8S_RESOURCEQUOTA_CPU_REQUEST_USED: Final = "k8s.resourcequota.cpu.request.used" """ The CPU requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace @@ -2460,9 +2373,7 @@ def create_k8s_resourcequota_cpu_request_used(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD: Final = ( - "k8s.resourcequota.ephemeral_storage.limit.hard" -) +K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD: Final = "k8s.resourcequota.ephemeral_storage.limit.hard" """ The sum of local ephemeral storage limits in the namespace. The value represents the configured quota limit of the resource in the namespace @@ -2485,9 +2396,7 @@ def create_k8s_resourcequota_ephemeral_storage_limit_hard( ) -K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_USED: Final = ( - "k8s.resourcequota.ephemeral_storage.limit.used" -) +K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_LIMIT_USED: Final = "k8s.resourcequota.ephemeral_storage.limit.used" """ The sum of local ephemeral storage limits in the namespace. The value represents the current observed total usage of the resource in the namespace @@ -2510,9 +2419,7 @@ def create_k8s_resourcequota_ephemeral_storage_limit_used( ) -K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD: Final = ( - "k8s.resourcequota.ephemeral_storage.request.hard" -) +K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD: Final = "k8s.resourcequota.ephemeral_storage.request.hard" """ The sum of local ephemeral storage requests in the namespace. The value represents the configured quota limit of the resource in the namespace @@ -2535,9 +2442,7 @@ def create_k8s_resourcequota_ephemeral_storage_request_hard( ) -K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_USED: Final = ( - "k8s.resourcequota.ephemeral_storage.request.used" -) +K8S_RESOURCEQUOTA_EPHEMERAL_STORAGE_REQUEST_USED: Final = "k8s.resourcequota.ephemeral_storage.request.used" """ The sum of local ephemeral storage requests in the namespace. The value represents the current observed total usage of the resource in the namespace @@ -2560,9 +2465,7 @@ def create_k8s_resourcequota_ephemeral_storage_request_used( ) -K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_HARD: Final = ( - "k8s.resourcequota.hugepage_count.request.hard" -) +K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_HARD: Final = "k8s.resourcequota.hugepage_count.request.hard" """ The huge page requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace @@ -2585,9 +2488,7 @@ def create_k8s_resourcequota_hugepage_count_request_hard( ) -K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_USED: Final = ( - "k8s.resourcequota.hugepage_count.request.used" -) +K8S_RESOURCEQUOTA_HUGEPAGE_COUNT_REQUEST_USED: Final = "k8s.resourcequota.hugepage_count.request.used" """ The huge page requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace @@ -2610,9 +2511,7 @@ def create_k8s_resourcequota_hugepage_count_request_used( ) -K8S_RESOURCEQUOTA_MEMORY_LIMIT_HARD: Final = ( - "k8s.resourcequota.memory.limit.hard" -) +K8S_RESOURCEQUOTA_MEMORY_LIMIT_HARD: Final = "k8s.resourcequota.memory.limit.hard" """ The memory limits in a specific namespace. The value represents the configured quota limit of the resource in the namespace @@ -2633,9 +2532,7 @@ def create_k8s_resourcequota_memory_limit_hard(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_MEMORY_LIMIT_USED: Final = ( - "k8s.resourcequota.memory.limit.used" -) +K8S_RESOURCEQUOTA_MEMORY_LIMIT_USED: Final = "k8s.resourcequota.memory.limit.used" """ The memory limits in a specific namespace. The value represents the current observed total usage of the resource in the namespace @@ -2656,9 +2553,7 @@ def create_k8s_resourcequota_memory_limit_used(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_MEMORY_REQUEST_HARD: Final = ( - "k8s.resourcequota.memory.request.hard" -) +K8S_RESOURCEQUOTA_MEMORY_REQUEST_HARD: Final = "k8s.resourcequota.memory.request.hard" """ The memory requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace @@ -2681,9 +2576,7 @@ def create_k8s_resourcequota_memory_request_hard( ) -K8S_RESOURCEQUOTA_MEMORY_REQUEST_USED: Final = ( - "k8s.resourcequota.memory.request.used" -) +K8S_RESOURCEQUOTA_MEMORY_REQUEST_USED: Final = "k8s.resourcequota.memory.request.used" """ The memory requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace @@ -2706,9 +2599,7 @@ def create_k8s_resourcequota_memory_request_used( ) -K8S_RESOURCEQUOTA_OBJECT_COUNT_HARD: Final = ( - "k8s.resourcequota.object_count.hard" -) +K8S_RESOURCEQUOTA_OBJECT_COUNT_HARD: Final = "k8s.resourcequota.object_count.hard" """ The object count limits in a specific namespace. The value represents the configured quota limit of the resource in the namespace @@ -2729,9 +2620,7 @@ def create_k8s_resourcequota_object_count_hard(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_OBJECT_COUNT_USED: Final = ( - "k8s.resourcequota.object_count.used" -) +K8S_RESOURCEQUOTA_OBJECT_COUNT_USED: Final = "k8s.resourcequota.object_count.used" """ The object count limits in a specific namespace. The value represents the current observed total usage of the resource in the namespace @@ -2752,9 +2641,7 @@ def create_k8s_resourcequota_object_count_used(meter: Meter) -> UpDownCounter: ) -K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_HARD: Final = ( - "k8s.resourcequota.persistentvolumeclaim_count.hard" -) +K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_HARD: Final = "k8s.resourcequota.persistentvolumeclaim_count.hard" """ The total number of PersistentVolumeClaims that can exist in the namespace. The value represents the configured quota limit of the resource in the namespace @@ -2780,9 +2667,7 @@ def create_k8s_resourcequota_persistentvolumeclaim_count_hard( ) -K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_USED: Final = ( - "k8s.resourcequota.persistentvolumeclaim_count.used" -) +K8S_RESOURCEQUOTA_PERSISTENTVOLUMECLAIM_COUNT_USED: Final = "k8s.resourcequota.persistentvolumeclaim_count.used" """ The total number of PersistentVolumeClaims that can exist in the namespace. The value represents the current observed total usage of the resource in the namespace @@ -2808,9 +2693,7 @@ def create_k8s_resourcequota_persistentvolumeclaim_count_used( ) -K8S_RESOURCEQUOTA_STORAGE_REQUEST_HARD: Final = ( - "k8s.resourcequota.storage.request.hard" -) +K8S_RESOURCEQUOTA_STORAGE_REQUEST_HARD: Final = "k8s.resourcequota.storage.request.hard" """ The storage requests in a specific namespace. The value represents the configured quota limit of the resource in the namespace @@ -2836,9 +2719,7 @@ def create_k8s_resourcequota_storage_request_hard( ) -K8S_RESOURCEQUOTA_STORAGE_REQUEST_USED: Final = ( - "k8s.resourcequota.storage.request.used" -) +K8S_RESOURCEQUOTA_STORAGE_REQUEST_USED: Final = "k8s.resourcequota.storage.request.used" """ The storage requests in a specific namespace. The value represents the current observed total usage of the resource in the namespace @@ -2890,9 +2771,7 @@ def create_k8s_resourcequota_storage_request_used( """ -def create_k8s_service_endpoint_count( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_k8s_service_endpoint_count(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Number of endpoints for a service by condition and address type""" return meter.create_observable_gauge( name=K8S_SERVICE_ENDPOINT_COUNT, @@ -2902,9 +2781,7 @@ def create_k8s_service_endpoint_count( ) -K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT: Final = ( - "k8s.service.load_balancer.ingress.count" -) +K8S_SERVICE_LOAD_BALANCER_INGRESS_COUNT: Final = "k8s.service.load_balancer.ingress.count" """ Number of load balancer ingress points (external IPs/hostnames) assigned to the service Instrument: gauge diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/messaging_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/messaging_metrics.py index d36713512a2..e16a394d84c 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/messaging_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/messaging_metrics.py @@ -6,9 +6,7 @@ from opentelemetry.metrics import Counter, Histogram, Meter -MESSAGING_CLIENT_CONSUMED_MESSAGES: Final = ( - "messaging.client.consumed.messages" -) +MESSAGING_CLIENT_CONSUMED_MESSAGES: Final = "messaging.client.consumed.messages" """ Number of messages that were delivered to the application Instrument: counter @@ -27,9 +25,7 @@ def create_messaging_client_consumed_messages(meter: Meter) -> Counter: ) -MESSAGING_CLIENT_OPERATION_DURATION: Final = ( - "messaging.client.operation.duration" -) +MESSAGING_CLIENT_OPERATION_DURATION: Final = "messaging.client.operation.duration" """ Duration of messaging operation initiated by a producer or consumer client Instrument: histogram @@ -47,9 +43,7 @@ def create_messaging_client_operation_duration(meter: Meter) -> Histogram: ) -MESSAGING_CLIENT_PUBLISHED_MESSAGES: Final = ( - "messaging.client.published.messages" -) +MESSAGING_CLIENT_PUBLISHED_MESSAGES: Final = "messaging.client.published.messages" """ Deprecated: Replaced by `messaging.client.sent.messages`. """ diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/nfs_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/nfs_metrics.py index a3b7091e4de..99f626f48b6 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/nfs_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/nfs_metrics.py @@ -24,9 +24,7 @@ def create_nfs_client_net_count(meter: Meter) -> Counter: ) -NFS_CLIENT_NET_TCP_CONNECTION_ACCEPTED: Final = ( - "nfs.client.net.tcp.connection.accepted" -) +NFS_CLIENT_NET_TCP_CONNECTION_ACCEPTED: Final = "nfs.client.net.tcp.connection.accepted" """ Reports the count of kernel NFS client TCP connections accepted Instrument: counter @@ -186,9 +184,7 @@ def create_nfs_server_net_count(meter: Meter) -> Counter: ) -NFS_SERVER_NET_TCP_CONNECTION_ACCEPTED: Final = ( - "nfs.server.net.tcp.connection.accepted" -) +NFS_SERVER_NET_TCP_CONNECTION_ACCEPTED: Final = "nfs.server.net.tcp.connection.accepted" """ Reports the count of kernel NFS server TCP connections accepted Instrument: counter diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/openshift_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/openshift_metrics.py index 3045fe9c05e..5a5cdd79a6b 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/openshift_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/openshift_metrics.py @@ -6,9 +6,7 @@ from opentelemetry.metrics import Meter, UpDownCounter -OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_HARD: Final = ( - "openshift.clusterquota.cpu.limit.hard" -) +OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_HARD: Final = "openshift.clusterquota.cpu.limit.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -31,9 +29,7 @@ def create_openshift_clusterquota_cpu_limit_hard( ) -OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_USED: Final = ( - "openshift.clusterquota.cpu.limit.used" -) +OPENSHIFT_CLUSTERQUOTA_CPU_LIMIT_USED: Final = "openshift.clusterquota.cpu.limit.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -56,9 +52,7 @@ def create_openshift_clusterquota_cpu_limit_used( ) -OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_HARD: Final = ( - "openshift.clusterquota.cpu.request.hard" -) +OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_HARD: Final = "openshift.clusterquota.cpu.request.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -81,9 +75,7 @@ def create_openshift_clusterquota_cpu_request_hard( ) -OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_USED: Final = ( - "openshift.clusterquota.cpu.request.used" -) +OPENSHIFT_CLUSTERQUOTA_CPU_REQUEST_USED: Final = "openshift.clusterquota.cpu.request.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -106,9 +98,7 @@ def create_openshift_clusterquota_cpu_request_used( ) -OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD: Final = ( - "openshift.clusterquota.ephemeral_storage.limit.hard" -) +OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_HARD: Final = "openshift.clusterquota.ephemeral_storage.limit.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -131,9 +121,7 @@ def create_openshift_clusterquota_ephemeral_storage_limit_hard( ) -OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_USED: Final = ( - "openshift.clusterquota.ephemeral_storage.limit.used" -) +OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_LIMIT_USED: Final = "openshift.clusterquota.ephemeral_storage.limit.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -156,9 +144,7 @@ def create_openshift_clusterquota_ephemeral_storage_limit_used( ) -OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD: Final = ( - "openshift.clusterquota.ephemeral_storage.request.hard" -) +OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_HARD: Final = "openshift.clusterquota.ephemeral_storage.request.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -181,9 +167,7 @@ def create_openshift_clusterquota_ephemeral_storage_request_hard( ) -OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_USED: Final = ( - "openshift.clusterquota.ephemeral_storage.request.used" -) +OPENSHIFT_CLUSTERQUOTA_EPHEMERAL_STORAGE_REQUEST_USED: Final = "openshift.clusterquota.ephemeral_storage.request.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -206,9 +190,7 @@ def create_openshift_clusterquota_ephemeral_storage_request_used( ) -OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_HARD: Final = ( - "openshift.clusterquota.hugepage_count.request.hard" -) +OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_HARD: Final = "openshift.clusterquota.hugepage_count.request.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -231,9 +213,7 @@ def create_openshift_clusterquota_hugepage_count_request_hard( ) -OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_USED: Final = ( - "openshift.clusterquota.hugepage_count.request.used" -) +OPENSHIFT_CLUSTERQUOTA_HUGEPAGE_COUNT_REQUEST_USED: Final = "openshift.clusterquota.hugepage_count.request.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -256,9 +236,7 @@ def create_openshift_clusterquota_hugepage_count_request_used( ) -OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_HARD: Final = ( - "openshift.clusterquota.memory.limit.hard" -) +OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_HARD: Final = "openshift.clusterquota.memory.limit.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -281,9 +259,7 @@ def create_openshift_clusterquota_memory_limit_hard( ) -OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_USED: Final = ( - "openshift.clusterquota.memory.limit.used" -) +OPENSHIFT_CLUSTERQUOTA_MEMORY_LIMIT_USED: Final = "openshift.clusterquota.memory.limit.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -306,9 +282,7 @@ def create_openshift_clusterquota_memory_limit_used( ) -OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_HARD: Final = ( - "openshift.clusterquota.memory.request.hard" -) +OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_HARD: Final = "openshift.clusterquota.memory.request.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -331,9 +305,7 @@ def create_openshift_clusterquota_memory_request_hard( ) -OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_USED: Final = ( - "openshift.clusterquota.memory.request.used" -) +OPENSHIFT_CLUSTERQUOTA_MEMORY_REQUEST_USED: Final = "openshift.clusterquota.memory.request.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -356,9 +328,7 @@ def create_openshift_clusterquota_memory_request_used( ) -OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_HARD: Final = ( - "openshift.clusterquota.object_count.hard" -) +OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_HARD: Final = "openshift.clusterquota.object_count.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -381,9 +351,7 @@ def create_openshift_clusterquota_object_count_hard( ) -OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_USED: Final = ( - "openshift.clusterquota.object_count.used" -) +OPENSHIFT_CLUSTERQUOTA_OBJECT_COUNT_USED: Final = "openshift.clusterquota.object_count.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter @@ -462,9 +430,7 @@ def create_openshift_clusterquota_persistentvolumeclaim_count_used( ) -OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_HARD: Final = ( - "openshift.clusterquota.storage.request.hard" -) +OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_HARD: Final = "openshift.clusterquota.storage.request.hard" """ The enforced hard limit of the resource across all projects Instrument: updowncounter @@ -490,9 +456,7 @@ def create_openshift_clusterquota_storage_request_hard( ) -OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_USED: Final = ( - "openshift.clusterquota.storage.request.used" -) +OPENSHIFT_CLUSTERQUOTA_STORAGE_REQUEST_USED: Final = "openshift.clusterquota.storage.request.used" """ The current observed total usage of the resource across all projects Instrument: updowncounter diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/otel_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/otel_metrics.py index fb5033117f1..1d400681849 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/otel_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/otel_metrics.py @@ -48,9 +48,7 @@ def create_otel_sdk_exporter_log_inflight(meter: Meter) -> UpDownCounter: ) -OTEL_SDK_EXPORTER_METRIC_DATA_POINT_EXPORTED: Final = ( - "otel.sdk.exporter.metric_data_point.exported" -) +OTEL_SDK_EXPORTER_METRIC_DATA_POINT_EXPORTED: Final = "otel.sdk.exporter.metric_data_point.exported" """ The number of metric data points for which the export has finished, either successful or failed Instrument: counter @@ -75,9 +73,7 @@ def create_otel_sdk_exporter_metric_data_point_exported( ) -OTEL_SDK_EXPORTER_METRIC_DATA_POINT_INFLIGHT: Final = ( - "otel.sdk.exporter.metric_data_point.inflight" -) +OTEL_SDK_EXPORTER_METRIC_DATA_POINT_INFLIGHT: Final = "otel.sdk.exporter.metric_data_point.inflight" """ The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed) Instrument: updowncounter @@ -98,9 +94,7 @@ def create_otel_sdk_exporter_metric_data_point_inflight( ) -OTEL_SDK_EXPORTER_OPERATION_DURATION: Final = ( - "otel.sdk.exporter.operation.duration" -) +OTEL_SDK_EXPORTER_OPERATION_DURATION: Final = "otel.sdk.exporter.operation.duration" """ The duration of exporting a batch of telemetry records Instrument: histogram @@ -146,9 +140,7 @@ def create_otel_sdk_exporter_span_exported(meter: Meter) -> Counter: ) -OTEL_SDK_EXPORTER_SPAN_EXPORTED_COUNT: Final = ( - "otel.sdk.exporter.span.exported.count" -) +OTEL_SDK_EXPORTER_SPAN_EXPORTED_COUNT: Final = "otel.sdk.exporter.span.exported.count" """ Deprecated: Replaced by `otel.sdk.exporter.span.exported`. """ @@ -184,9 +176,7 @@ def create_otel_sdk_exporter_span_inflight(meter: Meter) -> UpDownCounter: ) -OTEL_SDK_EXPORTER_SPAN_INFLIGHT_COUNT: Final = ( - "otel.sdk.exporter.span.inflight.count" -) +OTEL_SDK_EXPORTER_SPAN_INFLIGHT_COUNT: Final = "otel.sdk.exporter.span.inflight.count" """ Deprecated: Replaced by `otel.sdk.exporter.span.inflight`. """ @@ -220,9 +210,7 @@ def create_otel_sdk_log_created(meter: Meter) -> Counter: ) -OTEL_SDK_METRIC_READER_COLLECTION_DURATION: Final = ( - "otel.sdk.metric_reader.collection.duration" -) +OTEL_SDK_METRIC_READER_COLLECTION_DURATION: Final = "otel.sdk.metric_reader.collection.duration" """ The duration of the collect operation of the metric reader Instrument: histogram @@ -265,9 +253,7 @@ def create_otel_sdk_processor_log_processed(meter: Meter) -> Counter: ) -OTEL_SDK_PROCESSOR_LOG_QUEUE_CAPACITY: Final = ( - "otel.sdk.processor.log.queue.capacity" -) +OTEL_SDK_PROCESSOR_LOG_QUEUE_CAPACITY: Final = "otel.sdk.processor.log.queue.capacity" """ The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold Instrument: updowncounter @@ -326,9 +312,7 @@ def create_otel_sdk_processor_span_processed(meter: Meter) -> Counter: ) -OTEL_SDK_PROCESSOR_SPAN_PROCESSED_COUNT: Final = ( - "otel.sdk.processor.span.processed.count" -) +OTEL_SDK_PROCESSOR_SPAN_PROCESSED_COUNT: Final = "otel.sdk.processor.span.processed.count" """ Deprecated: Replaced by `otel.sdk.processor.span.processed`. """ @@ -345,9 +329,7 @@ def create_otel_sdk_processor_span_processed_count( ) -OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY: Final = ( - "otel.sdk.processor.span.queue.capacity" -) +OTEL_SDK_PROCESSOR_SPAN_QUEUE_CAPACITY: Final = "otel.sdk.processor.span.queue.capacity" """ The maximum number of spans the queue of a given instance of an SDK span processor can hold Instrument: updowncounter @@ -367,9 +349,7 @@ def create_otel_sdk_processor_span_queue_capacity( ) -OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE: Final = ( - "otel.sdk.processor.span.queue.size" -) +OTEL_SDK_PROCESSOR_SPAN_QUEUE_SIZE: Final = "otel.sdk.processor.span.queue.size" """ The number of spans in the queue of a given instance of an SDK span processor Instrument: updowncounter diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/process_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/process_metrics.py index d851baed1b8..dc34ad3dba1 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/process_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/process_metrics.py @@ -15,10 +15,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] PROCESS_CONTEXT_SWITCHES: Final = "process.context_switches" @@ -63,9 +60,7 @@ def create_process_cpu_time(meter: Meter) -> Counter: """ -def create_process_cpu_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_process_cpu_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process""" return meter.create_observable_gauge( name=PROCESS_CPU_UTILIZATION, @@ -143,9 +138,7 @@ def create_process_network_io(meter: Meter) -> Counter: ) -PROCESS_OPEN_FILE_DESCRIPTOR_COUNT: Final = ( - "process.open_file_descriptor.count" -) +PROCESS_OPEN_FILE_DESCRIPTOR_COUNT: Final = "process.open_file_descriptor.count" """ Deprecated: Replaced by `process.unix.file_descriptor.count`. """ @@ -194,9 +187,7 @@ def create_process_thread_count(meter: Meter) -> UpDownCounter: ) -PROCESS_UNIX_FILE_DESCRIPTOR_COUNT: Final = ( - "process.unix.file_descriptor.count" -) +PROCESS_UNIX_FILE_DESCRIPTOR_COUNT: Final = "process.unix.file_descriptor.count" """ Number of unix file descriptors in use by the process Instrument: updowncounter @@ -223,9 +214,7 @@ def create_process_unix_file_descriptor_count(meter: Meter) -> UpDownCounter: """ -def create_process_uptime( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_process_uptime(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The time the process has been running""" return meter.create_observable_gauge( name=PROCESS_UPTIME, diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py index b26bd06a0c2..7dd91a63405 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/system_metrics.py @@ -15,10 +15,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] SYSTEM_CPU_FREQUENCY: Final = "system.cpu.frequency" @@ -29,9 +26,7 @@ """ -def create_system_cpu_frequency( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_system_cpu_frequency(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Operating frequency of the logical CPU in Hertz""" return meter.create_observable_gauge( name=SYSTEM_CPU_FREQUENCY, @@ -102,9 +97,7 @@ def create_system_cpu_time(meter: Meter) -> Counter: """ -def create_system_cpu_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_system_cpu_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """For each logical CPU, the utilization is calculated as the change in cumulative CPU time (cpu.time) over a measurement interval, divided by the elapsed time""" return meter.create_observable_gauge( name=SYSTEM_CPU_UTILIZATION, @@ -287,9 +280,7 @@ def create_system_filesystem_usage(meter: Meter) -> UpDownCounter: """ -def create_system_filesystem_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_system_filesystem_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Fraction of filesystem bytes used""" return meter.create_observable_gauge( name=SYSTEM_FILESYSTEM_UTILIZATION, @@ -368,9 +359,7 @@ def create_system_memory_linux_available(meter: Meter) -> UpDownCounter: ) -SYSTEM_MEMORY_LINUX_HUGEPAGES_LIMIT: Final = ( - "system.memory.linux.hugepages.limit" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_LIMIT: Final = "system.memory.linux.hugepages.limit" """ Total number of hugepages available Instrument: updowncounter @@ -387,9 +376,7 @@ def create_system_memory_linux_hugepages_limit(meter: Meter) -> UpDownCounter: ) -SYSTEM_MEMORY_LINUX_HUGEPAGES_PAGE_SIZE: Final = ( - "system.memory.linux.hugepages.page_size" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_PAGE_SIZE: Final = "system.memory.linux.hugepages.page_size" """ System hugepage size in bytes Instrument: updowncounter @@ -408,9 +395,7 @@ def create_system_memory_linux_hugepages_page_size( ) -SYSTEM_MEMORY_LINUX_HUGEPAGES_RESERVED: Final = ( - "system.memory.linux.hugepages.reserved" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_RESERVED: Final = "system.memory.linux.hugepages.reserved" """ Number of reserved hugepages Instrument: updowncounter @@ -432,9 +417,7 @@ def create_system_memory_linux_hugepages_reserved( ) -SYSTEM_MEMORY_LINUX_HUGEPAGES_SURPLUS: Final = ( - "system.memory.linux.hugepages.surplus" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_SURPLUS: Final = "system.memory.linux.hugepages.surplus" """ Number of surplus hugepages Instrument: updowncounter @@ -456,9 +439,7 @@ def create_system_memory_linux_hugepages_surplus( ) -SYSTEM_MEMORY_LINUX_HUGEPAGES_USAGE: Final = ( - "system.memory.linux.hugepages.usage" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_USAGE: Final = "system.memory.linux.hugepages.usage" """ Number of hugepages in use by state Instrument: updowncounter @@ -475,9 +456,7 @@ def create_system_memory_linux_hugepages_usage(meter: Meter) -> UpDownCounter: ) -SYSTEM_MEMORY_LINUX_HUGEPAGES_UTILIZATION: Final = ( - "system.memory.linux.hugepages.utilization" -) +SYSTEM_MEMORY_LINUX_HUGEPAGES_UTILIZATION: Final = "system.memory.linux.hugepages.utilization" """ Percentage of hugepages in use by state Instrument: gauge @@ -576,9 +555,7 @@ def create_system_memory_usage(meter: Meter) -> UpDownCounter: """ -def create_system_memory_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_system_memory_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Percentage of memory bytes in use""" return meter.create_observable_gauge( name=SYSTEM_MEMORY_UTILIZATION, @@ -787,9 +764,7 @@ def create_system_paging_usage(meter: Meter) -> UpDownCounter: """ -def create_system_paging_utilization( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_system_paging_utilization(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Swap (unix) or pagefile (windows) utilization""" return meter.create_observable_gauge( name=SYSTEM_PAGING_UTILIZATION, @@ -843,9 +818,7 @@ def create_system_process_created(meter: Meter) -> Counter: """ -def create_system_uptime( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_system_uptime(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The time the system has been running""" return meter.create_observable_gauge( name=SYSTEM_UPTIME, diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/vcs_metrics.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/vcs_metrics.py index 15397638a98..6facfe4aade 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/vcs_metrics.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/_incubating/metrics/vcs_metrics.py @@ -14,10 +14,7 @@ ) # pylint: disable=invalid-name -CallbackT = ( - Callable[[CallbackOptions], Iterable[Observation]] - | Generator[Iterable[Observation], CallbackOptions, None] -) +CallbackT = Callable[[CallbackOptions], Iterable[Observation]] | Generator[Iterable[Observation], CallbackOptions, None] VCS_CHANGE_COUNT: Final = "vcs.change.count" @@ -45,9 +42,7 @@ def create_vcs_change_count(meter: Meter) -> UpDownCounter: """ -def create_vcs_change_duration( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_change_duration(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The time duration a change (pull request/merge request/changelist) has been in a given state""" return meter.create_observable_gauge( name=VCS_CHANGE_DURATION, @@ -65,9 +60,7 @@ def create_vcs_change_duration( """ -def create_vcs_change_time_to_approval( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_change_time_to_approval(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval""" return meter.create_observable_gauge( name=VCS_CHANGE_TIME_TO_APPROVAL, @@ -85,9 +78,7 @@ def create_vcs_change_time_to_approval( """ -def create_vcs_change_time_to_merge( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_change_time_to_merge(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref""" return meter.create_observable_gauge( name=VCS_CHANGE_TIME_TO_MERGE, @@ -105,9 +96,7 @@ def create_vcs_change_time_to_merge( """ -def create_vcs_contributor_count( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_contributor_count(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The number of unique contributors to a repository""" return meter.create_observable_gauge( name=VCS_CONTRIBUTOR_COUNT, @@ -145,9 +134,7 @@ def create_vcs_ref_count(meter: Meter) -> UpDownCounter: """ -def create_vcs_ref_lines_delta( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_ref_lines_delta(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute""" return meter.create_observable_gauge( name=VCS_REF_LINES_DELTA, @@ -167,9 +154,7 @@ def create_vcs_ref_lines_delta( """ -def create_vcs_ref_revisions_delta( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_ref_revisions_delta(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute""" return meter.create_observable_gauge( name=VCS_REF_REVISIONS_DELTA, @@ -187,9 +172,7 @@ def create_vcs_ref_revisions_delta( """ -def create_vcs_ref_time( - meter: Meter, callbacks: Sequence[CallbackT] | None -) -> ObservableGauge: +def create_vcs_ref_time(meter: Meter, callbacks: Sequence[CallbackT] | None) -> ObservableGauge: """Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`""" return meter.create_observable_gauge( name=VCS_REF_TIME, diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py index 736c6b4659e..fce5f37eb31 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/metrics/__init__.py @@ -69,18 +69,14 @@ class MetricInstruments: Unit: By """ - PROCESS_RUNTIME_JVM_SYSTEM_CPU_UTILIZATION = ( - "process.runtime.jvm.system.cpu.utilization" - ) + PROCESS_RUNTIME_JVM_SYSTEM_CPU_UTILIZATION = "process.runtime.jvm.system.cpu.utilization" """ Recent CPU utilization for the whole system as reported by the JVM Instrument: gauge Unit: 1 """ - PROCESS_RUNTIME_JVM_SYSTEM_CPU_LOAD_1M = ( - "process.runtime.jvm.system.cpu.load_1m" - ) + PROCESS_RUNTIME_JVM_SYSTEM_CPU_LOAD_1M = "process.runtime.jvm.system.cpu.load_1m" """ Average CPU load of the whole system for the last minute as reported by the JVM Instrument: gauge @@ -115,9 +111,7 @@ class MetricInstruments: Unit: By """ - PROCESS_RUNTIME_JVM_MEMORY_COMMITTED = ( - "process.runtime.jvm.memory.committed" - ) + PROCESS_RUNTIME_JVM_MEMORY_COMMITTED = "process.runtime.jvm.memory.committed" """ Measure of memory committed Instrument: updowncounter @@ -131,9 +125,7 @@ class MetricInstruments: Unit: By """ - PROCESS_RUNTIME_JVM_MEMORY_USAGE_AFTER_LAST_GC = ( - "process.runtime.jvm.memory.usage_after_last_gc" - ) + PROCESS_RUNTIME_JVM_MEMORY_USAGE_AFTER_LAST_GC = "process.runtime.jvm.memory.usage_after_last_gc" """ Measure of memory used, as measured after the most recent garbage collection event on this pool Instrument: updowncounter @@ -161,18 +153,14 @@ class MetricInstruments: Unit: {class} """ - PROCESS_RUNTIME_JVM_CLASSES_UNLOADED = ( - "process.runtime.jvm.classes.unloaded" - ) + PROCESS_RUNTIME_JVM_CLASSES_UNLOADED = "process.runtime.jvm.classes.unloaded" """ Number of classes unloaded since JVM start Instrument: counter Unit: {class} """ - PROCESS_RUNTIME_JVM_CLASSES_CURRENT_LOADED = ( - "process.runtime.jvm.classes.current_loaded" - ) + PROCESS_RUNTIME_JVM_CLASSES_CURRENT_LOADED = "process.runtime.jvm.classes.current_loaded" """ Number of classes currently loaded Instrument: updowncounter @@ -186,9 +174,7 @@ class MetricInstruments: Unit: s """ - PROCESS_RUNTIME_JVM_CPU_RECENT_UTILIZATION = ( - "process.runtime.jvm.cpu.recent_utilization" - ) + PROCESS_RUNTIME_JVM_CPU_RECENT_UTILIZATION = "process.runtime.jvm.cpu.recent_utilization" """ Recent CPU utilization for the process as reported by the JVM Instrument: gauge diff --git a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py index ceb562d811a..2ce2c407c37 100644 --- a/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py +++ b/opentelemetry-semantic-conventions/src/opentelemetry/semconv/trace/__init__.py @@ -456,9 +456,7 @@ class SpanAttributes: Whether or not the query is idempotent. """ - DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = ( - "db.cassandra.speculative_execution_count" - ) + DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = "db.cassandra.speculative_execution_count" """ The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. """ @@ -683,16 +681,12 @@ class SpanAttributes: The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called "Correlation ID". """ - MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = ( - "messaging.message.payload_size_bytes" - ) + MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = "messaging.message.payload_size_bytes" """ The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported. """ - MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = ( - "messaging.message.payload_compressed_size_bytes" - ) + MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = "messaging.message.payload_compressed_size_bytes" """ The compressed size of the message payload in bytes. """ @@ -868,23 +862,17 @@ class SpanAttributes: The JSON-serialized value of each item in the `ConsumedCapacity` response field. """ - AWS_DYNAMODB_ITEM_COLLECTION_METRICS = ( - "aws.dynamodb.item_collection_metrics" - ) + AWS_DYNAMODB_ITEM_COLLECTION_METRICS = "aws.dynamodb.item_collection_metrics" """ The JSON-serialized value of the `ItemCollectionMetrics` response field. """ - AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = ( - "aws.dynamodb.provisioned_read_capacity" - ) + AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = "aws.dynamodb.provisioned_read_capacity" """ The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. """ - AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = ( - "aws.dynamodb.provisioned_write_capacity" - ) + AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = "aws.dynamodb.provisioned_write_capacity" """ The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter. """ @@ -919,16 +907,12 @@ class SpanAttributes: The value of the `Select` request parameter. """ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = ( - "aws.dynamodb.global_secondary_indexes" - ) + AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = "aws.dynamodb.global_secondary_indexes" """ The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field. """ - AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = ( - "aws.dynamodb.local_secondary_indexes" - ) + AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = "aws.dynamodb.local_secondary_indexes" """ The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field. """ @@ -973,9 +957,7 @@ class SpanAttributes: The JSON-serialized value of each item in the `AttributeDefinitions` request field. """ - AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = ( - "aws.dynamodb.global_secondary_index_updates" - ) + AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = "aws.dynamodb.global_secondary_index_updates" """ The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field. """ @@ -1066,9 +1048,7 @@ class SpanAttributes: Note: The value may be sanitized to exclude sensitive information. """ - MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = ( - "messaging.rabbitmq.destination.routing_key" - ) + MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY = "messaging.rabbitmq.destination.routing_key" """ RabbitMQ message routing key. """ @@ -1084,9 +1064,7 @@ class SpanAttributes: Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers. """ - MESSAGING_KAFKA_DESTINATION_PARTITION = ( - "messaging.kafka.destination.partition" - ) + MESSAGING_KAFKA_DESTINATION_PARTITION = "messaging.kafka.destination.partition" """ Partition the message is sent to. """ @@ -1111,16 +1089,12 @@ class SpanAttributes: Name of the RocketMQ producer/consumer group that is handling the message. The client type is identified by the SpanKind. """ - MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = ( - "messaging.rocketmq.message.delivery_timestamp" - ) + MESSAGING_ROCKETMQ_MESSAGE_DELIVERY_TIMESTAMP = "messaging.rocketmq.message.delivery_timestamp" """ The timestamp in milliseconds that the delay message is expected to be delivered to consumer. """ - MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = ( - "messaging.rocketmq.message.delay_time_level" - ) + MESSAGING_ROCKETMQ_MESSAGE_DELAY_TIME_LEVEL = "messaging.rocketmq.message.delay_time_level" """ The delay time level for delay message, which determines the message delay time. """ @@ -1145,9 +1119,7 @@ class SpanAttributes: Key(s) of message, another way to mark message besides message id. """ - MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = ( - "messaging.rocketmq.consumption_model" - ) + MESSAGING_ROCKETMQ_CONSUMPTION_MODEL = "messaging.rocketmq.consumption_model" """ Model of message consumption. This only applies to consumer spans. """ @@ -1256,16 +1228,12 @@ class SpanAttributes: Deprecated, use the `http.resend_count` attribute. """ - HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = ( - "http.request_content_length_uncompressed" - ) + HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = "http.request_content_length_uncompressed" """ Deprecated, use the `http.request.body.size` attribute. """ - HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = ( - "http.response_content_length_uncompressed" - ) + HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = "http.response_content_length_uncompressed" """ Deprecated, use the `http.response.body.size` attribute. """ diff --git a/propagator/opentelemetry-propagator-b3/benchmarks/trace/propagation/test_benchmark_b3_format.py b/propagator/opentelemetry-propagator-b3/benchmarks/trace/propagation/test_benchmark_b3_format.py index d5ecbe742c0..2656f636e59 100644 --- a/propagator/opentelemetry-propagator-b3/benchmarks/trace/propagation/test_benchmark_b3_format.py +++ b/propagator/opentelemetry-propagator-b3/benchmarks/trace/propagation/test_benchmark_b3_format.py @@ -10,9 +10,7 @@ def test_extract_single_header(benchmark): benchmark( FORMAT.extract, - { - FORMAT.SINGLE_HEADER_KEY: "bdb5b63237ed38aea578af665aa5aa60-c32d953d73ad2251-1" - }, + {FORMAT.SINGLE_HEADER_KEY: "bdb5b63237ed38aea578af665aa5aa60-c32d953d73ad2251-1"}, ) diff --git a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py index 025a2b5dc5b..8fb2adcfb9d 100644 --- a/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py +++ b/propagator/opentelemetry-propagator-b3/src/opentelemetry/propagators/b3/__init__.py @@ -48,9 +48,7 @@ def extract( sampled = "0" flags = None - single_header = _extract_first_element( - getter.get(carrier, self.SINGLE_HEADER_KEY) - ) + single_header = _extract_first_element(getter.get(carrier, self.SINGLE_HEADER_KEY)) if single_header: # The b3 spec calls for the sampling state to be # "deferred", which is unspecified. This concept does not @@ -67,22 +65,10 @@ def extract( elif len(fields) == 4: trace_id, span_id, sampled, _ = fields else: - trace_id = ( - _extract_first_element(getter.get(carrier, self.TRACE_ID_KEY)) - or trace_id - ) - span_id = ( - _extract_first_element(getter.get(carrier, self.SPAN_ID_KEY)) - or span_id - ) - sampled = ( - _extract_first_element(getter.get(carrier, self.SAMPLED_KEY)) - or sampled - ) - flags = ( - _extract_first_element(getter.get(carrier, self.FLAGS_KEY)) - or flags - ) + trace_id = _extract_first_element(getter.get(carrier, self.TRACE_ID_KEY)) or trace_id + span_id = _extract_first_element(getter.get(carrier, self.SPAN_ID_KEY)) or span_id + sampled = _extract_first_element(getter.get(carrier, self.SAMPLED_KEY)) or sampled + flags = _extract_first_element(getter.get(carrier, self.FLAGS_KEY)) or flags if ( trace_id == trace.INVALID_TRACE_ID @@ -134,9 +120,7 @@ def inject( self.TRACE_ID_KEY, format_trace_id(span_context.trace_id), ) - setter.set( - carrier, self.SPAN_ID_KEY, format_span_id(span_context.span_id) - ) + setter.set(carrier, self.SPAN_ID_KEY, format_span_id(span_context.span_id)) setter.set(carrier, self.SAMPLED_KEY, "1" if sampled else "0") @property diff --git a/propagator/opentelemetry-propagator-b3/tests/test_b3_format.py b/propagator/opentelemetry-propagator-b3/tests/test_b3_format.py index 172ba2b4ad2..df0d778d714 100644 --- a/propagator/opentelemetry-propagator-b3/tests/test_b3_format.py +++ b/propagator/opentelemetry-propagator-b3/tests/test_b3_format.py @@ -47,18 +47,12 @@ class AbstractB3FormatTestCase: @classmethod def setUpClass(cls): generator = id_generator.RandomIdGenerator() - cls.serialized_trace_id = trace_api.format_trace_id( - generator.generate_trace_id() - ) - cls.serialized_span_id = trace_api.format_span_id( - generator.generate_span_id() - ) + cls.serialized_trace_id = trace_api.format_trace_id(generator.generate_trace_id()) + cls.serialized_span_id = trace_api.format_span_id(generator.generate_span_id()) def setUp(self) -> None: tracer_provider = trace.TracerProvider() - patcher = unittest.mock.patch.object( - trace_api, "get_tracer_provider", return_value=tracer_provider - ) + patcher = unittest.mock.patch.object(trace_api, "get_tracer_provider", return_value=tracer_provider) patcher.start() self.addCleanup(patcher.stop) @@ -108,9 +102,7 @@ def test_extract_single_header(self): """Test the extraction from a single b3 header.""" propagator = self.get_propagator() child, parent, _ = self.get_child_parent_new_carrier( - { - propagator.SINGLE_HEADER_KEY: f"{self.serialized_trace_id}-{self.serialized_span_id}" - } + {propagator.SINGLE_HEADER_KEY: f"{self.serialized_trace_id}-{self.serialized_span_id}"} ) self.assertEqual( @@ -125,9 +117,7 @@ def test_extract_single_header(self): self.assertTrue(parent.context.trace_flags.sampled) child, parent, _ = self.get_child_parent_new_carrier( - { - propagator.SINGLE_HEADER_KEY: f"{self.serialized_trace_id}-{self.serialized_span_id}-1" - } + {propagator.SINGLE_HEADER_KEY: f"{self.serialized_trace_id}-{self.serialized_span_id}-1"} ) self.assertEqual( @@ -158,9 +148,7 @@ def test_extract_header_precedence(self): } ) - self.assertEqual( - self.get_trace_id(new_carrier), single_header_trace_id - ) + self.assertEqual(self.get_trace_id(new_carrier), single_header_trace_id) def test_enabled_sampling(self): """Test b3 sample key variants that turn on sampling.""" @@ -255,9 +243,7 @@ def test_64bit_trace_id(self): }, ) - self.assertEqual( - self.get_trace_id(new_carrier), "0" * 16 + trace_id_64_bit - ) + self.assertEqual(self.get_trace_id(new_carrier), "0" * 16 + trace_id_64_bit) def test_extract_invalid_single_header_to_explicit_ctx(self): """Given unparsable header, do not modify context""" @@ -456,11 +442,7 @@ def get_trace_id(cls, carrier): return carrier[cls.get_propagator().SINGLE_HEADER_KEY].split("-")[0] def assertSampled(self, carrier): - self.assertEqual( - carrier[self.get_propagator().SINGLE_HEADER_KEY].split("-")[2], "1" - ) + self.assertEqual(carrier[self.get_propagator().SINGLE_HEADER_KEY].split("-")[2], "1") def assertNotSampled(self, carrier): - self.assertEqual( - carrier[self.get_propagator().SINGLE_HEADER_KEY].split("-")[2], "0" - ) + self.assertEqual(carrier[self.get_propagator().SINGLE_HEADER_KEY].split("-")[2], "0") diff --git a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py index 79bb1d89ea8..e71cc7cfeb7 100644 --- a/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py +++ b/propagator/opentelemetry-propagator-jaeger/src/opentelemetry/propagators/jaeger/__init__.py @@ -42,10 +42,7 @@ def extract( context = self._extract_baggage(getter, carrier, context) trace_id, span_id, flags = _parse_trace_id_header(header) - if ( - trace_id == trace.INVALID_TRACE_ID - or span_id == trace.INVALID_SPAN_ID - ): + if trace_id == trace.INVALID_TRACE_ID or span_id == trace.INVALID_SPAN_ID: return context span = trace.NonRecordingSpan( @@ -70,9 +67,7 @@ def inject( return # Non-recording spans do not have a parent - span_parent_id = ( - span.parent.span_id if span.is_recording() and span.parent else 0 - ) + span_parent_id = span.parent.span_id if span.is_recording() and span.parent else 0 trace_flags = span_context.trace_flags if trace_flags.sampled: trace_flags |= self.DEBUG_FLAG @@ -102,11 +97,7 @@ def fields(self) -> set[str]: return {self.TRACE_ID_KEY} def _extract_baggage(self, getter, carrier, context): - baggage_keys = [ - key - for key in getter.keys(carrier) - if key.startswith(self.BAGGAGE_PREFIX) - ] + baggage_keys = [key for key in getter.keys(carrier) if key.startswith(self.BAGGAGE_PREFIX)] for key in baggage_keys: value = _extract_first_element(getter.get(carrier, key)) context = baggage.set_baggage( diff --git a/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py b/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py index 481b56b9196..60b010490c8 100644 --- a/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py +++ b/propagator/opentelemetry-propagator-jaeger/tests/test_jaeger_propagator.py @@ -88,18 +88,13 @@ def test_parent_span_id(self): def test_sampled_flag_set(self): old_carrier = {FORMAT.TRACE_ID_KEY: self.serialized_uber_trace_id} _, new_carrier = get_context_new_carrier(old_carrier) - sample_flag_value = ( - int(new_carrier[FORMAT.TRACE_ID_KEY].split(":")[3]) & 0x01 - ) + sample_flag_value = int(new_carrier[FORMAT.TRACE_ID_KEY].split(":")[3]) & 0x01 self.assertEqual(1, sample_flag_value) def test_debug_flag_set(self): old_carrier = {FORMAT.TRACE_ID_KEY: self.serialized_uber_trace_id} _, new_carrier = get_context_new_carrier(old_carrier) - debug_flag_value = ( - int(new_carrier[FORMAT.TRACE_ID_KEY].split(":")[3]) - & FORMAT.DEBUG_FLAG - ) + debug_flag_value = int(new_carrier[FORMAT.TRACE_ID_KEY].split(":")[3]) & FORMAT.DEBUG_FLAG self.assertEqual(FORMAT.DEBUG_FLAG, debug_flag_value) def test_sample_debug_flags_unset(self): diff --git a/pyproject.toml b/pyproject.toml index cb8bc5eb571..ff4b6f4294a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,7 +77,7 @@ log_cli = true [tool.ruff] # https://docs.astral.sh/ruff/configuration/ -line-length = 79 +line-length = 120 force-exclude = true extend-exclude = [ "*_pb2*.py*", diff --git a/scripts/add_required_checks.py b/scripts/add_required_checks.py index 9c0db3c6a93..a5cd18803f5 100644 --- a/scripts/add_required_checks.py +++ b/scripts/add_required_checks.py @@ -22,19 +22,14 @@ "check-links", ]: with open(f"../.github/workflows/{yml_file_name}.yml") as yml_file: - job_names.extend( - [job["name"] for job in safe_load(yml_file)["jobs"].values()] - ) + job_names.extend([job["name"] for job in safe_load(yml_file)["jobs"].values()]) owner = "open-telemetry" repo = "opentelemetry-python" branch = "main" response = put( - ( - f"https://api.github.com/repos/{owner}/{repo}/branches/{branch}/" - "protection/required_status_checks/contexts" - ), + (f"https://api.github.com/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"), headers={ "Accept": "application/vnd.github.v3+json", # The token has to be created in Github, and exported to the @@ -51,8 +46,5 @@ if response.status_code == 200: print(response.content) else: - print( - "Failed to update branch protection settings. " - f"Status code: {response.status_code}" - ) + print(f"Failed to update branch protection settings. Status code: {response.status_code}") print(response.json()) diff --git a/scripts/check_for_valid_readme.py b/scripts/check_for_valid_readme.py index 4b1e11fe1ab..b490d1b0fa7 100644 --- a/scripts/check_for_valid_readme.py +++ b/scripts/check_for_valid_readme.py @@ -18,12 +18,8 @@ def is_valid_rst(path): def parse_args(): - parser = argparse.ArgumentParser( - description="Checks README.rst file in path for syntax errors." - ) - parser.add_argument( - "paths", nargs="+", help="paths containing a README.rst to test" - ) + parser = argparse.ArgumentParser(description="Checks README.rst file in path for syntax errors.") + parser.add_argument("paths", nargs="+", help="paths containing a README.rst to test") parser.add_argument("-v", "--verbose", action="store_true") return parser.parse_args() diff --git a/scripts/check_license_header.py b/scripts/check_license_header.py index 8a2f03ae9ed..2830179a825 100644 --- a/scripts/check_license_header.py +++ b/scripts/check_license_header.py @@ -61,10 +61,7 @@ def check_file(path): if len(lines) < start + 2: return False - return ( - lines[start] == EXPECTED_LINES[0] - and lines[start + 1] == EXPECTED_LINES[1] - ) + return lines[start] == EXPECTED_LINES[0] and lines[start + 1] == EXPECTED_LINES[1] def main(): diff --git a/scripts/eachdist.py b/scripts/eachdist.py index 48ec2d3d4be..65414c1bf78 100755 --- a/scripts/eachdist.py +++ b/scripts/eachdist.py @@ -187,15 +187,11 @@ def parse_args(args=None): ), ) - instparser = subparsers.add_parser( - "install", help="Install all distributions." - ) + instparser = subparsers.add_parser("install", help="Install all distributions.") def setup_instparser(instparser): instparser.set_defaults(func=install_args) - instparser.add_argument( - "pipargs", nargs=argparse.REMAINDER, help=extraargs_help("pip") - ) + instparser.add_argument("pipargs", nargs=argparse.REMAINDER, help=extraargs_help("pip")) setup_instparser(instparser) instparser.add_argument("--editable", "-e", action="store_true") @@ -213,9 +209,7 @@ def setup_instparser(instparser): eager_upgrades=True, ) - lintparser = subparsers.add_parser( - "lint", help="Lint everything, autofixing if possible." - ) + lintparser = subparsers.add_parser("lint", help="Lint everything, autofixing if possible.") lintparser.add_argument("--check-only", action="store_true") lintparser.set_defaults(func=lint_args) @@ -224,9 +218,7 @@ def setup_instparser(instparser): help="Test everything (run pytest yourself for more complex operations).", ) testparser.set_defaults(func=test_args) - testparser.add_argument( - "pytestargs", nargs=argparse.REMAINDER, help=extraargs_help("pytest") - ) + testparser.add_argument("pytestargs", nargs=argparse.REMAINDER, help=extraargs_help("pytest")) releaseparser = subparsers.add_parser( "update_versions", @@ -234,9 +226,7 @@ def setup_instparser(instparser): ) releaseparser.set_defaults(func=release_args) releaseparser.add_argument("--versions", required=True) - releaseparser.add_argument( - "releaseargs", nargs=argparse.REMAINDER, help=extraargs_help("pytest") - ) + releaseparser.add_argument("releaseargs", nargs=argparse.REMAINDER, help=extraargs_help("pytest")) patchreleaseparser = subparsers.add_parser( "update_patch_versions", @@ -291,22 +281,14 @@ def find_targets_unordered(rootpath): continue if subdir.name.startswith(".") or subdir.name.startswith("venv"): continue - if any( - (subdir / marker).exists() - for marker in ("setup.py", "pyproject.toml") - ): + if any((subdir / marker).exists() for marker in ("setup.py", "pyproject.toml")): yield subdir else: yield from find_targets_unordered(subdir) def getlistcfg(strval): - return [ - val.strip() - for line in strval.split("\n") - for val in line.split(",") - if val.strip() - ] + return [val.strip() for line in strval.split("\n") for val in line.split(",") if val.strip()] def find_targets(mode, rootpath): @@ -319,11 +301,7 @@ def find_targets(mode, rootpath): targets = list(find_targets_unordered(rootpath)) if "extraroots" in mcfg: - targets += [ - path - for extraglob in getlistcfg(mcfg["extraroots"]) - for path in rootpath.glob(extraglob) - ] + targets += [path for extraglob in getlistcfg(mcfg["extraroots"]) for path in rootpath.glob(extraglob)] if "sortfirst" in mcfg: sortfirst = getlistcfg(mcfg["sortfirst"]) @@ -357,9 +335,7 @@ def filter_func(path): for target in targets for subglob in subglobs # We need to special-case the dot, because glob fails to parse that with an IndexError. - for subdir in ( - (target,) if subglob == "." else target.glob(subglob) - ) + for subdir in ((target,) if subglob == "." else target.glob(subglob)) ) if ".egg-info" not in str(newentry) and newentry.exists() ] @@ -399,9 +375,7 @@ def runsubprocess(dry_run, params, *args, **kwargs): try: return subprocess_run(params, *args, check=check, **kwargs) except OSError as exc: - raise ValueError( - "Failed executing " + repr(params) + ": " + str(exc) - ) from exc + raise ValueError("Failed executing " + repr(params) + ": " + str(exc)) from exc def execute_args(args): @@ -425,9 +399,7 @@ def fmt_for_path(fmt, path): ) def _runcmd(cmd): - result = runsubprocess( - args.dry_run, shlex.split(cmd), cwd=rootpath, check=False - ) + result = runsubprocess(args.dry_run, shlex.split(cmd), cwd=rootpath, check=False) if result is not None and result.returncode not in args.allowexitcode: print( f"'{cmd}' failed with code {result.returncode}", @@ -436,9 +408,7 @@ def _runcmd(cmd): sys.exit(result.returncode) if args.all: - allstr = args.allsep.join( - fmt_for_path(args.all, path) for path in targets - ) + allstr = args.allsep.join(fmt_for_path(args.all, path) for path in targets) cmd = args.format.format(allstr) _runcmd(cmd) else: @@ -521,26 +491,18 @@ def lint_args(args): runsubprocess( args.dry_run, - ("black", "--config", "pyproject.toml", ".") - + (("--diff", "--check") if args.check_only else ()), + ("black", "--config", "pyproject.toml", ".") + (("--diff", "--check") if args.check_only else ()), cwd=rootdir, check=True, ) runsubprocess( args.dry_run, - ("isort", "--settings-path", ".isort.cfg", ".") - + (("--diff", "--check-only") if args.check_only else ()), + ("isort", "--settings-path", ".isort.cfg", ".") + (("--diff", "--check-only") if args.check_only else ()), cwd=rootdir, check=True, ) - runsubprocess( - args.dry_run, ("flake8", "--config", ".flake8", rootdir), check=True - ) - execute_args( - parse_subargs( - args, ("exec", "pylint {}", "--all", "--mode", "lintroots") - ) - ) + runsubprocess(args.dry_run, ("flake8", "--config", ".flake8", rootdir), check=True) + execute_args(parse_subargs(args, ("exec", "pylint {}", "--all", "--mode", "lintroots"))) execute_args( parse_subargs( args, @@ -580,11 +542,7 @@ def update_version_files(targets, version, packages): replace = f'__version__ = "{version}"' for target in filter_packages(targets, packages): - version_file_path = target.joinpath( - load(target.joinpath("pyproject.toml"))["tool"]["hatch"][ - "version" - ]["path"] - ) + version_file_path = target.joinpath(load(target.joinpath("pyproject.toml"))["tool"]["hatch"]["version"]["path"]) with open(version_file_path) as file: text = file.read() @@ -687,18 +645,14 @@ def patch_release_args(args): mcfg = cfg["stable"] packages = mcfg["packages"].split() print(f"update stable packages to {args.stable_version}") - update_patch_dependencies( - targets, args.stable_version, args.stable_version_prev, packages - ) + update_patch_dependencies(targets, args.stable_version, args.stable_version_prev, packages) update_version_files(targets, args.stable_version, packages) # prerelease mcfg = cfg["prerelease"] packages = mcfg["packages"].split() print(f"update prerelease packages to {args.unstable_version}") - update_patch_dependencies( - targets, args.unstable_version, args.unstable_version_prev, packages - ) + update_patch_dependencies(targets, args.unstable_version, args.unstable_version_prev, packages) update_version_files(targets, args.unstable_version, packages) diff --git a/scripts/griffe_check.py b/scripts/griffe_check.py index db24dec0cc6..fb70bff3e61 100644 --- a/scripts/griffe_check.py +++ b/scripts/griffe_check.py @@ -48,9 +48,7 @@ def main(): modules = get_modules() base = griffe.load(args.module, search_paths=modules) - against = griffe.load_git( - args.module, ref=args.against, search_paths=modules - ) + against = griffe.load_git(args.module, ref=args.against, search_paths=modules) breakages = list(griffe.find_breaking_changes(against, base)) # exclude version bumps from breakages as they are expected diff --git a/scripts/public_symbols_checker.py b/scripts/public_symbols_checker.py index 1066fc30f39..ef9164f0567 100644 --- a/scripts/public_symbols_checker.py +++ b/scripts/public_symbols_checker.py @@ -23,11 +23,7 @@ def get_symbols(change_type, diff_lines_getter, prefix): else: file_path_symbols = added_symbols - for diff_lines in ( - repo.commit("main") - .diff(repo.head.commit) - .iter_change_type(change_type) - ): + for diff_lines in repo.commit("main").diff(repo.head.commit).iter_change_type(change_type): if diff_lines.b_blob is None: # This happens if a file has been removed completely. b_file_path = diff_lines.a_blob.path @@ -55,16 +51,12 @@ def get_symbols(change_type, diff_lines_getter, prefix): matching_line = match( r"{prefix}({symbol_re})\s=\s.+|" r"{prefix}def\s({symbol_re})|" - r"{prefix}class\s({symbol_re})".format( - symbol_re=r"[a-zA-Z][_\w]+", prefix=prefix - ), + r"{prefix}class\s({symbol_re})".format(symbol_re=r"[a-zA-Z][_\w]+", prefix=prefix), diff_line, ) if matching_line is not None: - file_path_symbols[b_file_path].append( - next(filter(bool, matching_line.groups())) - ) + file_path_symbols[b_file_path].append(next(filter(bool, matching_line.groups()))) def a_diff_lines_getter(diff_lines): diff --git a/scripts/tests/test_eachdist.py b/scripts/tests/test_eachdist.py index c100d11c8fe..0d39d0cbeac 100644 --- a/scripts/tests/test_eachdist.py +++ b/scripts/tests/test_eachdist.py @@ -86,17 +86,10 @@ def test_all_release_packages_are_listed_in_eachdist(): config = ConfigParser() config.read(root / "eachdist.ini") - eachdist_package_names = set(config["stable"]["packages"].split()) | set( - config["prerelease"]["packages"].split() - ) + eachdist_package_names = set(config["stable"]["packages"].split()) | set(config["prerelease"]["packages"].split()) - missing_package_names = sorted( - releasable_package_names - eachdist_package_names - ) - assert not missing_package_names, ( - "packages missing from eachdist.ini: " - f"{', '.join(missing_package_names)}" - ) + missing_package_names = sorted(releasable_package_names - eachdist_package_names) + assert not missing_package_names, f"packages missing from eachdist.ini: {', '.join(missing_package_names)}" def test_update_dependencies_matches_exact_package_name(tmp_path): @@ -104,8 +97,7 @@ def test_update_dependencies_matches_exact_package_name(tmp_path): target = tmp_path / "target" write_pyproject( target, - '"opentelemetry-proto == 1.44.0.dev",\n' - ' "opentelemetry-proto-json == 0.65b0.dev",', + '"opentelemetry-proto == 1.44.0.dev",\n "opentelemetry-proto-json == 0.65b0.dev",', ) eachdist.update_dependencies( @@ -124,8 +116,7 @@ def test_update_patch_dependencies_matches_exact_package_name(tmp_path): target = tmp_path / "target" write_pyproject( target, - '"opentelemetry-proto == 1.43.0",\n' - ' "opentelemetry-proto-json == 1.43.0",', + '"opentelemetry-proto == 1.43.0",\n "opentelemetry-proto-json == 1.43.0",', ) eachdist.update_patch_dependencies( @@ -162,14 +153,10 @@ def test_update_version_files_matches_exact_project_name(tmp_path): ) assert ( - proto.joinpath("src/opentelemetry/version/__init__.py").read_text( - encoding="utf-8" - ) + proto.joinpath("src/opentelemetry/version/__init__.py").read_text(encoding="utf-8") == '__version__ = "1.45.0.dev"\n' ) assert ( - proto_json.joinpath("src/opentelemetry/version/__init__.py").read_text( - encoding="utf-8" - ) + proto_json.joinpath("src/opentelemetry/version/__init__.py").read_text(encoding="utf-8") == '__version__ = "0.65b0.dev"\n' ) diff --git a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py index c8602b0512f..a7730260b5d 100644 --- a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py +++ b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_span.py @@ -22,9 +22,7 @@ # Copied from Java # https://github.com/open-telemetry/opentelemetry-java/blob/0d3a04669e51b33ea47b29399a7af00012d25ccb/opencensus-shim/src/main/java/io/opentelemetry/opencensusshim/SpanConverter.java#L24-L27 _MESSAGE_EVENT_ATTRIBUTE_KEY_TYPE = "message.event.type" -_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_UNCOMPRESSED = ( - "message.event.size.uncompressed" -) +_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_UNCOMPRESSED = "message.event.size.uncompressed" _MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_COMPRESSED = "message.event.size.compressed" _MESSAGE_EVENT_TYPE_STR_MAPPING = { @@ -42,9 +40,7 @@ def _opencensus_time_to_nanos(timestamp: str) -> int: # https://github.com/census-instrumentation/opencensus-python/blob/c38c71b9285e71de94d0185ff3c5bf65ee163345/opencensus/common/utils/__init__.py#L76 # # datetime.fromisoformat() does not work with the added "Z" until python 3.11 - seconds_float = datetime.strptime( - timestamp, "%Y-%m-%dT%H:%M:%S.%fZ" - ).timestamp() + seconds_float = datetime.strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%fZ").timestamp() return round(seconds_float * 1e9) @@ -81,18 +77,12 @@ def add_annotation(self, description, **attrs): def add_message_event(self, message_event: MessageEvent): attrs = { - _MESSAGE_EVENT_ATTRIBUTE_KEY_TYPE: _MESSAGE_EVENT_TYPE_STR_MAPPING[ - message_event.type - ], + _MESSAGE_EVENT_ATTRIBUTE_KEY_TYPE: _MESSAGE_EVENT_TYPE_STR_MAPPING[message_event.type], } if message_event.uncompressed_size_bytes is not None: - attrs[_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_UNCOMPRESSED] = ( - message_event.uncompressed_size_bytes - ) + attrs[_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_UNCOMPRESSED] = message_event.uncompressed_size_bytes if message_event.compressed_size_bytes is not None: - attrs[_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_COMPRESSED] = ( - message_event.compressed_size_bytes - ) + attrs[_MESSAGE_EVENT_ATTRIBUTE_KEY_SIZE_COMPRESSED] = message_event.compressed_size_bytes timestamp = _opencensus_time_to_nanos(message_event.timestamp) self._self_otel_span.add_event( @@ -107,9 +97,7 @@ def add_link(self, link): links in start_span(). Same issue applies to SpanKind. Also see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/opencensus.md#known-incompatibilities """ - _logger.warning( - "OpenTelemetry does not support links added after a span is created." - ) + _logger.warning("OpenTelemetry does not support links added after a span is created.") @property def span_kind(self): @@ -121,9 +109,7 @@ def span_kind(self): @span_kind.setter def span_kind(self, value): - _logger.warning( - "OpenTelemetry does not support setting span kind after a span is created." - ) + _logger.warning("OpenTelemetry does not support setting span kind after a span is created.") def set_status(self, status: Status): self._self_otel_span.set_status( @@ -143,14 +129,10 @@ def __enter__(self): # pylint: disable=arguments-differ def __exit__(self, exception_type, exception_value, traceback): - self._self_otel_span.__exit__( - exception_type, exception_value, traceback - ) + self._self_otel_span.__exit__(exception_type, exception_value, traceback) # OpenCensus Span.__exit__() calls Tracer.end_span() # https://github.com/census-instrumentation/opencensus-python/blob/2e08df591b507612b3968be8c2538dedbf8fab37/opencensus/trace/span.py#L390 # but that would cause the OTel span to be ended twice. Instead, this code just copies # the context teardown from that method. context.detach(self._self_token) - execution_context.set_current_span( - self._self_shim_tracer.current_span() - ) + execution_context.set_current_span(self._self_shim_tracer.current_span()) diff --git a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py index b7bc55f491e..f648ccbf8a4 100644 --- a/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py +++ b/shim/opentelemetry-opencensus-shim/src/opentelemetry/shim/opencensus/_shim_tracer.py @@ -19,9 +19,7 @@ _SAMPLED = trace.TraceFlags(trace.TraceFlags.SAMPLED) -def set_shim_span_in_context( - span: ShimSpan, ctx: context.Context -) -> context.Context: +def set_shim_span_in_context(span: ShimSpan, ctx: context.Context) -> context.Context: return context.set_value(_SHIM_SPAN_KEY, span, ctx) @@ -29,9 +27,7 @@ def get_shim_span_in_context() -> ShimSpan: return context.get_value(_SHIM_SPAN_KEY) -def set_oc_span_in_context( - oc_span_context: SpanContext, ctx: context.Context -) -> context.Context: +def set_oc_span_in_context(oc_span_context: SpanContext, ctx: context.Context) -> context.Context: """Returns a new OTel context based on ctx with oc_span_context set as the current span""" # If no SpanContext is passed to the opencensus.trace.tracer.Tracer, it creates a new one @@ -46,9 +42,7 @@ def set_oc_span_in_context( trace_id = int(oc_span_context.trace_id, 16) span_id = int(oc_span_context.span_id, 16) is_remote = oc_span_context.from_header - trace_flags = ( - _SAMPLED if oc_span_context.trace_options.get_enabled() else None - ) + trace_flags = _SAMPLED if oc_span_context.trace_options.get_enabled() else None trace_state = ( trace.TraceState(tuple(oc_span_context.tracestate.items())) # OC SpanContext does not validate this type @@ -95,9 +89,7 @@ def start_span(self, name="span"): # If there is no current span in context, use the one provided to the OC Tracer at # creation time if trace.get_current_span(parent_ctx) is trace.INVALID_SPAN: - parent_ctx = set_oc_span_in_context( - self._self_oc_span_context, parent_ctx - ) + parent_ctx = set_oc_span_in_context(self._self_oc_span_context, parent_ctx) span = self._self_otel_tracer.start_span(name, context=parent_ctx) shim_span = ShimSpan( diff --git a/shim/opentelemetry-opencensus-shim/tests/test_shim.py b/shim/opentelemetry-opencensus-shim/tests/test_shim.py index 255d423fa29..df99f8b9b6c 100644 --- a/shim/opentelemetry-opencensus-shim/tests/test_shim.py +++ b/shim/opentelemetry-opencensus-shim/tests/test_shim.py @@ -144,9 +144,7 @@ def test_set_oc_span_in_context_ids(self): trace.format_trace_id(span_ctx.trace_id), "ace0216bab2b7ba249761dbb19c871b7", ) - self.assertEqual( - trace.format_span_id(span_ctx.span_id), "1fead89ecf242225" - ) + self.assertEqual(trace.format_span_id(span_ctx.span_id), "1fead89ecf242225") def test_set_oc_span_in_context_remote(self): for is_from_remote in True, False: @@ -195,6 +193,4 @@ def test_set_oc_span_in_context_tracestate(self): context.get_current(), ) span_ctx = trace.get_current_span(ctx).get_span_context() - self.assertEqual( - span_ctx.trace_state, trace.TraceState([("hello", "tracestate")]) - ) + self.assertEqual(span_ctx.trace_state, trace.TraceState([("hello", "tracestate")])) diff --git a/shim/opentelemetry-opencensus-shim/tests/test_shim_with_sdk.py b/shim/opentelemetry-opencensus-shim/tests/test_shim_with_sdk.py index 2f116f4cafb..5fda5d6e5ad 100644 --- a/shim/opentelemetry-opencensus-shim/tests/test_shim_with_sdk.py +++ b/shim/opentelemetry-opencensus-shim/tests/test_shim_with_sdk.py @@ -25,13 +25,9 @@ class TestShimWithSdk(unittest.TestCase): def setUp(self): uninstall_shim() - self.tracer_provider = TracerProvider( - sampler=ALWAYS_ON, shutdown_on_exit=False - ) + self.tracer_provider = TracerProvider(sampler=ALWAYS_ON, shutdown_on_exit=False) self.mem_exporter = InMemorySpanExporter() - self.tracer_provider.add_span_processor( - SimpleSpanProcessor(self.mem_exporter) - ) + self.tracer_provider.add_span_processor(SimpleSpanProcessor(self.mem_exporter)) install_shim(self.tracer_provider) def tearDown(self): @@ -70,9 +66,7 @@ def test_context_manager_interacts_with_context(self): otel_span = trace.get_current_span() self.assertNotEqual(span.span_id, 0) - self.assertEqual( - span.span_id, otel_span.get_span_context().span_id - ) + self.assertEqual(span.span_id, otel_span.get_span_context().span_id) # The span should now be popped from context self.assertIs(trace.get_current_span(), trace.INVALID_SPAN) @@ -113,9 +107,7 @@ def test_uses_tracers_span_context_when_no_parent_in_context(self): trace.format_trace_id(parent.trace_id), "ace0216bab2b7ba249761dbb19c871b7", ) - self.assertEqual( - trace.format_span_id(parent.span_id), "1fead89ecf242225" - ) + self.assertEqual(trace.format_span_id(parent.span_id), "1fead89ecf242225") def test_ignores_tracers_span_context_when_parent_already_in_context(self): # the SpanContext passed to the Tracer will be ignored since there is already a span @@ -160,18 +152,12 @@ def test_span_annotations(self): self.assertEqual(len(exported_span.events), 1) event = exported_span.events[0] self.assertEqual(event.name, "description") - self.assertDictEqual( - dict(event.attributes), {"key1": "value1", "key2": "value2"} - ) + self.assertDictEqual(dict(event.attributes), {"key1": "value1", "key2": "value2"}) def test_span_message_event(self): oc_tracer = OcTracer() with oc_tracer.start_span("span1") as span: - span.add_message_event( - time_event.MessageEvent( - _TIMESTAMP, "id_sent", time_event.Type.SENT, "20", "10" - ) - ) + span.add_message_event(time_event.MessageEvent(_TIMESTAMP, "id_sent", time_event.Type.SENT, "20", "10")) span.add_message_event( time_event.MessageEvent( _TIMESTAMP, @@ -235,9 +221,7 @@ def test_span_status(self): ) with oc_tracer.start_span("span_exception") as span: - span.set_status( - OcStatus.from_exception(Exception("exception message")) - ) + span.set_status(OcStatus.from_exception(Exception("exception message"))) self.assertEqual(len(self.mem_exporter.get_finished_spans()), 2) ok_span: ReadableSpan = self.mem_exporter.get_finished_spans()[0] @@ -252,9 +236,7 @@ def test_span_status(self): self.assertEqual(exc_span.status.description, "exception message") def assert_related(self, *, child: ReadableSpan, parent: ReadableSpan): - self.assertEqual( - child.parent.span_id, parent.get_span_context().span_id - ) + self.assertEqual(child.parent.span_id, parent.get_span_context().span_id) def test_otel_sandwich(self): oc_tracer = OcTracer() @@ -265,13 +247,9 @@ def test_otel_sandwich(self): pass self.assertEqual(len(self.mem_exporter.get_finished_spans()), 3) - opencensus_inner: ReadableSpan = ( - self.mem_exporter.get_finished_spans()[0] - ) + opencensus_inner: ReadableSpan = self.mem_exporter.get_finished_spans()[0] otel_middle: ReadableSpan = self.mem_exporter.get_finished_spans()[1] - opencensus_outer: ReadableSpan = ( - self.mem_exporter.get_finished_spans()[2] - ) + opencensus_outer: ReadableSpan = self.mem_exporter.get_finished_spans()[2] self.assertEqual(opencensus_outer.name, "opencensus_outer") self.assertEqual(otel_middle.name, "otel_middle") @@ -291,9 +269,7 @@ def test_opencensus_sandwich(self): self.assertEqual(len(self.mem_exporter.get_finished_spans()), 3) otel_inner: ReadableSpan = self.mem_exporter.get_finished_spans()[0] - opencensus_middle: ReadableSpan = ( - self.mem_exporter.get_finished_spans()[1] - ) + opencensus_middle: ReadableSpan = self.mem_exporter.get_finished_spans()[1] otel_outer: ReadableSpan = self.mem_exporter.get_finished_spans()[2] self.assertEqual(otel_outer.name, "otel_outer") diff --git a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py index 3a3ab126118..72baa927219 100644 --- a/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py +++ b/shim/opentelemetry-opentracing-shim/src/opentelemetry/shim/opentracing_shim/__init__.py @@ -244,9 +244,7 @@ def set_tag(self, key: str, value: ValueT) -> SpanShim: self._otel_span.set_attribute(key, value) return self - def log_kv( - self, key_values: Attributes, timestamp: float | None = None - ) -> SpanShim: + def log_kv(self, key_values: Attributes, timestamp: float | None = None) -> SpanShim: """Logs an event for the wrapped OpenTelemetry span. Note: @@ -292,9 +290,7 @@ def set_baggage_item(self, key: str, value: str): value: A tag value. """ # pylint: disable=protected-access - self._context._baggage = set_baggage( - key, value, context=self._context._baggage - ) + self._context._baggage = set_baggage(key, value, context=self._context._baggage) def get_baggage_item(self, key: str) -> object | None: """Retrieves value of the baggage item with the given key. @@ -344,9 +340,7 @@ class ScopeShim(Scope): ``__exit__()`` method. Defaults to `None`. """ - def __init__( - self, manager: ScopeManagerShim, span: SpanShim, span_cm=None - ): + def __init__(self, manager: ScopeManagerShim, span: SpanShim, span_cm=None): super().__init__(manager, span) self._span_cm = span_cm self._token = attach(set_value(_SHIM_KEY, self)) @@ -585,10 +579,7 @@ def start_active_span( current_span = get_current_span() - if ( - child_of is None - and current_span.get_span_context() is not INVALID_SPAN_CONTEXT - ): + if child_of is None and current_span.get_span_context() is not INVALID_SPAN_CONTEXT: child_of = SpanShim(None, None, current_span) span = self.start_span( diff --git a/shim/opentelemetry-opentracing-shim/tests/test_shim.py b/shim/opentelemetry-opentracing-shim/tests/test_shim.py index 1687b0d1033..21259eef7ac 100644 --- a/shim/opentelemetry-opentracing-shim/tests/test_shim.py +++ b/shim/opentelemetry-opentracing-shim/tests/test_shim.py @@ -155,9 +155,7 @@ def test_explicit_span_activation(self): # Verify no span is currently active. self.assertIsNone(self.shim.active_span) - with self.shim.scope_manager.activate( - span, finish_on_close=True - ) as scope: + with self.shim.scope_manager.activate(span, finish_on_close=True) as scope: # Verify span is active. self.assertEqual( self.shim.active_span.context.unwrap(), @@ -170,18 +168,14 @@ def test_explicit_span_activation(self): def test_start_active_span_finish_on_close(self): """Test `finish_on_close` argument of `start_active_span()`.""" - with self.shim.start_active_span( - "TestSpan7", finish_on_close=True - ) as scope: + with self.shim.start_active_span("TestSpan7", finish_on_close=True) as scope: # Verify span hasn't ended. self.assertIsNone(scope.span.unwrap().end_time) # Verify span has ended. self.assertIsNotNone(scope.span.unwrap().end_time) - with self.shim.start_active_span( - "TestSpan8", finish_on_close=False - ) as scope: + with self.shim.start_active_span("TestSpan8", finish_on_close=False) as scope: # Verify span hasn't ended. self.assertIsNone(scope.span.unwrap().end_time) @@ -195,9 +189,7 @@ def test_activate_finish_on_close(self): span = self.shim.start_span("TestSpan9") - with self.shim.scope_manager.activate( - span, finish_on_close=True - ) as scope: + with self.shim.scope_manager.activate(span, finish_on_close=True) as scope: # Verify span is active. self.assertEqual( self.shim.active_span.context.unwrap(), @@ -209,9 +201,7 @@ def test_activate_finish_on_close(self): span = self.shim.start_span("TestSpan10") - with self.shim.scope_manager.activate( - span, finish_on_close=False - ) as scope: + with self.shim.scope_manager.activate(span, finish_on_close=False) as scope: # Verify span is active. self.assertEqual( self.shim.active_span.context.unwrap(), @@ -275,12 +265,8 @@ def test_parent_child_implicit(self): ) # Verify parent-child relationship. - parent_trace_id = ( - parent.span.unwrap().get_span_context().trace_id - ) - child_trace_id = ( - child.span.unwrap().get_span_context().trace_id - ) + parent_trace_id = parent.span.unwrap().get_span_context().trace_id + child_trace_id = child.span.unwrap().get_span_context().trace_id self.assertEqual(parent_trace_id, child_trace_id) self.assertEqual( @@ -306,13 +292,9 @@ def test_parent_child_explicit_span(self): """ with self.shim.start_span("ParentSpan") as parent: - with self.shim.start_active_span( - "ChildSpan", child_of=parent - ) as child: + with self.shim.start_active_span("ChildSpan", child_of=parent) as child: parent_trace_id = parent.unwrap().get_span_context().trace_id - child_trace_id = ( - child.span.unwrap().get_span_context().trace_id - ) + child_trace_id = child.span.unwrap().get_span_context().trace_id self.assertEqual(child_trace_id, parent_trace_id) self.assertEqual( @@ -327,9 +309,7 @@ def test_parent_child_explicit_span(self): child_trace_id = child.unwrap().get_span_context().trace_id self.assertEqual(child_trace_id, parent_trace_id) - self.assertEqual( - child.unwrap().parent, parent.unwrap().get_span_context() - ) + self.assertEqual(child.unwrap().parent, parent.unwrap().get_span_context()) child.finish() @@ -339,30 +319,20 @@ def test_parent_child_explicit_span_context(self): """ with self.shim.start_span("ParentSpan") as parent: - with self.shim.start_active_span( - "ChildSpan", child_of=parent.context - ) as child: + with self.shim.start_active_span("ChildSpan", child_of=parent.context) as child: parent_trace_id = parent.unwrap().get_span_context().trace_id - child_trace_id = ( - child.span.unwrap().get_span_context().trace_id - ) + child_trace_id = child.span.unwrap().get_span_context().trace_id self.assertEqual(child_trace_id, parent_trace_id) - self.assertEqual( - child.span.unwrap().parent, parent.context.unwrap() - ) + self.assertEqual(child.span.unwrap().parent, parent.context.unwrap()) with self.shim.start_span("ParentSpan") as parent: - with self.shim.start_span( - "SpanWithContextParent", child_of=parent.context - ) as child: + with self.shim.start_span("SpanWithContextParent", child_of=parent.context) as child: parent_trace_id = parent.unwrap().get_span_context().trace_id child_trace_id = child.unwrap().get_span_context().trace_id self.assertEqual(child_trace_id, parent_trace_id) - self.assertEqual( - child.unwrap().parent, parent.context.unwrap() - ) + self.assertEqual(child.unwrap().parent, parent.context.unwrap()) def test_references(self): """Test span creation using the `references` argument.""" @@ -370,9 +340,7 @@ def test_references(self): with self.shim.start_span("ParentSpan") as parent: ref = opentracing.child_of(parent.context) - with self.shim.start_active_span( - "ChildSpan", references=[ref] - ) as child: + with self.shim.start_active_span("ChildSpan", references=[ref]) as child: self.assertEqual( child.span.unwrap().links[0].context, parent.context.unwrap(), @@ -384,9 +352,7 @@ def test_follows_from_references(self): with self.shim.start_span("ParentSpan") as parent: ref = opentracing.follows_from(parent.context) - with self.shim.start_active_span( - "FollowingSpan", references=[ref] - ) as child: + with self.shim.start_active_span("FollowingSpan", references=[ref]) as child: self.assertEqual( child.span.unwrap().links[0].context, parent.context.unwrap(), @@ -435,9 +401,7 @@ def test_log_kv(self): # Test explicit timestamp. now = time.time() span.log_kv({"foo": "bar"}, now) - result = util.time_seconds_from_ns( - span.unwrap().events[1].timestamp - ) + result = util.time_seconds_from_ns(span.unwrap().events[1].timestamp) self.assertEqual(span.unwrap().events[1].attributes["foo"], "bar") # Tolerate inaccuracies of less than a microsecond. See Note: # https://open-telemetry.github.io/opentelemetry-python/shim/opentracing_shim/opentracing_shim.html @@ -489,63 +453,43 @@ def test_span_on_error(self): raise Exception("bad thing") ex = exc_ctx.exception - expected_stack = "".join( - traceback.format_exception(type(ex), value=ex, tb=ex.__traceback__) - ) + expected_stack = "".join(traceback.format_exception(type(ex), value=ex, tb=ex.__traceback__)) # Verify exception details have been added to span. exc_event = scope.span.unwrap().events[0] self.assertEqual(exc_event.name, "exception") - self.assertEqual( - exc_event.attributes["exception.message"], "bad thing" - ) - self.assertEqual( - exc_event.attributes["exception.type"], Exception.__name__ - ) + self.assertEqual(exc_event.attributes["exception.message"], "bad thing") + self.assertEqual(exc_event.attributes["exception.type"], Exception.__name__) # cannot get the whole stacktrace so just assert exception part is contained - self.assertIn( - expected_stack, exc_event.attributes["exception.stacktrace"] - ) + self.assertIn(expected_stack, exc_event.attributes["exception.stacktrace"]) def test_inject_http_headers(self): """Test `inject()` method for Format.HTTP_HEADERS.""" - otel_context = trace.SpanContext( - trace_id=1220, span_id=7478, is_remote=False - ) + otel_context = trace.SpanContext(trace_id=1220, span_id=7478, is_remote=False) context = SpanContextShim(otel_context) headers = {} self.shim.inject(context, opentracing.Format.HTTP_HEADERS, headers) - self.assertEqual( - headers[MockTextMapPropagator.TRACE_ID_KEY], str(1220) - ) + self.assertEqual(headers[MockTextMapPropagator.TRACE_ID_KEY], str(1220)) self.assertEqual(headers[MockTextMapPropagator.SPAN_ID_KEY], str(7478)) def test_inject_text_map(self): """Test `inject()` method for Format.TEXT_MAP.""" - otel_context = trace.SpanContext( - trace_id=1220, span_id=7478, is_remote=False - ) + otel_context = trace.SpanContext(trace_id=1220, span_id=7478, is_remote=False) context = SpanContextShim(otel_context) # Verify Format.TEXT_MAP text_map = {} self.shim.inject(context, opentracing.Format.TEXT_MAP, text_map) - self.assertEqual( - text_map[MockTextMapPropagator.TRACE_ID_KEY], str(1220) - ) - self.assertEqual( - text_map[MockTextMapPropagator.SPAN_ID_KEY], str(7478) - ) + self.assertEqual(text_map[MockTextMapPropagator.TRACE_ID_KEY], str(1220)) + self.assertEqual(text_map[MockTextMapPropagator.SPAN_ID_KEY], str(7478)) def test_inject_binary(self): """Test `inject()` method for Format.BINARY.""" - otel_context = trace.SpanContext( - trace_id=1220, span_id=7478, is_remote=False - ) + otel_context = trace.SpanContext(trace_id=1220, span_id=7478, is_remote=False) context = SpanContextShim(otel_context) # Verify exception for non supported binary format. @@ -598,9 +542,7 @@ def test_extract_binary(self): self.shim.extract(opentracing.Format.BINARY, bytearray()) def test_baggage(self): - span_context_shim = SpanContextShim( - trace.SpanContext(1234, 5678, is_remote=False) - ) + span_context_shim = SpanContextShim(trace.SpanContext(1234, 5678, is_remote=False)) baggage = span_context_shim.baggage @@ -639,19 +581,13 @@ def test_mixed_mode(self): span_shim = self.shim.start_span("TestSpan16") with self.shim.scope_manager.activate(span_shim, finish_on_close=True): - with ( - TracerProvider() - .get_tracer(__name__) - .start_as_current_span("abc") - ) as opentelemetry_span: + with TracerProvider().get_tracer(__name__).start_as_current_span("abc") as opentelemetry_span: self.assertIs( span_shim.unwrap().context, opentelemetry_span.parent, ) - with ( - TracerProvider().get_tracer(__name__).start_as_current_span("abc") - ) as opentelemetry_span: + with TracerProvider().get_tracer(__name__).start_as_current_span("abc") as opentelemetry_span: with self.shim.start_active_span("TestSpan17") as scope: self.assertIs( scope.span.unwrap().parent, diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_asyncio.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_asyncio.py index 349c61d0082..934a9bf2265 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_asyncio.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_asyncio.py @@ -45,9 +45,7 @@ async def send(self): scope.span.set_tag(tags.SPAN_KIND, tags.SPAN_KIND_RPC_CLIENT) message = {} - self.tracer.inject( - scope.span.context, opentracing.Format.TEXT_MAP, message - ) + self.tracer.inject(scope.span.context, opentracing.Format.TEXT_MAP, message) await self.queue.put(message) logger.info("Sent message from client") @@ -78,9 +76,5 @@ def test(self): self.loop.run_forever() spans = self.tracer.finished_spans() - self.assertIsNotNone( - get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_SERVER) - ) - self.assertIsNotNone( - get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_CLIENT) - ) + self.assertIsNotNone(get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_SERVER)) + self.assertIsNotNone(get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_CLIENT)) diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_threads.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_threads.py index 8f6e795eae0..f2015d2bd73 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_threads.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_client_server/test_threads.py @@ -47,9 +47,7 @@ def send(self): scope.span.set_tag(tags.SPAN_KIND, tags.SPAN_KIND_RPC_CLIENT) message = {} - self.tracer.inject( - scope.span.context, opentracing.Format.TEXT_MAP, message - ) + self.tracer.inject(scope.span.context, opentracing.Format.TEXT_MAP, message) self.queue.put(message) logger.info("Sent message from client") @@ -69,9 +67,5 @@ def test(self): await_until(lambda: len(self.tracer.finished_spans()) >= 2) spans = self.tracer.finished_spans() - self.assertIsNotNone( - get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_SERVER) - ) - self.assertIsNotNone( - get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_CLIENT) - ) + self.assertIsNotNone(get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_SERVER)) + self.assertIsNotNone(get_one_by_tag(spans, tags.SPAN_KIND, tags.SPAN_KIND_RPC_CLIENT)) diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/request_handler.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/request_handler.py index 23153ed4d71..9d830c2c8eb 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/request_handler.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_common_request_handler/request_handler.py @@ -21,9 +21,7 @@ def before_request(self, request, request_context): # If we should ignore the active Span, use any passed SpanContext # as the parent. Else, use the active one. if self.ignore_active_span: - span = self.tracer.start_span( - "send", child_of=self.context, ignore_active_span=True - ) + span = self.tracer.start_span("send", child_of=self.context, ignore_active_span=True) else: span = self.tracer.start_span("send") diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_multiple_callbacks/test_threads.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_multiple_callbacks/test_threads.py index a348b4558bb..a55ccb44b0f 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_multiple_callbacks/test_threads.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_multiple_callbacks/test_threads.py @@ -23,9 +23,7 @@ def setUp(self): # pylint: disable=invalid-name def test_main(self): try: - scope = self.tracer.start_active_span( - "parent", finish_on_close=False - ) + scope = self.tracer.start_active_span("parent", finish_on_close=False) scope.span.ref_count = RefCount(1) self.submit_callbacks(scope.span) finally: @@ -59,6 +57,4 @@ def task(self, interval, parent_span): def submit_callbacks(self, parent_span): for _ in range(3): parent_span.ref_count.incr() - self.executor.submit( - self.task, 0.1 + random.randint(200, 500) * 0.001, parent_span - ) + self.executor.submit(self.task, 0.1 + random.randint(200, 500) * 0.001, parent_span) diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_asyncio.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_asyncio.py index d70d8824f3b..b0183a3188d 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_asyncio.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_asyncio.py @@ -40,9 +40,7 @@ async def task(): self.assertEqual(spans[0].name, "one") for idx in range(1, 4): - self.assertEqual( - spans[0].attributes.get(f"key{idx}", None), str(idx) - ) + self.assertEqual(spans[0].attributes.get(f"key{idx}", None), str(idx)) def submit(self): span = self.tracer.scope_manager.active.span diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_threads.py b/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_threads.py index b117a3aa93b..59a576d0cba 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_threads.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/test_nested_callbacks/test_threads.py @@ -35,9 +35,7 @@ def test_main(self): self.assertEqual(spans[0].name, "one") for idx in range(1, 4): - self.assertEqual( - spans[0].attributes.get(f"key{idx}", None), str(idx) - ) + self.assertEqual(spans[0].attributes.get(f"key{idx}", None), str(idx)) def submit(self): span = self.tracer.scope_manager.active.span @@ -51,9 +49,7 @@ def task2(): span.set_tag("key2", "2") def task3(): - with self.tracer.scope_manager.activate( - span, True - ): + with self.tracer.scope_manager.activate(span, True): span.set_tag("key3", "3") self.executor.submit(task3) diff --git a/shim/opentelemetry-opentracing-shim/tests/testbed/testcase.py b/shim/opentelemetry-opentracing-shim/tests/testbed/testcase.py index 9ed63fa5b23..a347c860258 100644 --- a/shim/opentelemetry-opentracing-shim/tests/testbed/testcase.py +++ b/shim/opentelemetry-opentracing-shim/tests/testbed/testcase.py @@ -12,9 +12,7 @@ def assertSameTrace(self, spanA, spanB): return self.assertEqual(spanA.context.trace_id, spanB.context.trace_id) def assertNotSameTrace(self, spanA, spanB): - return self.assertNotEqual( - spanA.context.trace_id, spanB.context.trace_id - ) + return self.assertNotEqual(spanA.context.trace_id, spanB.context.trace_id) def assertIsChildOf(self, spanA, spanB): # spanA is child of spanB diff --git a/tests/opentelemetry-docker-tests/tests/opencensus/test_opencensusexporter_functional.py b/tests/opentelemetry-docker-tests/tests/opencensus/test_opencensusexporter_functional.py index 3e3a8eefb86..42dfa396ca3 100644 --- a/tests/opentelemetry-docker-tests/tests/opencensus/test_opencensusexporter_functional.py +++ b/tests/opentelemetry-docker-tests/tests/opencensus/test_opencensusexporter_functional.py @@ -28,9 +28,7 @@ def setUp(self): trace.set_tracer_provider(TracerProvider()) self.tracer = trace.get_tracer(__name__) - self.span_processor = ExportStatusSpanProcessor( - OpenCensusSpanExporter(endpoint="localhost:55678") - ) + self.span_processor = ExportStatusSpanProcessor(OpenCensusSpanExporter(endpoint="localhost:55678")) trace.get_tracer_provider().add_span_processor(self.span_processor) diff --git a/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_logs_functional.py b/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_logs_functional.py index aebb6b0d0f0..e8fb377d6d6 100644 --- a/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_logs_functional.py +++ b/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_logs_functional.py @@ -147,9 +147,7 @@ class TestLogsExporter: - @pytest.fixture( - scope="class", params=LOG_EXPORTER_CONFIGS, ids=lambda c: c.id - ) + @pytest.fixture(scope="class", params=LOG_EXPORTER_CONFIGS, ids=lambda c: c.id) def config(self, request) -> ExporterConfig[LogRecordExporter]: return request.param @@ -162,9 +160,7 @@ def logger_provider( provider = LoggerProvider( resource=Resource.create({"service.name": "test-service"}), ) - provider.add_log_record_processor( - SimpleLogRecordProcessor(config.build()) - ) + provider.add_log_record_processor(SimpleLogRecordProcessor(config.build())) try: yield provider finally: @@ -184,21 +180,13 @@ def test_log_body(self, logger: Logger, server: OtlpProtoTestServer): recorded = server.get_log_record(timeout=5.0) assert recorded.log_record.body.string_value == snapshot("hello world") - def test_log_severity_number( - self, logger: Logger, server: OtlpProtoTestServer - ): - logger.emit( - severity_number=SeverityNumber.ERROR, body="error occurred" - ) + def test_log_severity_number(self, logger: Logger, server: OtlpProtoTestServer): + logger.emit(severity_number=SeverityNumber.ERROR, body="error occurred") recorded = server.get_log_record(timeout=5.0) - assert ( - recorded.log_record.severity_number == SeverityNumber.ERROR.value - ) + assert recorded.log_record.severity_number == SeverityNumber.ERROR.value - def test_log_severity_text( - self, logger: Logger, server: OtlpProtoTestServer - ): + def test_log_severity_text(self, logger: Logger, server: OtlpProtoTestServer): logger.emit( severity_number=SeverityNumber.WARN, severity_text="WARN", @@ -223,13 +211,9 @@ def test_log_attributes(self, logger: Logger, server: OtlpProtoTestServer): recorded = server.get_log_record(timeout=5.0) attrs = _attrs_to_dict(recorded.log_record.attributes) assert math.isclose(attrs.pop("float_key"), 3.14, abs_tol=1e-5) - assert attrs == snapshot( - {"str_key": "hello", "int_key": 42, "bool_key": True} - ) + assert attrs == snapshot({"str_key": "hello", "int_key": 42, "bool_key": True}) - def test_scope_attributes( - self, logger_provider: LoggerProvider, server: OtlpProtoTestServer - ): + def test_scope_attributes(self, logger_provider: LoggerProvider, server: OtlpProtoTestServer): logger = logger_provider.get_logger( "test.scope", version="1.0.0", @@ -240,13 +224,9 @@ def test_scope_attributes( recorded = server.get_log_record(timeout=5.0) assert recorded.scope.name == snapshot("test.scope") assert recorded.scope.version == snapshot("1.0.0") - assert _attrs_to_dict(recorded.scope.attributes) == snapshot( - {"scope.key": "scope.val"} - ) + assert _attrs_to_dict(recorded.scope.attributes) == snapshot({"scope.key": "scope.val"}) - def test_resource_attributes( - self, logger: Logger, server: OtlpProtoTestServer - ): + def test_resource_attributes(self, logger: Logger, server: OtlpProtoTestServer): logger.emit(body="resource test", severity_number=SeverityNumber.INFO) recorded = server.get_log_record(timeout=5.0) diff --git a/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_metrics_functional.py b/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_metrics_functional.py index 8378b171623..494aacb7759 100644 --- a/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_metrics_functional.py +++ b/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_metrics_functional.py @@ -151,9 +151,7 @@ class TestMetricsExporter: - @pytest.fixture( - scope="class", params=METRIC_EXPORTER_CONFIGS, ids=lambda c: c.id - ) + @pytest.fixture(scope="class", params=METRIC_EXPORTER_CONFIGS, ids=lambda c: c.id) def config(self, request) -> ExporterConfig[MetricExporter]: return request.param @@ -163,14 +161,10 @@ def reader( config: ExporterConfig[MetricExporter], server: OtlpProtoTestServer, ) -> PeriodicExportingMetricReader: - return PeriodicExportingMetricReader( - config.build(), export_interval_millis=math.inf - ) + return PeriodicExportingMetricReader(config.build(), export_interval_millis=math.inf) @pytest.fixture(scope="class") - def meter_provider( - self, reader: PeriodicExportingMetricReader - ) -> Iterator[MeterProvider]: + def meter_provider(self, reader: PeriodicExportingMetricReader) -> Iterator[MeterProvider]: provider = MeterProvider( metric_readers=[reader], resource=Resource.create({"service.name": "test-service"}), @@ -205,10 +199,7 @@ def test_sum_counter( assert recorded.metric.unit == snapshot("requests") assert recorded.metric.HasField("sum") assert recorded.metric.sum.is_monotonic - dps = { - _attrs_to_dict(dp.attributes)["status"]: dp.as_int - for dp in recorded.metric.sum.data_points - } + dps = {_attrs_to_dict(dp.attributes)["status"]: dp.as_int for dp in recorded.metric.sum.data_points} assert dps == snapshot({"ok": 10, "error": 5}) def test_sum_up_down_counter( @@ -222,9 +213,7 @@ def test_sum_up_down_counter( counter.add(-3) reader.force_flush(timeout_millis=5000) - recorded = server.wait_for_metric( - name="test.up_down_counter", timeout=5.0 - ) + recorded = server.wait_for_metric(name="test.up_down_counter", timeout=5.0) assert recorded.metric.HasField("sum") assert not recorded.metric.sum.is_monotonic assert recorded.metric.sum.data_points[0].as_int == 7 @@ -268,9 +257,7 @@ def test_exponential_histogram( config: ExporterConfig[MetricExporter], server: OtlpProtoTestServer, ): - reader = PeriodicExportingMetricReader( - config.build(), export_interval_millis=math.inf - ) + reader = PeriodicExportingMetricReader(config.build(), export_interval_millis=math.inf) meter_provider = MeterProvider( metric_readers=[reader], resource=Resource.create({"service.name": "test-service"}), @@ -287,9 +274,7 @@ def test_exponential_histogram( histogram.record(v) reader.force_flush(timeout_millis=5000) - recorded = server.wait_for_metric( - name="test.exp.histogram", timeout=5.0 - ) + recorded = server.wait_for_metric(name="test.exp.histogram", timeout=5.0) assert recorded.metric.HasField("exponential_histogram") dp = recorded.metric.exponential_histogram.data_points[0] assert dp.count == 3 @@ -308,9 +293,7 @@ def test_metric_data_point_attributes( counter.add(1, {"str_key": "hello", "int_key": 42}) reader.force_flush(timeout_millis=5000) - recorded = server.wait_for_metric( - name="test.attrs.counter", timeout=5.0 - ) + recorded = server.wait_for_metric(name="test.attrs.counter", timeout=5.0) attrs = _attrs_to_dict(recorded.metric.sum.data_points[0].attributes) assert attrs == snapshot({"str_key": "hello", "int_key": 42}) @@ -332,9 +315,7 @@ def test_scope_attributes( recorded = server.wait_for_metric(name="scope.counter", timeout=5.0) assert recorded.scope.name == snapshot("test.scope") assert recorded.scope.version == snapshot("1.0.0") - assert _attrs_to_dict(recorded.scope.attributes) == snapshot( - {"scope.key": "scope.val"} - ) + assert _attrs_to_dict(recorded.scope.attributes) == snapshot({"scope.key": "scope.val"}) def test_resource_attributes( self, diff --git a/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_traces_functional.py b/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_traces_functional.py index 17532c122ec..e49ffa83e5b 100644 --- a/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_traces_functional.py +++ b/tests/opentelemetry-docker-tests/tests/otlpexporter/test_otlp_traces_functional.py @@ -143,9 +143,7 @@ class TestTracesExporter: - @pytest.fixture( - scope="class", params=TRACE_EXPORTER_CONFIGS, ids=lambda c: c.id - ) + @pytest.fixture(scope="class", params=TRACE_EXPORTER_CONFIGS, ids=lambda c: c.id) def config(self, request) -> ExporterConfig[SpanExporter]: return request.param @@ -166,18 +164,14 @@ def tracer( def clear_server(self, server: OtlpProtoTestServer) -> None: server.clear() - def test_simple_span_name( - self, tracer: Tracer, server: OtlpProtoTestServer - ): + def test_simple_span_name(self, tracer: Tracer, server: OtlpProtoTestServer): with tracer.start_as_current_span("my-span"): pass recorded = server.get_span(timeout=5.0) assert recorded.span.name == "my-span" - def test_span_attributes( - self, tracer: Tracer, server: OtlpProtoTestServer - ): + def test_span_attributes(self, tracer: Tracer, server: OtlpProtoTestServer): with tracer.start_as_current_span( "attrs-span", attributes={ @@ -192,30 +186,21 @@ def test_span_attributes( recorded = server.get_span(timeout=5.0) attrs = _attrs_to_dict(recorded.span.attributes) assert math.isclose(attrs.pop("float_key"), 3.14, abs_tol=1e-5) - assert attrs == snapshot( - {"str_key": "hello", "int_key": 42, "bool_key": True} - ) + assert attrs == snapshot({"str_key": "hello", "int_key": 42, "bool_key": True}) - def test_nested_spans_parent_child( - self, tracer: Tracer, server: OtlpProtoTestServer - ): + def test_nested_spans_parent_child(self, tracer: Tracer, server: OtlpProtoTestServer): with tracer.start_as_current_span("foo"): with tracer.start_as_current_span("bar"): with tracer.start_as_current_span("baz"): pass - spans = { - r.span.name: r.span - for r in server.get_spans(count=3, timeout=10.0) - } + spans = {r.span.name: r.span for r in server.get_spans(count=3, timeout=10.0)} assert set(spans.keys()) == snapshot({"bar", "baz", "foo"}) assert spans["baz"].parent_span_id == spans["bar"].span_id assert spans["bar"].parent_span_id == spans["foo"].span_id assert spans["foo"].parent_span_id == b"" - def test_span_with_event( - self, tracer: Tracer, server: OtlpProtoTestServer - ): + def test_span_with_event(self, tracer: Tracer, server: OtlpProtoTestServer): with tracer.start_as_current_span("event-span") as span: span.add_event("my-event", {"event_key": "event_val"}) @@ -223,9 +208,7 @@ def test_span_with_event( assert len(recorded.span.events) == 1 event = recorded.span.events[0] assert event.name == "my-event" - assert _attrs_to_dict(event.attributes) == snapshot( - {"event_key": "event_val"} - ) + assert _attrs_to_dict(event.attributes) == snapshot({"event_key": "event_val"}) def test_span_with_link(self, tracer: Tracer, server: OtlpProtoTestServer): link_trace_id = 0x000000000000000000000000DEADBEEF @@ -236,9 +219,7 @@ def test_span_with_link(self, tracer: Tracer, server: OtlpProtoTestServer): is_remote=True, trace_flags=TraceFlags(0x01), ) - with tracer.start_as_current_span( - "linked-span", links=[Link(link_context)] - ): + with tracer.start_as_current_span("linked-span", links=[Link(link_context)]): pass recorded = server.get_span(timeout=5.0) @@ -254,9 +235,7 @@ def test_span_status_ok(self, tracer: Tracer, server: OtlpProtoTestServer): recorded = server.get_span(timeout=5.0) assert recorded.span.status.code == snapshot(1) - def test_span_status_error( - self, tracer: Tracer, server: OtlpProtoTestServer - ): + def test_span_status_error(self, tracer: Tracer, server: OtlpProtoTestServer): with tracer.start_as_current_span("error-span") as span: span.set_status(StatusCode.ERROR, "something went wrong") diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/__init__.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/__init__.py index b3de9dfe37a..070de9de7cb 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/__init__.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/__init__.py @@ -17,11 +17,7 @@ def __enter__(self): def __exit__(self, type_, value, tb): # pylint: disable=invalid-name if value is not None and type_ in self._exception_types: - self._test_case.fail( - "Unexpected exception was raised:\n{}".format( - "\n".join(format_tb(tb)) - ) - ) + self._test_case.fail("Unexpected exception was raised:\n{}".format("\n".join(format_tb(tb)))) return True diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py index 2cc63d9cb3b..58bb261d0f1 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/_otlp_test_server.py @@ -101,11 +101,7 @@ def _handle_traces(body: bytes) -> bytes: for rs in request.resource_spans: for ss in rs.scope_spans: for span in ss.spans: - spans_queue.put( - RecordedSpan( - span=span, resource=rs.resource, scope=ss.scope - ) - ) + spans_queue.put(RecordedSpan(span=span, resource=rs.resource, scope=ss.scope)) return ExportTraceServiceResponse().SerializeToString() @staticmethod @@ -147,9 +143,7 @@ def log_message(self, format, *args): # pylint: disable=redefined-builtin class OtlpProtoTestServer: - def __init__( - self, host: str = "127.0.0.1", port: int = 0, base_path: str = "" - ) -> None: + def __init__(self, host: str = "127.0.0.1", port: int = 0, base_path: str = "") -> None: try: # pylint: disable-next=import-outside-toplevel,unused-import import opentelemetry.proto # noqa: F401 @@ -221,36 +215,26 @@ def get_span(self, timeout: float = 5.0) -> RecordedSpan: except Empty: raise TimeoutError(f"No span received within {timeout}s") from None - def get_spans( - self, count: int = 1, timeout: float = 5.0 - ) -> list[RecordedSpan]: + def get_spans(self, count: int = 1, timeout: float = 5.0) -> list[RecordedSpan]: deadline = time.monotonic() + timeout spans = [] for _ in range(count): remaining = deadline - time.monotonic() if remaining <= 0: - raise TimeoutError( - f"Timed out after receiving {len(spans)}/{count} spans" - ) + raise TimeoutError(f"Timed out after receiving {len(spans)}/{count} spans") spans.append(self.get_span(timeout=remaining)) return spans - def wait_for_span( - self, *, name: str | None = None, timeout: float = 5.0 - ) -> RecordedSpan: + def wait_for_span(self, *, name: str | None = None, timeout: float = 5.0) -> RecordedSpan: deadline = time.monotonic() + timeout while True: remaining = deadline - time.monotonic() if remaining <= 0: - raise TimeoutError( - f"No span with name={name!r} received within {timeout}s" - ) + raise TimeoutError(f"No span with name={name!r} received within {timeout}s") try: recorded = self._spans_queue.get(timeout=remaining) except Empty: - raise TimeoutError( - f"No span with name={name!r} received within {timeout}s" - ) from None + raise TimeoutError(f"No span with name={name!r} received within {timeout}s") from None if name is None or recorded.span.name == name: return recorded @@ -266,40 +250,28 @@ def get_metric(self, timeout: float = 5.0) -> RecordedMetric: try: return self._metrics_queue.get(timeout=timeout) except Empty: - raise TimeoutError( - f"No metric received within {timeout}s" - ) from None + raise TimeoutError(f"No metric received within {timeout}s") from None - def get_metrics( - self, count: int = 1, timeout: float = 5.0 - ) -> list[RecordedMetric]: + def get_metrics(self, count: int = 1, timeout: float = 5.0) -> list[RecordedMetric]: deadline = time.monotonic() + timeout metrics = [] for _ in range(count): remaining = deadline - time.monotonic() if remaining <= 0: - raise TimeoutError( - f"Timed out after receiving {len(metrics)}/{count} metrics" - ) + raise TimeoutError(f"Timed out after receiving {len(metrics)}/{count} metrics") metrics.append(self.get_metric(timeout=remaining)) return metrics - def wait_for_metric( - self, *, name: str | None = None, timeout: float = 5.0 - ) -> RecordedMetric: + def wait_for_metric(self, *, name: str | None = None, timeout: float = 5.0) -> RecordedMetric: deadline = time.monotonic() + timeout while True: remaining = deadline - time.monotonic() if remaining <= 0: - raise TimeoutError( - f"No metric with name={name!r} received within {timeout}s" - ) + raise TimeoutError(f"No metric with name={name!r} received within {timeout}s") try: recorded = self._metrics_queue.get(timeout=remaining) except Empty: - raise TimeoutError( - f"No metric with name={name!r} received within {timeout}s" - ) from None + raise TimeoutError(f"No metric with name={name!r} received within {timeout}s") from None if name is None or recorded.metric.name == name: return recorded @@ -315,33 +287,23 @@ def get_log_record(self, timeout: float = 5.0) -> RecordedLogRecord: try: return self._logs_queue.get(timeout=timeout) except Empty: - raise TimeoutError( - f"No log record received within {timeout}s" - ) from None + raise TimeoutError(f"No log record received within {timeout}s") from None - def get_log_records( - self, count: int = 1, timeout: float = 5.0 - ) -> list[RecordedLogRecord]: + def get_log_records(self, count: int = 1, timeout: float = 5.0) -> list[RecordedLogRecord]: deadline = time.monotonic() + timeout log_records = [] for _ in range(count): remaining = deadline - time.monotonic() if remaining <= 0: - raise TimeoutError( - f"Timed out after receiving {len(log_records)}/{count} log records" - ) + raise TimeoutError(f"Timed out after receiving {len(log_records)}/{count} log records") log_records.append(self.get_log_record(timeout=remaining)) return log_records - def wait_for_log_record( - self, *, timeout: float = 5.0 - ) -> RecordedLogRecord: + def wait_for_log_record(self, *, timeout: float = 5.0) -> RecordedLogRecord: try: return self._logs_queue.get(timeout=timeout) except Empty: - raise TimeoutError( - f"No log record received within {timeout}s" - ) from None + raise TimeoutError(f"No log record received within {timeout}s") from None def drain_log_records(self) -> list[RecordedLogRecord]: result = [] diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/asgitestutil.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/asgitestutil.py index 6b680aca5a4..c831a33721d 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/asgitestutil.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/asgitestutil.py @@ -35,25 +35,19 @@ def setUp(self): def tearDown(self): if self.communicator: - asyncio.get_event_loop().run_until_complete( - self.communicator.wait() - ) + asyncio.get_event_loop().run_until_complete(self.communicator.wait()) def seed_app(self, app): self.communicator = ApplicationCommunicator(app, self.scope) def send_input(self, message): - asyncio.get_event_loop().run_until_complete( - self.communicator.send_input(message) - ) + asyncio.get_event_loop().run_until_complete(self.communicator.send_input(message)) def send_default_request(self): self.send_input({"type": "http.request", "body": b""}) def get_output(self): - output = asyncio.get_event_loop().run_until_complete( - self.communicator.receive_output(0) - ) + output = asyncio.get_event_loop().run_until_complete(self.communicator.receive_output(0)) return output def get_all_output(self): @@ -76,9 +70,7 @@ def setUp(self): def tearDown(self): if self.communicator: - asyncio.get_event_loop().run_until_complete( - self.communicator.wait() - ) + asyncio.get_event_loop().run_until_complete(self.communicator.wait()) def seed_app(self, app): self.communicator = ApplicationCommunicator(app, self.scope) diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/concurrency_test.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/concurrency_test.py index 25f6f35cf42..f275abe7024 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/concurrency_test.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/concurrency_test.py @@ -68,10 +68,7 @@ def thread_start(idx: int) -> None: barrier.wait() results[idx] = func_to_test() - threads = [ - threading.Thread(target=partial(thread_start, i)) - for i in range(num_threads) - ] + threads = [threading.Thread(target=partial(thread_start, i)) for i in range(num_threads)] for thread in threads: thread.start() for thread in threads: diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/httptest.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/httptest.py index 5f42a36637a..3e62c51f318 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/httptest.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/httptest.py @@ -39,9 +39,7 @@ def create_server(cls): @classmethod def run_server(cls): httpd = cls.create_server() - worker = Thread( - target=httpd.serve_forever, daemon=True, name="Test server worker" - ) + worker = Thread(target=httpd.serve_forever, daemon=True, name="Test server worker") worker.start() return worker, httpd diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/metrictestutil.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/metrictestutil.py index c2de0b7c653..f51bfcd5256 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/metrictestutil.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/metrictestutil.py @@ -15,9 +15,7 @@ from opentelemetry.util.types import Attributes -def _generate_metric( - name, data, attributes=None, description=None, unit=None -) -> Metric: +def _generate_metric(name, data, attributes=None, description=None, unit=None) -> Metric: if description is None: description = "foo" if unit is None: @@ -59,9 +57,7 @@ def _generate_sum( ) -def _generate_gauge( - name, value, attributes=None, description=None, unit=None -) -> Metric: +def _generate_gauge(name, value, attributes=None, description=None, unit=None) -> Metric: if attributes is None: attributes = BoundedAttributes(attributes={"a": 1, "b": True}) return _generate_metric( @@ -81,9 +77,7 @@ def _generate_gauge( ) -def _generate_unsupported_metric( - name, attributes=None, description=None, unit=None -) -> Metric: +def _generate_unsupported_metric(name, attributes=None, description=None, unit=None) -> Metric: return _generate_metric( name, None, diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/mock_textmap.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/mock_textmap.py index 09378aa1fed..4e37fc81858 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/mock_textmap.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/mock_textmap.py @@ -80,12 +80,8 @@ def inject( setter: Setter = default_setter, ) -> None: span = trace.get_current_span(context) - setter.set( - carrier, self.TRACE_ID_KEY, str(span.get_span_context().trace_id) - ) - setter.set( - carrier, self.SPAN_ID_KEY, str(span.get_span_context().span_id) - ) + setter.set(carrier, self.TRACE_ID_KEY, str(span.get_span_context().trace_id)) + setter.set(carrier, self.SPAN_ID_KEY, str(span.get_span_context().span_id)) @property def fields(self): diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/spantestutil.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/spantestutil.py index 24dace2fc03..2b9e6c06dc9 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/spantestutil.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/spantestutil.py @@ -36,9 +36,7 @@ def get_span_with_dropped_attributes_events_links(): span_limits=trace_sdk.SpanLimits(), resource=Resource(attributes=attributes), ) - with tracer.start_as_current_span( - "span", links=links, attributes=attributes - ) as span: + with tracer.start_as_current_span("span", links=links, attributes=attributes) as span: for index in range(131): span.add_event(f"event{index}", attributes=attributes) return span diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py index f2826a32e1d..01d105414bf 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py @@ -58,15 +58,11 @@ def tearDown(self): reset_metrics_globals() def get_finished_spans(self): - return FinishedTestSpans( - self, self.memory_exporter.get_finished_spans() - ) + return FinishedTestSpans(self, self.memory_exporter.get_finished_spans()) def assertEqualSpanInstrumentationScope(self, span, module): self.assertEqual(span.instrumentation_scope.name, module.__name__) - self.assertEqual( - span.instrumentation_scope.version, module.__version__ - ) + self.assertEqual(span.instrumentation_scope.version, module.__version__) def assertSpanHasAttributes(self, span, attributes): for key, val in attributes.items(): @@ -139,9 +135,7 @@ def get_sorted_metrics(self, scope: str | None = None): all metrics are returned. """ metrics_data = self.memory_metrics_reader.get_metrics_data() - resource_metrics = ( - metrics_data.resource_metrics if metrics_data else [] - ) + resource_metrics = metrics_data.resource_metrics if metrics_data else [] all_metrics = [] for metrics in resource_metrics: @@ -168,13 +162,9 @@ def assert_metric_expected( expected_data_points: Sequence[DataPointT], est_value_delta: float | None = 0, ): - self.assertEqual( - len(expected_data_points), len(metric.data.data_points) - ) + self.assertEqual(len(expected_data_points), len(metric.data.data_points)) for expected_data_point in expected_data_points: - self.assert_data_point_expected( - expected_data_point, metric.data.data_points, est_value_delta - ) + self.assert_data_point_expected(expected_data_point, metric.data.data_points, est_value_delta) # pylint: disable=unidiomatic-typecheck @staticmethod @@ -195,23 +185,14 @@ def is_data_points_equal( values_diff = abs(expected_data_point.sum - data_point.sum) if expected_data_point.count != data_point.count or ( est_value_delta == 0 - and ( - expected_data_point.min != data_point.min - or expected_data_point.max != data_point.max - ) + and (expected_data_point.min != data_point.min or expected_data_point.max != data_point.max) ): return False - if ( - expected_data_point.explicit_bounds - != data_point.explicit_bounds - ): + if expected_data_point.explicit_bounds != data_point.explicit_bounds: return False - return ( - values_diff <= est_value_delta - and expected_data_point.attributes == dict(data_point.attributes) - ) + return values_diff <= est_value_delta and expected_data_point.attributes == dict(data_point.attributes) def assert_data_point_expected( self, @@ -221,9 +202,7 @@ def assert_data_point_expected( ): is_data_point_exist = False for data_point in data_points: - if self.is_data_points_equal( - expected_data_point, data_point, est_value_delta - ): + if self.is_data_points_equal(expected_data_point, data_point, est_value_delta): is_data_point_exist = True break diff --git a/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py b/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py index 774cd011991..b19393b2ace 100644 --- a/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py +++ b/tests/opentelemetry-test-utils/src/opentelemetry/test/weaver_live_check.py @@ -49,9 +49,7 @@ def _collect(obj: Any) -> list[dict]: if isinstance(lcr, dict): advices = lcr.get("all_advice") if isinstance(advices, list): - result.extend( - a for a in advices if a.get("level") == "violation" - ) + result.extend(a for a in advices if a.get("level") == "violation") for value in obj.values(): result.extend(_collect(value)) return result @@ -67,9 +65,7 @@ def _collect(obj: Any) -> list[dict]: key = ( violation.get("id"), violation.get("message"), - json.dumps(ctx, sort_keys=True) - if isinstance(ctx, (dict, list)) - else ctx, + json.dumps(ctx, sort_keys=True) if isinstance(ctx, (dict, list)) else ctx, violation.get("signal_name"), violation.get("signal_type"), ) @@ -79,9 +75,7 @@ def _collect(obj: Any) -> list[dict]: { "id": k[0], "message": k[1], - "context": vs[0].get( - "context" - ), # preserve original dict, not JSON string + "context": vs[0].get("context"), # preserve original dict, not JSON string "signal_name": k[3], "signal_type": k[4], "count": len(vs), @@ -122,8 +116,7 @@ class LiveCheckError(AssertionError): err = exc_info.value assert any( - v["id"] == "my_policy_check" - and v["context"]["attribute_name"] == "my.attribute" + v["id"] == "my_policy_check" and v["context"]["attribute_name"] == "my.attribute" for v in err.report.violations ) """ @@ -151,9 +144,7 @@ class LiveCheckReport: report = weaver.end() assert any( - v["id"] == "my_policy_check" - and v["context"]["attribute_name"] == "my.attribute" - for v in report.violations + v["id"] == "my_policy_check" and v["context"]["attribute_name"] == "my.attribute" for v in report.violations ) """ @@ -200,9 +191,7 @@ class WeaverLiveCheck: def test_my_telemetry(self): with WeaverLiveCheck() as weaver: - exporter = OTLPSpanExporter( - endpoint=weaver.otlp_endpoint, insecure=True - ) + exporter = OTLPSpanExporter(endpoint=weaver.otlp_endpoint, insecure=True) # ... configure provider, emit telemetry ... provider.force_flush() @@ -258,8 +247,7 @@ def __init__( weaver_bin = shutil.which("weaver") if not weaver_bin: raise RuntimeError( - "weaver binary not found on PATH. " - "Install it from https://github.com/open-telemetry/weaver/releases" + "weaver binary not found on PATH. Install it from https://github.com/open-telemetry/weaver/releases" ) self._otlp_port = otlp_port or _find_free_port() @@ -310,12 +298,8 @@ def __exit__(self, exc_type: Any, *_: object) -> None: def start(self) -> "WeaverLiveCheck": logger.debug("Starting WeaverLiveCheck process...") # Redirect weaver's stdout/stderr to tempfiles - stdout_fd, self._stdout_path = tempfile.mkstemp( - prefix="weaver-stdout-", suffix=".log" - ) - stderr_fd, self._stderr_path = tempfile.mkstemp( - prefix="weaver-stderr-", suffix=".log" - ) + stdout_fd, self._stdout_path = tempfile.mkstemp(prefix="weaver-stdout-", suffix=".log") + stderr_fd, self._stderr_path = tempfile.mkstemp(prefix="weaver-stderr-", suffix=".log") try: self._process = subprocess.Popen( # pylint: disable=consider-using-with self._command, @@ -330,9 +314,7 @@ def start(self) -> "WeaverLiveCheck": self._ready = True except Exception as exc: # pylint: disable=broad-except logs = self._read_weaver_logs() - logger.error( - "WeaverLiveCheck did not start: %s, logs: %s", exc, logs - ) + logger.error("WeaverLiveCheck did not start: %s, logs: %s", exc, logs) raise return self @@ -349,17 +331,13 @@ def _wait_for_ready(self) -> None: session = Session() session.mount("http://", HTTPAdapter(max_retries=retry)) try: - session.get( - f"http://localhost:{self._admin_port}/health", timeout=5 - ) + session.get(f"http://localhost:{self._admin_port}/health", timeout=5) except Exception as exc: # pylint: disable=broad-except if self._process is not None and self._process.poll() is not None: raise RuntimeError( f"WeaverLiveCheck process exited unexpectedly (code {self._process.returncode})" ) from exc - raise TimeoutError( - "WeaverLiveCheck did not become ready in time" - ) from exc + raise TimeoutError("WeaverLiveCheck did not become ready in time") from exc @property def otlp_endpoint(self) -> str: @@ -372,22 +350,16 @@ def _do_stop(self, timeout: int) -> tuple["LiveCheckReport", int]: Never raises for semconv violations. """ if not self._ready: - raise RuntimeError( - "WeaverLiveCheck process did not start successfully" - ) + raise RuntimeError("WeaverLiveCheck process did not start successfully") try: - response = post( - f"http://localhost:{self._admin_port}/stop", timeout=5 - ) + response = post(f"http://localhost:{self._admin_port}/stop", timeout=5) response.raise_for_status() report = LiveCheckReport(response.json()) assert self._process is not None exit_code = self._process.wait(timeout=timeout) except Exception as exc: # pylint: disable=broad-except logs = self._read_weaver_logs() - logger.error( - "Error communicating with weaver: %s, logs: %s", exc, logs - ) + logger.error("Error communicating with weaver: %s, logs: %s", exc, logs) raise return report, exit_code @@ -405,9 +377,7 @@ def end(self, timeout: int = 30) -> "LiveCheckReport": for the report structure. """ if self._stopped: - logger.warning( - "end() called after weaver already stopped; returning empty report" - ) + logger.warning("end() called after weaver already stopped; returning empty report") return LiveCheckReport({}) self._stopped = True report, _ = self._do_stop(timeout) @@ -429,9 +399,7 @@ def end_and_check(self, timeout: int = 30) -> "LiveCheckReport": to start, HTTP communication error, etc.). """ if self._stopped: - logger.warning( - "end_and_check() called after weaver already stopped; returning empty report" - ) + logger.warning("end_and_check() called after weaver already stopped; returning empty report") return LiveCheckReport({}) self._stopped = True report, exit_code = self._do_stop(timeout) diff --git a/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py b/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py index fdd456c249c..4cccdbeda8f 100644 --- a/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py +++ b/tests/opentelemetry-test-utils/tests/test_otlp_test_server.py @@ -54,12 +54,8 @@ def setUp(self): def tearDown(self): self.server.stop() - def _make_trace_provider( - self, service: str = "trace-svc", **exporter_kwargs - ) -> TracerProvider: - provider = TracerProvider( - resource=Resource.create({"service.name": service}) - ) + def _make_trace_provider(self, service: str = "trace-svc", **exporter_kwargs) -> TracerProvider: + provider = TracerProvider(resource=Resource.create({"service.name": service})) provider.add_span_processor( SimpleSpanProcessor( OTLPSpanExporter( @@ -88,12 +84,8 @@ def _make_metrics_provider( ) return reader, provider - def _make_log_provider( - self, service: str = "log-svc", **exporter_kwargs - ) -> LoggerProvider: - provider = LoggerProvider( - resource=Resource.create({"service.name": service}) - ) + def _make_log_provider(self, service: str = "log-svc", **exporter_kwargs) -> LoggerProvider: + provider = LoggerProvider(resource=Resource.create({"service.name": service})) provider.add_log_record_processor( SimpleLogRecordProcessor( OTLPLogExporter( @@ -114,17 +106,11 @@ def test_span_export(self): tracer.start_span("baz").end() spans = self.server.get_spans(count=3, timeout=5.0) - self.assertEqual( - {recorded.span.name for recorded in spans}, {"foo", "bar", "baz"} - ) + self.assertEqual({recorded.span.name for recorded in spans}, {"foo", "bar", "baz"}) for recorded in spans: self.assertIsInstance(recorded, RecordedSpan) self.assertEqual(recorded.scope.name, "trace-scope") - svc = next( - a.value.string_value - for a in recorded.resource.attributes - if a.key == "service.name" - ) + svc = next(a.value.string_value for a in recorded.resource.attributes if a.key == "service.name") self.assertEqual(svc, "trace-svc") provider.shutdown() @@ -164,17 +150,11 @@ def test_metric_export(self): reader.force_flush(timeout_millis=3000) metrics = self.server.get_metrics(count=2, timeout=5.0) - self.assertEqual( - {r.metric.name for r in metrics}, {"test.requests", "test.latency"} - ) + self.assertEqual({r.metric.name for r in metrics}, {"test.requests", "test.latency"}) for recorded in metrics: self.assertIsInstance(recorded, RecordedMetric) self.assertEqual(recorded.scope.name, "metrics-scope") - svc = next( - a.value.string_value - for a in recorded.resource.attributes - if a.key == "service.name" - ) + svc = next(a.value.string_value for a in recorded.resource.attributes if a.key == "service.name") self.assertEqual(svc, "metrics-svc") provider.shutdown() @@ -206,9 +186,7 @@ def test_log_export(self): provider = self._make_log_provider() logger = provider.get_logger("log-scope") logger.emit(body="first message", severity_number=SeverityNumber.WARN) - logger.emit( - body="second message", severity_number=SeverityNumber.ERROR - ) + logger.emit(body="second message", severity_number=SeverityNumber.ERROR) log_records = self.server.get_log_records(count=2, timeout=5.0) self.assertEqual( @@ -218,11 +196,7 @@ def test_log_export(self): for recorded in log_records: self.assertIsInstance(recorded, RecordedLogRecord) self.assertEqual(recorded.scope.name, "log-scope") - svc = next( - a.value.string_value - for a in recorded.resource.attributes - if a.key == "service.name" - ) + svc = next(a.value.string_value for a in recorded.resource.attributes if a.key == "service.name") self.assertEqual(svc, "log-svc") provider.shutdown() @@ -248,32 +222,20 @@ def test_log_drain_and_timeout(self): provider.shutdown() def test_compression(self): - trace_provider = self._make_trace_provider( - compression=Compression.Gzip - ) - metrics_reader, metrics_provider = self._make_metrics_provider( - compression=Compression.Gzip - ) + trace_provider = self._make_trace_provider(compression=Compression.Gzip) + metrics_reader, metrics_provider = self._make_metrics_provider(compression=Compression.Gzip) log_provider = self._make_log_provider(compression=Compression.Gzip) trace_provider.get_tracer("s").start_span("gzip-span").end() - self.assertEqual( - self.server.get_span(timeout=5.0).span.name, "gzip-span" - ) + self.assertEqual(self.server.get_span(timeout=5.0).span.name, "gzip-span") metrics_provider.get_meter("s").create_counter("gzip.counter").add(1) metrics_reader.force_flush(timeout_millis=3000) - self.assertEqual( - self.server.get_metric(timeout=5.0).metric.name, "gzip.counter" - ) + self.assertEqual(self.server.get_metric(timeout=5.0).metric.name, "gzip.counter") - log_provider.get_logger("s").emit( - body="gzip log", severity_number=SeverityNumber.INFO - ) + log_provider.get_logger("s").emit(body="gzip log", severity_number=SeverityNumber.INFO) self.assertEqual( - self.server.get_log_record( - timeout=5.0 - ).log_record.body.string_value, + self.server.get_log_record(timeout=5.0).log_record.body.string_value, "gzip log", ) @@ -284,24 +246,14 @@ def test_compression(self): def test_endpoint_urls(self): port = self.server.port self.assertGreater(port, 0) - self.assertEqual( - self.server.traces_endpoint, f"http://127.0.0.1:{port}/v1/traces" - ) - self.assertEqual( - self.server.metrics_endpoint, f"http://127.0.0.1:{port}/v1/metrics" - ) - self.assertEqual( - self.server.logs_endpoint, f"http://127.0.0.1:{port}/v1/logs" - ) + self.assertEqual(self.server.traces_endpoint, f"http://127.0.0.1:{port}/v1/traces") + self.assertEqual(self.server.metrics_endpoint, f"http://127.0.0.1:{port}/v1/metrics") + self.assertEqual(self.server.logs_endpoint, f"http://127.0.0.1:{port}/v1/logs") def test_context_manager(self): with OtlpProtoTestServer() as srv: provider = TracerProvider() - provider.add_span_processor( - SimpleSpanProcessor( - OTLPSpanExporter(endpoint=srv.traces_endpoint, timeout=1) - ) - ) + provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint=srv.traces_endpoint, timeout=1))) provider.get_tracer("s").start_span("ctx-span").end() self.assertEqual(srv.get_span(timeout=5.0).span.name, "ctx-span") provider.shutdown() @@ -310,15 +262,9 @@ def test_base_path(self): with OtlpProtoTestServer(base_path="/custom") as srv: self.assertTrue(srv.traces_endpoint.endswith("/custom/v1/traces")) provider = TracerProvider() - provider.add_span_processor( - SimpleSpanProcessor( - OTLPSpanExporter(endpoint=srv.traces_endpoint, timeout=1) - ) - ) + provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint=srv.traces_endpoint, timeout=1))) provider.get_tracer("s").start_span("prefixed-span").end() - self.assertEqual( - srv.get_span(timeout=5.0).span.name, "prefixed-span" - ) + self.assertEqual(srv.get_span(timeout=5.0).span.name, "prefixed-span") provider.shutdown() def test_signal_routing(self): @@ -329,20 +275,12 @@ def test_signal_routing(self): trace_provider.get_tracer("s").start_span("routed-span").end() metrics_provider.get_meter("s").create_counter("routed.counter").add(1) metrics_reader.force_flush(timeout_millis=3000) - log_provider.get_logger("s").emit( - body="routed log", severity_number=SeverityNumber.INFO - ) + log_provider.get_logger("s").emit(body="routed log", severity_number=SeverityNumber.INFO) + self.assertEqual(self.server.get_span(timeout=5.0).span.name, "routed-span") + self.assertEqual(self.server.get_metric(timeout=5.0).metric.name, "routed.counter") self.assertEqual( - self.server.get_span(timeout=5.0).span.name, "routed-span" - ) - self.assertEqual( - self.server.get_metric(timeout=5.0).metric.name, "routed.counter" - ) - self.assertEqual( - self.server.get_log_record( - timeout=5.0 - ).log_record.body.string_value, + self.server.get_log_record(timeout=5.0).log_record.body.string_value, "routed log", ) @@ -361,9 +299,7 @@ def test_unknown_path_returns_404(self): def test_missing_proto_raises_import_error(self): with ( - unittest.mock.patch.dict( - "sys.modules", {"opentelemetry.proto": None} - ), + unittest.mock.patch.dict("sys.modules", {"opentelemetry.proto": None}), self.assertRaises(ImportError) as cm, ): OtlpProtoTestServer() diff --git a/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py b/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py index 8275d281eea..2219ded2032 100644 --- a/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py +++ b/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py @@ -54,9 +54,7 @@ def test_end_and_check_no_violations(self): """end_and_check() returns a LiveCheckReport with no violations on conformant telemetry.""" with WeaverLiveCheck(registry=_REGISTRY_DIR) as weaver: provider = _make_provider(weaver.otlp_endpoint) - with provider.get_tracer("test-tracer").start_as_current_span( - "test-span" - ): + with provider.get_tracer("test-tracer").start_as_current_span("test-span"): pass provider.force_flush() report = weaver.end_and_check() @@ -66,13 +64,9 @@ def test_end_and_check_no_violations(self): def test_end_and_check_raises_on_violations(self): """end_and_check() raises LiveCheckError with the report attached.""" - with WeaverLiveCheck( - registry=_REGISTRY_DIR, policies_dir=_TESTDATA_DIR - ) as weaver: + with WeaverLiveCheck(registry=_REGISTRY_DIR, policies_dir=_TESTDATA_DIR) as weaver: provider = _make_provider(weaver.otlp_endpoint) - with provider.get_tracer("test-tracer").start_as_current_span( - "test-span" - ) as span: + with provider.get_tracer("test-tracer").start_as_current_span("test-span") as span: span.set_attribute("never.use.this.attribute", "bad value") provider.force_flush() @@ -88,9 +82,7 @@ def test_end_and_check_raises_on_violations(self): # Structured report is attached for programmatic inspection self.assertTrue( any( - v["id"] == "test_check" - and v["context"].get("attribute_name") - == "never.use.this.attribute" + v["id"] == "test_check" and v["context"].get("attribute_name") == "never.use.this.attribute" for v in cm.exception.report.violations ) ) @@ -99,9 +91,7 @@ def test_end_no_violations(self): """end() returns a LiveCheckReport with no violations on conformant telemetry.""" with WeaverLiveCheck(registry=_REGISTRY_DIR) as weaver: provider = _make_provider(weaver.otlp_endpoint) - with provider.get_tracer("test-tracer").start_as_current_span( - "test-span" - ): + with provider.get_tracer("test-tracer").start_as_current_span("test-span"): pass provider.force_flush() report = weaver.end() @@ -115,13 +105,9 @@ def test_end_no_violations(self): def test_end_with_violations(self): """end() returns a LiveCheckReport with violations without raising.""" - with WeaverLiveCheck( - registry=_REGISTRY_DIR, policies_dir=_TESTDATA_DIR - ) as weaver: + with WeaverLiveCheck(registry=_REGISTRY_DIR, policies_dir=_TESTDATA_DIR) as weaver: provider = _make_provider(weaver.otlp_endpoint) - with provider.get_tracer("test-tracer").start_as_current_span( - "test-span" - ) as span: + with provider.get_tracer("test-tracer").start_as_current_span("test-span") as span: span.set_attribute("never.use.this.attribute", "bad value") provider.force_flush() @@ -129,15 +115,11 @@ def test_end_with_violations(self): self.assertIsInstance(report, LiveCheckReport) # Check the violation id (maps to advice_type in the rego policy) - self.assertTrue( - any(v["id"] == "test_check" for v in report.violations) - ) + self.assertTrue(any(v["id"] == "test_check" for v in report.violations)) # Check the structured context identifies the offending attribute by name self.assertTrue( any( - isinstance(v["context"], dict) - and v["context"].get("attribute_name") - == "never.use.this.attribute" + isinstance(v["context"], dict) and v["context"].get("attribute_name") == "never.use.this.attribute" for v in report.violations ) ) @@ -146,18 +128,14 @@ def test_report_span_statistics(self): """The full report exposes span counts and individual span samples.""" with WeaverLiveCheck(registry=_REGISTRY_DIR) as weaver: provider = _make_provider(weaver.otlp_endpoint) - with provider.get_tracer("test-tracer").start_as_current_span( - "test-span" - ): + with provider.get_tracer("test-tracer").start_as_current_span("test-span"): pass provider.force_flush() report = weaver.end() # Individual spans are accessible in report["samples"], each entry # with a "span" key containing the span data. - span_samples = [ - s["span"] for s in report.get("samples", []) if "span" in s - ] + span_samples = [s["span"] for s in report.get("samples", []) if "span" in s] self.assertTrue( any(s["name"] == "test-span" for s in span_samples), f"Expected 'test-span' in samples, got: {[s['name'] for s in span_samples]}", @@ -179,13 +157,9 @@ class TestOutputCapture(unittest.TestCase): def test_does_not_deadlock_on_large_diagnostic_output(self): """`--debug --debug` makes weaver dump trace logs that exceed the 64KB PIPE buffer; with tempfile capture the subprocess still exits cleanly.""" - with WeaverLiveCheck( - registry=_REGISTRY_DIR, extra_args=["--debug", "--debug"] - ) as weaver: + with WeaverLiveCheck(registry=_REGISTRY_DIR, extra_args=["--debug", "--debug"]) as weaver: provider = _make_provider(weaver.otlp_endpoint) - with provider.get_tracer("test-tracer").start_as_current_span( - "test-span" - ): + with provider.get_tracer("test-tracer").start_as_current_span("test-span"): pass provider.force_flush() report = weaver.end() diff --git a/uv.lock b/uv.lock index 6c5760cf630..7d3437d64f9 100644 --- a/uv.lock +++ b/uv.lock @@ -37,60 +37,60 @@ members = [ [[package]] name = "annotated-types" version = "0.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/annotated-types/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89" } wheels = [ - { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/annotated-types/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53" }, ] [[package]] name = "anyio" version = "4.14.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, { name = "idna" }, { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3b/72/5562aabb8dd7181e8e860622a38bea08d17842b99ecd4c91f84ac95251b0/anyio-4.14.1.tar.gz", hash = "sha256:8d648a3544c1a700e3ff78615cd679e4c5c3f149904287e73687b2596963629e", size = 254831, upload-time = "2026-06-24T20:56:06.017Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/anyio/anyio-4.14.1.tar.gz", hash = "sha256:8d648a3544c1a700e3ff78615cd679e4c5c3f149904287e73687b2596963629e" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b0/7b/90df4a0a816d98d6ea26f559d87836d494a2cf1fcf063be67df50a7bcc30/anyio-4.14.1-py3-none-any.whl", hash = "sha256:4e5533c5b8ff0a24f5d7a176cbe6877129cd183893f66b537f8f227d10527d72", size = 124875, upload-time = "2026-06-24T20:56:04.413Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/anyio/anyio-4.14.1-py3-none-any.whl", hash = "sha256:4e5533c5b8ff0a24f5d7a176cbe6877129cd183893f66b537f8f227d10527d72" }, ] [[package]] name = "argcomplete" version = "3.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/95/c0/c8e94135e66fabf89a120d9b4b123fe6993506beca6c1938a74c24cfa5fd/argcomplete-3.7.0.tar.gz", hash = "sha256:afde224f753f874807b1dc1414e883ab8fe0cda9c04807b6047dcb8e1ac23913", size = 73284, upload-time = "2026-06-30T22:28:22.249Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/argcomplete/argcomplete-3.7.0.tar.gz", hash = "sha256:afde224f753f874807b1dc1414e883ab8fe0cda9c04807b6047dcb8e1ac23913" } wheels = [ - { url = "https://files.pythonhosted.org/packages/12/f6/5b8ec087cd9cfa9449491ec83f76fb6b7006b4dff57d2ba8aaab330fe8e4/argcomplete-3.7.0-py3-none-any.whl", hash = "sha256:d8f0f22d2a8a7caa383be1e22b6caf1ecaf0ebd10d8f83cc125e36540c95830c", size = 42575, upload-time = "2026-06-30T22:28:20.547Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/argcomplete/argcomplete-3.7.0-py3-none-any.whl", hash = "sha256:d8f0f22d2a8a7caa383be1e22b6caf1ecaf0ebd10d8f83cc125e36540c95830c" }, ] [[package]] name = "asgiref" version = "3.11.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/63/40/f03da1264ae8f7cfdbf9146542e5e7e8100a4c66ab48e791df9a03d3f6c0/asgiref-3.11.1.tar.gz", hash = "sha256:5f184dc43b7e763efe848065441eac62229c9f7b0475f41f80e207a114eda4ce", size = 38550, upload-time = "2026-02-03T13:30:14.33Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/asgiref/asgiref-3.11.1.tar.gz", hash = "sha256:5f184dc43b7e763efe848065441eac62229c9f7b0475f41f80e207a114eda4ce" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5c/0a/a72d10ed65068e115044937873362e6e32fab1b7dce0046aeb224682c989/asgiref-3.11.1-py3-none-any.whl", hash = "sha256:e8667a091e69529631969fd45dc268fa79b99c92c5fcdda727757e52146ec133", size = 24345, upload-time = "2026-02-03T13:30:13.039Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/asgiref/asgiref-3.11.1-py3-none-any.whl", hash = "sha256:e8667a091e69529631969fd45dc268fa79b99c92c5fcdda727757e52146ec133" }, ] [[package]] name = "attrs" version = "26.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/attrs/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32" } wheels = [ - { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/attrs/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309" }, ] [[package]] name = "black" version = "26.5.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "click" }, { name = "mypy-extensions" }, @@ -101,332 +101,332 @@ dependencies = [ { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c0/37/5628dd55bf2b34257fc7603f0fe97c40e3aaf24265f416a9c85c95ca1436/black-26.5.1.tar.gz", hash = "sha256:dd321f668053961824bcc1be1cc1df748b2d7e4fa28086b08331e577b0100a73", size = 679439, upload-time = "2026-05-18T16:53:36.107Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/be/84/b3f55026206a9e8820a91503308075ca48eadc515e436731ca01dbe043b3/black-26.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9942db8888e06943c5dde66ca0037dcff82a2a4ec1ad0ada9e0d2ee9d9823893", size = 1987719, upload-time = "2026-05-18T17:05:02.757Z" }, - { url = "https://files.pythonhosted.org/packages/c6/34/7db312c5e5783d6e76cffd9d5ac8972a32badae4c6e3288dac0eed8d3bed/black-26.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:89c93167a74d3a75dfaa38a5c7cca015537d5820dd7f17d63267d674a61cae90", size = 1810083, upload-time = "2026-05-18T17:05:04.302Z" }, - { url = "https://files.pythonhosted.org/packages/33/e2/e0101e73c2c8727634e2efcb35e2b34bd23ad70dfa673789f5773a591b21/black-26.5.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22f2cd76d069cc54c71f10360744ba8983fbb616903b4304a85b734915c8e1b4", size = 1860633, upload-time = "2026-05-18T17:05:06.391Z" }, - { url = "https://files.pythonhosted.org/packages/b0/4c/e15c0c5b23cf3651035fe5addcce90e283af3548a3f91bb03d81b83106ab/black-26.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:87ed5c6f450580a2f6790bc7cbfb016dfc73bc750249762268a3695361315eef", size = 1477886, upload-time = "2026-05-18T17:05:07.96Z" }, - { url = "https://files.pythonhosted.org/packages/9f/3f/59d43ade98d2ce5c8dc34a4e46cbecd177e6d55d7d4092969c6003ccc655/black-26.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:58b4bd92cf88aacf83d88479c8f9caee044b1ec55f2451a337354a7ea2590a22", size = 1277111, upload-time = "2026-05-18T17:05:09.473Z" }, - { url = "https://files.pythonhosted.org/packages/4b/96/3c3e09f09f44a37aac36b178a279cd19aa7001bd796187a7b162a294c81f/black-26.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:96ae2c733b2aabdd9986e2c5df628ff3473676cd1c5faded1ff496cf6d74083c", size = 1970639, upload-time = "2026-05-18T17:05:11.461Z" }, - { url = "https://files.pythonhosted.org/packages/83/ea/5ad117b9ee3ecd933c712bcbae610006e5b7cc9f41c526cd7ed3b6c4124c/black-26.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0e48b87e03bf109288e55cfceadcfa15ff5470aca2851a851950ed2926f450d7", size = 1792130, upload-time = "2026-05-18T17:05:12.983Z" }, - { url = "https://files.pythonhosted.org/packages/06/3a/7c448bc623fcdfa96672531beb5a616ea5e64f6975955254d7731ffb0ad9/black-26.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5119fa92ae61f786e8c3662fd60aece1d0a2dd5cca5d0c79417a95e7a4272a59", size = 1846134, upload-time = "2026-05-18T17:05:14.506Z" }, - { url = "https://files.pythonhosted.org/packages/a1/5b/0b39b3a5917f0657ac014ad2edb58c139553a478adfe7f817abf1622ff6e/black-26.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:30d3c14661f2792e9142cce3eeeb1cbc175b3eb5f733be0c8eeb99651e52b0c3", size = 1478883, upload-time = "2026-05-18T17:05:16.542Z" }, - { url = "https://files.pythonhosted.org/packages/4c/48/dc222692e0f95030db1bbfb6c857e76858bad09058221ea7aae815255327/black-26.5.1-cp311-cp311-win_arm64.whl", hash = "sha256:1ef92b76f7733f282fd096ea406200b5a286c42947412b0eaff3a74e3616cefe", size = 1277776, upload-time = "2026-05-18T17:05:18.029Z" }, - { url = "https://files.pythonhosted.org/packages/24/99/7744b906703228264ef73bdd534df88ec1ef3de45c4e78f6d31b9e32d0c9/black-26.5.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4ad6fa01f941920f54f2bbb35f3df7673428a0ef98a0b0840c2eaef3b110efa8", size = 2012518, upload-time = "2026-05-18T17:05:20.108Z" }, - { url = "https://files.pythonhosted.org/packages/b7/c0/c5a3b1636dfd09c42534f2b3cf33506814f6d3e066fb0879ffa16c1ae860/black-26.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3915f256e75a2d7cf88d8953d37f780455dc586cc72dee059c528fe77f581217", size = 1816016, upload-time = "2026-05-18T17:05:21.84Z" }, - { url = "https://files.pythonhosted.org/packages/1f/0e/36044316b65ca471d3bb6d3703fd06fb50c6b727c3562f6a5a3153634f88/black-26.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d98d4137277c75dfb898ec8d846c4fd68ba1e9cf77f95e2865c203dc18f4c3d", size = 1884150, upload-time = "2026-05-18T17:05:23.546Z" }, - { url = "https://files.pythonhosted.org/packages/b3/33/dafc5808c2af43672912111d7c3354af1615f7e2be3bed7a878461abbe4d/black-26.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:a1dca32d9f1784af512a13410ec204c6f7f0aa9797a111c42e1c03449821c264", size = 1486825, upload-time = "2026-05-18T17:05:25.004Z" }, - { url = "https://files.pythonhosted.org/packages/82/14/b965ee6ad2a311f28bdbf692def3ee9848d2ae289dab28b27657fcee3e78/black-26.5.1-cp312-cp312-win_arm64.whl", hash = "sha256:1037d5ac7b7b310b2632ad867ec8d0e4c4819dcdb0b820f63135da746a24e418", size = 1288646, upload-time = "2026-05-18T17:05:26.477Z" }, - { url = "https://files.pythonhosted.org/packages/3f/5c/c384363980e11e25ca6b93205949bb331fbf35f4e0dbec376dfa6326cec8/black-26.5.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b36cf2ddf5566e205f6535f782a62194a184d33e175b64ae8c40b1737522be3", size = 2009020, upload-time = "2026-05-18T17:05:28.132Z" }, - { url = "https://files.pythonhosted.org/packages/0b/df/9f31c5e0babbfed77d505fc5d120beb98b21b33feaeded3924ea941fe360/black-26.5.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f7ea64ebfa01b50f693508fc39f875e264446d3b097088f84f203b9d09618a0", size = 1813335, upload-time = "2026-05-18T17:05:31.266Z" }, - { url = "https://files.pythonhosted.org/packages/fb/24/8e7b9a2fa61b0afd82209efe937557d180a1fa055bd7f6161eb9defc3719/black-26.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecb3e624844c798144e9bd986954e0adc81d8911a1f30f375e1252fe26e8c294", size = 1881614, upload-time = "2026-05-18T17:05:32.718Z" }, - { url = "https://files.pythonhosted.org/packages/49/ad/b4e0d9365ba8ac34f6bbab62a4b1b2dd5d618fac3fa1b8db968c844201b5/black-26.5.1-cp313-cp313-win_amd64.whl", hash = "sha256:e1a26503279b6b310669fb0b219c39e4820b77e8189fe80f522bb511f247db0a", size = 1488925, upload-time = "2026-05-18T17:05:34.259Z" }, - { url = "https://files.pythonhosted.org/packages/a1/4b/652b859bf5df88a751c30451b09338f7fd26a77d1271c666992f836b7711/black-26.5.1-cp313-cp313-win_arm64.whl", hash = "sha256:5c34b25da232ead53a6f335b76dbea124f4d152ad568b9080d6f944bc2b34b52", size = 1289883, upload-time = "2026-05-18T17:05:36.019Z" }, - { url = "https://files.pythonhosted.org/packages/a6/16/a8da8eb208c51c7f4ce74609a45d0dcc6d8a2141e45e81ee5289d1bb0d59/black-26.5.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e88976690a64b0af98312ca958415849cb42423423c5f2ee74af4b49a97a2168", size = 2004800, upload-time = "2026-05-18T17:05:38.182Z" }, - { url = "https://files.pythonhosted.org/packages/11/8a/a479296a19e383b70a725882a6cf3d786540601ff03cabbaaf1cce864c5a/black-26.5.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:32d5ea7f6c8bdfa6e648326ebca1f02b0764e2a029edc6f8dce2627e19d468c3", size = 1815576, upload-time = "2026-05-18T17:05:40.309Z" }, - { url = "https://files.pythonhosted.org/packages/81/6b/cfaf3d39f25132c156a068f6b805576c9103a84086019507c70e1911ee7d/black-26.5.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ea8d16dc41655aa113cd64665e7219446cd7e4ff2248d7178eaa905190c86b18", size = 1877927, upload-time = "2026-05-18T17:05:42.463Z" }, - { url = "https://files.pythonhosted.org/packages/66/76/302e313964bcff7e28df329d39f84f5270095730d85ff0acc260610a0d82/black-26.5.1-cp314-cp314-win_amd64.whl", hash = "sha256:577f21094ea469ef92ec1adaf2c9441a226d2144d01a5be2fa823cecf6543e50", size = 1511860, upload-time = "2026-05-18T17:05:43.943Z" }, - { url = "https://files.pythonhosted.org/packages/27/4e/a3827e35e0e567f9f9ee59e2a0ab979267dca98718f25547ca8c6733afd4/black-26.5.1-cp314-cp314-win_arm64.whl", hash = "sha256:ed1a20af114c301a0269bf01163d51dbef72737fd65f850001e7cbe7f3c7abae", size = 1316632, upload-time = "2026-05-18T17:05:45.521Z" }, - { url = "https://files.pythonhosted.org/packages/94/51/f975cae76d44274cc2868dc9040ac5d58d464784610234455b4e7b19c6ef/black-26.5.1-py3-none-any.whl", hash = "sha256:4ed7f7da04046d2e488437170797d3b4a4ad83906683bcb7dfc68b673bbce5e2", size = 213693, upload-time = "2026-05-18T16:53:33.964Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1.tar.gz", hash = "sha256:dd321f668053961824bcc1be1cc1df748b2d7e4fa28086b08331e577b0100a73" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9942db8888e06943c5dde66ca0037dcff82a2a4ec1ad0ada9e0d2ee9d9823893" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:89c93167a74d3a75dfaa38a5c7cca015537d5820dd7f17d63267d674a61cae90" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22f2cd76d069cc54c71f10360744ba8983fbb616903b4304a85b734915c8e1b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:87ed5c6f450580a2f6790bc7cbfb016dfc73bc750249762268a3695361315eef" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:58b4bd92cf88aacf83d88479c8f9caee044b1ec55f2451a337354a7ea2590a22" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:96ae2c733b2aabdd9986e2c5df628ff3473676cd1c5faded1ff496cf6d74083c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0e48b87e03bf109288e55cfceadcfa15ff5470aca2851a851950ed2926f450d7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5119fa92ae61f786e8c3662fd60aece1d0a2dd5cca5d0c79417a95e7a4272a59" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:30d3c14661f2792e9142cce3eeeb1cbc175b3eb5f733be0c8eeb99651e52b0c3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp311-cp311-win_arm64.whl", hash = "sha256:1ef92b76f7733f282fd096ea406200b5a286c42947412b0eaff3a74e3616cefe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4ad6fa01f941920f54f2bbb35f3df7673428a0ef98a0b0840c2eaef3b110efa8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3915f256e75a2d7cf88d8953d37f780455dc586cc72dee059c528fe77f581217" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d98d4137277c75dfb898ec8d846c4fd68ba1e9cf77f95e2865c203dc18f4c3d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:a1dca32d9f1784af512a13410ec204c6f7f0aa9797a111c42e1c03449821c264" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp312-cp312-win_arm64.whl", hash = "sha256:1037d5ac7b7b310b2632ad867ec8d0e4c4819dcdb0b820f63135da746a24e418" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b36cf2ddf5566e205f6535f782a62194a184d33e175b64ae8c40b1737522be3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f7ea64ebfa01b50f693508fc39f875e264446d3b097088f84f203b9d09618a0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecb3e624844c798144e9bd986954e0adc81d8911a1f30f375e1252fe26e8c294" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp313-cp313-win_amd64.whl", hash = "sha256:e1a26503279b6b310669fb0b219c39e4820b77e8189fe80f522bb511f247db0a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp313-cp313-win_arm64.whl", hash = "sha256:5c34b25da232ead53a6f335b76dbea124f4d152ad568b9080d6f944bc2b34b52" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e88976690a64b0af98312ca958415849cb42423423c5f2ee74af4b49a97a2168" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:32d5ea7f6c8bdfa6e648326ebca1f02b0764e2a029edc6f8dce2627e19d468c3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ea8d16dc41655aa113cd64665e7219446cd7e4ff2248d7178eaa905190c86b18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp314-cp314-win_amd64.whl", hash = "sha256:577f21094ea469ef92ec1adaf2c9441a226d2144d01a5be2fa823cecf6543e50" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-cp314-cp314-win_arm64.whl", hash = "sha256:ed1a20af114c301a0269bf01163d51dbef72737fd65f850001e7cbe7f3c7abae" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/black/black-26.5.1-py3-none-any.whl", hash = "sha256:4ed7f7da04046d2e488437170797d3b4a4ad83906683bcb7dfc68b673bbce5e2" }, ] [[package]] name = "cachetools" version = "7.1.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f4/8b/0d3945a13955303b81272f759a0331e54c5c793da455e6f5706b89d2639c/cachetools-7.1.4.tar.gz", hash = "sha256:437f55a4e0c1b01a4f3077cc470e6991d47430970e36fbcb77e2be0df4fc1cd6", size = 40085, upload-time = "2026-05-21T22:40:43.376Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cachetools/cachetools-7.1.4.tar.gz", hash = "sha256:437f55a4e0c1b01a4f3077cc470e6991d47430970e36fbcb77e2be0df4fc1cd6" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8c/7b/1fc1c09cc0756cf25861a3be10565915953876da48bb228fb9a672b20a42/cachetools-7.1.4-py3-none-any.whl", hash = "sha256:323dc4127934744db5b54eb4924482d7edafbf9554e820d1531c2e08c0e4ef54", size = 16761, upload-time = "2026-05-21T22:40:41.845Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cachetools/cachetools-7.1.4-py3-none-any.whl", hash = "sha256:323dc4127934744db5b54eb4924482d7edafbf9554e820d1531c2e08c0e4ef54" }, ] [[package]] name = "certifi" version = "2026.6.17" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c9/c7/424b75da314c1045981bd9777432fad05a9e0c69daa4ed7e308bbaffe405/certifi-2026.6.17.tar.gz", hash = "sha256:024c88eeec92ca068db80f02b8b07c9cef7b9fe261d1d535abfd5abd6f6af432", size = 134594, upload-time = "2026-06-17T10:31:07.894Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/certifi/certifi-2026.6.17.tar.gz", hash = "sha256:024c88eeec92ca068db80f02b8b07c9cef7b9fe261d1d535abfd5abd6f6af432" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/2f/c5464532e965badff2f4c4c1a3a83f5697f0d7c407ed0cda44aaa99bb451/certifi-2026.6.17-py3-none-any.whl", hash = "sha256:2227dcbaafe0d2f59279d1762ddddc37783ed4354594f194ffc31d20f41fc3db", size = 133289, upload-time = "2026-06-17T10:31:06.348Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/certifi/certifi-2026.6.17-py3-none-any.whl", hash = "sha256:2227dcbaafe0d2f59279d1762ddddc37783ed4354594f194ffc31d20f41fc3db" }, ] [[package]] name = "cffi" version = "2.0.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "pycparser", marker = "implementation_name != 'PyPy'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/93/d7/516d984057745a6cd96575eea814fe1edd6646ee6efd552fb7b0921dec83/cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44", size = 184283, upload-time = "2025-09-08T23:22:08.01Z" }, - { url = "https://files.pythonhosted.org/packages/9e/84/ad6a0b408daa859246f57c03efd28e5dd1b33c21737c2db84cae8c237aa5/cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49", size = 180504, upload-time = "2025-09-08T23:22:10.637Z" }, - { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" }, - { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" }, - { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" }, - { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" }, - { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" }, - { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" }, - { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" }, - { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" }, - { url = "https://files.pythonhosted.org/packages/e2/cc/027d7fb82e58c48ea717149b03bcadcbdc293553edb283af792bd4bcbb3f/cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a", size = 172184, upload-time = "2025-09-08T23:22:23.328Z" }, - { url = "https://files.pythonhosted.org/packages/33/fa/072dd15ae27fbb4e06b437eb6e944e75b068deb09e2a2826039e49ee2045/cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739", size = 182790, upload-time = "2025-09-08T23:22:24.752Z" }, - { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" }, - { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" }, - { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, - { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" }, - { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" }, - { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" }, - { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" }, - { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" }, - { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" }, - { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" }, - { url = "https://files.pythonhosted.org/packages/2b/c0/015b25184413d7ab0a410775fdb4a50fca20f5589b5dab1dbbfa3baad8ce/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5", size = 172076, upload-time = "2025-09-08T23:22:40.95Z" }, - { url = "https://files.pythonhosted.org/packages/ae/8f/dc5531155e7070361eb1b7e4c1a9d896d0cb21c49f807a6c03fd63fc877e/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5", size = 182820, upload-time = "2025-09-08T23:22:42.463Z" }, - { url = "https://files.pythonhosted.org/packages/95/5c/1b493356429f9aecfd56bc171285a4c4ac8697f76e9bbbbb105e537853a1/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d", size = 177635, upload-time = "2025-09-08T23:22:43.623Z" }, - { url = "https://files.pythonhosted.org/packages/ea/47/4f61023ea636104d4f16ab488e268b93008c3d0bb76893b1b31db1f96802/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d", size = 185271, upload-time = "2025-09-08T23:22:44.795Z" }, - { url = "https://files.pythonhosted.org/packages/df/a2/781b623f57358e360d62cdd7a8c681f074a71d445418a776eef0aadb4ab4/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c", size = 181048, upload-time = "2025-09-08T23:22:45.938Z" }, - { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" }, - { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" }, - { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" }, - { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" }, - { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" }, - { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" }, - { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" }, - { url = "https://files.pythonhosted.org/packages/7b/2b/2b6435f76bfeb6bbf055596976da087377ede68df465419d192acf00c437/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18", size = 172932, upload-time = "2025-09-08T23:22:57.188Z" }, - { url = "https://files.pythonhosted.org/packages/f8/ed/13bd4418627013bec4ed6e54283b1959cf6db888048c7cf4b4c3b5b36002/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5", size = 183557, upload-time = "2025-09-08T23:22:58.351Z" }, - { url = "https://files.pythonhosted.org/packages/95/31/9f7f93ad2f8eff1dbc1c3656d7ca5bfd8fb52c9d786b4dcf19b2d02217fa/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6", size = 177762, upload-time = "2025-09-08T23:22:59.668Z" }, - { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" }, - { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" }, - { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, - { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, - { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, - { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, - { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, - { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, - { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, - { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" }, - { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" }, - { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" }, - { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" }, - { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" }, - { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, - { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, - { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, - { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, - { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, - { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, - { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" }, - { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" }, - { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" }, - { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" }, - { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" }, - { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, - { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, - { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, - { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, - { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, - { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, - { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, - { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, - { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cffi/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9" }, ] [[package]] name = "cfgv" version = "3.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4e/b5/721b8799b04bf9afe054a3899c6cf4e880fcf8563cc71c15610242490a0c/cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132", size = 7334, upload-time = "2025-11-19T20:55:51.612Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cfgv/cfgv-3.5.0.tar.gz", hash = "sha256:d5b1034354820651caa73ede66a6294d6e95c1b00acc5e9b098e917404669132" } wheels = [ - { url = "https://files.pythonhosted.org/packages/db/3c/33bac158f8ab7f89b2e59426d5fe2e4f63f7ed25df84c036890172b412b5/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0", size = 7445, upload-time = "2025-11-19T20:55:50.744Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cfgv/cfgv-3.5.0-py2.py3-none-any.whl", hash = "sha256:a8dc6b26ad22ff227d2634a65cb388215ce6cc96bbcc5cfde7641ae87e8dacc0" }, ] [[package]] name = "charset-normalizer" version = "3.4.7" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e7/a1/67fe25fac3c7642725500a3f6cfe5821ad557c3abb11c9d20d12c7008d3e/charset_normalizer-3.4.7.tar.gz", hash = "sha256:ae89db9e5f98a11a4bf50407d4363e7b09b31e55bc117b4f7d80aab97ba009e5", size = 144271, upload-time = "2026-04-02T09:28:39.342Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/26/08/0f303cb0b529e456bb116f2d50565a482694fbb94340bf56d44677e7ed03/charset_normalizer-3.4.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cdd68a1fb318e290a2077696b7eb7a21a49163c455979c639bf5a5dcdc46617d", size = 315182, upload-time = "2026-04-02T09:25:40.673Z" }, - { url = "https://files.pythonhosted.org/packages/24/47/b192933e94b546f1b1fe4df9cc1f84fcdbf2359f8d1081d46dd029b50207/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e17b8d5d6a8c47c85e68ca8379def1303fd360c3e22093a807cd34a71cd082b8", size = 209329, upload-time = "2026-04-02T09:25:42.354Z" }, - { url = "https://files.pythonhosted.org/packages/c2/b4/01fa81c5ca6141024d89a8fc15968002b71da7f825dd14113207113fabbd/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:511ef87c8aec0783e08ac18565a16d435372bc1ac25a91e6ac7f5ef2b0bff790", size = 231230, upload-time = "2026-04-02T09:25:44.281Z" }, - { url = "https://files.pythonhosted.org/packages/20/f7/7b991776844dfa058017e600e6e55ff01984a063290ca5622c0b63162f68/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:007d05ec7321d12a40227aae9e2bc6dca73f3cb21058999a1df9e193555a9dcc", size = 225890, upload-time = "2026-04-02T09:25:45.475Z" }, - { url = "https://files.pythonhosted.org/packages/20/e7/bed0024a0f4ab0c8a9c64d4445f39b30c99bd1acd228291959e3de664247/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf29836da5119f3c8a8a70667b0ef5fdca3bb12f80fd06487cfa575b3909b393", size = 216930, upload-time = "2026-04-02T09:25:46.58Z" }, - { url = "https://files.pythonhosted.org/packages/e2/ab/b18f0ab31cdd7b3ddb8bb76c4a414aeb8160c9810fdf1bc62f269a539d87/charset_normalizer-3.4.7-cp310-cp310-manylinux_2_31_armv7l.whl", hash = "sha256:12d8baf840cc7889b37c7c770f478adea7adce3dcb3944d02ec87508e2dcf153", size = 202109, upload-time = "2026-04-02T09:25:48.031Z" }, - { url = "https://files.pythonhosted.org/packages/82/e5/7e9440768a06dfb3075936490cb82dbf0ee20a133bf0dd8551fa096914ec/charset_normalizer-3.4.7-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d560742f3c0d62afaccf9f41fe485ed69bd7661a241f86a3ef0f0fb8b1a397af", size = 214684, upload-time = "2026-04-02T09:25:49.245Z" }, - { url = "https://files.pythonhosted.org/packages/71/94/8c61d8da9f062fdf457c80acfa25060ec22bf1d34bbeaca4350f13bcfd07/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b14b2d9dac08e28bb8046a1a0434b1750eb221c8f5b87a68f4fa11a6f97b5e34", size = 212785, upload-time = "2026-04-02T09:25:50.671Z" }, - { url = "https://files.pythonhosted.org/packages/66/cd/6e9889c648e72c0ab2e5967528bb83508f354d706637bc7097190c874e13/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bc17a677b21b3502a21f66a8cc64f5bfad4df8a0b8434d661666f8ce90ac3af1", size = 203055, upload-time = "2026-04-02T09:25:51.802Z" }, - { url = "https://files.pythonhosted.org/packages/92/2e/7a951d6a08aefb7eb8e1b54cdfb580b1365afdd9dd484dc4bee9e5d8f258/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:750e02e074872a3fad7f233b47734166440af3cdea0add3e95163110816d6752", size = 232502, upload-time = "2026-04-02T09:25:53.388Z" }, - { url = "https://files.pythonhosted.org/packages/58/d5/abcf2d83bf8e0a1286df55cd0dc1d49af0da4282aa77e986df343e7de124/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:4e5163c14bffd570ef2affbfdd77bba66383890797df43dc8b4cc7d6f500bf53", size = 214295, upload-time = "2026-04-02T09:25:54.765Z" }, - { url = "https://files.pythonhosted.org/packages/47/3a/7d4cd7ed54be99973a0dc176032cba5cb1f258082c31fa6df35cff46acfc/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6ed74185b2db44f41ef35fd1617c5888e59792da9bbc9190d6c7300617182616", size = 227145, upload-time = "2026-04-02T09:25:55.904Z" }, - { url = "https://files.pythonhosted.org/packages/1d/98/3a45bf8247889cf28262ebd3d0872edff11565b2a1e3064ccb132db3fbb0/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:94e1885b270625a9a828c9793b4d52a64445299baa1fea5a173bf1d3dd9a1a5a", size = 218884, upload-time = "2026-04-02T09:25:57.074Z" }, - { url = "https://files.pythonhosted.org/packages/ad/80/2e8b7f8915ed5c9ef13aa828d82738e33888c485b65ebf744d615040c7ea/charset_normalizer-3.4.7-cp310-cp310-win32.whl", hash = "sha256:6785f414ae0f3c733c437e0f3929197934f526d19dfaa75e18fdb4f94c6fb374", size = 148343, upload-time = "2026-04-02T09:25:58.199Z" }, - { url = "https://files.pythonhosted.org/packages/35/1b/3b8c8c77184af465ee9ad88b5aea46ea6b2e1f7b9dc9502891e37af21e30/charset_normalizer-3.4.7-cp310-cp310-win_amd64.whl", hash = "sha256:6696b7688f54f5af4462118f0bfa7c1621eeb87154f77fa04b9295ce7a8f2943", size = 159174, upload-time = "2026-04-02T09:25:59.322Z" }, - { url = "https://files.pythonhosted.org/packages/be/c1/feb40dca40dbb21e0a908801782d9288c64fc8d8e562c2098e9994c8c21b/charset_normalizer-3.4.7-cp310-cp310-win_arm64.whl", hash = "sha256:66671f93accb62ed07da56613636f3641f1a12c13046ce91ffc923721f23c008", size = 147805, upload-time = "2026-04-02T09:26:00.756Z" }, - { url = "https://files.pythonhosted.org/packages/c2/d7/b5b7020a0565c2e9fa8c09f4b5fa6232feb326b8c20081ccded47ea368fd/charset_normalizer-3.4.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7641bb8895e77f921102f72833904dcd9901df5d6d72a2ab8f31d04b7e51e4e7", size = 309705, upload-time = "2026-04-02T09:26:02.191Z" }, - { url = "https://files.pythonhosted.org/packages/5a/53/58c29116c340e5456724ecd2fff4196d236b98f3da97b404bc5e51ac3493/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:202389074300232baeb53ae2569a60901f7efadd4245cf3a3bf0617d60b439d7", size = 206419, upload-time = "2026-04-02T09:26:03.583Z" }, - { url = "https://files.pythonhosted.org/packages/b2/02/e8146dc6591a37a00e5144c63f29fb7c97a734ea8a111190783c0e60ab63/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:30b8d1d8c52a48c2c5690e152c169b673487a2a58de1ec7393196753063fcd5e", size = 227901, upload-time = "2026-04-02T09:26:04.738Z" }, - { url = "https://files.pythonhosted.org/packages/fb/73/77486c4cd58f1267bf17db420e930c9afa1b3be3fe8c8b8ebbebc9624359/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:532bc9bf33a68613fd7d65e4b1c71a6a38d7d42604ecf239c77392e9b4e8998c", size = 222742, upload-time = "2026-04-02T09:26:06.36Z" }, - { url = "https://files.pythonhosted.org/packages/a1/fa/f74eb381a7d94ded44739e9d94de18dc5edc9c17fb8c11f0a6890696c0a9/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2fe249cb4651fd12605b7288b24751d8bfd46d35f12a20b1ba33dea122e690df", size = 214061, upload-time = "2026-04-02T09:26:08.347Z" }, - { url = "https://files.pythonhosted.org/packages/dc/92/42bd3cefcf7687253fb86694b45f37b733c97f59af3724f356fa92b8c344/charset_normalizer-3.4.7-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:65bcd23054beab4d166035cabbc868a09c1a49d1efe458fe8e4361215df40265", size = 199239, upload-time = "2026-04-02T09:26:09.823Z" }, - { url = "https://files.pythonhosted.org/packages/4c/3d/069e7184e2aa3b3cddc700e3dd267413dc259854adc3380421c805c6a17d/charset_normalizer-3.4.7-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:08e721811161356f97b4059a9ba7bafb23ea5ee2255402c42881c214e173c6b4", size = 210173, upload-time = "2026-04-02T09:26:10.953Z" }, - { url = "https://files.pythonhosted.org/packages/62/51/9d56feb5f2e7074c46f93e0ebdbe61f0848ee246e2f0d89f8e20b89ebb8f/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e060d01aec0a910bdccb8be71faf34e7799ce36950f8294c8bf612cba65a2c9e", size = 209841, upload-time = "2026-04-02T09:26:12.142Z" }, - { url = "https://files.pythonhosted.org/packages/d2/59/893d8f99cc4c837dda1fe2f1139079703deb9f321aabcb032355de13b6c7/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:38c0109396c4cfc574d502df99742a45c72c08eff0a36158b6f04000043dbf38", size = 200304, upload-time = "2026-04-02T09:26:13.711Z" }, - { url = "https://files.pythonhosted.org/packages/7d/1d/ee6f3be3464247578d1ed5c46de545ccc3d3ff933695395c402c21fa6b77/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:1c2a768fdd44ee4a9339a9b0b130049139b8ce3c01d2ce09f67f5a68048d477c", size = 229455, upload-time = "2026-04-02T09:26:14.941Z" }, - { url = "https://files.pythonhosted.org/packages/54/bb/8fb0a946296ea96a488928bdce8ef99023998c48e4713af533e9bb98ef07/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:1a87ca9d5df6fe460483d9a5bbf2b18f620cbed41b432e2bddb686228282d10b", size = 210036, upload-time = "2026-04-02T09:26:16.478Z" }, - { url = "https://files.pythonhosted.org/packages/9a/bc/015b2387f913749f82afd4fcba07846d05b6d784dd16123cb66860e0237d/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:d635aab80466bc95771bb78d5370e74d36d1fe31467b6b29b8b57b2a3cd7d22c", size = 224739, upload-time = "2026-04-02T09:26:17.751Z" }, - { url = "https://files.pythonhosted.org/packages/17/ab/63133691f56baae417493cba6b7c641571a2130eb7bceba6773367ab9ec5/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ae196f021b5e7c78e918242d217db021ed2a6ace2bc6ae94c0fc596221c7f58d", size = 216277, upload-time = "2026-04-02T09:26:18.981Z" }, - { url = "https://files.pythonhosted.org/packages/06/6d/3be70e827977f20db77c12a97e6a9f973631a45b8d186c084527e53e77a4/charset_normalizer-3.4.7-cp311-cp311-win32.whl", hash = "sha256:adb2597b428735679446b46c8badf467b4ca5f5056aae4d51a19f9570301b1ad", size = 147819, upload-time = "2026-04-02T09:26:20.295Z" }, - { url = "https://files.pythonhosted.org/packages/20/d9/5f67790f06b735d7c7637171bbfd89882ad67201891b7275e51116ed8207/charset_normalizer-3.4.7-cp311-cp311-win_amd64.whl", hash = "sha256:8e385e4267ab76874ae30db04c627faaaf0b509e1ccc11a95b3fc3e83f855c00", size = 159281, upload-time = "2026-04-02T09:26:21.74Z" }, - { url = "https://files.pythonhosted.org/packages/ca/83/6413f36c5a34afead88ce6f66684d943d91f233d76dd083798f9602b75ae/charset_normalizer-3.4.7-cp311-cp311-win_arm64.whl", hash = "sha256:d4a48e5b3c2a489fae013b7589308a40146ee081f6f509e047e0e096084ceca1", size = 147843, upload-time = "2026-04-02T09:26:22.901Z" }, - { url = "https://files.pythonhosted.org/packages/0c/eb/4fc8d0a7110eb5fc9cc161723a34a8a6c200ce3b4fbf681bc86feee22308/charset_normalizer-3.4.7-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:eca9705049ad3c7345d574e3510665cb2cf844c2f2dcfe675332677f081cbd46", size = 311328, upload-time = "2026-04-02T09:26:24.331Z" }, - { url = "https://files.pythonhosted.org/packages/f8/e3/0fadc706008ac9d7b9b5be6dc767c05f9d3e5df51744ce4cc9605de7b9f4/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6178f72c5508bfc5fd446a5905e698c6212932f25bcdd4b47a757a50605a90e2", size = 208061, upload-time = "2026-04-02T09:26:25.568Z" }, - { url = "https://files.pythonhosted.org/packages/42/f0/3dd1045c47f4a4604df85ec18ad093912ae1344ac706993aff91d38773a2/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e1421b502d83040e6d7fb2fb18dff63957f720da3d77b2fbd3187ceb63755d7b", size = 229031, upload-time = "2026-04-02T09:26:26.865Z" }, - { url = "https://files.pythonhosted.org/packages/dc/67/675a46eb016118a2fbde5a277a5d15f4f69d5f3f5f338e5ee2f8948fcf43/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:edac0f1ab77644605be2cbba52e6b7f630731fc42b34cb0f634be1a6eface56a", size = 225239, upload-time = "2026-04-02T09:26:28.044Z" }, - { url = "https://files.pythonhosted.org/packages/4b/f8/d0118a2f5f23b02cd166fa385c60f9b0d4f9194f574e2b31cef350ad7223/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5649fd1c7bade02f320a462fdefd0b4bd3ce036065836d4f42e0de958038e116", size = 216589, upload-time = "2026-04-02T09:26:29.239Z" }, - { url = "https://files.pythonhosted.org/packages/b1/f1/6d2b0b261b6c4ceef0fcb0d17a01cc5bc53586c2d4796fa04b5c540bc13d/charset_normalizer-3.4.7-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:203104ed3e428044fd943bc4bf45fa73c0730391f9621e37fe39ecf477b128cb", size = 202733, upload-time = "2026-04-02T09:26:30.5Z" }, - { url = "https://files.pythonhosted.org/packages/6f/c0/7b1f943f7e87cc3db9626ba17807d042c38645f0a1d4415c7a14afb5591f/charset_normalizer-3.4.7-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:298930cec56029e05497a76988377cbd7457ba864beeea92ad7e844fe74cd1f1", size = 212652, upload-time = "2026-04-02T09:26:31.709Z" }, - { url = "https://files.pythonhosted.org/packages/38/dd/5a9ab159fe45c6e72079398f277b7d2b523e7f716acc489726115a910097/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:708838739abf24b2ceb208d0e22403dd018faeef86ddac04319a62ae884c4f15", size = 211229, upload-time = "2026-04-02T09:26:33.282Z" }, - { url = "https://files.pythonhosted.org/packages/d5/ff/531a1cad5ca855d1c1a8b69cb71abfd6d85c0291580146fda7c82857caa1/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:0f7eb884681e3938906ed0434f20c63046eacd0111c4ba96f27b76084cd679f5", size = 203552, upload-time = "2026-04-02T09:26:34.845Z" }, - { url = "https://files.pythonhosted.org/packages/c1/4c/a5fb52d528a8ca41f7598cb619409ece30a169fbdf9cdce592e53b46c3a6/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4dc1e73c36828f982bfe79fadf5919923f8a6f4df2860804db9a98c48824ce8d", size = 230806, upload-time = "2026-04-02T09:26:36.152Z" }, - { url = "https://files.pythonhosted.org/packages/59/7a/071feed8124111a32b316b33ae4de83d36923039ef8cf48120266844285b/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:aed52fea0513bac0ccde438c188c8a471c4e0f457c2dd20cdbf6ea7a450046c7", size = 212316, upload-time = "2026-04-02T09:26:37.672Z" }, - { url = "https://files.pythonhosted.org/packages/fd/35/f7dba3994312d7ba508e041eaac39a36b120f32d4c8662b8814dab876431/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:fea24543955a6a729c45a73fe90e08c743f0b3334bbf3201e6c4bc1b0c7fa464", size = 227274, upload-time = "2026-04-02T09:26:38.93Z" }, - { url = "https://files.pythonhosted.org/packages/8a/2d/a572df5c9204ab7688ec1edc895a73ebded3b023bb07364710b05dd1c9be/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:bb6d88045545b26da47aa879dd4a89a71d1dce0f0e549b1abcb31dfe4a8eac49", size = 218468, upload-time = "2026-04-02T09:26:40.17Z" }, - { url = "https://files.pythonhosted.org/packages/86/eb/890922a8b03a568ca2f336c36585a4713c55d4d67bf0f0c78924be6315ca/charset_normalizer-3.4.7-cp312-cp312-win32.whl", hash = "sha256:2257141f39fe65a3fdf38aeccae4b953e5f3b3324f4ff0daf9f15b8518666a2c", size = 148460, upload-time = "2026-04-02T09:26:41.416Z" }, - { url = "https://files.pythonhosted.org/packages/35/d9/0e7dffa06c5ab081f75b1b786f0aefc88365825dfcd0ac544bdb7b2b6853/charset_normalizer-3.4.7-cp312-cp312-win_amd64.whl", hash = "sha256:5ed6ab538499c8644b8a3e18debabcd7ce684f3fa91cf867521a7a0279cab2d6", size = 159330, upload-time = "2026-04-02T09:26:42.554Z" }, - { url = "https://files.pythonhosted.org/packages/9e/5d/481bcc2a7c88ea6b0878c299547843b2521ccbc40980cb406267088bc701/charset_normalizer-3.4.7-cp312-cp312-win_arm64.whl", hash = "sha256:56be790f86bfb2c98fb742ce566dfb4816e5a83384616ab59c49e0604d49c51d", size = 147828, upload-time = "2026-04-02T09:26:44.075Z" }, - { url = "https://files.pythonhosted.org/packages/c1/3b/66777e39d3ae1ddc77ee606be4ec6d8cbd4c801f65e5a1b6f2b11b8346dd/charset_normalizer-3.4.7-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f496c9c3cc02230093d8330875c4c3cdfc3b73612a5fd921c65d39cbcef08063", size = 309627, upload-time = "2026-04-02T09:26:45.198Z" }, - { url = "https://files.pythonhosted.org/packages/2e/4e/b7f84e617b4854ade48a1b7915c8ccfadeba444d2a18c291f696e37f0d3b/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ea948db76d31190bf08bd371623927ee1339d5f2a0b4b1b4a4439a65298703c", size = 207008, upload-time = "2026-04-02T09:26:46.824Z" }, - { url = "https://files.pythonhosted.org/packages/c4/bb/ec73c0257c9e11b268f018f068f5d00aa0ef8c8b09f7753ebd5f2880e248/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a277ab8928b9f299723bc1a2dabb1265911b1a76341f90a510368ca44ad9ab66", size = 228303, upload-time = "2026-04-02T09:26:48.397Z" }, - { url = "https://files.pythonhosted.org/packages/85/fb/32d1f5033484494619f701e719429c69b766bfc4dbc61aa9e9c8c166528b/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3bec022aec2c514d9cf199522a802bd007cd588ab17ab2525f20f9c34d067c18", size = 224282, upload-time = "2026-04-02T09:26:49.684Z" }, - { url = "https://files.pythonhosted.org/packages/fa/07/330e3a0dda4c404d6da83b327270906e9654a24f6c546dc886a0eb0ffb23/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e044c39e41b92c845bc815e5ae4230804e8e7bc29e399b0437d64222d92809dd", size = 215595, upload-time = "2026-04-02T09:26:50.915Z" }, - { url = "https://files.pythonhosted.org/packages/e3/7c/fc890655786e423f02556e0216d4b8c6bcb6bdfa890160dc66bf52dee468/charset_normalizer-3.4.7-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:f495a1652cf3fbab2eb0639776dad966c2fb874d79d87ca07f9d5f059b8bd215", size = 201986, upload-time = "2026-04-02T09:26:52.197Z" }, - { url = "https://files.pythonhosted.org/packages/d8/97/bfb18b3db2aed3b90cf54dc292ad79fdd5ad65c4eae454099475cbeadd0d/charset_normalizer-3.4.7-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e712b419df8ba5e42b226c510472b37bd57b38e897d3eca5e8cfd410a29fa859", size = 211711, upload-time = "2026-04-02T09:26:53.49Z" }, - { url = "https://files.pythonhosted.org/packages/6f/a5/a581c13798546a7fd557c82614a5c65a13df2157e9ad6373166d2a3e645d/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7804338df6fcc08105c7745f1502ba68d900f45fd770d5bdd5288ddccb8a42d8", size = 210036, upload-time = "2026-04-02T09:26:54.975Z" }, - { url = "https://files.pythonhosted.org/packages/8c/bf/b3ab5bcb478e4193d517644b0fb2bf5497fbceeaa7a1bc0f4d5b50953861/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:481551899c856c704d58119b5025793fa6730adda3571971af568f66d2424bb5", size = 202998, upload-time = "2026-04-02T09:26:56.303Z" }, - { url = "https://files.pythonhosted.org/packages/e7/4e/23efd79b65d314fa320ec6017b4b5834d5c12a58ba4610aa353af2e2f577/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f59099f9b66f0d7145115e6f80dd8b1d847176df89b234a5a6b3f00437aa0832", size = 230056, upload-time = "2026-04-02T09:26:57.554Z" }, - { url = "https://files.pythonhosted.org/packages/b9/9f/1e1941bc3f0e01df116e68dc37a55c4d249df5e6fa77f008841aef68264f/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:f59ad4c0e8f6bba240a9bb85504faa1ab438237199d4cce5f622761507b8f6a6", size = 211537, upload-time = "2026-04-02T09:26:58.843Z" }, - { url = "https://files.pythonhosted.org/packages/80/0f/088cbb3020d44428964a6c97fe1edfb1b9550396bf6d278330281e8b709c/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:3dedcc22d73ec993f42055eff4fcfed9318d1eeb9a6606c55892a26964964e48", size = 226176, upload-time = "2026-04-02T09:27:00.437Z" }, - { url = "https://files.pythonhosted.org/packages/6a/9f/130394f9bbe06f4f63e22641d32fc9b202b7e251c9aef4db044324dac493/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:64f02c6841d7d83f832cd97ccf8eb8a906d06eb95d5276069175c696b024b60a", size = 217723, upload-time = "2026-04-02T09:27:02.021Z" }, - { url = "https://files.pythonhosted.org/packages/73/55/c469897448a06e49f8fa03f6caae97074fde823f432a98f979cc42b90e69/charset_normalizer-3.4.7-cp313-cp313-win32.whl", hash = "sha256:4042d5c8f957e15221d423ba781e85d553722fc4113f523f2feb7b188cc34c5e", size = 148085, upload-time = "2026-04-02T09:27:03.192Z" }, - { url = "https://files.pythonhosted.org/packages/5d/78/1b74c5bbb3f99b77a1715c91b3e0b5bdb6fe302d95ace4f5b1bec37b0167/charset_normalizer-3.4.7-cp313-cp313-win_amd64.whl", hash = "sha256:3946fa46a0cf3e4c8cb1cc52f56bb536310d34f25f01ca9b6c16afa767dab110", size = 158819, upload-time = "2026-04-02T09:27:04.454Z" }, - { url = "https://files.pythonhosted.org/packages/68/86/46bd42279d323deb8687c4a5a811fd548cb7d1de10cf6535d099877a9a9f/charset_normalizer-3.4.7-cp313-cp313-win_arm64.whl", hash = "sha256:80d04837f55fc81da168b98de4f4b797ef007fc8a79ab71c6ec9bc4dd662b15b", size = 147915, upload-time = "2026-04-02T09:27:05.971Z" }, - { url = "https://files.pythonhosted.org/packages/97/c8/c67cb8c70e19ef1960b97b22ed2a1567711de46c4ddf19799923adc836c2/charset_normalizer-3.4.7-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:c36c333c39be2dbca264d7803333c896ab8fa7d4d6f0ab7edb7dfd7aea6e98c0", size = 309234, upload-time = "2026-04-02T09:27:07.194Z" }, - { url = "https://files.pythonhosted.org/packages/99/85/c091fdee33f20de70d6c8b522743b6f831a2f1cd3ff86de4c6a827c48a76/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1c2aed2e5e41f24ea8ef1590b8e848a79b56f3a5564a65ceec43c9d692dc7d8a", size = 208042, upload-time = "2026-04-02T09:27:08.749Z" }, - { url = "https://files.pythonhosted.org/packages/87/1c/ab2ce611b984d2fd5d86a5a8a19c1ae26acac6bad967da4967562c75114d/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:54523e136b8948060c0fa0bc7b1b50c32c186f2fceee897a495406bb6e311d2b", size = 228706, upload-time = "2026-04-02T09:27:09.951Z" }, - { url = "https://files.pythonhosted.org/packages/a8/29/2b1d2cb00bf085f59d29eb773ce58ec2d325430f8c216804a0a5cd83cbca/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:715479b9a2802ecac752a3b0efa2b0b60285cf962ee38414211abdfccc233b41", size = 224727, upload-time = "2026-04-02T09:27:11.175Z" }, - { url = "https://files.pythonhosted.org/packages/47/5c/032c2d5a07fe4d4855fea851209cca2b6f03ebeb6d4e3afdb3358386a684/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bd6c2a1c7573c64738d716488d2cdd3c00e340e4835707d8fdb8dc1a66ef164e", size = 215882, upload-time = "2026-04-02T09:27:12.446Z" }, - { url = "https://files.pythonhosted.org/packages/2c/c2/356065d5a8b78ed04499cae5f339f091946a6a74f91e03476c33f0ab7100/charset_normalizer-3.4.7-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:c45e9440fb78f8ddabcf714b68f936737a121355bf59f3907f4e17721b9d1aae", size = 200860, upload-time = "2026-04-02T09:27:13.721Z" }, - { url = "https://files.pythonhosted.org/packages/0c/cd/a32a84217ced5039f53b29f460962abb2d4420def55afabe45b1c3c7483d/charset_normalizer-3.4.7-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3534e7dcbdcf757da6b85a0bbf5b6868786d5982dd959b065e65481644817a18", size = 211564, upload-time = "2026-04-02T09:27:15.272Z" }, - { url = "https://files.pythonhosted.org/packages/44/86/58e6f13ce26cc3b8f4a36b94a0f22ae2f00a72534520f4ae6857c4b81f89/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e8ac484bf18ce6975760921bb6148041faa8fef0547200386ea0b52b5d27bf7b", size = 211276, upload-time = "2026-04-02T09:27:16.834Z" }, - { url = "https://files.pythonhosted.org/packages/8f/fe/d17c32dc72e17e155e06883efa84514ca375f8a528ba2546bee73fc4df81/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a5fe03b42827c13cdccd08e6c0247b6a6d4b5e3cdc53fd1749f5896adcdc2356", size = 201238, upload-time = "2026-04-02T09:27:18.229Z" }, - { url = "https://files.pythonhosted.org/packages/6a/29/f33daa50b06525a237451cdb6c69da366c381a3dadcd833fa5676bc468b3/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:2d6eb928e13016cea4f1f21d1e10c1cebd5a421bc57ddf5b1142ae3f86824fab", size = 230189, upload-time = "2026-04-02T09:27:19.445Z" }, - { url = "https://files.pythonhosted.org/packages/b6/6e/52c84015394a6a0bdcd435210a7e944c5f94ea1055f5cc5d56c5fe368e7b/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e74327fb75de8986940def6e8dee4f127cc9752bee7355bb323cc5b2659b6d46", size = 211352, upload-time = "2026-04-02T09:27:20.79Z" }, - { url = "https://files.pythonhosted.org/packages/8c/d7/4353be581b373033fb9198bf1da3cf8f09c1082561e8e922aa7b39bf9fe8/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:d6038d37043bced98a66e68d3aa2b6a35505dc01328cd65217cefe82f25def44", size = 227024, upload-time = "2026-04-02T09:27:22.063Z" }, - { url = "https://files.pythonhosted.org/packages/30/45/99d18aa925bd1740098ccd3060e238e21115fffbfdcb8f3ece837d0ace6c/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:7579e913a5339fb8fa133f6bbcfd8e6749696206cf05acdbdca71a1b436d8e72", size = 217869, upload-time = "2026-04-02T09:27:23.486Z" }, - { url = "https://files.pythonhosted.org/packages/5c/05/5ee478aa53f4bb7996482153d4bfe1b89e0f087f0ab6b294fcf92d595873/charset_normalizer-3.4.7-cp314-cp314-win32.whl", hash = "sha256:5b77459df20e08151cd6f8b9ef8ef1f961ef73d85c21a555c7eed5b79410ec10", size = 148541, upload-time = "2026-04-02T09:27:25.146Z" }, - { url = "https://files.pythonhosted.org/packages/48/77/72dcb0921b2ce86420b2d79d454c7022bf5be40202a2a07906b9f2a35c97/charset_normalizer-3.4.7-cp314-cp314-win_amd64.whl", hash = "sha256:92a0a01ead5e668468e952e4238cccd7c537364eb7d851ab144ab6627dbbe12f", size = 159634, upload-time = "2026-04-02T09:27:26.642Z" }, - { url = "https://files.pythonhosted.org/packages/c6/a3/c2369911cd72f02386e4e340770f6e158c7980267da16af8f668217abaa0/charset_normalizer-3.4.7-cp314-cp314-win_arm64.whl", hash = "sha256:67f6279d125ca0046a7fd386d01b311c6363844deac3e5b069b514ba3e63c246", size = 148384, upload-time = "2026-04-02T09:27:28.271Z" }, - { url = "https://files.pythonhosted.org/packages/94/09/7e8a7f73d24dba1f0035fbbf014d2c36828fc1bf9c88f84093e57d315935/charset_normalizer-3.4.7-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:effc3f449787117233702311a1b7d8f59cba9ced946ba727bdc329ec69028e24", size = 330133, upload-time = "2026-04-02T09:27:29.474Z" }, - { url = "https://files.pythonhosted.org/packages/8d/da/96975ddb11f8e977f706f45cddd8540fd8242f71ecdb5d18a80723dcf62c/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fbccdc05410c9ee21bbf16a35f4c1d16123dcdeb8a1d38f33654fa21d0234f79", size = 216257, upload-time = "2026-04-02T09:27:30.793Z" }, - { url = "https://files.pythonhosted.org/packages/e5/e8/1d63bf8ef2d388e95c64b2098f45f84758f6d102a087552da1485912637b/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:733784b6d6def852c814bce5f318d25da2ee65dd4839a0718641c696e09a2960", size = 234851, upload-time = "2026-04-02T09:27:32.44Z" }, - { url = "https://files.pythonhosted.org/packages/9b/40/e5ff04233e70da2681fa43969ad6f66ca5611d7e669be0246c4c7aaf6dc8/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a89c23ef8d2c6b27fd200a42aa4ac72786e7c60d40efdc76e6011260b6e949c4", size = 233393, upload-time = "2026-04-02T09:27:34.03Z" }, - { url = "https://files.pythonhosted.org/packages/be/c1/06c6c49d5a5450f76899992f1ee40b41d076aee9279b49cf9974d2f313d5/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c114670c45346afedc0d947faf3c7f701051d2518b943679c8ff88befe14f8e", size = 223251, upload-time = "2026-04-02T09:27:35.369Z" }, - { url = "https://files.pythonhosted.org/packages/2b/9f/f2ff16fb050946169e3e1f82134d107e5d4ae72647ec8a1b1446c148480f/charset_normalizer-3.4.7-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:a180c5e59792af262bf263b21a3c49353f25945d8d9f70628e73de370d55e1e1", size = 206609, upload-time = "2026-04-02T09:27:36.661Z" }, - { url = "https://files.pythonhosted.org/packages/69/d5/a527c0cd8d64d2eab7459784fb4169a0ac76e5a6fc5237337982fd61347e/charset_normalizer-3.4.7-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3c9a494bc5ec77d43cea229c4f6db1e4d8fe7e1bbffa8b6f0f0032430ff8ab44", size = 220014, upload-time = "2026-04-02T09:27:38.019Z" }, - { url = "https://files.pythonhosted.org/packages/7e/80/8a7b8104a3e203074dc9aa2c613d4b726c0e136bad1cc734594b02867972/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8d828b6667a32a728a1ad1d93957cdf37489c57b97ae6c4de2860fa749b8fc1e", size = 218979, upload-time = "2026-04-02T09:27:39.37Z" }, - { url = "https://files.pythonhosted.org/packages/02/9a/b759b503d507f375b2b5c153e4d2ee0a75aa215b7f2489cf314f4541f2c0/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:cf1493cd8607bec4d8a7b9b004e699fcf8f9103a9284cc94962cb73d20f9d4a3", size = 209238, upload-time = "2026-04-02T09:27:40.722Z" }, - { url = "https://files.pythonhosted.org/packages/c2/4e/0f3f5d47b86bdb79256e7290b26ac847a2832d9a4033f7eb2cd4bcf4bb5b/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:0c96c3b819b5c3e9e165495db84d41914d6894d55181d2d108cc1a69bfc9cce0", size = 236110, upload-time = "2026-04-02T09:27:42.33Z" }, - { url = "https://files.pythonhosted.org/packages/96/23/bce28734eb3ed2c91dcf93abeb8a5cf393a7b2749725030bb630e554fdd8/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:752a45dc4a6934060b3b0dab47e04edc3326575f82be64bc4fc293914566503e", size = 219824, upload-time = "2026-04-02T09:27:43.924Z" }, - { url = "https://files.pythonhosted.org/packages/2c/6f/6e897c6984cc4d41af319b077f2f600fc8214eb2fe2d6bcb79141b882400/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:8778f0c7a52e56f75d12dae53ae320fae900a8b9b4164b981b9c5ce059cd1fcb", size = 233103, upload-time = "2026-04-02T09:27:45.348Z" }, - { url = "https://files.pythonhosted.org/packages/76/22/ef7bd0fe480a0ae9b656189ec00744b60933f68b4f42a7bb06589f6f576a/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ce3412fbe1e31eb81ea42f4169ed94861c56e643189e1e75f0041f3fe7020abe", size = 225194, upload-time = "2026-04-02T09:27:46.706Z" }, - { url = "https://files.pythonhosted.org/packages/c5/a7/0e0ab3e0b5bc1219bd80a6a0d4d72ca74d9250cb2382b7c699c147e06017/charset_normalizer-3.4.7-cp314-cp314t-win32.whl", hash = "sha256:c03a41a8784091e67a39648f70c5f97b5b6a37f216896d44d2cdcb82615339a0", size = 159827, upload-time = "2026-04-02T09:27:48.053Z" }, - { url = "https://files.pythonhosted.org/packages/7a/1d/29d32e0fb40864b1f878c7f5a0b343ae676c6e2b271a2d55cc3a152391da/charset_normalizer-3.4.7-cp314-cp314t-win_amd64.whl", hash = "sha256:03853ed82eeebbce3c2abfdbc98c96dc205f32a79627688ac9a27370ea61a49c", size = 174168, upload-time = "2026-04-02T09:27:49.795Z" }, - { url = "https://files.pythonhosted.org/packages/de/32/d92444ad05c7a6e41fb2036749777c163baf7a0301a040cb672d6b2b1ae9/charset_normalizer-3.4.7-cp314-cp314t-win_arm64.whl", hash = "sha256:c35abb8bfff0185efac5878da64c45dafd2b37fb0383add1be155a763c1f083d", size = 153018, upload-time = "2026-04-02T09:27:51.116Z" }, - { url = "https://files.pythonhosted.org/packages/db/8f/61959034484a4a7c527811f4721e75d02d653a35afb0b6054474d8185d4c/charset_normalizer-3.4.7-py3-none-any.whl", hash = "sha256:3dce51d0f5e7951f8bb4900c257dad282f49190fdbebecd4ba99bcc41fef404d", size = 61958, upload-time = "2026-04-02T09:28:37.794Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7.tar.gz", hash = "sha256:ae89db9e5f98a11a4bf50407d4363e7b09b31e55bc117b4f7d80aab97ba009e5" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cdd68a1fb318e290a2077696b7eb7a21a49163c455979c639bf5a5dcdc46617d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e17b8d5d6a8c47c85e68ca8379def1303fd360c3e22093a807cd34a71cd082b8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:511ef87c8aec0783e08ac18565a16d435372bc1ac25a91e6ac7f5ef2b0bff790" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:007d05ec7321d12a40227aae9e2bc6dca73f3cb21058999a1df9e193555a9dcc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cf29836da5119f3c8a8a70667b0ef5fdca3bb12f80fd06487cfa575b3909b393" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-manylinux_2_31_armv7l.whl", hash = "sha256:12d8baf840cc7889b37c7c770f478adea7adce3dcb3944d02ec87508e2dcf153" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:d560742f3c0d62afaccf9f41fe485ed69bd7661a241f86a3ef0f0fb8b1a397af" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b14b2d9dac08e28bb8046a1a0434b1750eb221c8f5b87a68f4fa11a6f97b5e34" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:bc17a677b21b3502a21f66a8cc64f5bfad4df8a0b8434d661666f8ce90ac3af1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:750e02e074872a3fad7f233b47734166440af3cdea0add3e95163110816d6752" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:4e5163c14bffd570ef2affbfdd77bba66383890797df43dc8b4cc7d6f500bf53" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6ed74185b2db44f41ef35fd1617c5888e59792da9bbc9190d6c7300617182616" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:94e1885b270625a9a828c9793b4d52a64445299baa1fea5a173bf1d3dd9a1a5a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-win32.whl", hash = "sha256:6785f414ae0f3c733c437e0f3929197934f526d19dfaa75e18fdb4f94c6fb374" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-win_amd64.whl", hash = "sha256:6696b7688f54f5af4462118f0bfa7c1621eeb87154f77fa04b9295ce7a8f2943" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp310-cp310-win_arm64.whl", hash = "sha256:66671f93accb62ed07da56613636f3641f1a12c13046ce91ffc923721f23c008" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7641bb8895e77f921102f72833904dcd9901df5d6d72a2ab8f31d04b7e51e4e7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:202389074300232baeb53ae2569a60901f7efadd4245cf3a3bf0617d60b439d7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:30b8d1d8c52a48c2c5690e152c169b673487a2a58de1ec7393196753063fcd5e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:532bc9bf33a68613fd7d65e4b1c71a6a38d7d42604ecf239c77392e9b4e8998c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2fe249cb4651fd12605b7288b24751d8bfd46d35f12a20b1ba33dea122e690df" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:65bcd23054beab4d166035cabbc868a09c1a49d1efe458fe8e4361215df40265" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:08e721811161356f97b4059a9ba7bafb23ea5ee2255402c42881c214e173c6b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:e060d01aec0a910bdccb8be71faf34e7799ce36950f8294c8bf612cba65a2c9e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:38c0109396c4cfc574d502df99742a45c72c08eff0a36158b6f04000043dbf38" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:1c2a768fdd44ee4a9339a9b0b130049139b8ce3c01d2ce09f67f5a68048d477c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:1a87ca9d5df6fe460483d9a5bbf2b18f620cbed41b432e2bddb686228282d10b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:d635aab80466bc95771bb78d5370e74d36d1fe31467b6b29b8b57b2a3cd7d22c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ae196f021b5e7c78e918242d217db021ed2a6ace2bc6ae94c0fc596221c7f58d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-win32.whl", hash = "sha256:adb2597b428735679446b46c8badf467b4ca5f5056aae4d51a19f9570301b1ad" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-win_amd64.whl", hash = "sha256:8e385e4267ab76874ae30db04c627faaaf0b509e1ccc11a95b3fc3e83f855c00" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp311-cp311-win_arm64.whl", hash = "sha256:d4a48e5b3c2a489fae013b7589308a40146ee081f6f509e047e0e096084ceca1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:eca9705049ad3c7345d574e3510665cb2cf844c2f2dcfe675332677f081cbd46" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6178f72c5508bfc5fd446a5905e698c6212932f25bcdd4b47a757a50605a90e2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e1421b502d83040e6d7fb2fb18dff63957f720da3d77b2fbd3187ceb63755d7b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:edac0f1ab77644605be2cbba52e6b7f630731fc42b34cb0f634be1a6eface56a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5649fd1c7bade02f320a462fdefd0b4bd3ce036065836d4f42e0de958038e116" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:203104ed3e428044fd943bc4bf45fa73c0730391f9621e37fe39ecf477b128cb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:298930cec56029e05497a76988377cbd7457ba864beeea92ad7e844fe74cd1f1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:708838739abf24b2ceb208d0e22403dd018faeef86ddac04319a62ae884c4f15" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:0f7eb884681e3938906ed0434f20c63046eacd0111c4ba96f27b76084cd679f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:4dc1e73c36828f982bfe79fadf5919923f8a6f4df2860804db9a98c48824ce8d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:aed52fea0513bac0ccde438c188c8a471c4e0f457c2dd20cdbf6ea7a450046c7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:fea24543955a6a729c45a73fe90e08c743f0b3334bbf3201e6c4bc1b0c7fa464" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:bb6d88045545b26da47aa879dd4a89a71d1dce0f0e549b1abcb31dfe4a8eac49" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-win32.whl", hash = "sha256:2257141f39fe65a3fdf38aeccae4b953e5f3b3324f4ff0daf9f15b8518666a2c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-win_amd64.whl", hash = "sha256:5ed6ab538499c8644b8a3e18debabcd7ce684f3fa91cf867521a7a0279cab2d6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp312-cp312-win_arm64.whl", hash = "sha256:56be790f86bfb2c98fb742ce566dfb4816e5a83384616ab59c49e0604d49c51d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f496c9c3cc02230093d8330875c4c3cdfc3b73612a5fd921c65d39cbcef08063" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0ea948db76d31190bf08bd371623927ee1339d5f2a0b4b1b4a4439a65298703c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a277ab8928b9f299723bc1a2dabb1265911b1a76341f90a510368ca44ad9ab66" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3bec022aec2c514d9cf199522a802bd007cd588ab17ab2525f20f9c34d067c18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e044c39e41b92c845bc815e5ae4230804e8e7bc29e399b0437d64222d92809dd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:f495a1652cf3fbab2eb0639776dad966c2fb874d79d87ca07f9d5f059b8bd215" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e712b419df8ba5e42b226c510472b37bd57b38e897d3eca5e8cfd410a29fa859" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:7804338df6fcc08105c7745f1502ba68d900f45fd770d5bdd5288ddccb8a42d8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:481551899c856c704d58119b5025793fa6730adda3571971af568f66d2424bb5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:f59099f9b66f0d7145115e6f80dd8b1d847176df89b234a5a6b3f00437aa0832" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:f59ad4c0e8f6bba240a9bb85504faa1ab438237199d4cce5f622761507b8f6a6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:3dedcc22d73ec993f42055eff4fcfed9318d1eeb9a6606c55892a26964964e48" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:64f02c6841d7d83f832cd97ccf8eb8a906d06eb95d5276069175c696b024b60a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-win32.whl", hash = "sha256:4042d5c8f957e15221d423ba781e85d553722fc4113f523f2feb7b188cc34c5e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-win_amd64.whl", hash = "sha256:3946fa46a0cf3e4c8cb1cc52f56bb536310d34f25f01ca9b6c16afa767dab110" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp313-cp313-win_arm64.whl", hash = "sha256:80d04837f55fc81da168b98de4f4b797ef007fc8a79ab71c6ec9bc4dd662b15b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:c36c333c39be2dbca264d7803333c896ab8fa7d4d6f0ab7edb7dfd7aea6e98c0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1c2aed2e5e41f24ea8ef1590b8e848a79b56f3a5564a65ceec43c9d692dc7d8a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:54523e136b8948060c0fa0bc7b1b50c32c186f2fceee897a495406bb6e311d2b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:715479b9a2802ecac752a3b0efa2b0b60285cf962ee38414211abdfccc233b41" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bd6c2a1c7573c64738d716488d2cdd3c00e340e4835707d8fdb8dc1a66ef164e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:c45e9440fb78f8ddabcf714b68f936737a121355bf59f3907f4e17721b9d1aae" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3534e7dcbdcf757da6b85a0bbf5b6868786d5982dd959b065e65481644817a18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e8ac484bf18ce6975760921bb6148041faa8fef0547200386ea0b52b5d27bf7b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:a5fe03b42827c13cdccd08e6c0247b6a6d4b5e3cdc53fd1749f5896adcdc2356" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:2d6eb928e13016cea4f1f21d1e10c1cebd5a421bc57ddf5b1142ae3f86824fab" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e74327fb75de8986940def6e8dee4f127cc9752bee7355bb323cc5b2659b6d46" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:d6038d37043bced98a66e68d3aa2b6a35505dc01328cd65217cefe82f25def44" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:7579e913a5339fb8fa133f6bbcfd8e6749696206cf05acdbdca71a1b436d8e72" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-win32.whl", hash = "sha256:5b77459df20e08151cd6f8b9ef8ef1f961ef73d85c21a555c7eed5b79410ec10" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-win_amd64.whl", hash = "sha256:92a0a01ead5e668468e952e4238cccd7c537364eb7d851ab144ab6627dbbe12f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314-win_arm64.whl", hash = "sha256:67f6279d125ca0046a7fd386d01b311c6363844deac3e5b069b514ba3e63c246" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:effc3f449787117233702311a1b7d8f59cba9ced946ba727bdc329ec69028e24" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fbccdc05410c9ee21bbf16a35f4c1d16123dcdeb8a1d38f33654fa21d0234f79" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:733784b6d6def852c814bce5f318d25da2ee65dd4839a0718641c696e09a2960" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a89c23ef8d2c6b27fd200a42aa4ac72786e7c60d40efdc76e6011260b6e949c4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6c114670c45346afedc0d947faf3c7f701051d2518b943679c8ff88befe14f8e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:a180c5e59792af262bf263b21a3c49353f25945d8d9f70628e73de370d55e1e1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:3c9a494bc5ec77d43cea229c4f6db1e4d8fe7e1bbffa8b6f0f0032430ff8ab44" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8d828b6667a32a728a1ad1d93957cdf37489c57b97ae6c4de2860fa749b8fc1e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:cf1493cd8607bec4d8a7b9b004e699fcf8f9103a9284cc94962cb73d20f9d4a3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:0c96c3b819b5c3e9e165495db84d41914d6894d55181d2d108cc1a69bfc9cce0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:752a45dc4a6934060b3b0dab47e04edc3326575f82be64bc4fc293914566503e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:8778f0c7a52e56f75d12dae53ae320fae900a8b9b4164b981b9c5ce059cd1fcb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ce3412fbe1e31eb81ea42f4169ed94861c56e643189e1e75f0041f3fe7020abe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-win32.whl", hash = "sha256:c03a41a8784091e67a39648f70c5f97b5b6a37f216896d44d2cdcb82615339a0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-win_amd64.whl", hash = "sha256:03853ed82eeebbce3c2abfdbc98c96dc205f32a79627688ac9a27370ea61a49c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-cp314-cp314t-win_arm64.whl", hash = "sha256:c35abb8bfff0185efac5878da64c45dafd2b37fb0383add1be155a763c1f083d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/charset-normalizer/charset_normalizer-3.4.7-py3-none-any.whl", hash = "sha256:3dce51d0f5e7951f8bb4900c257dad282f49190fdbebecd4ba99bcc41fef404d" }, ] [[package]] name = "click" version = "8.4.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/76/d4/81420972a676e8ffea40450d8c8c92943e7218a78fe9b64359836cc9876b/click-8.4.2.tar.gz", hash = "sha256:9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6", size = 338000, upload-time = "2026-06-24T17:45:15.148Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/click/click-8.4.2.tar.gz", hash = "sha256:9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fb/e2/79c688af8b210d232694e31e59da9f6ec747bae31c3f5946e4e9b98860d5/click-8.4.2-py3-none-any.whl", hash = "sha256:e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76", size = 119243, upload-time = "2026-06-24T17:45:13.73Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/click/click-8.4.2-py3-none-any.whl", hash = "sha256:e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76" }, ] [[package]] name = "colorama" version = "0.4.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/colorama/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/colorama/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6" }, ] [[package]] name = "cryptography" version = "49.0.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1f/99/d1c90d6041656cc6ee229dc99cd67fd0cd5aec3c5f7d72fffc27cc750054/cryptography-49.0.0.tar.gz", hash = "sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493", size = 854345, upload-time = "2026-06-12T20:02:30.512Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9b/22/adf66990e63584a68dfb50c24f48a125c07b1699899381c8151e63ed458c/cryptography-49.0.0-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:966fe0e9c67490071f14c0d2b1cb2dfb3023c5ce39457343931415f08382f2db", size = 4032100, upload-time = "2026-06-12T20:02:32.143Z" }, - { url = "https://files.pythonhosted.org/packages/09/41/3797cfaf69cae04a13ee78ebd83f0678d9c02b4779d21ce24445326f1a69/cryptography-49.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db", size = 4692978, upload-time = "2026-06-12T20:01:21.305Z" }, - { url = "https://files.pythonhosted.org/packages/e6/8b/43011f7ebe515a8aa20d61f290a326cd890c2e738e16e59eaff8d9c3a412/cryptography-49.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325", size = 4716422, upload-time = "2026-06-12T20:01:48.566Z" }, - { url = "https://files.pythonhosted.org/packages/4a/91/01ce7303a4579e6d3a6abef01bd322848e9ea7a219adcabc5048b9033571/cryptography-49.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2", size = 4700503, upload-time = "2026-06-12T20:02:47.091Z" }, - { url = "https://files.pythonhosted.org/packages/62/99/a2c95cf8293f07491e9e27c20cc4dcd18176d944e674679adeb1d0173fd6/cryptography-49.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b", size = 5309779, upload-time = "2026-06-12T20:02:08.987Z" }, - { url = "https://files.pythonhosted.org/packages/20/2c/0622f20ff02b2ef32558733443805dc82fd4c275be01b2d19d14676f3a1b/cryptography-49.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6", size = 4749683, upload-time = "2026-06-12T20:02:03.335Z" }, - { url = "https://files.pythonhosted.org/packages/a3/5b/c5246635d5fd3b64e0d45ae10e99fd32fe9676a79915ccfe5a61ba9af1a5/cryptography-49.0.0-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c", size = 4337874, upload-time = "2026-06-12T20:02:54.323Z" }, - { url = "https://files.pythonhosted.org/packages/6d/88/05563c7fe2e914e87d1a536d06fe83e66b4e1d95cb593e05aea375531da8/cryptography-49.0.0-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7", size = 4700283, upload-time = "2026-06-12T20:01:34.822Z" }, - { url = "https://files.pythonhosted.org/packages/c4/b6/d7696e4e890d6ae1469935164c9e5215c557671cb78d6e3f458ccceaa632/cryptography-49.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68", size = 5265844, upload-time = "2026-06-12T20:01:24.09Z" }, - { url = "https://files.pythonhosted.org/packages/a9/3c/f3ad17eecc1a57b0ba236dc01f90e783c51f4a2f35f64777cc4f47a184b2/cryptography-49.0.0-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9", size = 4749290, upload-time = "2026-06-12T20:01:30.848Z" }, - { url = "https://files.pythonhosted.org/packages/4f/01/339573cf1023163a400b0b5d16f6d507de413b9f60be6fd1b77feeaf6737/cryptography-49.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f", size = 4834612, upload-time = "2026-06-12T20:01:29.246Z" }, - { url = "https://files.pythonhosted.org/packages/71/fd/577302e213a1be9468f92d1afef66fcf1ef83d516819d9992ca547f592bd/cryptography-49.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459", size = 4980804, upload-time = "2026-06-12T20:01:42.853Z" }, - { url = "https://files.pythonhosted.org/packages/1f/09/f42b1d190c5ba75f72062a387f8030d1d75f6ab035788f1d9c4b01de6525/cryptography-49.0.0-cp311-abi3-win_amd64.whl", hash = "sha256:e5dfc1e64de5677cec922ffa8da89c546d0415bf6efdf081842e5d44c84e1f0e", size = 3810026, upload-time = "2026-06-12T20:02:39.262Z" }, - { url = "https://files.pythonhosted.org/packages/ec/9e/db72b3ae7fc9cfad53e630e56c6ae83b9b6ff0bf3718ffb8012d20b3aabf/cryptography-49.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:73a205dce83953d131a4aa1e0fd917a2fd1c5b1eef251e9d7152efefcbf5caf7", size = 4013892, upload-time = "2026-06-12T20:02:10.735Z" }, - { url = "https://files.pythonhosted.org/packages/86/12/c48a424f38db03027be9f7ed5c7dc5de9933dbee992865f98b13727a009d/cryptography-49.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d", size = 4678835, upload-time = "2026-06-12T20:02:48.743Z" }, - { url = "https://files.pythonhosted.org/packages/68/28/8a3ad4653662c93fc44dc4e5d8fd374c25c42e07b34bbfbadf49cf57a5a8/cryptography-49.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa", size = 4697239, upload-time = "2026-06-12T20:02:56.03Z" }, - { url = "https://files.pythonhosted.org/packages/a8/b2/2193fc74f81aee4f9b62733133b73b5176718932ed8f2e4b03fa040480a6/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb", size = 4685593, upload-time = "2026-06-12T20:02:50.666Z" }, - { url = "https://files.pythonhosted.org/packages/47/f1/1d3eaa243bfc5de4a187b22aa8c048b3e4980bfbe830ac46e6bac2e66947/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d", size = 5289961, upload-time = "2026-06-12T20:01:46.468Z" }, - { url = "https://files.pythonhosted.org/packages/58/39/2d51306721330c486495853eda1c567880ff036de15a14c4b74f399934af/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561", size = 4731145, upload-time = "2026-06-12T20:02:16.832Z" }, - { url = "https://files.pythonhosted.org/packages/17/50/983e838c7fd0d87fd8c969bcdd328edaf5f756e38df5281637424c155873/cryptography-49.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122", size = 4321719, upload-time = "2026-06-12T20:02:52.611Z" }, - { url = "https://files.pythonhosted.org/packages/a7/f5/8f571d7e27c55bce9f76f026143bcb1e040a4233149ecca0bea5fa5dd5f7/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505", size = 4685209, upload-time = "2026-06-12T20:02:07.282Z" }, - { url = "https://files.pythonhosted.org/packages/e7/84/0e27016a6fc5a0886f797018b26aa42f40c09a82332bff77822a451deaaa/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866", size = 5246285, upload-time = "2026-06-12T20:01:32.439Z" }, - { url = "https://files.pythonhosted.org/packages/11/2d/5e1fb307cb5931881516b464c98774b3f2c36b5d4bb9a2830253cf553cad/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8", size = 4730441, upload-time = "2026-06-12T20:02:01.469Z" }, - { url = "https://files.pythonhosted.org/packages/e4/c0/bff5a02ee731d207d6a1ed51732549d8c53d2bc8da1d10ec6f2844201d68/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3", size = 4815869, upload-time = "2026-06-12T20:01:36.574Z" }, - { url = "https://files.pythonhosted.org/packages/b9/26/814681d14248d95d73d5c3eea0c39a94eb8302df966f670a2c60de90974b/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27", size = 4960948, upload-time = "2026-06-12T20:02:18.688Z" }, - { url = "https://files.pythonhosted.org/packages/4c/fe/93ecac273d3738939d023612ad12cca9a3740a5345d69fda04134c43fd96/cryptography-49.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:33cd0565932807baddb67b96dbee92f2c374b5c89dee09fd74079aeb8c8dba61", size = 3799153, upload-time = "2026-06-12T20:01:39.059Z" }, - { url = "https://files.pythonhosted.org/packages/19/2a/5bb823f5bedcf80718cea7fbc95ec5515cca3769633c4b01a32be7f30e7c/cryptography-49.0.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:ec5e529fb80935c94fe7b729f9972b50e351a0e6b50aa294fd5cabb109fcc29a", size = 4025947, upload-time = "2026-06-12T20:01:25.745Z" }, - { url = "https://files.pythonhosted.org/packages/3d/df/40577043ca124e17012f408ddddaeb213b856336ac82ddb3bc915f39e29f/cryptography-49.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4", size = 4692429, upload-time = "2026-06-12T20:01:53.628Z" }, - { url = "https://files.pythonhosted.org/packages/2c/99/2d13299eb3dd27b02dcfaafcc91d6b5cb3329f7cbd6d8f51921acd566c1a/cryptography-49.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18", size = 4700968, upload-time = "2026-06-12T20:02:45.383Z" }, - { url = "https://files.pythonhosted.org/packages/a5/4d/9c0cd02f95e2602dd5e563da149ee0830abef3537be8b34dc56281ebe27a/cryptography-49.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69", size = 4697758, upload-time = "2026-06-12T20:01:41.13Z" }, - { url = "https://files.pythonhosted.org/packages/24/01/186c825898477d77e2324d5360fefe622ff1d8d1963ec0554e2cada8ec77/cryptography-49.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64", size = 5298863, upload-time = "2026-06-12T20:02:24.579Z" }, - { url = "https://files.pythonhosted.org/packages/b8/7b/62cbbab75d0659865bf0273790031544a0b16c8072d258f9428dcd8190dc/cryptography-49.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21", size = 4735983, upload-time = "2026-06-12T20:01:50.14Z" }, - { url = "https://files.pythonhosted.org/packages/6c/72/3e798c064bc39e471008075d0f9bc9daf77a80879c092e4a8e170c585ed4/cryptography-49.0.0-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9", size = 4334173, upload-time = "2026-06-12T20:01:44.743Z" }, - { url = "https://files.pythonhosted.org/packages/f0/ee/6fca21d1ac73e06f8bef71940abfd4d2f6472b4bca284d770f32bd4086f6/cryptography-49.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc", size = 4697298, upload-time = "2026-06-12T20:02:20.918Z" }, - { url = "https://files.pythonhosted.org/packages/67/d0/a5fcd3515f0bae49a7b6d0413cc1bdccdcc1fc0047037a0d480642cdc5d6/cryptography-49.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8", size = 5254338, upload-time = "2026-06-12T20:02:22.737Z" }, - { url = "https://files.pythonhosted.org/packages/a0/84/84fe36f19caf857d61cb7fc9c63035a47ffabd84ea12d1d393148efa3615/cryptography-49.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36", size = 4735650, upload-time = "2026-06-12T20:02:41.389Z" }, - { url = "https://files.pythonhosted.org/packages/6c/a0/db537264e234f7273a73ec020873d6d6b39dfd8a53db78b550ca8320440e/cryptography-49.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e", size = 4834820, upload-time = "2026-06-12T20:01:51.847Z" }, - { url = "https://files.pythonhosted.org/packages/93/77/8df9eb486495979bccecd1062e2eaf435250e84437040295b57d09048b0b/cryptography-49.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b", size = 4967968, upload-time = "2026-06-12T20:02:12.524Z" }, - { url = "https://files.pythonhosted.org/packages/c2/e6/f60198ea8d9dfa15fff9ed4ca02ce362f6eadd9ba757dcc50634c4257b63/cryptography-49.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:026ac7423e6fa66872d3bf889be5974507da3944f866f704fa200eadacd00001", size = 3785547, upload-time = "2026-06-12T20:02:26.847Z" }, - { url = "https://files.pythonhosted.org/packages/63/d3/4a83af35d65e3fad632c926fad684c193ea4398569ccb0bbbc7fe8f5dc9a/cryptography-49.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:fc1e275c2f1d97b1a6450b8b0ea3ebfa6e087a611c2b26cb2404d48588abab7b", size = 3993685, upload-time = "2026-06-12T20:02:14.883Z" }, - { url = "https://files.pythonhosted.org/packages/d6/a7/f9dac0ab7f80368c56993a7bf638ef9935f825c91902798481fac0898138/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838", size = 4676239, upload-time = "2026-06-12T20:02:28.793Z" }, - { url = "https://files.pythonhosted.org/packages/d7/70/2ba3769dd0ae167e2f33dfa9592d45db6ff9a61d62ca1a5b3d1bdd09068f/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5", size = 4715584, upload-time = "2026-06-12T20:01:27.495Z" }, - { url = "https://files.pythonhosted.org/packages/94/64/2923570ac1c0bd3a737aa366ac3abbbbde273042308b8cde95e2364a6e6a/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615", size = 4675885, upload-time = "2026-06-12T20:01:55.49Z" }, - { url = "https://files.pythonhosted.org/packages/ab/f8/614dc7e051418cfe53d55173c1e24c6b0085e89996fe90508c2fdf769aef/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6", size = 4715449, upload-time = "2026-06-12T20:02:05.469Z" }, - { url = "https://files.pythonhosted.org/packages/aa/50/a9caea39ad19c431c1a3f8a31114df65b260cdfe67786b6c7e7c040c4c44/cryptography-49.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:be9fcb48a55f023493482827d4f459bd263cc20efde64f204b97c123201850c6", size = 3783731, upload-time = "2026-06-12T20:02:43.319Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0.tar.gz", hash = "sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-macosx_11_0_arm64.whl", hash = "sha256:966fe0e9c67490071f14c0d2b1cb2dfb3023c5ce39457343931415f08382f2db" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp311-abi3-win_amd64.whl", hash = "sha256:e5dfc1e64de5677cec922ffa8da89c546d0415bf6efdf081842e5d44c84e1f0e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:73a205dce83953d131a4aa1e0fd917a2fd1c5b1eef251e9d7152efefcbf5caf7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:33cd0565932807baddb67b96dbee92f2c374b5c89dee09fd74079aeb8c8dba61" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:ec5e529fb80935c94fe7b729f9972b50e351a0e6b50aa294fd5cabb109fcc29a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-cp39-abi3-win_amd64.whl", hash = "sha256:026ac7423e6fa66872d3bf889be5974507da3944f866f704fa200eadacd00001" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:fc1e275c2f1d97b1a6450b8b0ea3ebfa6e087a611c2b26cb2404d48588abab7b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/cryptography/cryptography-49.0.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:be9fcb48a55f023493482827d4f459bd263cc20efde64f204b97c123201850c6" }, ] [[package]] name = "datamodel-code-generator" version = "0.66.3" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "argcomplete" }, { name = "black", marker = "sys_platform != 'emscripten'" }, @@ -438,9 +438,9 @@ dependencies = [ { name = "pyyaml" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/1d/4f/78f654273af65bd65f55b1eb670b23e56a8d1b227129bc17d96c4803495d/datamodel_code_generator-0.66.3.tar.gz", hash = "sha256:739f36b42d8131359a82cb25b704444581114e14611344538a61465d1743c6ec", size = 1516025, upload-time = "2026-07-01T16:03:37.389Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/datamodel-code-generator/datamodel_code_generator-0.66.3.tar.gz", hash = "sha256:739f36b42d8131359a82cb25b704444581114e14611344538a61465d1743c6ec" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/ef/78fcf2a043e4c541827f156c98034bc6f2d4f511ec750f58f6f757985f66/datamodel_code_generator-0.66.3-py3-none-any.whl", hash = "sha256:7c1b44910951efea0e109f64243acb9721f6f7cd45b15635df17bd0829b24244", size = 418011, upload-time = "2026-07-01T16:03:35.348Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/datamodel-code-generator/datamodel_code_generator-0.66.3-py3-none-any.whl", hash = "sha256:7c1b44910951efea0e109f64243acb9721f6f7cd45b15635df17bd0829b24244" }, ] [package.optional-dependencies] @@ -454,355 +454,355 @@ ruff = [ [[package]] name = "distlib" version = "0.4.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c9/02/bd72be9134d25ed783ecbbc38a539ffaefbf90c78418c7fb7229600dbac7/distlib-0.4.3.tar.gz", hash = "sha256:f152097224a0ae24be5a0f6bae1b9359af82133bce63f98a95f86cae1aede9ed", size = 615141, upload-time = "2026-06-12T08:04:52.847Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/distlib/distlib-0.4.3.tar.gz", hash = "sha256:f152097224a0ae24be5a0f6bae1b9359af82133bce63f98a95f86cae1aede9ed" } wheels = [ - { url = "https://files.pythonhosted.org/packages/02/08/9c41fb51ab5b43eb21674aff13df270e8ba6c4b29c8624e328dc7a9482af/distlib-0.4.3-py2.py3-none-any.whl", hash = "sha256:4b0ce306c966eb73bc3a7b6abad017c556dadd92c44701562cd528ac7fde4d5b", size = 470628, upload-time = "2026-06-12T08:04:50.506Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/distlib/distlib-0.4.3-py2.py3-none-any.whl", hash = "sha256:4b0ce306c966eb73bc3a7b6abad017c556dadd92c44701562cd528ac7fde4d5b" }, ] [[package]] name = "exceptiongroup" version = "1.3.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/exceptiongroup/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/exceptiongroup/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598" }, ] [[package]] name = "filelock" version = "3.29.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e6/dc/be6cbe99670cd6e4ad387123647cb08e0c32975e223f82551e914c5568a6/filelock-3.29.4.tar.gz", hash = "sha256:10cdb3656fc44541cdf30652a93fb10ec6b05325620eb316bd26893e4201538a", size = 63028, upload-time = "2026-06-13T16:12:00.744Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/filelock/filelock-3.29.4.tar.gz", hash = "sha256:10cdb3656fc44541cdf30652a93fb10ec6b05325620eb316bd26893e4201538a" } wheels = [ - { url = "https://files.pythonhosted.org/packages/13/37/a065dc3bd6e49423a6532c642ca7378d3f467b1ef44c2800c937af7f9739/filelock-3.29.4-py3-none-any.whl", hash = "sha256:dac1648087d5115554850d113e7dd8c83ab2d38e3435dde2d4f163847e57b767", size = 42757, upload-time = "2026-06-13T16:11:59.582Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/filelock/filelock-3.29.4-py3-none-any.whl", hash = "sha256:dac1648087d5115554850d113e7dd8c83ab2d38e3435dde2d4f163847e57b767" }, ] [[package]] name = "genson" version = "1.3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c5/cf/2303c8ad276dcf5ee2ad6cf69c4338fd86ef0f471a5207b069adf7a393cf/genson-1.3.0.tar.gz", hash = "sha256:e02db9ac2e3fd29e65b5286f7135762e2cd8a986537c075b06fc5f1517308e37", size = 34919, upload-time = "2024-05-15T22:08:49.123Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/genson/genson-1.3.0.tar.gz", hash = "sha256:e02db9ac2e3fd29e65b5286f7135762e2cd8a986537c075b06fc5f1517308e37" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f8/5c/e226de133afd8bb267ec27eead9ae3d784b95b39a287ed404caab39a5f50/genson-1.3.0-py3-none-any.whl", hash = "sha256:468feccd00274cc7e4c09e84b08704270ba8d95232aa280f65b986139cec67f7", size = 21470, upload-time = "2024-05-15T22:08:47.056Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/genson/genson-1.3.0-py3-none-any.whl", hash = "sha256:468feccd00274cc7e4c09e84b08704270ba8d95232aa280f65b986139cec67f7" }, ] [[package]] name = "google-auth" version = "2.55.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "cryptography" }, { name = "pyasn1-modules" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a3/6f/f3f4ac177c67bbee8fe8e88f2ab4f36af88c44a096e165c5217accf6e5d3/google_auth-2.55.1.tar.gz", hash = "sha256:fb2d9b730f2c9b8d326ec8d7222f21aef2ead15bf0513793d6442485d87af0a1", size = 349527, upload-time = "2026-06-25T23:39:27.182Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/google-auth/google_auth-2.55.1.tar.gz", hash = "sha256:fb2d9b730f2c9b8d326ec8d7222f21aef2ead15bf0513793d6442485d87af0a1" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/1d/f6d3ca1ad0725f2e08a1c6915640748a52de2e66596160a4d53b010cccf0/google_auth-2.55.1-py3-none-any.whl", hash = "sha256:eada68dfd52b3b81191827601e2a0c3fa12540c818534b630ddc5355769c3995", size = 252349, upload-time = "2026-06-25T23:38:52.946Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/google-auth/google_auth-2.55.1-py3-none-any.whl", hash = "sha256:eada68dfd52b3b81191827601e2a0c3fa12540c818534b630ddc5355769c3995" }, ] [[package]] name = "googleapis-common-protos" version = "1.75.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "protobuf" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b5/c8/f439cffde755cffa462bfbb156278fa6f9d09119719af9814b858fd4f81f/googleapis_common_protos-1.75.0.tar.gz", hash = "sha256:53a062ff3c32552fbd62c11fe23768b78e4ddf0494d5e5fd97d3f4689c75fbbd", size = 151035, upload-time = "2026-05-07T08:04:49.423Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/googleapis-common-protos/googleapis_common_protos-1.75.0.tar.gz", hash = "sha256:53a062ff3c32552fbd62c11fe23768b78e4ddf0494d5e5fd97d3f4689c75fbbd" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/c8/e2645aa8ed02fd4c7a2f59d68783b65b1f3cbdfe39a6308e156509d1fee8/googleapis_common_protos-1.75.0-py3-none-any.whl", hash = "sha256:961ed60399c457ceb0ee8f285a84c870aabc9c6a832b9d37bb281b5bebde43ed", size = 300631, upload-time = "2026-05-07T08:03:30.345Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/googleapis-common-protos/googleapis_common_protos-1.75.0-py3-none-any.whl", hash = "sha256:961ed60399c457ceb0ee8f285a84c870aabc9c6a832b9d37bb281b5bebde43ed" }, ] [[package]] name = "grpcio" version = "1.81.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b0/b5/1ff353970a87eda4c98251e34d2dfd214abd4982dc89119c9252a2a482d2/grpcio-1.81.1.tar.gz", hash = "sha256:6fa10a767143a5e82e8eaab53918af0cd8909a57a27f8cb2288b80a613ac671b", size = 13026582, upload-time = "2026-06-11T12:46:51.673Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/d5/f2b159d8eec08be2a855ef698f5b6f7f9fdda022e4dd9e4f5d968affd678/grpcio-1.81.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:6f9a0c9c1cc15c112d1c053064fd032b64917062292c3d70aea280e02ae10b77", size = 6086868, upload-time = "2026-06-11T12:44:19.364Z" }, - { url = "https://files.pythonhosted.org/packages/80/41/9c95232b94b219ed8b14029d9cd000e0381cafba869c451dda60af84f4ba/grpcio-1.81.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:69ef28e54fc85397f91b8c19592b8ef3d81952080366914823bd8572a2958120", size = 12062291, upload-time = "2026-06-11T12:44:27.142Z" }, - { url = "https://files.pythonhosted.org/packages/83/8b/bd9284bdd665ddf877a3e8bc2930d1bcf6ebdbae7b0da5c783dc26bd6e33/grpcio-1.81.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:15641444eca4a29358107b3dceb74c1c6305c55c822fd199b458aaea4068a7fb", size = 6635242, upload-time = "2026-06-11T12:44:30.741Z" }, - { url = "https://files.pythonhosted.org/packages/60/24/78fa025517a925f1a17da71c4ef9d5f1c6f9fa65af22dfb523c5c6317a21/grpcio-1.81.1-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:d4b2dddfc219f54f956ccd53cf76a1d338ffe68fc7f2849ec9c7feb9927ff692", size = 7332974, upload-time = "2026-06-11T12:44:33.72Z" }, - { url = "https://files.pythonhosted.org/packages/f7/11/402295b388dd35861007f8a26a37c2e2f284212d57bdf407c31f36043746/grpcio-1.81.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ca1cc11d82677b9662082e5478b7528e2b7db7beaa6bdff42bd62789d81be399", size = 6836597, upload-time = "2026-06-11T12:44:36.108Z" }, - { url = "https://files.pythonhosted.org/packages/4d/71/37b10fd4fd579ffade6e695c14e9df5e8cba9e2365b81c131da438b67c34/grpcio-1.81.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:aa2ba7d2ad6df4d80127cea65e5b8d5e2c3adbf153ff4804452836328aca7c54", size = 7440660, upload-time = "2026-06-11T12:44:38.664Z" }, - { url = "https://files.pythonhosted.org/packages/4a/d5/40203f828abc83d458b634666df6df13778032f178c03845ad5a93682388/grpcio-1.81.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:592b5fee597faa91cce2dd294dd7d9a1c83d76c4dbf877e33ec1adb866b2fbed", size = 8443171, upload-time = "2026-06-11T12:44:41.678Z" }, - { url = "https://files.pythonhosted.org/packages/eb/2c/0ed82ea35b5ec595e10444940c1db8c0e0ef57aa46bc8797d5ff838a219e/grpcio-1.81.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:62481553b1793a27e9b9c3cf9e5bd483ef045ca72462592074b46d42b0c4d9b9", size = 7868905, upload-time = "2026-06-11T12:44:44.854Z" }, - { url = "https://files.pythonhosted.org/packages/9e/1f/dcbdc1a68a07cc2b631c3098953794f17d75f93426a019240b90ce5423d6/grpcio-1.81.1-cp310-cp310-win32.whl", hash = "sha256:bb693b1e3d9a2f3fd228e2110daf4b5aeedb36761ca1e4282f74725f6d89f611", size = 4202215, upload-time = "2026-06-11T12:44:47.165Z" }, - { url = "https://files.pythonhosted.org/packages/75/a1/d7ab9f1f42efcb7d9e6111d38be6b367737a72ea2c534e1f55c81e1b6436/grpcio-1.81.1-cp310-cp310-win_amd64.whl", hash = "sha256:88268ca418cacea64cecb0d1d600d3c6b3a8038fcba02e1e205178c5b1f47661", size = 4936582, upload-time = "2026-06-11T12:44:49.479Z" }, - { url = "https://files.pythonhosted.org/packages/52/ea/1c2fa386b718ff493225e61cfc052ef400b4d6ffc54cbe261026432624b5/grpcio-1.81.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:d71d30f2d92f67d944631c523713934fee37292469e182ebcd2c1dd8a64ce53f", size = 6093112, upload-time = "2026-06-11T12:44:52.131Z" }, - { url = "https://files.pythonhosted.org/packages/2b/18/acf45fa8bd1bc5d7b0c2fd3dc4c209379fbd5bb396b440b68a83342226b7/grpcio-1.81.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:b137f4bf3ada9dc44d411478decc6ff09a79ed30b306cd2abaa98408c3588137", size = 12074277, upload-time = "2026-06-11T12:44:55.354Z" }, - { url = "https://files.pythonhosted.org/packages/48/d7/ee86a60699b7db039f772a2c4a7e4facc7138984ff42c0130933a0063884/grpcio-1.81.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a3acb384427816dd5d470f47e62137b87f74da694faa8a50147012cf40df276a", size = 6640348, upload-time = "2026-06-11T12:44:59.223Z" }, - { url = "https://files.pythonhosted.org/packages/26/ee/d2de5e47378ffc207d476c230fea3be4d2601edbce9995f4fe45535d4896/grpcio-1.81.1-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:f9a0ebbe45c29b5e5866593c12b78bd9035f0f0f0d4bc8361680cd580d99db49", size = 7331842, upload-time = "2026-06-11T12:45:02.001Z" }, - { url = "https://files.pythonhosted.org/packages/23/d6/abeda5c2b896a0b341584fe5ac411bbf72e197a9a374c355fb90965e08d2/grpcio-1.81.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a37165cc80b1a368384b383e63a4c38116a10467ae44c904d2d7468c4470ec2", size = 6842229, upload-time = "2026-06-11T12:45:04.76Z" }, - { url = "https://files.pythonhosted.org/packages/10/1c/1f0da7d590b4aeee006826ba568d0e419ca14b23e18f901a3da3e9fba613/grpcio-1.81.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6282caffb41ec326d4cb67ca9cf53b739d1b2f975a2acb498c7418e9f7d9a416", size = 7446096, upload-time = "2026-06-11T12:45:07.499Z" }, - { url = "https://files.pythonhosted.org/packages/6a/81/5c505d508f7c887aa7982d21443a4126597c80d34b0bcf40f9cec576d7f3/grpcio-1.81.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a35009284d0d3d5c2c9601c164a911b8b4331608d98a9a66d47d97bb2f522b70", size = 8445238, upload-time = "2026-06-11T12:45:10.243Z" }, - { url = "https://files.pythonhosted.org/packages/f7/b2/524847365122ee509ca17bcc4e092198b700e94af7bfd5bb5e6dd9f3ee66/grpcio-1.81.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1b22c80559854b789a01fd89e8929b3798a156c0829b5282a8939f33ad4115ad", size = 7873989, upload-time = "2026-06-11T12:45:13.102Z" }, - { url = "https://files.pythonhosted.org/packages/18/fa/07c037c50b006909d1d13a5848774f8aa7b242f70dc03a035c64eea0e6db/grpcio-1.81.1-cp311-cp311-win32.whl", hash = "sha256:428bec0161b48d8cf583c068591bc0016d0d9cfff52462b72b3884861ea768c5", size = 4202223, upload-time = "2026-06-11T12:45:16.166Z" }, - { url = "https://files.pythonhosted.org/packages/41/ed/6bff15376920942fac6b95b9802752b837437172c9e8fc2d3170546b89cc/grpcio-1.81.1-cp311-cp311-win_amd64.whl", hash = "sha256:30e825f6848d9f18bba350ed6c75c1b02a0b5184474a31db9a32b1fa66fd8c79", size = 4941303, upload-time = "2026-06-11T12:45:18.724Z" }, - { url = "https://files.pythonhosted.org/packages/85/07/9a979c81738863a738dc23d65177056e71fbb2db817740ed870b33434e7a/grpcio-1.81.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:8b39472beafc0bdcafc4c8c73ad082ebfdb449d566897a61e7acb4fa88089115", size = 6053264, upload-time = "2026-06-11T12:45:21.017Z" }, - { url = "https://files.pythonhosted.org/packages/75/95/539706ca0d3bd40dbad583dc56fd883da941f37556b629132da5762781b9/grpcio-1.81.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:12b7524c88d4026d3dcb7b0ebe16b6714f3b4af402ddd0f0639ab064a00c87c3", size = 12052560, upload-time = "2026-06-11T12:45:23.652Z" }, - { url = "https://files.pythonhosted.org/packages/e0/44/f257b7e0bd69c93b06c6cb8ac8d1b901ccb42bedabd83c1a4c77a71f8810/grpcio-1.81.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1e123f9b37edb8375fd74130d1f69c944bbf0a7b06761ae7211154b8759e94d2", size = 6595983, upload-time = "2026-06-11T12:45:26.963Z" }, - { url = "https://files.pythonhosted.org/packages/b9/f3/19782aa04c960968bef8c5539329d8e3bbc3364e2e46d19eb5e5cc5e43b7/grpcio-1.81.1-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:2c2e2ae6867c2966b8daccc836d54a13218e0007e9a490aeb81dd05be64d22d7", size = 7303455, upload-time = "2026-06-11T12:45:29.707Z" }, - { url = "https://files.pythonhosted.org/packages/eb/8c/dea020b6d91508cd84463917a63149ec196ee7db505d032ae43fcb3303b9/grpcio-1.81.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:766bc7c9a9c340342f4c864ccbda8e78111e4751f13b895812b9c148fb79e9d0", size = 6809167, upload-time = "2026-06-11T12:45:32.52Z" }, - { url = "https://files.pythonhosted.org/packages/1c/c7/3030dd940408083bd32cd95d634777a71605ade4887154d93e8a89244946/grpcio-1.81.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b259a04a737cb3496be0901328eb8b7552ed8df4865d8c8f1cf1bffcfc0776a3", size = 7412536, upload-time = "2026-06-11T12:45:35.403Z" }, - { url = "https://files.pythonhosted.org/packages/e0/dd/1172a9e42b168edcafefad6115346ef619a3fc02158bb170e66ced24bcdd/grpcio-1.81.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:85b10a45b8993d195c4f3ff57025b8d1e11834909ee475c403bfa60cb4caefaf", size = 8408276, upload-time = "2026-06-11T12:45:37.78Z" }, - { url = "https://files.pythonhosted.org/packages/25/7a/71437c7f3596e5246155c515852795a85a1a8d228190212432b13b97a95d/grpcio-1.81.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8ea1936c26b99999b27479853039a7f34713f56c49375ad52b38535ec93a796c", size = 7849660, upload-time = "2026-06-11T12:45:40.627Z" }, - { url = "https://files.pythonhosted.org/packages/65/40/7debc0da45d2efebafb82da75644be347497fe4ee250514b8cd3b86ae8bf/grpcio-1.81.1-cp312-cp312-win32.whl", hash = "sha256:a185a04039df6cae8648bc8ab6d6fde7bf94f7188ecf7828e76ac52eef1e41d6", size = 4185819, upload-time = "2026-06-11T12:45:43.027Z" }, - { url = "https://files.pythonhosted.org/packages/2e/b9/8fe3ba5ed462067774ebc1f9c7f26aa7ebcc280ddd476be107153de1339e/grpcio-1.81.1-cp312-cp312-win_amd64.whl", hash = "sha256:3ad74f8bb1a18963914c5452d289422830b39459e8776ebbcd207be1fbfb1d94", size = 4930461, upload-time = "2026-06-11T12:45:45.775Z" }, - { url = "https://files.pythonhosted.org/packages/7a/42/dcc2e4b600538ef18327c0839d56b7d3c3812337c5d710df5877dbb39b1e/grpcio-1.81.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:b10e1ff4756ed27d5a29d7fc79cfce7ef1ff56ad20025b89bac7cf79e09abbbe", size = 6054466, upload-time = "2026-06-11T12:45:48.43Z" }, - { url = "https://files.pythonhosted.org/packages/7b/4a/a36e03210183a8a7d4c80c3936acee679f4bd77d5861f369db47b2cc5f05/grpcio-1.81.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:819edbdcb42ab8598b494bcf0222684bbb7a3c772bd1b1f0be7e029a6063c28e", size = 12048795, upload-time = "2026-06-11T12:45:54.011Z" }, - { url = "https://files.pythonhosted.org/packages/b0/d5/d68e30b29098f63beab6fe501100fe82674ff142b32c672532da86a99b3a/grpcio-1.81.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c5bf2dc311127d91230cc79b92188c082634a06cf66c5234db49a43b910183b0", size = 6599094, upload-time = "2026-06-11T12:45:57.799Z" }, - { url = "https://files.pythonhosted.org/packages/3d/b3/e837954d279754f638a11cca5dcf6b24a005efb398984cefaf7735945a54/grpcio-1.81.1-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:e8ca6a1fcdb2943c9cbc1804a1baf3acb6071d72a471591678ded84218006e14", size = 7307182, upload-time = "2026-06-11T12:46:00.568Z" }, - { url = "https://files.pythonhosted.org/packages/0d/1e/b47957057e729adc6cdf519a47f8be2562b7140e280f1418443eb4022192/grpcio-1.81.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e64dd101d380a115cc5a0c7856788adb535f1a4e21fc543775602f8be95180ae", size = 6810962, upload-time = "2026-06-11T12:46:03.312Z" }, - { url = "https://files.pythonhosted.org/packages/40/26/569868e364e05b19ec8f969da53d230bcd89c962cd198f7c29943155c4d3/grpcio-1.81.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:98a07f9bf591e3a8919797bee1c53f026ba4acd587e5a4404c8e57c9ec36b2a5", size = 7415698, upload-time = "2026-06-11T12:46:06.005Z" }, - { url = "https://files.pythonhosted.org/packages/36/0c/5440a0582cb5653fc42a6e262eeb22700943313f8076f9dc927491b20a59/grpcio-1.81.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c261d74b1a945cf895a9d6eccd1685a8e837531beaab782da4d630a8d12deffb", size = 8407779, upload-time = "2026-06-11T12:46:08.84Z" }, - { url = "https://files.pythonhosted.org/packages/ff/aa/66fe9f39871d766987d869a03ee0842a026f499c7b1e62decb9e78a8088e/grpcio-1.81.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:58ad1131c300d3c9b933802b3cc4dc69d380822935ba50b28703156ea826fbf7", size = 7844521, upload-time = "2026-06-11T12:46:12.171Z" }, - { url = "https://files.pythonhosted.org/packages/f0/9e/69bb7194861bcd28fb3193261d4f9c3831b4446993f002cf59068943e7ab/grpcio-1.81.1-cp313-cp313-win32.whl", hash = "sha256:78e29211f26da2fdd0e9c6d2b79f489476140cf7029b6a64808ade7ca4156a42", size = 4182786, upload-time = "2026-06-11T12:46:15.192Z" }, - { url = "https://files.pythonhosted.org/packages/0d/20/3da8bb0d637feccdc3e1e419bb511ce93651ce7d54164f95de22cc0b8b34/grpcio-1.81.1-cp313-cp313-win_amd64.whl", hash = "sha256:edb59506291b647a30884b1d51a599d605f40b20af4a7dc3d33786a47a31de60", size = 4928648, upload-time = "2026-06-11T12:46:17.823Z" }, - { url = "https://files.pythonhosted.org/packages/b6/58/19414622b1bf6981bc9c05a365bd548e71876c89000083b3af489251e9c0/grpcio-1.81.1-cp314-cp314-linux_armv7l.whl", hash = "sha256:506f48f2f9c29b143fca3dad7b0d518c188b6c9648c75a2ae6e2d9f2c13a060b", size = 6055336, upload-time = "2026-06-11T12:46:20.557Z" }, - { url = "https://files.pythonhosted.org/packages/32/f1/2ec88adb92b0eba970dd0e0e7dd086341daa3c75eba4f735f9e44bf684b0/grpcio-1.81.1-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:d865db4a6318e1c1bea83292e0ed231090538fc4ca45425b0f0480eb338bbc6e", size = 12056279, upload-time = "2026-06-11T12:46:24.255Z" }, - { url = "https://files.pythonhosted.org/packages/41/36/e8c5f8c6ec71de73733695ebc809e98b178b534ec6d8eaa31a7ebab4ad4c/grpcio-1.81.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e2aa72e3ce1770317ef534f63d397b55e130725f5149bd36077c3b539019db27", size = 6608225, upload-time = "2026-06-11T12:46:27.601Z" }, - { url = "https://files.pythonhosted.org/packages/30/22/96fc577a845ab093326d9ab1adb874bd4936c8cf98ac8ed2f3db13a0a2fb/grpcio-1.81.1-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0490c30c261eded63f3f354979f9dc4502a9fb944cccb60cd9dc85f5a7349854", size = 7306576, upload-time = "2026-06-11T12:46:30.514Z" }, - { url = "https://files.pythonhosted.org/packages/76/7b/61dab5d5969f28d97fb1009cead1df0a5cd987d3315e1b37f18a4449f8bc/grpcio-1.81.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:410482da976329fe5f4067270401b12cf2bd552ff8020f054ecfaddb5475f9d6", size = 6812165, upload-time = "2026-06-11T12:46:33.699Z" }, - { url = "https://files.pythonhosted.org/packages/82/78/6e501929d4f5f96462fd82fd9f0f06e5f9612207582b862868d68757b27d/grpcio-1.81.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e3657301562ac3cb8018d30d0d3ebfa39932239f7b5703422057ef14b69949f5", size = 7422962, upload-time = "2026-06-11T12:46:36.511Z" }, - { url = "https://files.pythonhosted.org/packages/2a/7e/f2157589e66daa78ebb3165942d05a08bdea93b9d11c2bc1e172aef89685/grpcio-1.81.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:24c8e57504c8f45b237e40b99262d181071e5099a07053695b75d97bb53053a0", size = 8408176, upload-time = "2026-06-11T12:46:39.803Z" }, - { url = "https://files.pythonhosted.org/packages/da/df/c6717fef716e00d235ffb96123baf6dce76d6004f6233fa767c502861460/grpcio-1.81.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b427c19380991a4eaab2f6144b64b99b412043314c6bf4ab544f97bb31ee4190", size = 7846681, upload-time = "2026-06-11T12:46:43.013Z" }, - { url = "https://files.pythonhosted.org/packages/36/84/3502e9f210a6a5c4438c8aca3f88edd2e04f6a27f3d41b26cf0a0024b096/grpcio-1.81.1-cp314-cp314-win32.whl", hash = "sha256:61233fe8951e5c85dff81c2458b6528624760166946b5b47ea150a589168411f", size = 4264615, upload-time = "2026-06-11T12:46:45.741Z" }, - { url = "https://files.pythonhosted.org/packages/ff/b0/4af731ff7492c68a96e4c71bfd0f4590acde92b31c6fe4894e6465c10ff6/grpcio-1.81.1-cp314-cp314-win_amd64.whl", hash = "sha256:3768a5ff1b2125e6f552e561b6b2dca0e64982d8949689b4df145cf8b98d7821", size = 5070275, upload-time = "2026-06-11T12:46:48.486Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1.tar.gz", hash = "sha256:6fa10a767143a5e82e8eaab53918af0cd8909a57a27f8cb2288b80a613ac671b" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:6f9a0c9c1cc15c112d1c053064fd032b64917062292c3d70aea280e02ae10b77" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:69ef28e54fc85397f91b8c19592b8ef3d81952080366914823bd8572a2958120" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:15641444eca4a29358107b3dceb74c1c6305c55c822fd199b458aaea4068a7fb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:d4b2dddfc219f54f956ccd53cf76a1d338ffe68fc7f2849ec9c7feb9927ff692" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ca1cc11d82677b9662082e5478b7528e2b7db7beaa6bdff42bd62789d81be399" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:aa2ba7d2ad6df4d80127cea65e5b8d5e2c3adbf153ff4804452836328aca7c54" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:592b5fee597faa91cce2dd294dd7d9a1c83d76c4dbf877e33ec1adb866b2fbed" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:62481553b1793a27e9b9c3cf9e5bd483ef045ca72462592074b46d42b0c4d9b9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-win32.whl", hash = "sha256:bb693b1e3d9a2f3fd228e2110daf4b5aeedb36761ca1e4282f74725f6d89f611" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp310-cp310-win_amd64.whl", hash = "sha256:88268ca418cacea64cecb0d1d600d3c6b3a8038fcba02e1e205178c5b1f47661" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:d71d30f2d92f67d944631c523713934fee37292469e182ebcd2c1dd8a64ce53f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:b137f4bf3ada9dc44d411478decc6ff09a79ed30b306cd2abaa98408c3588137" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a3acb384427816dd5d470f47e62137b87f74da694faa8a50147012cf40df276a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:f9a0ebbe45c29b5e5866593c12b78bd9035f0f0f0d4bc8361680cd580d99db49" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:0a37165cc80b1a368384b383e63a4c38116a10467ae44c904d2d7468c4470ec2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:6282caffb41ec326d4cb67ca9cf53b739d1b2f975a2acb498c7418e9f7d9a416" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:a35009284d0d3d5c2c9601c164a911b8b4331608d98a9a66d47d97bb2f522b70" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1b22c80559854b789a01fd89e8929b3798a156c0829b5282a8939f33ad4115ad" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-win32.whl", hash = "sha256:428bec0161b48d8cf583c068591bc0016d0d9cfff52462b72b3884861ea768c5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp311-cp311-win_amd64.whl", hash = "sha256:30e825f6848d9f18bba350ed6c75c1b02a0b5184474a31db9a32b1fa66fd8c79" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:8b39472beafc0bdcafc4c8c73ad082ebfdb449d566897a61e7acb4fa88089115" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:12b7524c88d4026d3dcb7b0ebe16b6714f3b4af402ddd0f0639ab064a00c87c3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:1e123f9b37edb8375fd74130d1f69c944bbf0a7b06761ae7211154b8759e94d2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:2c2e2ae6867c2966b8daccc836d54a13218e0007e9a490aeb81dd05be64d22d7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:766bc7c9a9c340342f4c864ccbda8e78111e4751f13b895812b9c148fb79e9d0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b259a04a737cb3496be0901328eb8b7552ed8df4865d8c8f1cf1bffcfc0776a3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:85b10a45b8993d195c4f3ff57025b8d1e11834909ee475c403bfa60cb4caefaf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8ea1936c26b99999b27479853039a7f34713f56c49375ad52b38535ec93a796c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-win32.whl", hash = "sha256:a185a04039df6cae8648bc8ab6d6fde7bf94f7188ecf7828e76ac52eef1e41d6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp312-cp312-win_amd64.whl", hash = "sha256:3ad74f8bb1a18963914c5452d289422830b39459e8776ebbcd207be1fbfb1d94" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-linux_armv7l.whl", hash = "sha256:b10e1ff4756ed27d5a29d7fc79cfce7ef1ff56ad20025b89bac7cf79e09abbbe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:819edbdcb42ab8598b494bcf0222684bbb7a3c772bd1b1f0be7e029a6063c28e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c5bf2dc311127d91230cc79b92188c082634a06cf66c5234db49a43b910183b0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:e8ca6a1fcdb2943c9cbc1804a1baf3acb6071d72a471591678ded84218006e14" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e64dd101d380a115cc5a0c7856788adb535f1a4e21fc543775602f8be95180ae" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:98a07f9bf591e3a8919797bee1c53f026ba4acd587e5a4404c8e57c9ec36b2a5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c261d74b1a945cf895a9d6eccd1685a8e837531beaab782da4d630a8d12deffb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:58ad1131c300d3c9b933802b3cc4dc69d380822935ba50b28703156ea826fbf7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-win32.whl", hash = "sha256:78e29211f26da2fdd0e9c6d2b79f489476140cf7029b6a64808ade7ca4156a42" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp313-cp313-win_amd64.whl", hash = "sha256:edb59506291b647a30884b1d51a599d605f40b20af4a7dc3d33786a47a31de60" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-linux_armv7l.whl", hash = "sha256:506f48f2f9c29b143fca3dad7b0d518c188b6c9648c75a2ae6e2d9f2c13a060b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:d865db4a6318e1c1bea83292e0ed231090538fc4ca45425b0f0480eb338bbc6e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e2aa72e3ce1770317ef534f63d397b55e130725f5149bd36077c3b539019db27" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0490c30c261eded63f3f354979f9dc4502a9fb944cccb60cd9dc85f5a7349854" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:410482da976329fe5f4067270401b12cf2bd552ff8020f054ecfaddb5475f9d6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:e3657301562ac3cb8018d30d0d3ebfa39932239f7b5703422057ef14b69949f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:24c8e57504c8f45b237e40b99262d181071e5099a07053695b75d97bb53053a0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b427c19380991a4eaab2f6144b64b99b412043314c6bf4ab544f97bb31ee4190" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-win32.whl", hash = "sha256:61233fe8951e5c85dff81c2458b6528624760166946b5b47ea150a589168411f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/grpcio/grpcio-1.81.1-cp314-cp314-win_amd64.whl", hash = "sha256:3768a5ff1b2125e6f552e561b6b2dca0e64982d8949689b4df145cf8b98d7821" }, ] [[package]] name = "h11" version = "0.16.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/h11/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1" } wheels = [ - { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/h11/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86" }, ] [[package]] name = "httpcore" version = "1.0.9" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "certifi" }, { name = "h11" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/httpcore/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/httpcore/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55" }, ] [[package]] name = "httpx" version = "0.28.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "anyio" }, { name = "certifi" }, { name = "httpcore" }, { name = "idna" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/httpx/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/httpx/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad" }, ] [[package]] name = "identify" version = "2.6.19" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/52/63/51723b5f116cc04b061cb6f5a561790abf249d25931d515cd375e063e0f4/identify-2.6.19.tar.gz", hash = "sha256:6be5020c38fcb07da56c53733538a3081ea5aa70d36a156f83044bfbf9173842", size = 99567, upload-time = "2026-04-17T18:39:50.265Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/identify/identify-2.6.19.tar.gz", hash = "sha256:6be5020c38fcb07da56c53733538a3081ea5aa70d36a156f83044bfbf9173842" } wheels = [ - { url = "https://files.pythonhosted.org/packages/94/84/d9273cd09688070a6523c4aee4663a8538721b2b755c4962aafae0011e72/identify-2.6.19-py2.py3-none-any.whl", hash = "sha256:20e6a87f786f768c092a721ad107fc9df0eb89347be9396cadf3f4abbd1fb78a", size = 99397, upload-time = "2026-04-17T18:39:49.221Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/identify/identify-2.6.19-py2.py3-none-any.whl", hash = "sha256:20e6a87f786f768c092a721ad107fc9df0eb89347be9396cadf3f4abbd1fb78a" }, ] [[package]] name = "idna" version = "3.18" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848", size = 196711, upload-time = "2026-06-02T14:34:07.794Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/idna/idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2", size = 65455, upload-time = "2026-06-02T14:34:06.319Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/idna/idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2" }, ] [[package]] name = "inflect" version = "7.5.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "more-itertools" }, { name = "typeguard" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/78/c6/943357d44a21fd995723d07ccaddd78023eace03c1846049a2645d4324a3/inflect-7.5.0.tar.gz", hash = "sha256:faf19801c3742ed5a05a8ce388e0d8fe1a07f8d095c82201eb904f5d27ad571f", size = 73751, upload-time = "2024-12-28T17:11:18.897Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/inflect/inflect-7.5.0.tar.gz", hash = "sha256:faf19801c3742ed5a05a8ce388e0d8fe1a07f8d095c82201eb904f5d27ad571f" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/eb/427ed2b20a38a4ee29f24dbe4ae2dafab198674fe9a85e3d6adf9e5f5f41/inflect-7.5.0-py3-none-any.whl", hash = "sha256:2aea70e5e70c35d8350b8097396ec155ffd68def678c7ff97f51aa69c1d92344", size = 35197, upload-time = "2024-12-28T17:11:15.931Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/inflect/inflect-7.5.0-py3-none-any.whl", hash = "sha256:2aea70e5e70c35d8350b8097396ec155ffd68def678c7ff97f51aa69c1d92344" }, ] [[package]] name = "isort" version = "8.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ef/7c/ec4ab396d31b3b395e2e999c8f46dec78c5e29209fac49d1f4dace04041d/isort-8.0.1.tar.gz", hash = "sha256:171ac4ff559cdc060bcfff550bc8404a486fee0caab245679c2abe7cb253c78d", size = 769592, upload-time = "2026-02-28T10:08:20.685Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/isort/isort-8.0.1.tar.gz", hash = "sha256:171ac4ff559cdc060bcfff550bc8404a486fee0caab245679c2abe7cb253c78d" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3e/95/c7c34aa53c16353c56d0b802fba48d5f5caa2cdee7958acbcb795c830416/isort-8.0.1-py3-none-any.whl", hash = "sha256:28b89bc70f751b559aeca209e6120393d43fbe2490de0559662be7a9787e3d75", size = 89733, upload-time = "2026-02-28T10:08:19.466Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/isort/isort-8.0.1-py3-none-any.whl", hash = "sha256:28b89bc70f751b559aeca209e6120393d43fbe2490de0559662be7a9787e3d75" }, ] [[package]] name = "jinja2" version = "3.1.6" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/jinja2/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d" } wheels = [ - { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/jinja2/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67" }, ] [[package]] name = "jsonschema" version = "4.26.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "attrs" }, { name = "jsonschema-specifications" }, { name = "referencing" }, - { name = "rpds-py", version = "0.30.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "rpds-py", version = "2026.6.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "rpds-py", version = "0.30.0", source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" }, marker = "python_full_version < '3.11'" }, + { name = "rpds-py", version = "2026.6.3", source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" }, marker = "python_full_version >= '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b3/fc/e067678238fa451312d4c62bf6e6cf5ec56375422aee02f9cb5f909b3047/jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326", size = 366583, upload-time = "2026-01-07T13:41:07.246Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/jsonschema/jsonschema-4.26.0.tar.gz", hash = "sha256:0c26707e2efad8aa1bfc5b7ce170f3fccc2e4918ff85989ba9ffa9facb2be326" } wheels = [ - { url = "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", size = 90630, upload-time = "2026-01-07T13:41:05.306Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/jsonschema/jsonschema-4.26.0-py3-none-any.whl", hash = "sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce" }, ] [[package]] name = "jsonschema-specifications" version = "2025.9.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "referencing" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/19/74/a633ee74eb36c44aa6d1095e7cc5569bebf04342ee146178e2d36600708b/jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d", size = 32855, upload-time = "2025-09-08T01:34:59.186Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/jsonschema-specifications/jsonschema_specifications-2025.9.1.tar.gz", hash = "sha256:b540987f239e745613c7a9176f3edb72b832a4ac465cf02712288397832b5e8d" } wheels = [ - { url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", size = 18437, upload-time = "2025-09-08T01:34:57.871Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/jsonschema-specifications/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe" }, ] [[package]] name = "markupsafe" version = "3.0.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/4b/3541d44f3937ba468b75da9eebcae497dcf67adb65caa16760b0a6807ebb/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", size = 11631, upload-time = "2025-09-27T18:36:05.558Z" }, - { url = "https://files.pythonhosted.org/packages/98/1b/fbd8eed11021cabd9226c37342fa6ca4e8a98d8188a8d9b66740494960e4/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", size = 12057, upload-time = "2025-09-27T18:36:07.165Z" }, - { url = "https://files.pythonhosted.org/packages/40/01/e560d658dc0bb8ab762670ece35281dec7b6c1b33f5fbc09ebb57a185519/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", size = 22050, upload-time = "2025-09-27T18:36:08.005Z" }, - { url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c32314c9b237839119c5a564a59725b53157c856e90937b7a/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", size = 20681, upload-time = "2025-09-27T18:36:08.881Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2a/b5c12c809f1c3045c4d580b035a743d12fcde53cf685dbc44660826308da/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", size = 20705, upload-time = "2025-09-27T18:36:10.131Z" }, - { url = "https://files.pythonhosted.org/packages/cf/e3/9427a68c82728d0a88c50f890d0fc072a1484de2f3ac1ad0bfc1a7214fd5/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", size = 21524, upload-time = "2025-09-27T18:36:11.324Z" }, - { url = "https://files.pythonhosted.org/packages/bc/36/23578f29e9e582a4d0278e009b38081dbe363c5e7165113fad546918a232/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", size = 20282, upload-time = "2025-09-27T18:36:12.573Z" }, - { url = "https://files.pythonhosted.org/packages/56/21/dca11354e756ebd03e036bd8ad58d6d7168c80ce1fe5e75218e4945cbab7/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", size = 20745, upload-time = "2025-09-27T18:36:13.504Z" }, - { url = "https://files.pythonhosted.org/packages/87/99/faba9369a7ad6e4d10b6a5fbf71fa2a188fe4a593b15f0963b73859a1bbd/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", size = 14571, upload-time = "2025-09-27T18:36:14.779Z" }, - { url = "https://files.pythonhosted.org/packages/d6/25/55dc3ab959917602c96985cb1253efaa4ff42f71194bddeb61eb7278b8be/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", size = 15056, upload-time = "2025-09-27T18:36:16.125Z" }, - { url = "https://files.pythonhosted.org/packages/d0/9e/0a02226640c255d1da0b8d12e24ac2aa6734da68bff14c05dd53b94a0fc3/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", size = 13932, upload-time = "2025-09-27T18:36:17.311Z" }, - { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, - { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, - { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, - { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, - { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, - { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, - { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, - { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, - { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, - { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, - { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, - { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, - { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, - { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, - { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, - { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, - { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, - { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, - { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, - { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, - { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, - { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, - { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, - { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, - { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, - { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, - { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, - { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, - { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, - { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, - { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, - { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, - { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, - { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, - { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, - { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, - { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, - { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, - { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, - { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, - { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, - { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, - { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, - { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, - { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, - { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, - { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, - { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, - { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, - { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, - { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, - { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, - { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, - { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, - { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, - { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, - { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, - { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, - { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, - { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, - { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, - { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, - { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, - { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, - { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/markupsafe/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa" }, ] [[package]] name = "more-itertools" version = "11.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/de/1d/f4da6f02cdffe04d6362210b807146a26044c88d839208aec273bb0d9184/more_itertools-11.1.0.tar.gz", hash = "sha256:48e8f4d9e7e5878571ecf6f2b4e57634f93cd474cc8cfbd2376f2d11b396e30d", size = 145772, upload-time = "2026-05-22T14:14:29.909Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/more-itertools/more_itertools-11.1.0.tar.gz", hash = "sha256:48e8f4d9e7e5878571ecf6f2b4e57634f93cd474cc8cfbd2376f2d11b396e30d" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e8/3d/1087453384dbde46a8c7f9356eead2c58be8a7bf156bca40243377c85715/more_itertools-11.1.0-py3-none-any.whl", hash = "sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192", size = 72226, upload-time = "2026-05-22T14:14:28.824Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/more-itertools/more_itertools-11.1.0-py3-none-any.whl", hash = "sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192" }, ] [[package]] name = "mypy-extensions" version = "1.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/mypy-extensions/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" } wheels = [ - { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/mypy-extensions/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505" }, ] [[package]] name = "nodeenv" version = "1.10.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/24/bf/d1bda4f6168e0b2e9e5958945e01910052158313224ada5ce1fb2e1113b8/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb", size = 55611, upload-time = "2025-12-20T14:08:54.006Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/nodeenv/nodeenv-1.10.0.tar.gz", hash = "sha256:996c191ad80897d076bdfba80a41994c2b47c68e224c542b48feba42ba00f8bb" } wheels = [ - { url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a7fc5717c305f1a861c26e18c05047949fb371034d98bd/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827", size = 23438, upload-time = "2025-12-20T14:08:52.782Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/nodeenv/nodeenv-1.10.0-py2.py3-none-any.whl", hash = "sha256:5bb13e3eed2923615535339b3c620e76779af4cb4c6a90deccc9e36b274d3827" }, ] [[package]] @@ -851,15 +851,15 @@ requires-dist = [ [[package]] name = "opentelemetry-exporter-credential-provider-gcp" version = "0.64b0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "google-auth" }, { name = "grpcio" }, { name = "requests" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ad/8e/f236166b207fdc18cd3bba1e372e653b277dacafee80796a351b73e81ba2/opentelemetry_exporter_credential_provider_gcp-0.64b0.tar.gz", hash = "sha256:ee1854178338e5b5013614d191dc0ee8de025d36ca624fa197b416f0dc0f7952", size = 7130, upload-time = "2026-06-24T15:19:10.925Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/opentelemetry-exporter-credential-provider-gcp/opentelemetry_exporter_credential_provider_gcp-0.64b0.tar.gz", hash = "sha256:ee1854178338e5b5013614d191dc0ee8de025d36ca624fa197b416f0dc0f7952" } wheels = [ - { url = "https://files.pythonhosted.org/packages/42/3a/f6a1863c3d2fa9c52756de3180cc3d1d1b77e078b7df6fb07d3d6782aad2/opentelemetry_exporter_credential_provider_gcp-0.64b0-py3-none-any.whl", hash = "sha256:6471dfda9af8b4d9f2706967bedf0982fe6259b4299049ddc5f2b0c2b1e78c13", size = 7770, upload-time = "2026-06-24T15:18:14.387Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/opentelemetry-exporter-credential-provider-gcp/opentelemetry_exporter_credential_provider_gcp-0.64b0-py3-none-any.whl", hash = "sha256:6471dfda9af8b4d9f2706967bedf0982fe6259b4299049ddc5f2b0c2b1e78c13" }, ] [[package]] @@ -1238,43 +1238,43 @@ requires-dist = [ [[package]] name = "packaging" version = "26.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d7/f1/e7a6dd94a8d4a5626c03e4e99c87f241ba9e350cd9e6d75123f992427270/packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661", size = 228134, upload-time = "2026-04-24T20:15:23.917Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/packaging/packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661" } wheels = [ - { url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e", size = 100195, upload-time = "2026-04-24T20:15:22.081Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/packaging/packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e" }, ] [[package]] name = "pathspec" version = "1.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pathspec/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pathspec/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189" }, ] [[package]] name = "platformdirs" version = "4.10.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d7/47/e4501f49c178ae1d9f4a75073fda4204f52647993f075a9db4d14930e0c5/platformdirs-4.10.0.tar.gz", hash = "sha256:31e761a6a0ca04faf7353ea759bdba55652be214725111e5aac52dfa29d4bef7", size = 31224, upload-time = "2026-05-28T03:32:53.587Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/platformdirs/platformdirs-4.10.0.tar.gz", hash = "sha256:31e761a6a0ca04faf7353ea759bdba55652be214725111e5aac52dfa29d4bef7" } wheels = [ - { url = "https://files.pythonhosted.org/packages/81/e6/cd9575ac904136b3cbf7aa7ee819ef86eedb7274e46f230e94ea4342e729/platformdirs-4.10.0-py3-none-any.whl", hash = "sha256:fb516cdb12eb0d857d0cd85a7c57cea4d060bee4578d6cf5a14dfdf8cbf8784a", size = 22743, upload-time = "2026-05-28T03:32:52.175Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/platformdirs/platformdirs-4.10.0-py3-none-any.whl", hash = "sha256:fb516cdb12eb0d857d0cd85a7c57cea4d060bee4578d6cf5a14dfdf8cbf8784a" }, ] [[package]] name = "pluggy" version = "1.6.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pluggy/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pluggy/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746" }, ] [[package]] name = "pre-commit" version = "4.6.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "cfgv" }, { name = "identify" }, @@ -1282,714 +1282,714 @@ dependencies = [ { name = "pyyaml" }, { name = "virtualenv" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8e/22/2de9408ac81acbb8a7d05d4cc064a152ccf33b3d480ebe0cd292153db239/pre_commit-4.6.0.tar.gz", hash = "sha256:718d2208cef53fdc38206e40524a6d4d9576d103eb16f0fec11c875e7716e9d9", size = 198525, upload-time = "2026-04-21T20:31:41.613Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pre-commit/pre_commit-4.6.0.tar.gz", hash = "sha256:718d2208cef53fdc38206e40524a6d4d9576d103eb16f0fec11c875e7716e9d9" } wheels = [ - { url = "https://files.pythonhosted.org/packages/80/6e/4b28b62ecb6aae56769c34a8ff1d661473ec1e9519e2d5f8b2c150086b26/pre_commit-4.6.0-py2.py3-none-any.whl", hash = "sha256:e2cf246f7299edcabcf15f9b0571fdce06058527f0a06535068a86d38089f29b", size = 226472, upload-time = "2026-04-21T20:31:40.092Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pre-commit/pre_commit-4.6.0-py2.py3-none-any.whl", hash = "sha256:e2cf246f7299edcabcf15f9b0571fdce06058527f0a06535068a86d38089f29b" }, ] [[package]] name = "prometheus-client" version = "0.25.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1b/fb/d9aa83ffe43ce1f19e557c0971d04b90561b0cfd50762aafb01968285553/prometheus_client-0.25.0.tar.gz", hash = "sha256:5e373b75c31afb3c86f1a52fa1ad470c9aace18082d39ec0d2f918d11cc9ba28", size = 86035, upload-time = "2026-04-09T19:53:42.359Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/prometheus-client/prometheus_client-0.25.0.tar.gz", hash = "sha256:5e373b75c31afb3c86f1a52fa1ad470c9aace18082d39ec0d2f918d11cc9ba28" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8d/9b/d4b1e644385499c8346fa9b622a3f030dce14cd6ef8a1871c221a17a67e7/prometheus_client-0.25.0-py3-none-any.whl", hash = "sha256:d5aec89e349a6ec230805d0df882f3807f74fd6c1a2fa86864e3c2279059fed1", size = 64154, upload-time = "2026-04-09T19:53:41.324Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/prometheus-client/prometheus_client-0.25.0-py3-none-any.whl", hash = "sha256:d5aec89e349a6ec230805d0df882f3807f74fd6c1a2fa86864e3c2279059fed1" }, ] [[package]] name = "protobuf" version = "7.35.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/01/9ef0afd7999eb9badb3a768b4aedd78c86d4c65cfaf1958ab276199e76b4/protobuf-7.35.1.tar.gz", hash = "sha256:ce115a26fe0c39a2c29973d914d327e516a6455464489fe3cd1e51a1b354f81a", size = 458717, upload-time = "2026-06-11T21:55:40.257Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1.tar.gz", hash = "sha256:ce115a26fe0c39a2c29973d914d327e516a6455464489fe3cd1e51a1b354f81a" } wheels = [ - { url = "https://files.pythonhosted.org/packages/10/03/8aeeb7458d22546bf64b5250ca1daeb5ff757d900e8e4a7476c6f0db843e/protobuf-7.35.1-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:24f857477359a85c0c235261b8ba905fd51b2562f4a64ca1df5473f29850cbf6", size = 433226, upload-time = "2026-06-11T21:55:31.719Z" }, - { url = "https://files.pythonhosted.org/packages/37/4b/dfb89eb0e652a1ff073c39a59fb5e3a83cfe9b57a2c83fa6d78270101767/protobuf-7.35.1-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:11d6b0ec246892d85215b0a13ca6e0233cf5284b68f0ac02646427f4ff88a799", size = 328847, upload-time = "2026-06-11T21:55:34.035Z" }, - { url = "https://files.pythonhosted.org/packages/0f/58/dc12f2cd484951524af6e3382c785869b9b3fb5e52ee95ae23add53ee8f9/protobuf-7.35.1-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:b73f9489a4b8b1c9cb1f8ed951c736392592edb24b9d6819f36d2e10b171d5b4", size = 344030, upload-time = "2026-06-11T21:55:34.941Z" }, - { url = "https://files.pythonhosted.org/packages/e4/be/5b3cfe508bfab6761414ff944e3366eb13be4fd71efcd69450f89ba39f43/protobuf-7.35.1-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:74758715c53d7158fb76caf4f0cfdacc5329a4b1bb994f865d6cf302d413a1c4", size = 327130, upload-time = "2026-06-11T21:55:35.921Z" }, - { url = "https://files.pythonhosted.org/packages/d8/bc/6d6c7ba8709c85f8f2c390b2b118d6fb08a783676a572271851bf45a7d22/protobuf-7.35.1-cp310-abi3-win32.whl", hash = "sha256:353652e4efd0bca5b5fc2656abf8307ef351f0cf938c9eba09f0e09c20a25c30", size = 428945, upload-time = "2026-06-11T21:55:37.034Z" }, - { url = "https://files.pythonhosted.org/packages/0a/19/8d0cb6f20a1ef7b18f1c8986ad5783f22f84cce39c6ce9a6e645ea55192e/protobuf-7.35.1-cp310-abi3-win_amd64.whl", hash = "sha256:230a75ddfc2de4806e56696ce9640c1cdfdb6543b7cfce98d42a4c0a0e7bdb87", size = 439996, upload-time = "2026-06-11T21:55:38.123Z" }, - { url = "https://files.pythonhosted.org/packages/19/c7/5f7c636ec43e0c545e28d1f1db71990108306f7bdcb89f069ba97e428e7f/protobuf-7.35.1-py3-none-any.whl", hash = "sha256:4bc97768d8fe4ad6743c8a19403e314511ed9f6d13205b687e52421c023ac1b9", size = 171659, upload-time = "2026-06-11T21:55:39.155Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:24f857477359a85c0c235261b8ba905fd51b2562f4a64ca1df5473f29850cbf6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:11d6b0ec246892d85215b0a13ca6e0233cf5284b68f0ac02646427f4ff88a799" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:b73f9489a4b8b1c9cb1f8ed951c736392592edb24b9d6819f36d2e10b171d5b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:74758715c53d7158fb76caf4f0cfdacc5329a4b1bb994f865d6cf302d413a1c4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-cp310-abi3-win32.whl", hash = "sha256:353652e4efd0bca5b5fc2656abf8307ef351f0cf938c9eba09f0e09c20a25c30" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-cp310-abi3-win_amd64.whl", hash = "sha256:230a75ddfc2de4806e56696ce9640c1cdfdb6543b7cfce98d42a4c0a0e7bdb87" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/protobuf/protobuf-7.35.1-py3-none-any.whl", hash = "sha256:4bc97768d8fe4ad6743c8a19403e314511ed9f6d13205b687e52421c023ac1b9" }, ] [[package]] name = "pyasn1" version = "0.6.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5c/5f/6583902b6f79b399c9c40674ac384fd9cd77805f9e6205075f828ef11fb2/pyasn1-0.6.3.tar.gz", hash = "sha256:697a8ecd6d98891189184ca1fa05d1bb00e2f84b5977c481452050549c8a72cf", size = 148685, upload-time = "2026-03-17T01:06:53.382Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyasn1/pyasn1-0.6.3.tar.gz", hash = "sha256:697a8ecd6d98891189184ca1fa05d1bb00e2f84b5977c481452050549c8a72cf" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5d/a0/7d793dce3fa811fe047d6ae2431c672364b462850c6235ae306c0efd025f/pyasn1-0.6.3-py3-none-any.whl", hash = "sha256:a80184d120f0864a52a073acc6fc642847d0be408e7c7252f31390c0f4eadcde", size = 83997, upload-time = "2026-03-17T01:06:52.036Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyasn1/pyasn1-0.6.3-py3-none-any.whl", hash = "sha256:a80184d120f0864a52a073acc6fc642847d0be408e7c7252f31390c0f4eadcde" }, ] [[package]] name = "pyasn1-modules" version = "0.4.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "pyasn1" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6", size = 307892, upload-time = "2025-03-28T02:41:22.17Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyasn1-modules/pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6" } wheels = [ - { url = "https://files.pythonhosted.org/packages/47/8d/d529b5d697919ba8c11ad626e835d4039be708a35b0d22de83a269a6682c/pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a", size = 181259, upload-time = "2025-03-28T02:41:19.028Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyasn1-modules/pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a" }, ] [[package]] name = "pycparser" version = "3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pycparser/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pycparser/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992" }, ] [[package]] name = "pydantic" version = "2.13.4" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "annotated-types" }, { name = "pydantic-core" }, { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/18/a5/b60d21ac674192f8ab0ba4e9fd860690f9b4a6e51ca5df118733b487d8d6/pydantic-2.13.4.tar.gz", hash = "sha256:c40756b57adaa8b1efeeced5c196f3f3b7c435f90e84ea7f443901bec8099ef6", size = 844775, upload-time = "2026-05-06T13:43:05.343Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic/pydantic-2.13.4.tar.gz", hash = "sha256:c40756b57adaa8b1efeeced5c196f3f3b7c435f90e84ea7f443901bec8099ef6" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fd/7b/122376b1fd3c62c1ed9dc80c931ace4844b3c55407b6fb2d199377c9736f/pydantic-2.13.4-py3-none-any.whl", hash = "sha256:45a282cde31d808236fd7ea9d919b128653c8b38b393d1c4ab335c62924d9aba", size = 472262, upload-time = "2026-05-06T13:43:02.641Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic/pydantic-2.13.4-py3-none-any.whl", hash = "sha256:45a282cde31d808236fd7ea9d919b128653c8b38b393d1c4ab335c62924d9aba" }, ] [[package]] name = "pydantic-core" version = "2.46.4" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9d/56/921726b776ace8d8f5db44c4ef961006580d91dc52b803c489fafd1aa249/pydantic_core-2.46.4.tar.gz", hash = "sha256:62f875393d7f270851f20523dd2e29f082bcc82292d66db2b64ea71f64b6e1c1", size = 471464, upload-time = "2026-05-06T13:37:06.98Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/08/f1ba952f1c8ae5581c70fa9c6da89f247b83e3dd8c09c035d5d7931fc23d/pydantic_core-2.46.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a396dcc17e5a0b164dbe026896245a4fa9ff402edca1dff0be3d53a517f74de4", size = 2113146, upload-time = "2026-05-06T13:37:36.537Z" }, - { url = "https://files.pythonhosted.org/packages/56/c6/65f646c7ff09bd257f660434adb45c4dfcbbcebcc030562fecf6f5bf887d/pydantic_core-2.46.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:da4b951fe36dc7c3a1ccb4e3cd1747c3542b8c9ceede8fc86cae054e764485f5", size = 1949769, upload-time = "2026-05-06T13:37:46.365Z" }, - { url = "https://files.pythonhosted.org/packages/64/ba/bfb1d928fd5b49e1258935ff104ae356e9fd89384a55bf9f847e9193ad40/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb63e0198ca18aad131c089b9204c23079c3afa95487e561f4c522d519e55aba", size = 1974958, upload-time = "2026-05-06T13:37:28.611Z" }, - { url = "https://files.pythonhosted.org/packages/4e/74/76223bfb117b64af743c9b6670d1364516f5c0604f96b48f3272f6af6cc6/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f47286a97f0bc9b8859519809077b91b2cefe4ae47fcbf5e466a009c1c5d742b", size = 2042118, upload-time = "2026-05-06T13:36:55.216Z" }, - { url = "https://files.pythonhosted.org/packages/cb/7b/848732968bc8f48f3187542f08358b9d842db564147b256669426ebb1652/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:905a0ed8ea6f2d61c1738835f99b699348d7857379083e5fc497fa0c967a407c", size = 2222876, upload-time = "2026-05-06T13:38:25.455Z" }, - { url = "https://files.pythonhosted.org/packages/b5/2f/e90b63ee2e14bd8d3db8f705a6d75d64e6ee1b7c2c8833747ce706e1e0ce/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea793e075b70290d89d8142074262885d3f7da19634845135751bd6344f73b50", size = 2286703, upload-time = "2026-05-06T13:37:53.304Z" }, - { url = "https://files.pythonhosted.org/packages/ba/1e/acc4d70f88a0a277e4a1fa77ebb985ceabaf900430f875bf9338e11c9420/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:395aebd9183f9d112f569aeb5b2214d1a10a33bec8456447f7fbdfa51d38d4cd", size = 2092042, upload-time = "2026-05-06T13:38:46.981Z" }, - { url = "https://files.pythonhosted.org/packages/a9/da/0a422b57bf8504102bf3c4ccea9c41bab5a5cee6a54650acf8faf67f5a24/pydantic_core-2.46.4-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:b078afbc25f3a1436c7a1d2cd3e322497ee99615ba97c563566fdf46aff1ee01", size = 2117231, upload-time = "2026-05-06T13:39:23.146Z" }, - { url = "https://files.pythonhosted.org/packages/bd/2a/2ac13c3af305843e23c5078c53d135656b3f05a2fd78cb7bbbb12e97b473/pydantic_core-2.46.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f747929cf940cddb5b3668a390056ddd5ba2e5010615ea2dcf4f9c4f3ab8791d", size = 2168388, upload-time = "2026-05-06T13:40:08.06Z" }, - { url = "https://files.pythonhosted.org/packages/72/04/2beacf7e1607e93eefe4aed1b4709f079b905fb77530179d4f7c71745f22/pydantic_core-2.46.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:daa27d92c36f24388fe3ad306b174781c747627f134452e4f128ea00ce1fe8c4", size = 2184769, upload-time = "2026-05-06T13:38:13.901Z" }, - { url = "https://files.pythonhosted.org/packages/9e/29/d2b9fd9f539133548eaf622c06a4ce176cb46ac59f32d0359c4abc0de047/pydantic_core-2.46.4-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:19e51f073cd3df251856a8a4189fbdf1de4012c3ebacfb1884f94f1eb406079f", size = 2319312, upload-time = "2026-05-06T13:39:08.24Z" }, - { url = "https://files.pythonhosted.org/packages/7c/af/0f7a5b85fec6075bea96e3ef9187de38fccced0de92c1e7feda8d5cc7bb9/pydantic_core-2.46.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c1747f85cee84c26985853c6f3d9bd3e75da5212912443fa111c113b9c246f39", size = 2361817, upload-time = "2026-05-06T13:38:43.2Z" }, - { url = "https://files.pythonhosted.org/packages/25/a4/73363fec545fd3ec025490bdda2743c56d0dd5b6266b1a53bbe9e4265375/pydantic_core-2.46.4-cp310-cp310-win32.whl", hash = "sha256:2f84c03c8607173d16b5a854ec68a2f9079ae03237a54fb506d13af47e1d018d", size = 1987085, upload-time = "2026-05-06T13:39:25.497Z" }, - { url = "https://files.pythonhosted.org/packages/01/aa/62f082da2c91fac1c234bc9ee0066257ce83f0604abd72e4c9d5991f2d84/pydantic_core-2.46.4-cp310-cp310-win_amd64.whl", hash = "sha256:8358a950c8909158e3df31538a7e4edc2d7265a7c54b47f0864d9e5bae9dcebf", size = 2074311, upload-time = "2026-05-06T13:39:59.922Z" }, - { url = "https://files.pythonhosted.org/packages/5c/fa/6d7708d2cfc1a832acb6aeb0cd16e801902df8a0f583bb3b4b527fde022e/pydantic_core-2.46.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:0e96592440881c74a213e5ad528e2b24d3d4f940de2766bed9010ab1d9e51594", size = 2111872, upload-time = "2026-05-06T13:40:27.596Z" }, - { url = "https://files.pythonhosted.org/packages/ae/6f/aa064a3e74b5745afbdf250594f38e7ead05e2d651bcb35994b9417a0d4d/pydantic_core-2.46.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e0d65b8c354be7fb5f720c3caa8bc940bc2d20ce749c8e06135f07f8ed95dd7c", size = 1948255, upload-time = "2026-05-06T13:39:12.574Z" }, - { url = "https://files.pythonhosted.org/packages/43/3a/41114a9f7569b84b4d84e7a018c57c56347dac30c0d4a872946ec4e36c46/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bfb192b3f4b9e8a89b6277b6ce787564f62cfd272055f6e685726b111dc7826", size = 1972827, upload-time = "2026-05-06T13:38:19.841Z" }, - { url = "https://files.pythonhosted.org/packages/ef/25/1ab42e8048fe551934d9884e8d64daa7e990ad386f310a15981aeb6a5b08/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9037063db01f09b09e237c282b6792bd4da634b5402c4e7f0c61effed7701a04", size = 2041051, upload-time = "2026-05-06T13:38:10.447Z" }, - { url = "https://files.pythonhosted.org/packages/94/c2/1a934597ddf08da410385b3b7aae91956a5a76c635effef456074fad7e88/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc010ab034c8c7452522748bf937df58020d256ccae0874463d1f4d01758af8e", size = 2221314, upload-time = "2026-05-06T13:40:13.089Z" }, - { url = "https://files.pythonhosted.org/packages/02/6d/9e8ad178c9c4df27ad3c8f25d1fe2a7ab0d2ba0559fad4aee5d3d1f16771/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c5dac79fa1614d1e06ca695109c6105923bd9c7d1d6c918d4e637b7e6b32fd3", size = 2285146, upload-time = "2026-05-06T13:38:59.224Z" }, - { url = "https://files.pythonhosted.org/packages/80/50/540cd3aeefc041beb111125c4bff779831a2111fc6b15a9138cda277d32c/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9fa868638bf362d3d138ea55829cefb3d5f4b0d7f142234382a15e2485dbec4", size = 2089685, upload-time = "2026-05-06T13:38:17.762Z" }, - { url = "https://files.pythonhosted.org/packages/6b/a4/b440ad35f05f6a38f89fa0f149accb3f0e02be94ca5e15f3c449a61b4bc9/pydantic_core-2.46.4-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:17299feefe090f2caa5b8e37222bb5f663e4935a8bfa6931d4102e5df1a9f398", size = 2115420, upload-time = "2026-05-06T13:37:58.195Z" }, - { url = "https://files.pythonhosted.org/packages/99/61/de4f55db8dfd57bfdfa9a12ec90fe1b57c4f41062f7ca86f08586b3e0ac0/pydantic_core-2.46.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4c63ebc82684aa89d9a3bcbd13d515b3be44250dc68dd3bd81526c1cb31286c3", size = 2165122, upload-time = "2026-05-06T13:37:01.167Z" }, - { url = "https://files.pythonhosted.org/packages/f7/52/7c529d7bdb2d1068bd52f51fe32572c8301f9a4febf1948f10639f1436f5/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:aaa2a54443eff1950ba5ddc6b6ccda0d9c84a364276a62f969bdf2a390650848", size = 2182573, upload-time = "2026-05-06T13:38:45.04Z" }, - { url = "https://files.pythonhosted.org/packages/37/b3/7c40325848ba78247f2812dcf9c7274e38cd801820ca6dd9fe63bcfb0eb4/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:18e5ceec2ab67e6d5f1a9085e5a24c9c4e2ac4545730bfe668680bca05e555f3", size = 2317139, upload-time = "2026-05-06T13:37:15.539Z" }, - { url = "https://files.pythonhosted.org/packages/d9/37/f913f81a657c865b75da6c0dbed79876073c2a43b5bd9edbe8da785e4d49/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a0f62d0a58f4e7da165457e995725421e0064f2255d8eccebc49f41bbc23b109", size = 2360433, upload-time = "2026-05-06T13:37:30.099Z" }, - { url = "https://files.pythonhosted.org/packages/c4/67/6acaa1be2567f9256b056d8477158cac7240813956ce86e49deae8e173b4/pydantic_core-2.46.4-cp311-cp311-win32.whl", hash = "sha256:041bde0a48fd37cf71cab1c9d56d3e8625a3793fef1f7dd232b3ff37e978ecda", size = 1985513, upload-time = "2026-05-06T13:38:15.669Z" }, - { url = "https://files.pythonhosted.org/packages/aa/e6/c505f83dfeda9a2e5c995cfd872949e4d05e12f7feb3dca72f633daefa94/pydantic_core-2.46.4-cp311-cp311-win_amd64.whl", hash = "sha256:6f2eeda33a839975441c86a4119e1383c50b47faf0cbb5176985565c6bb02c33", size = 2071114, upload-time = "2026-05-06T13:40:35.416Z" }, - { url = "https://files.pythonhosted.org/packages/0f/da/7a263a96d965d9d0df5e8de8a475f33495451117035b09acb110288c381f/pydantic_core-2.46.4-cp311-cp311-win_arm64.whl", hash = "sha256:14f4c5d6db102bd796a627bbb3a17b4cf4574b9ae861d8b7c9a9661c6dd3362d", size = 2044298, upload-time = "2026-05-06T13:38:29.754Z" }, - { url = "https://files.pythonhosted.org/packages/ce/8c/af022f0af448d7747c5154288d46b5f2bc5f17366eaa0e23e9aa04d59f3b/pydantic_core-2.46.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:3245406455a5d98187ec35530fd772b1d799b26667980872c8d4614991e2c4a2", size = 2106158, upload-time = "2026-05-06T13:38:57.215Z" }, - { url = "https://files.pythonhosted.org/packages/19/95/6195171e385007300f0f5574592e467c568becce2d937a0b6804f218bc49/pydantic_core-2.46.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:962ccbab7b642487b1d8b7df90ef677e03134cf1fd8880bf698649b22a69371f", size = 1951724, upload-time = "2026-05-06T13:37:02.697Z" }, - { url = "https://files.pythonhosted.org/packages/8e/bc/f47d1ff9cbb1620e1b5b697eef06010035735f07820180e74178226b27b3/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8233f2947cf85404441fd7e0085f53b10c93e0ee78611099b5c7237e36aacbf7", size = 1975742, upload-time = "2026-05-06T13:37:09.448Z" }, - { url = "https://files.pythonhosted.org/packages/5b/11/9b9a5b0306345664a2da6410877af6e8082481b5884b3ddd78d47c6013ce/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a233125ac121aa3ffba9a2b59edfc4a985a76092dc8279586ab4b71390875e7", size = 2052418, upload-time = "2026-05-06T13:37:38.234Z" }, - { url = "https://files.pythonhosted.org/packages/f1/b7/a65fec226f5d78fc39f4a13c4cc0c768c22b113438f60c14adc9d2865038/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b712b53160b79a5850310b912a5ef8e57e56947c8ad690c227f5c9d7e561712", size = 2232274, upload-time = "2026-05-06T13:38:27.753Z" }, - { url = "https://files.pythonhosted.org/packages/68/f0/92039db98b907ef49269a8271f67db9cb78ae2fc68062ef7e4e77adb5f61/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9401557acd873c3a7f3eb9383edef8ac4968f9510e340f4808d427e75667e7b4", size = 2309940, upload-time = "2026-05-06T13:38:05.353Z" }, - { url = "https://files.pythonhosted.org/packages/5f/97/2aab507d3d00ca626e8e57c1eac6a79e4e5fbcc63eb99733ff55d1717f65/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:926c9541b14b12b1681dca8a0b75feb510b06c6341b70a8e500c2fdcff837cce", size = 2094516, upload-time = "2026-05-06T13:39:10.577Z" }, - { url = "https://files.pythonhosted.org/packages/22/37/a8aca44d40d737dde2bc05b3c6c07dff0de07ce6f82e9f3167aeaf4d5dea/pydantic_core-2.46.4-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:56cb4851bcaf3d117eddcef4fe66afd750a50274b0da8e22be256d10e5611987", size = 2136854, upload-time = "2026-05-06T13:40:22.59Z" }, - { url = "https://files.pythonhosted.org/packages/24/99/fcef1b79238c06a8cbec70819ac722ba76e02bc8ada9b0fd66eba40da01b/pydantic_core-2.46.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c68fcd102d71ea85c5b2dfac3f4f8476eff42a9e078fd5faefff6d145063536b", size = 2180306, upload-time = "2026-05-06T13:40:10.666Z" }, - { url = "https://files.pythonhosted.org/packages/ae/6c/fc44000918855b42779d007ae63b0532794739027b2f417321cddbc44f6a/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b2f69dec1725e79a012d920df1707de5caf7ed5e08f3be4435e25803efc47458", size = 2190044, upload-time = "2026-05-06T13:40:43.231Z" }, - { url = "https://files.pythonhosted.org/packages/6b/65/d9cadc9f1920d7a127ad2edba16c1db7916e59719285cd6c94600b0080ba/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8d0820e8192167f80d88d64038e609c31452eeca865b4e1d9950a27a4609b00b", size = 2329133, upload-time = "2026-05-06T13:39:57.365Z" }, - { url = "https://files.pythonhosted.org/packages/d0/cf/c873d91679f3a30bcf5e7ac280ce5573483e72295307685120d0d5ad3416/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fbdb89b3e1c94a30cc5edfce477c6e6a5dc4d8f84665b455c27582f211a1c72c", size = 2374464, upload-time = "2026-05-06T13:38:06.976Z" }, - { url = "https://files.pythonhosted.org/packages/47/bd/6f2fc8188f31bf10590f1e98e7b306336161fac930a8c514cd7bd828c7dc/pydantic_core-2.46.4-cp312-cp312-win32.whl", hash = "sha256:9aa768456404a8bf48a4406685ac2bec8e72b62c69313734fa3b73cf33b3a894", size = 1974823, upload-time = "2026-05-06T13:40:47.985Z" }, - { url = "https://files.pythonhosted.org/packages/40/8c/985c1d41ea1107c2534abd9870e4ed5c8e7669b5c308297835c001e7a1c4/pydantic_core-2.46.4-cp312-cp312-win_amd64.whl", hash = "sha256:e9c26f834c65f5752f3f06cb08cb86a913ceb7274d0db6e267808a708b46bc89", size = 2072919, upload-time = "2026-05-06T13:39:21.153Z" }, - { url = "https://files.pythonhosted.org/packages/c4/ba/f463d006e0c47373ca7ec5e1a261c59dc01ef4d62b2657af925fb0deee3a/pydantic_core-2.46.4-cp312-cp312-win_arm64.whl", hash = "sha256:4fc73cb559bdb54b1134a706a2802a4cddd27a0633f5abb7e53056268751ac6a", size = 2027604, upload-time = "2026-05-06T13:39:03.753Z" }, - { url = "https://files.pythonhosted.org/packages/51/a2/5d30b469c5267a17b39dec53208222f76a8d351dfac4af661888c5aee77d/pydantic_core-2.46.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:5d5902252db0d3cedf8d4a1bc68f70eeb430f7e4c7104c8c476753519b423008", size = 2106306, upload-time = "2026-05-06T13:37:48.029Z" }, - { url = "https://files.pythonhosted.org/packages/c1/81/4fa520eaffa8bd7d1525e644cd6d39e7d60b1592bc5b516693c7340b50f1/pydantic_core-2.46.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c94f0688e7b8d0a67abf40e57a7eaaecd17cc9586706a31b76c031f63df052b4", size = 1951906, upload-time = "2026-05-06T13:37:17.012Z" }, - { url = "https://files.pythonhosted.org/packages/03/d5/fd02da45b659668b05923b17ba3a0100a0a3d5541e3bd8fcc4ecb711309e/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f027324c56cd5406ca49c124b0db10e56c69064fec039acc571c29020cc87c76", size = 1976802, upload-time = "2026-05-06T13:37:35.113Z" }, - { url = "https://files.pythonhosted.org/packages/21/f2/95727e1368be3d3ed485eaab7adbd7dda408f33f7a36e8b48e0144002b91/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e739fee756ba1010f8bcccb534252e85a35fe45ae92c295a06059ce58b74ccd3", size = 2052446, upload-time = "2026-05-06T13:37:12.313Z" }, - { url = "https://files.pythonhosted.org/packages/9c/86/5d99feea3f77c7234b8718075b23db11532773c1a0dbd9b9490215dc2eeb/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d56801be94b86a9da183e5f3766e6310752b99ff647e38b09a9500d88e46e76", size = 2232757, upload-time = "2026-05-06T13:39:01.149Z" }, - { url = "https://files.pythonhosted.org/packages/d2/3a/508ac615935ef7588cf6d9e9b91309fdc2da751af865e02a9098de88258c/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2412e734dcb48da14d4e4006b82b46b74f2518b8a26ee7e58c6844a6cd6d03c4", size = 2309275, upload-time = "2026-05-06T13:37:41.406Z" }, - { url = "https://files.pythonhosted.org/packages/07/f8/41db9de19d7987d6b04715a02b3b40aea467000275d9d758ffaa31af7d50/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9551187363ffc0de2a00b2e47c25aeaeb1020b69b668762966df15fc5659dd5a", size = 2094467, upload-time = "2026-05-06T13:39:18.847Z" }, - { url = "https://files.pythonhosted.org/packages/2c/e2/f35033184cb11d0052daf4416e8e10a502ea2ac006fc4f459aee872727d1/pydantic_core-2.46.4-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0186750b482eefa11d7f435892b09c5c606193ef3375bcf94aa00ae6bfb66262", size = 2134417, upload-time = "2026-05-06T13:40:17.944Z" }, - { url = "https://files.pythonhosted.org/packages/7e/7b/6ceeb1cc90e193862f444ebe373d8fdf613f0a82572dde03fb10734c6c71/pydantic_core-2.46.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5855698a4856556d86e8e6cd8434bc3ac0314ee8e12089ae0e143f64c6256e4e", size = 2179782, upload-time = "2026-05-06T13:40:32.618Z" }, - { url = "https://files.pythonhosted.org/packages/5a/f2/c8d7773ede6af08036423a00ae0ceffce266c3c52a096c435d68c896083f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cbaf13819775b7f769bf4a1f066cb6df7a28d4480081a589828ef190226881cd", size = 2188782, upload-time = "2026-05-06T13:36:51.018Z" }, - { url = "https://files.pythonhosted.org/packages/59/31/0c864784e31f09f05cdd87606f08923b9c9e7f6e51dd27f20f62f975ce9f/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:633147d34cf4550417f12e2b1a0383973bdf5cdfde212cb09e9a581cf10820be", size = 2328334, upload-time = "2026-05-06T13:40:37.764Z" }, - { url = "https://files.pythonhosted.org/packages/c2/eb/4f6c8a41efa30baa755590f4141abf3a8c370fab610915733e74134a7270/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:82cf5301172168103724d49a1444d3378cb20cdee30b116a1bd6031236298a5d", size = 2372986, upload-time = "2026-05-06T13:39:34.152Z" }, - { url = "https://files.pythonhosted.org/packages/5b/24/b375a480d53113860c299764bfe9f349a3dc9108b3adc0d7f0d786492ebf/pydantic_core-2.46.4-cp313-cp313-win32.whl", hash = "sha256:9fa8ae11da9e2b3126c6426f147e0fba88d96d65921799bb30c6abd1cb2c97fb", size = 1973693, upload-time = "2026-05-06T13:37:55.072Z" }, - { url = "https://files.pythonhosted.org/packages/7e/e8/cff247591966f2d22ec8c003cd7587e27b7ba7b81ab2fb888e3ab75dc285/pydantic_core-2.46.4-cp313-cp313-win_amd64.whl", hash = "sha256:6b3ace8194b0e5204818c92802dcdca7fc6d88aabbb799d7c795540d9cd6d292", size = 2071819, upload-time = "2026-05-06T13:38:49.139Z" }, - { url = "https://files.pythonhosted.org/packages/c6/1a/f4aee670d5670e9e148e0c82c7db98d780be566c6e6a97ee8035528ca0b3/pydantic_core-2.46.4-cp313-cp313-win_arm64.whl", hash = "sha256:184c081504d17f1c1066e430e117142b2c77d9448a97f7b65c6ac9fd9aee238d", size = 2027411, upload-time = "2026-05-06T13:40:45.796Z" }, - { url = "https://files.pythonhosted.org/packages/8d/74/228a26ddad29c6672b805d9fd78e8d251cd04004fa7eed0e622096cd0250/pydantic_core-2.46.4-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:428e04521a40150c85216fc8b85e8d39fece235a9cf5e383761238c7fa9b96fb", size = 2102079, upload-time = "2026-05-06T13:38:41.019Z" }, - { url = "https://files.pythonhosted.org/packages/ad/1f/8970b150a4b4365623ae00fc88603491f763c627311ae8031e3111356d6e/pydantic_core-2.46.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23ace664830ee0bfe014a0c7bc248b1f7f25ed7ad103852c317624a1083af462", size = 1952179, upload-time = "2026-05-06T13:36:59.812Z" }, - { url = "https://files.pythonhosted.org/packages/95/30/5211a831ae054928054b2f79731661087a2bc5c01e825c672b3a4a8f1b3e/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce5c1d2a8b27468f433ca974829c44060b8097eedc39933e3c206a90ee49c4a9", size = 1978926, upload-time = "2026-05-06T13:37:39.933Z" }, - { url = "https://files.pythonhosted.org/packages/57/e9/689668733b1eb67adeef047db3c2e8788fcf65a7fd9c9e2b46b7744fe245/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7283d57845ecf5a163403eb0702dfc220cc4fbdd18919cb5ccea4f95ee1cdab4", size = 2046785, upload-time = "2026-05-06T13:38:01.995Z" }, - { url = "https://files.pythonhosted.org/packages/60/d9/6715260422ff50a2109878fd24d948a6c3446bb2664f34ee78cd972b3acd/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8daafc69c93ee8a0204506a3b6b30f586ef54028f52aeeeb5c4cfc5184fd5914", size = 2228733, upload-time = "2026-05-06T13:40:50.371Z" }, - { url = "https://files.pythonhosted.org/packages/18/ae/fdb2f64316afca925640f8e70bb1a564b0ec2721c1389e25b8eb4bf9a299/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd2213145bcc2ba85884d0ac63d222fece9209678f77b9b4d76f054c561adb28", size = 2307534, upload-time = "2026-05-06T13:37:21.531Z" }, - { url = "https://files.pythonhosted.org/packages/89/1d/8eff589b45bb8190a9d12c49cfad0f176a5cbd1534908a6b5125e2886239/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a5f930472650a82629163023e630d160863fce524c616f4e5186e5de9d9a49b", size = 2099732, upload-time = "2026-05-06T13:39:31.942Z" }, - { url = "https://files.pythonhosted.org/packages/06/d5/ee5a3366637fee41dee51a1fc91562dcf12ddbc68fda34e6b253da2324bb/pydantic_core-2.46.4-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:c1b3f518abeca3aa13c712fd202306e145abf59a18b094a6bafb2d2bbf59192c", size = 2129627, upload-time = "2026-05-06T13:37:25.033Z" }, - { url = "https://files.pythonhosted.org/packages/94/33/2414be571d2c6a6c4d08be21f9292b6d3fdb08949a97b6dfe985017821db/pydantic_core-2.46.4-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a7dd0b3ee80d90150e3495a3a13ac34dbcbfd4f012996a6a1d8900e91b5c0fb", size = 2179141, upload-time = "2026-05-06T13:37:14.046Z" }, - { url = "https://files.pythonhosted.org/packages/7b/79/7daa95be995be0eecc4cf75064cb33f9bbbfe3fe0158caf2f0d4a996a5c7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:3fb702cd90b0446a3a1c5e470bfa0dd23c0233b676a9099ddcc964fa6ca13898", size = 2184325, upload-time = "2026-05-06T13:36:53.615Z" }, - { url = "https://files.pythonhosted.org/packages/9f/cb/d0a382f5c0de8a222dc61c65348e0ce831b1f68e0a018450d31c2cace3a5/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:b8458003118a712e66286df6a707db01c52c0f52f7db8e4a38f0da1d3b94fc4e", size = 2323990, upload-time = "2026-05-06T13:40:29.971Z" }, - { url = "https://files.pythonhosted.org/packages/05/db/d9ba624cc4a5aced1598e88c04fdbd8310c8a69b9d38b9a3d39ce3a61ed7/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:372429a130e469c9cd698925ce5fc50940b7a1336b0d82038e63d5bbc4edc519", size = 2369978, upload-time = "2026-05-06T13:37:23.027Z" }, - { url = "https://files.pythonhosted.org/packages/f2/20/d15df15ba918c423461905802bfd2981c3af0bfa0e40d05e13edbfa48bc3/pydantic_core-2.46.4-cp314-cp314-win32.whl", hash = "sha256:85bb3611ff1802f3ee7fdd7dbff26b56f343fb432d57a4728fdd49b6ef35e2f4", size = 1966354, upload-time = "2026-05-06T13:38:03.499Z" }, - { url = "https://files.pythonhosted.org/packages/fc/b6/6b8de4c0a7d7ab3004c439c80c5c1e0a3e8d78bbae19379b01960383d9e5/pydantic_core-2.46.4-cp314-cp314-win_amd64.whl", hash = "sha256:811ff8e9c313ab425368bcbb36e5c4ebd7108c2bbf4e4089cfbb0b01eff63fac", size = 2072238, upload-time = "2026-05-06T13:39:40.807Z" }, - { url = "https://files.pythonhosted.org/packages/32/36/51eb763beec1f4cf59b1db243a7dcc39cbb41230f050a09b9d69faaf0a48/pydantic_core-2.46.4-cp314-cp314-win_arm64.whl", hash = "sha256:bfec22eab3c8cc2ceec0248aec886624116dc079afa027ecc8ad4a7e62010f8a", size = 2018251, upload-time = "2026-05-06T13:37:26.72Z" }, - { url = "https://files.pythonhosted.org/packages/e8/91/855af51d625b23aa987116a19e231d2aaef9c4a415273ddc189b79a45fee/pydantic_core-2.46.4-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:af8244b2bef6aaad6d92cda81372de7f8c8d36c9f0c3ea36e827c60e7d9467a0", size = 2099593, upload-time = "2026-05-06T13:39:47.682Z" }, - { url = "https://files.pythonhosted.org/packages/fb/1b/8784a54c65edb5f49f0a14d6977cf1b209bba85a4c77445b255c2de58ab3/pydantic_core-2.46.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a4330cdbc57162e4b3aa303f588ba752257694c9c9be3e7ebb11b4aca659b5d", size = 1935226, upload-time = "2026-05-06T13:40:40.428Z" }, - { url = "https://files.pythonhosted.org/packages/e8/e7/1955d28d1afc56dd4b3ad7cc0cf39df1b9852964cf16e5d13912756d6d6b/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29c61fc04a3d840155ff08e475a04809278972fe6aef51e2720554e96367e34b", size = 1974605, upload-time = "2026-05-06T13:37:32.029Z" }, - { url = "https://files.pythonhosted.org/packages/93/e2/3fedbf0ba7a22850e6e9fd78117f1c0f10f950182344d8a6c535d468fdd8/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c50f2528cf200c5eed56faf3f4e22fcd5f38c157a8b78576e6ba3168ec35f000", size = 2030777, upload-time = "2026-05-06T13:38:55.239Z" }, - { url = "https://files.pythonhosted.org/packages/f8/61/46be275fcaaba0b4f5b9669dd852267ce1ff616592dccf7a7845588df091/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0cbe8b01f948de4286c74cdd6c667aceb38f5c1e26f0693b3983d9d74887c65e", size = 2236641, upload-time = "2026-05-06T13:37:08.096Z" }, - { url = "https://files.pythonhosted.org/packages/60/db/12e93e46a8bac9988be3c016860f83293daea8c716c029c9ace279036f2f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:617d7e2ca7dcb8c5cf6bcb8c59b8832c94b36196bbf1cbd1bfb56ed341905edd", size = 2286404, upload-time = "2026-05-06T13:40:20.221Z" }, - { url = "https://files.pythonhosted.org/packages/e2/4a/4d8b19008f38d31c53b8219cfedc2e3d5de5fe99d90076b7e767de29274f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7027560ee92211647d0d34e3f7cd6f50da56399d26a9c8ad0da286d3869a53f3", size = 2109219, upload-time = "2026-05-06T13:38:12.153Z" }, - { url = "https://files.pythonhosted.org/packages/88/70/3cbc40978fefb7bb09c6708d40d4ad1a5d70fd7213c3d17f971de868ec1f/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:f99626688942fb746e545232e7726926f3be91b5975f8b55327665fafda991c7", size = 2110594, upload-time = "2026-05-06T13:40:02.971Z" }, - { url = "https://files.pythonhosted.org/packages/9d/20/b8d36736216e29491125531685b2f9e61aa5b4b2599893f8268551da3338/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fc3e9034a63de20e15e8ade85358bc6efc614008cab72898b4b4952bea0509ff", size = 2159542, upload-time = "2026-05-06T13:39:27.506Z" }, - { url = "https://files.pythonhosted.org/packages/1d/a2/367df868eb584dacf6bf82a389272406d7178e301c4ac82545ab98bc2dd9/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:97e7cf2be5c77b7d1a9713a05605d49460d02c6078d38d8bef3cbe323c548424", size = 2168146, upload-time = "2026-05-06T13:38:31.93Z" }, - { url = "https://files.pythonhosted.org/packages/c1/b8/4460f77f7e201893f649a29ab355dddd3beee8a97bcb1a320db414f9a06e/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:3bf92c5d0e00fefaab325a4d27828fe6b6e2a21848686b5b60d2d9eeb09d76c6", size = 2306309, upload-time = "2026-05-06T13:37:44.717Z" }, - { url = "https://files.pythonhosted.org/packages/64/c4/be2639293acd87dc8ddbcec41a73cee9b2ebf996fe6d892a1a74e88ad3f7/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:3ecbc122d18468d06ca279dc26a8c2e2d5acb10943bb35e36ae92096dc3b5565", size = 2369736, upload-time = "2026-05-06T13:37:05.645Z" }, - { url = "https://files.pythonhosted.org/packages/30/a6/9f9f380dbb301f67023bf8f707aaa75daadf84f7152d95c410fd7e81d994/pydantic_core-2.46.4-cp314-cp314t-win32.whl", hash = "sha256:e846ae7835bf0703ae43f534ab79a867146dadd59dc9ca5c8b53d5c8f7c9ef02", size = 1955575, upload-time = "2026-05-06T13:38:51.116Z" }, - { url = "https://files.pythonhosted.org/packages/40/1f/f1eb9eb350e795d1af8586289746f5c5677d16043040d63710e22abc43c9/pydantic_core-2.46.4-cp314-cp314t-win_amd64.whl", hash = "sha256:2108ba5c1c1eca18030634489dc544844144ee36357f2f9f780b93e7ddbb44b5", size = 2051624, upload-time = "2026-05-06T13:38:21.672Z" }, - { url = "https://files.pythonhosted.org/packages/f6/d2/42dd53d0a85c27606f316d3aa5d2869c4e8470a5ed6dec30e4a1abe19192/pydantic_core-2.46.4-cp314-cp314t-win_arm64.whl", hash = "sha256:4fcbe087dbc2068af7eda3aa87634eba216dbda64d1ae73c8684b621d33f6596", size = 2017325, upload-time = "2026-05-06T13:40:52.723Z" }, - { url = "https://files.pythonhosted.org/packages/ee/a4/73995fd4ebbb46ba0ee51e6fa049b8f02c40daebb762208feda8a6b7894d/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:14d4edf427bdcf950a8a02d7cb44a08614388dd6e1bdcbf4f67504fa7887da9c", size = 2111589, upload-time = "2026-05-06T13:37:10.817Z" }, - { url = "https://files.pythonhosted.org/packages/fb/7f/f37d3a5e8bfcc2e403f5c57a730f2d815693fb42119e8ea48b3789335af1/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:0ce40cd7b21210e99342afafbd4d0f76d784eb5b1d60f3bdc566be4983c6c73b", size = 1944552, upload-time = "2026-05-06T13:36:56.717Z" }, - { url = "https://files.pythonhosted.org/packages/15/3c/d7eb777b3ff43e8433a4efb39a17aa8fd98a4ee8561a24a67ef5db07b2d6/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90884113d8b48f760e9587002789ddd741e76ab9f89518cd1e43b1f1a52ec44b", size = 1982984, upload-time = "2026-05-06T13:39:06.207Z" }, - { url = "https://files.pythonhosted.org/packages/63/87/70b9f40170a81afd55ca26c9b2acb25c20d64bcfbf888fafecb3ba077d4c/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66ce7632c22d837c95301830e111ad0128a32b8207533b60896a96c4915192ea", size = 2138417, upload-time = "2026-05-06T13:39:45.476Z" }, - { url = "https://files.pythonhosted.org/packages/9d/1d/8987ad40f65ae1432753072f214fb5c74fe47ffbd0698bb9cbbb585664f8/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:1d8ba486450b14f3b1d63bc521d410ec7565e52f887b9fb671791886436a42f7", size = 2095527, upload-time = "2026-05-06T13:39:52.283Z" }, - { url = "https://files.pythonhosted.org/packages/64/d3/84c282a7eee1d3ac4c0377546ef5a1ea436ce26840d9ac3b7ed54a377507/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:3009f12e4e90b7f88b4f9adb1b0c4a3d58fe7820f3238c190047209d148026df", size = 1936024, upload-time = "2026-05-06T13:40:15.671Z" }, - { url = "https://files.pythonhosted.org/packages/d7/ca/eac61596cdeb4d7e174d3dc0bd8a6238f14f75f97a24e7b7db4c7e7340a0/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad785e92e6dc634c21555edc8bd6b64957ab844541bcb96a1366c202951ae526", size = 1990696, upload-time = "2026-05-06T13:38:34.717Z" }, - { url = "https://files.pythonhosted.org/packages/fa/c3/7c8b240552251faf6b3a957db200fcfbbcec36763c050428b601e0c9b83b/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00c603d540afdd6b80eb39f078f33ebd46211f02f33e34a32d9f053bba711de0", size = 2147590, upload-time = "2026-05-06T13:39:29.883Z" }, - { url = "https://files.pythonhosted.org/packages/11/cb/428de0385b6c8d44b716feba566abfacfbd23ee3c4439faa789a1456242f/pydantic_core-2.46.4-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:0c563b08bca408dc7f65f700633d8442fffb2421fc47b8101377e9fd65051ff0", size = 2112782, upload-time = "2026-05-06T13:37:04.016Z" }, - { url = "https://files.pythonhosted.org/packages/0b/b5/6a17bdadd0fc1f170adfd05a20d37c832f52b117b4d9131da1f41bb097ce/pydantic_core-2.46.4-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:db06ffe51636ffe9ca531fe9023dd64bdd794be8754cb5df57c5498ae5b518a7", size = 1952146, upload-time = "2026-05-06T13:39:43.092Z" }, - { url = "https://files.pythonhosted.org/packages/2a/dc/03734d80e362cd43ef65428e9de77c730ce7f2f11c60d2b1e1b39f0fbf99/pydantic_core-2.46.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:133878133d271ade3d41d1bfb2a45ec38dbdbda40bc065921c6b04e4630127e2", size = 2134492, upload-time = "2026-05-06T13:36:58.124Z" }, - { url = "https://files.pythonhosted.org/packages/de/df/5e5ffc085ed07cc22d298134d3d911c63e91f6a0eb91fe646750a3209910/pydantic_core-2.46.4-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9bc519fbf2b7578398853d815009ae5e4d4603d12f4e3f91da8c06852d3da3e9", size = 2156604, upload-time = "2026-05-06T13:37:49.88Z" }, - { url = "https://files.pythonhosted.org/packages/81/44/6e112a4253e56f5705467cbab7ab5e91ee7398ba3d56d358635958893d3e/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c7a7bd4e39e8e4c12c39cd480356842b6a8a06e41b23a55a5e3e191718838ddf", size = 2183828, upload-time = "2026-05-06T13:37:43.053Z" }, - { url = "https://files.pythonhosted.org/packages/ac/ad/5565071e937d8e752842ac241463944c9eb14c87e2d269f2658a5bd05e98/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:d396ec2b979760aaf3218e76c24e65bd0aca24983298653b3a9d7a45f9e47b30", size = 2310000, upload-time = "2026-05-06T13:37:56.694Z" }, - { url = "https://files.pythonhosted.org/packages/4f/c3/66883a5cec183e7fba4d024b4cbbe61851a63750ef606b0afecc46d1f2bf/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:86e1a4418c6cd97d60c95c71164158eaf7324fae7b0923264016baa993eba6fc", size = 2361286, upload-time = "2026-05-06T13:40:05.667Z" }, - { url = "https://files.pythonhosted.org/packages/4b/2d/69abac8f838090bbecd5df894befb2c2619e7996a98ddb949db9f3b93225/pydantic_core-2.46.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:d51026d73fcfd93610abc7b27789c26b313920fcfb20e27462d74a7f8b06e983", size = 2193071, upload-time = "2026-05-06T13:38:08.682Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4.tar.gz", hash = "sha256:62f875393d7f270851f20523dd2e29f082bcc82292d66db2b64ea71f64b6e1c1" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:a396dcc17e5a0b164dbe026896245a4fa9ff402edca1dff0be3d53a517f74de4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:da4b951fe36dc7c3a1ccb4e3cd1747c3542b8c9ceede8fc86cae054e764485f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bb63e0198ca18aad131c089b9204c23079c3afa95487e561f4c522d519e55aba" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f47286a97f0bc9b8859519809077b91b2cefe4ae47fcbf5e466a009c1c5d742b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:905a0ed8ea6f2d61c1738835f99b699348d7857379083e5fc497fa0c967a407c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea793e075b70290d89d8142074262885d3f7da19634845135751bd6344f73b50" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:395aebd9183f9d112f569aeb5b2214d1a10a33bec8456447f7fbdfa51d38d4cd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:b078afbc25f3a1436c7a1d2cd3e322497ee99615ba97c563566fdf46aff1ee01" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f747929cf940cddb5b3668a390056ddd5ba2e5010615ea2dcf4f9c4f3ab8791d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:daa27d92c36f24388fe3ad306b174781c747627f134452e4f128ea00ce1fe8c4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:19e51f073cd3df251856a8a4189fbdf1de4012c3ebacfb1884f94f1eb406079f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c1747f85cee84c26985853c6f3d9bd3e75da5212912443fa111c113b9c246f39" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-win32.whl", hash = "sha256:2f84c03c8607173d16b5a854ec68a2f9079ae03237a54fb506d13af47e1d018d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp310-cp310-win_amd64.whl", hash = "sha256:8358a950c8909158e3df31538a7e4edc2d7265a7c54b47f0864d9e5bae9dcebf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:0e96592440881c74a213e5ad528e2b24d3d4f940de2766bed9010ab1d9e51594" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e0d65b8c354be7fb5f720c3caa8bc940bc2d20ce749c8e06135f07f8ed95dd7c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bfb192b3f4b9e8a89b6277b6ce787564f62cfd272055f6e685726b111dc7826" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9037063db01f09b09e237c282b6792bd4da634b5402c4e7f0c61effed7701a04" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fc010ab034c8c7452522748bf937df58020d256ccae0874463d1f4d01758af8e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c5dac79fa1614d1e06ca695109c6105923bd9c7d1d6c918d4e637b7e6b32fd3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f9fa868638bf362d3d138ea55829cefb3d5f4b0d7f142234382a15e2485dbec4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:17299feefe090f2caa5b8e37222bb5f663e4935a8bfa6931d4102e5df1a9f398" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4c63ebc82684aa89d9a3bcbd13d515b3be44250dc68dd3bd81526c1cb31286c3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:aaa2a54443eff1950ba5ddc6b6ccda0d9c84a364276a62f969bdf2a390650848" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:18e5ceec2ab67e6d5f1a9085e5a24c9c4e2ac4545730bfe668680bca05e555f3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a0f62d0a58f4e7da165457e995725421e0064f2255d8eccebc49f41bbc23b109" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-win32.whl", hash = "sha256:041bde0a48fd37cf71cab1c9d56d3e8625a3793fef1f7dd232b3ff37e978ecda" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-win_amd64.whl", hash = "sha256:6f2eeda33a839975441c86a4119e1383c50b47faf0cbb5176985565c6bb02c33" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp311-cp311-win_arm64.whl", hash = "sha256:14f4c5d6db102bd796a627bbb3a17b4cf4574b9ae861d8b7c9a9661c6dd3362d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:3245406455a5d98187ec35530fd772b1d799b26667980872c8d4614991e2c4a2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:962ccbab7b642487b1d8b7df90ef677e03134cf1fd8880bf698649b22a69371f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8233f2947cf85404441fd7e0085f53b10c93e0ee78611099b5c7237e36aacbf7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a233125ac121aa3ffba9a2b59edfc4a985a76092dc8279586ab4b71390875e7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5b712b53160b79a5850310b912a5ef8e57e56947c8ad690c227f5c9d7e561712" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9401557acd873c3a7f3eb9383edef8ac4968f9510e340f4808d427e75667e7b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:926c9541b14b12b1681dca8a0b75feb510b06c6341b70a8e500c2fdcff837cce" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:56cb4851bcaf3d117eddcef4fe66afd750a50274b0da8e22be256d10e5611987" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c68fcd102d71ea85c5b2dfac3f4f8476eff42a9e078fd5faefff6d145063536b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:b2f69dec1725e79a012d920df1707de5caf7ed5e08f3be4435e25803efc47458" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:8d0820e8192167f80d88d64038e609c31452eeca865b4e1d9950a27a4609b00b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fbdb89b3e1c94a30cc5edfce477c6e6a5dc4d8f84665b455c27582f211a1c72c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-win32.whl", hash = "sha256:9aa768456404a8bf48a4406685ac2bec8e72b62c69313734fa3b73cf33b3a894" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-win_amd64.whl", hash = "sha256:e9c26f834c65f5752f3f06cb08cb86a913ceb7274d0db6e267808a708b46bc89" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp312-cp312-win_arm64.whl", hash = "sha256:4fc73cb559bdb54b1134a706a2802a4cddd27a0633f5abb7e53056268751ac6a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:5d5902252db0d3cedf8d4a1bc68f70eeb430f7e4c7104c8c476753519b423008" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c94f0688e7b8d0a67abf40e57a7eaaecd17cc9586706a31b76c031f63df052b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f027324c56cd5406ca49c124b0db10e56c69064fec039acc571c29020cc87c76" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e739fee756ba1010f8bcccb534252e85a35fe45ae92c295a06059ce58b74ccd3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9d56801be94b86a9da183e5f3766e6310752b99ff647e38b09a9500d88e46e76" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2412e734dcb48da14d4e4006b82b46b74f2518b8a26ee7e58c6844a6cd6d03c4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9551187363ffc0de2a00b2e47c25aeaeb1020b69b668762966df15fc5659dd5a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:0186750b482eefa11d7f435892b09c5c606193ef3375bcf94aa00ae6bfb66262" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5855698a4856556d86e8e6cd8434bc3ac0314ee8e12089ae0e143f64c6256e4e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:cbaf13819775b7f769bf4a1f066cb6df7a28d4480081a589828ef190226881cd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:633147d34cf4550417f12e2b1a0383973bdf5cdfde212cb09e9a581cf10820be" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:82cf5301172168103724d49a1444d3378cb20cdee30b116a1bd6031236298a5d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-win32.whl", hash = "sha256:9fa8ae11da9e2b3126c6426f147e0fba88d96d65921799bb30c6abd1cb2c97fb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-win_amd64.whl", hash = "sha256:6b3ace8194b0e5204818c92802dcdca7fc6d88aabbb799d7c795540d9cd6d292" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp313-cp313-win_arm64.whl", hash = "sha256:184c081504d17f1c1066e430e117142b2c77d9448a97f7b65c6ac9fd9aee238d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:428e04521a40150c85216fc8b85e8d39fece235a9cf5e383761238c7fa9b96fb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:23ace664830ee0bfe014a0c7bc248b1f7f25ed7ad103852c317624a1083af462" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce5c1d2a8b27468f433ca974829c44060b8097eedc39933e3c206a90ee49c4a9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7283d57845ecf5a163403eb0702dfc220cc4fbdd18919cb5ccea4f95ee1cdab4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8daafc69c93ee8a0204506a3b6b30f586ef54028f52aeeeb5c4cfc5184fd5914" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cd2213145bcc2ba85884d0ac63d222fece9209678f77b9b4d76f054c561adb28" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7a5f930472650a82629163023e630d160863fce524c616f4e5186e5de9d9a49b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:c1b3f518abeca3aa13c712fd202306e145abf59a18b094a6bafb2d2bbf59192c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a7dd0b3ee80d90150e3495a3a13ac34dbcbfd4f012996a6a1d8900e91b5c0fb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:3fb702cd90b0446a3a1c5e470bfa0dd23c0233b676a9099ddcc964fa6ca13898" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:b8458003118a712e66286df6a707db01c52c0f52f7db8e4a38f0da1d3b94fc4e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:372429a130e469c9cd698925ce5fc50940b7a1336b0d82038e63d5bbc4edc519" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-win32.whl", hash = "sha256:85bb3611ff1802f3ee7fdd7dbff26b56f343fb432d57a4728fdd49b6ef35e2f4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-win_amd64.whl", hash = "sha256:811ff8e9c313ab425368bcbb36e5c4ebd7108c2bbf4e4089cfbb0b01eff63fac" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314-win_arm64.whl", hash = "sha256:bfec22eab3c8cc2ceec0248aec886624116dc079afa027ecc8ad4a7e62010f8a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:af8244b2bef6aaad6d92cda81372de7f8c8d36c9f0c3ea36e827c60e7d9467a0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5a4330cdbc57162e4b3aa303f588ba752257694c9c9be3e7ebb11b4aca659b5d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:29c61fc04a3d840155ff08e475a04809278972fe6aef51e2720554e96367e34b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c50f2528cf200c5eed56faf3f4e22fcd5f38c157a8b78576e6ba3168ec35f000" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0cbe8b01f948de4286c74cdd6c667aceb38f5c1e26f0693b3983d9d74887c65e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:617d7e2ca7dcb8c5cf6bcb8c59b8832c94b36196bbf1cbd1bfb56ed341905edd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7027560ee92211647d0d34e3f7cd6f50da56399d26a9c8ad0da286d3869a53f3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:f99626688942fb746e545232e7726926f3be91b5975f8b55327665fafda991c7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fc3e9034a63de20e15e8ade85358bc6efc614008cab72898b4b4952bea0509ff" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:97e7cf2be5c77b7d1a9713a05605d49460d02c6078d38d8bef3cbe323c548424" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:3bf92c5d0e00fefaab325a4d27828fe6b6e2a21848686b5b60d2d9eeb09d76c6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:3ecbc122d18468d06ca279dc26a8c2e2d5acb10943bb35e36ae92096dc3b5565" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-win32.whl", hash = "sha256:e846ae7835bf0703ae43f534ab79a867146dadd59dc9ca5c8b53d5c8f7c9ef02" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-win_amd64.whl", hash = "sha256:2108ba5c1c1eca18030634489dc544844144ee36357f2f9f780b93e7ddbb44b5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-cp314-cp314t-win_arm64.whl", hash = "sha256:4fcbe087dbc2068af7eda3aa87634eba216dbda64d1ae73c8684b621d33f6596" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:14d4edf427bdcf950a8a02d7cb44a08614388dd6e1bdcbf4f67504fa7887da9c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:0ce40cd7b21210e99342afafbd4d0f76d784eb5b1d60f3bdc566be4983c6c73b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:90884113d8b48f760e9587002789ddd741e76ab9f89518cd1e43b1f1a52ec44b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:66ce7632c22d837c95301830e111ad0128a32b8207533b60896a96c4915192ea" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:1d8ba486450b14f3b1d63bc521d410ec7565e52f887b9fb671791886436a42f7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:3009f12e4e90b7f88b4f9adb1b0c4a3d58fe7820f3238c190047209d148026df" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad785e92e6dc634c21555edc8bd6b64957ab844541bcb96a1366c202951ae526" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:00c603d540afdd6b80eb39f078f33ebd46211f02f33e34a32d9f053bba711de0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:0c563b08bca408dc7f65f700633d8442fffb2421fc47b8101377e9fd65051ff0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:db06ffe51636ffe9ca531fe9023dd64bdd794be8754cb5df57c5498ae5b518a7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:133878133d271ade3d41d1bfb2a45ec38dbdbda40bc065921c6b04e4630127e2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9bc519fbf2b7578398853d815009ae5e4d4603d12f4e3f91da8c06852d3da3e9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c7a7bd4e39e8e4c12c39cd480356842b6a8a06e41b23a55a5e3e191718838ddf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:d396ec2b979760aaf3218e76c24e65bd0aca24983298653b3a9d7a45f9e47b30" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:86e1a4418c6cd97d60c95c71164158eaf7324fae7b0923264016baa993eba6fc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pydantic-core/pydantic_core-2.46.4-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:d51026d73fcfd93610abc7b27789c26b313920fcfb20e27462d74a7f8b06e983" }, ] [[package]] name = "pyproject-api" version = "1.10.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "packaging" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/62/62/0fe346fe380b1aafaf819c8cb195d3241bb4f355f908e6339814131a830b/pyproject_api-1.10.1.tar.gz", hash = "sha256:c2b2726bd7aa9217b6c50b621fef5b2ae5def4d55b779c9e0694c15e0a8517ba", size = 23477, upload-time = "2026-05-28T14:22:14.049Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyproject-api/pyproject_api-1.10.1.tar.gz", hash = "sha256:c2b2726bd7aa9217b6c50b621fef5b2ae5def4d55b779c9e0694c15e0a8517ba" } wheels = [ - { url = "https://files.pythonhosted.org/packages/79/d7/29e1e5e882f79133631f7bcace42d23db493f616463c157a1ab614bf69dd/pyproject_api-1.10.1-py3-none-any.whl", hash = "sha256:fa9e6f66c35b5017e909825d8f2b5d5482ea699d7be809d21c03bd1f7317f36a", size = 12992, upload-time = "2026-05-28T14:22:12.711Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyproject-api/pyproject_api-1.10.1-py3-none-any.whl", hash = "sha256:fa9e6f66c35b5017e909825d8f2b5d5482ea699d7be809d21c03bd1f7317f36a" }, ] [[package]] name = "python-discovery" version = "1.4.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "filelock" }, { name = "platformdirs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0b/1a/cbbaf13b730abb0a16b964d984e19f2fe520c21a4dc664051359a3f5a9e7/python_discovery-1.4.2.tar.gz", hash = "sha256:8f3746c4b4968d22afbb97d36e1a0e5b66e6c0f297290f2e95f05b9b8bf18690", size = 70277, upload-time = "2026-06-11T16:10:42.383Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/python-discovery/python_discovery-1.4.2.tar.gz", hash = "sha256:8f3746c4b4968d22afbb97d36e1a0e5b66e6c0f297290f2e95f05b9b8bf18690" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1a/82/a70006589557f267f15bd384c0642ad49f0d97b690c3a05b166b9dcbad3b/python_discovery-1.4.2-py3-none-any.whl", hash = "sha256:475803f53b7b2ed6e490e27373f9d8340f7d2eebf9acdaf645d7d714c97bb500", size = 33886, upload-time = "2026-06-11T16:10:41.192Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/python-discovery/python_discovery-1.4.2-py3-none-any.whl", hash = "sha256:475803f53b7b2ed6e490e27373f9d8340f7d2eebf9acdaf645d7d714c97bb500" }, ] [[package]] name = "pytokens" version = "0.4.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b6/34/b4e015b99031667a7b960f888889c5bd34ef585c85e1cb56a594b92836ac/pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a", size = 23015, upload-time = "2026-01-30T01:03:45.924Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/42/24/f206113e05cb8ef51b3850e7ef88f20da6f4bf932190ceb48bd3da103e10/pytokens-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a44ed93ea23415c54f3face3b65ef2b844d96aeb3455b8a69b3df6beab6acc5", size = 161522, upload-time = "2026-01-30T01:02:50.393Z" }, - { url = "https://files.pythonhosted.org/packages/d4/e9/06a6bf1b90c2ed81a9c7d2544232fe5d2891d1cd480e8a1809ca354a8eb2/pytokens-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:add8bf86b71a5d9fb5b89f023a80b791e04fba57960aa790cc6125f7f1d39dfe", size = 246945, upload-time = "2026-01-30T01:02:52.399Z" }, - { url = "https://files.pythonhosted.org/packages/69/66/f6fb1007a4c3d8b682d5d65b7c1fb33257587a5f782647091e3408abe0b8/pytokens-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:670d286910b531c7b7e3c0b453fd8156f250adb140146d234a82219459b9640c", size = 259525, upload-time = "2026-01-30T01:02:53.737Z" }, - { url = "https://files.pythonhosted.org/packages/04/92/086f89b4d622a18418bac74ab5db7f68cf0c21cf7cc92de6c7b919d76c88/pytokens-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4e691d7f5186bd2842c14813f79f8884bb03f5995f0575272009982c5ac6c0f7", size = 262693, upload-time = "2026-01-30T01:02:54.871Z" }, - { url = "https://files.pythonhosted.org/packages/b4/7b/8b31c347cf94a3f900bdde750b2e9131575a61fdb620d3d3c75832262137/pytokens-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:27b83ad28825978742beef057bfe406ad6ed524b2d28c252c5de7b4a6dd48fa2", size = 103567, upload-time = "2026-01-30T01:02:56.414Z" }, - { url = "https://files.pythonhosted.org/packages/3d/92/790ebe03f07b57e53b10884c329b9a1a308648fc083a6d4a39a10a28c8fc/pytokens-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d70e77c55ae8380c91c0c18dea05951482e263982911fc7410b1ffd1dadd3440", size = 160864, upload-time = "2026-01-30T01:02:57.882Z" }, - { url = "https://files.pythonhosted.org/packages/13/25/a4f555281d975bfdd1eba731450e2fe3a95870274da73fb12c40aeae7625/pytokens-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a58d057208cb9075c144950d789511220b07636dd2e4708d5645d24de666bdc", size = 248565, upload-time = "2026-01-30T01:02:59.912Z" }, - { url = "https://files.pythonhosted.org/packages/17/50/bc0394b4ad5b1601be22fa43652173d47e4c9efbf0044c62e9a59b747c56/pytokens-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b49750419d300e2b5a3813cf229d4e5a4c728dae470bcc89867a9ad6f25a722d", size = 260824, upload-time = "2026-01-30T01:03:01.471Z" }, - { url = "https://files.pythonhosted.org/packages/4e/54/3e04f9d92a4be4fc6c80016bc396b923d2a6933ae94b5f557c939c460ee0/pytokens-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9907d61f15bf7261d7e775bd5d7ee4d2930e04424bab1972591918497623a16", size = 264075, upload-time = "2026-01-30T01:03:04.143Z" }, - { url = "https://files.pythonhosted.org/packages/d1/1b/44b0326cb5470a4375f37988aea5d61b5cc52407143303015ebee94abfd6/pytokens-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:ee44d0f85b803321710f9239f335aafe16553b39106384cef8e6de40cb4ef2f6", size = 103323, upload-time = "2026-01-30T01:03:05.412Z" }, - { url = "https://files.pythonhosted.org/packages/41/5d/e44573011401fb82e9d51e97f1290ceb377800fb4eed650b96f4753b499c/pytokens-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:140709331e846b728475786df8aeb27d24f48cbcf7bcd449f8de75cae7a45083", size = 160663, upload-time = "2026-01-30T01:03:06.473Z" }, - { url = "https://files.pythonhosted.org/packages/f0/e6/5bbc3019f8e6f21d09c41f8b8654536117e5e211a85d89212d59cbdab381/pytokens-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d6c4268598f762bc8e91f5dbf2ab2f61f7b95bdc07953b602db879b3c8c18e1", size = 255626, upload-time = "2026-01-30T01:03:08.177Z" }, - { url = "https://files.pythonhosted.org/packages/bf/3c/2d5297d82286f6f3d92770289fd439956b201c0a4fc7e72efb9b2293758e/pytokens-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24afde1f53d95348b5a0eb19488661147285ca4dd7ed752bbc3e1c6242a304d1", size = 269779, upload-time = "2026-01-30T01:03:09.756Z" }, - { url = "https://files.pythonhosted.org/packages/20/01/7436e9ad693cebda0551203e0bf28f7669976c60ad07d6402098208476de/pytokens-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ad948d085ed6c16413eb5fec6b3e02fa00dc29a2534f088d3302c47eb59adf9", size = 268076, upload-time = "2026-01-30T01:03:10.957Z" }, - { url = "https://files.pythonhosted.org/packages/2e/df/533c82a3c752ba13ae7ef238b7f8cdd272cf1475f03c63ac6cf3fcfb00b6/pytokens-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:3f901fe783e06e48e8cbdc82d631fca8f118333798193e026a50ce1b3757ea68", size = 103552, upload-time = "2026-01-30T01:03:12.066Z" }, - { url = "https://files.pythonhosted.org/packages/cb/dc/08b1a080372afda3cceb4f3c0a7ba2bde9d6a5241f1edb02a22a019ee147/pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b", size = 160720, upload-time = "2026-01-30T01:03:13.843Z" }, - { url = "https://files.pythonhosted.org/packages/64/0c/41ea22205da480837a700e395507e6a24425151dfb7ead73343d6e2d7ffe/pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f", size = 254204, upload-time = "2026-01-30T01:03:14.886Z" }, - { url = "https://files.pythonhosted.org/packages/e0/d2/afe5c7f8607018beb99971489dbb846508f1b8f351fcefc225fcf4b2adc0/pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1", size = 268423, upload-time = "2026-01-30T01:03:15.936Z" }, - { url = "https://files.pythonhosted.org/packages/68/d4/00ffdbd370410c04e9591da9220a68dc1693ef7499173eb3e30d06e05ed1/pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4", size = 266859, upload-time = "2026-01-30T01:03:17.458Z" }, - { url = "https://files.pythonhosted.org/packages/a7/c9/c3161313b4ca0c601eeefabd3d3b576edaa9afdefd32da97210700e47652/pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78", size = 103520, upload-time = "2026-01-30T01:03:18.652Z" }, - { url = "https://files.pythonhosted.org/packages/8f/a7/b470f672e6fc5fee0a01d9e75005a0e617e162381974213a945fcd274843/pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321", size = 160821, upload-time = "2026-01-30T01:03:19.684Z" }, - { url = "https://files.pythonhosted.org/packages/80/98/e83a36fe8d170c911f864bfded690d2542bfcfacb9c649d11a9e6eb9dc41/pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa", size = 254263, upload-time = "2026-01-30T01:03:20.834Z" }, - { url = "https://files.pythonhosted.org/packages/0f/95/70d7041273890f9f97a24234c00b746e8da86df462620194cef1d411ddeb/pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d", size = 268071, upload-time = "2026-01-30T01:03:21.888Z" }, - { url = "https://files.pythonhosted.org/packages/da/79/76e6d09ae19c99404656d7db9c35dfd20f2086f3eb6ecb496b5b31163bad/pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324", size = 271716, upload-time = "2026-01-30T01:03:23.633Z" }, - { url = "https://files.pythonhosted.org/packages/79/37/482e55fa1602e0a7ff012661d8c946bafdc05e480ea5a32f4f7e336d4aa9/pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9", size = 104539, upload-time = "2026-01-30T01:03:24.788Z" }, - { url = "https://files.pythonhosted.org/packages/30/e8/20e7db907c23f3d63b0be3b8a4fd1927f6da2395f5bcc7f72242bb963dfe/pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb", size = 168474, upload-time = "2026-01-30T01:03:26.428Z" }, - { url = "https://files.pythonhosted.org/packages/d6/81/88a95ee9fafdd8f5f3452107748fd04c24930d500b9aba9738f3ade642cc/pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3", size = 290473, upload-time = "2026-01-30T01:03:27.415Z" }, - { url = "https://files.pythonhosted.org/packages/cf/35/3aa899645e29b6375b4aed9f8d21df219e7c958c4c186b465e42ee0a06bf/pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975", size = 303485, upload-time = "2026-01-30T01:03:28.558Z" }, - { url = "https://files.pythonhosted.org/packages/52/a0/07907b6ff512674d9b201859f7d212298c44933633c946703a20c25e9d81/pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a", size = 306698, upload-time = "2026-01-30T01:03:29.653Z" }, - { url = "https://files.pythonhosted.org/packages/39/2a/cbbf9250020a4a8dd53ba83a46c097b69e5eb49dd14e708f496f548c6612/pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918", size = 116287, upload-time = "2026-01-30T01:03:30.912Z" }, - { url = "https://files.pythonhosted.org/packages/c6/78/397db326746f0a342855b81216ae1f0a32965deccfd7c830a2dbc66d2483/pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de", size = 13729, upload-time = "2026-01-30T01:03:45.029Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a44ed93ea23415c54f3face3b65ef2b844d96aeb3455b8a69b3df6beab6acc5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:add8bf86b71a5d9fb5b89f023a80b791e04fba57960aa790cc6125f7f1d39dfe" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:670d286910b531c7b7e3c0b453fd8156f250adb140146d234a82219459b9640c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4e691d7f5186bd2842c14813f79f8884bb03f5995f0575272009982c5ac6c0f7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:27b83ad28825978742beef057bfe406ad6ed524b2d28c252c5de7b4a6dd48fa2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d70e77c55ae8380c91c0c18dea05951482e263982911fc7410b1ffd1dadd3440" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a58d057208cb9075c144950d789511220b07636dd2e4708d5645d24de666bdc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b49750419d300e2b5a3813cf229d4e5a4c728dae470bcc89867a9ad6f25a722d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9907d61f15bf7261d7e775bd5d7ee4d2930e04424bab1972591918497623a16" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:ee44d0f85b803321710f9239f335aafe16553b39106384cef8e6de40cb4ef2f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:140709331e846b728475786df8aeb27d24f48cbcf7bcd449f8de75cae7a45083" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d6c4268598f762bc8e91f5dbf2ab2f61f7b95bdc07953b602db879b3c8c18e1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24afde1f53d95348b5a0eb19488661147285ca4dd7ed752bbc3e1c6242a304d1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ad948d085ed6c16413eb5fec6b3e02fa00dc29a2534f088d3302c47eb59adf9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:3f901fe783e06e48e8cbdc82d631fca8f118333798193e026a50ce1b3757ea68" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pytokens/pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de" }, ] [[package]] name = "pyyaml" version = "6.0.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, - { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, - { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, - { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, - { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, - { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, - { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, - { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, - { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, - { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, - { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, - { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, - { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, - { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, - { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, - { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, - { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, - { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, - { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, - { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, - { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, - { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, - { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, - { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, - { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, - { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, - { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, - { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, - { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, - { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, - { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, - { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, - { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, - { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, - { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, - { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, - { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, - { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, - { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, - { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, - { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, - { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, - { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, - { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, - { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, - { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, - { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, - { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, - { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, - { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, - { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, - { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, - { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, - { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, - { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, - { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/pyyaml/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b" }, ] [[package]] name = "referencing" version = "0.37.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "attrs" }, - { name = "rpds-py", version = "0.30.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, - { name = "rpds-py", version = "2026.6.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "rpds-py", version = "0.30.0", source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" }, marker = "python_full_version < '3.11'" }, + { name = "rpds-py", version = "2026.6.3", source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" }, marker = "python_full_version >= '3.11'" }, { name = "typing-extensions", marker = "python_full_version < '3.13'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/22/f5/df4e9027acead3ecc63e50fe1e36aca1523e1719559c499951bb4b53188f/referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8", size = 78036, upload-time = "2025-10-13T15:30:48.871Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/referencing/referencing-0.37.0.tar.gz", hash = "sha256:44aefc3142c5b842538163acb373e24cce6632bd54bdb01b21ad5863489f50d8" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", size = 26766, upload-time = "2025-10-13T15:30:47.625Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/referencing/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231" }, ] [[package]] name = "requests" version = "2.34.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "certifi" }, { name = "charset-normalizer" }, { name = "idna" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/requests/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/requests/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0" }, ] [[package]] name = "rpds-py" version = "0.30.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } resolution-markers = [ "python_full_version < '3.11'", ] -sdist = { url = "https://files.pythonhosted.org/packages/20/af/3f2f423103f1113b36230496629986e0ef7e199d2aa8392452b484b38ced/rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84", size = 69469, upload-time = "2025-11-30T20:24:38.837Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/06/0c/0c411a0ec64ccb6d104dcabe0e713e05e153a9a2c3c2bd2b32ce412166fe/rpds_py-0.30.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:679ae98e00c0e8d68a7fda324e16b90fd5260945b45d3b824c892cec9eea3288", size = 370490, upload-time = "2025-11-30T20:21:33.256Z" }, - { url = "https://files.pythonhosted.org/packages/19/6a/4ba3d0fb7297ebae71171822554abe48d7cab29c28b8f9f2c04b79988c05/rpds_py-0.30.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4cc2206b76b4f576934f0ed374b10d7ca5f457858b157ca52064bdfc26b9fc00", size = 359751, upload-time = "2025-11-30T20:21:34.591Z" }, - { url = "https://files.pythonhosted.org/packages/cd/7c/e4933565ef7f7a0818985d87c15d9d273f1a649afa6a52ea35ad011195ea/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:389a2d49eded1896c3d48b0136ead37c48e221b391c052fba3f4055c367f60a6", size = 389696, upload-time = "2025-11-30T20:21:36.122Z" }, - { url = "https://files.pythonhosted.org/packages/5e/01/6271a2511ad0815f00f7ed4390cf2567bec1d4b1da39e2c27a41e6e3b4de/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:32c8528634e1bf7121f3de08fa85b138f4e0dc47657866630611b03967f041d7", size = 403136, upload-time = "2025-11-30T20:21:37.728Z" }, - { url = "https://files.pythonhosted.org/packages/55/64/c857eb7cd7541e9b4eee9d49c196e833128a55b89a9850a9c9ac33ccf897/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f207f69853edd6f6700b86efb84999651baf3789e78a466431df1331608e5324", size = 524699, upload-time = "2025-11-30T20:21:38.92Z" }, - { url = "https://files.pythonhosted.org/packages/9c/ed/94816543404078af9ab26159c44f9e98e20fe47e2126d5d32c9d9948d10a/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67b02ec25ba7a9e8fa74c63b6ca44cf5707f2fbfadae3ee8e7494297d56aa9df", size = 412022, upload-time = "2025-11-30T20:21:40.407Z" }, - { url = "https://files.pythonhosted.org/packages/61/b5/707f6cf0066a6412aacc11d17920ea2e19e5b2f04081c64526eb35b5c6e7/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0e95f6819a19965ff420f65578bacb0b00f251fefe2c8b23347c37174271f3", size = 390522, upload-time = "2025-11-30T20:21:42.17Z" }, - { url = "https://files.pythonhosted.org/packages/13/4e/57a85fda37a229ff4226f8cbcf09f2a455d1ed20e802ce5b2b4a7f5ed053/rpds_py-0.30.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:a452763cc5198f2f98898eb98f7569649fe5da666c2dc6b5ddb10fde5a574221", size = 404579, upload-time = "2025-11-30T20:21:43.769Z" }, - { url = "https://files.pythonhosted.org/packages/f9/da/c9339293513ec680a721e0e16bf2bac3db6e5d7e922488de471308349bba/rpds_py-0.30.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e0b65193a413ccc930671c55153a03ee57cecb49e6227204b04fae512eb657a7", size = 421305, upload-time = "2025-11-30T20:21:44.994Z" }, - { url = "https://files.pythonhosted.org/packages/f9/be/522cb84751114f4ad9d822ff5a1aa3c98006341895d5f084779b99596e5c/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:858738e9c32147f78b3ac24dc0edb6610000e56dc0f700fd5f651d0a0f0eb9ff", size = 572503, upload-time = "2025-11-30T20:21:46.91Z" }, - { url = "https://files.pythonhosted.org/packages/a2/9b/de879f7e7ceddc973ea6e4629e9b380213a6938a249e94b0cdbcc325bb66/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:da279aa314f00acbb803da1e76fa18666778e8a8f83484fba94526da5de2cba7", size = 598322, upload-time = "2025-11-30T20:21:48.709Z" }, - { url = "https://files.pythonhosted.org/packages/48/ac/f01fc22efec3f37d8a914fc1b2fb9bcafd56a299edbe96406f3053edea5a/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7c64d38fb49b6cdeda16ab49e35fe0da2e1e9b34bc38bd78386530f218b37139", size = 560792, upload-time = "2025-11-30T20:21:50.024Z" }, - { url = "https://files.pythonhosted.org/packages/e2/da/4e2b19d0f131f35b6146425f846563d0ce036763e38913d917187307a671/rpds_py-0.30.0-cp310-cp310-win32.whl", hash = "sha256:6de2a32a1665b93233cde140ff8b3467bdb9e2af2b91079f0333a0974d12d464", size = 221901, upload-time = "2025-11-30T20:21:51.32Z" }, - { url = "https://files.pythonhosted.org/packages/96/cb/156d7a5cf4f78a7cc571465d8aec7a3c447c94f6749c5123f08438bcf7bc/rpds_py-0.30.0-cp310-cp310-win_amd64.whl", hash = "sha256:1726859cd0de969f88dc8673bdd954185b9104e05806be64bcd87badbe313169", size = 235823, upload-time = "2025-11-30T20:21:52.505Z" }, - { url = "https://files.pythonhosted.org/packages/4d/6e/f964e88b3d2abee2a82c1ac8366da848fce1c6d834dc2132c3fda3970290/rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425", size = 370157, upload-time = "2025-11-30T20:21:53.789Z" }, - { url = "https://files.pythonhosted.org/packages/94/ba/24e5ebb7c1c82e74c4e4f33b2112a5573ddc703915b13a073737b59b86e0/rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d", size = 359676, upload-time = "2025-11-30T20:21:55.475Z" }, - { url = "https://files.pythonhosted.org/packages/84/86/04dbba1b087227747d64d80c3b74df946b986c57af0a9f0c98726d4d7a3b/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4", size = 389938, upload-time = "2025-11-30T20:21:57.079Z" }, - { url = "https://files.pythonhosted.org/packages/42/bb/1463f0b1722b7f45431bdd468301991d1328b16cffe0b1c2918eba2c4eee/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f", size = 402932, upload-time = "2025-11-30T20:21:58.47Z" }, - { url = "https://files.pythonhosted.org/packages/99/ee/2520700a5c1f2d76631f948b0736cdf9b0acb25abd0ca8e889b5c62ac2e3/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4", size = 525830, upload-time = "2025-11-30T20:21:59.699Z" }, - { url = "https://files.pythonhosted.org/packages/e0/ad/bd0331f740f5705cc555a5e17fdf334671262160270962e69a2bdef3bf76/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97", size = 412033, upload-time = "2025-11-30T20:22:00.991Z" }, - { url = "https://files.pythonhosted.org/packages/f8/1e/372195d326549bb51f0ba0f2ecb9874579906b97e08880e7a65c3bef1a99/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89", size = 390828, upload-time = "2025-11-30T20:22:02.723Z" }, - { url = "https://files.pythonhosted.org/packages/ab/2b/d88bb33294e3e0c76bc8f351a3721212713629ffca1700fa94979cb3eae8/rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d", size = 404683, upload-time = "2025-11-30T20:22:04.367Z" }, - { url = "https://files.pythonhosted.org/packages/50/32/c759a8d42bcb5289c1fac697cd92f6fe01a018dd937e62ae77e0e7f15702/rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038", size = 421583, upload-time = "2025-11-30T20:22:05.814Z" }, - { url = "https://files.pythonhosted.org/packages/2b/81/e729761dbd55ddf5d84ec4ff1f47857f4374b0f19bdabfcf929164da3e24/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7", size = 572496, upload-time = "2025-11-30T20:22:07.713Z" }, - { url = "https://files.pythonhosted.org/packages/14/f6/69066a924c3557c9c30baa6ec3a0aa07526305684c6f86c696b08860726c/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed", size = 598669, upload-time = "2025-11-30T20:22:09.312Z" }, - { url = "https://files.pythonhosted.org/packages/5f/48/905896b1eb8a05630d20333d1d8ffd162394127b74ce0b0784ae04498d32/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85", size = 561011, upload-time = "2025-11-30T20:22:11.309Z" }, - { url = "https://files.pythonhosted.org/packages/22/16/cd3027c7e279d22e5eb431dd3c0fbc677bed58797fe7581e148f3f68818b/rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c", size = 221406, upload-time = "2025-11-30T20:22:13.101Z" }, - { url = "https://files.pythonhosted.org/packages/fa/5b/e7b7aa136f28462b344e652ee010d4de26ee9fd16f1bfd5811f5153ccf89/rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825", size = 236024, upload-time = "2025-11-30T20:22:14.853Z" }, - { url = "https://files.pythonhosted.org/packages/14/a6/364bba985e4c13658edb156640608f2c9e1d3ea3c81b27aa9d889fff0e31/rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229", size = 229069, upload-time = "2025-11-30T20:22:16.577Z" }, - { url = "https://files.pythonhosted.org/packages/03/e7/98a2f4ac921d82f33e03f3835f5bf3a4a40aa1bfdc57975e74a97b2b4bdd/rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad", size = 375086, upload-time = "2025-11-30T20:22:17.93Z" }, - { url = "https://files.pythonhosted.org/packages/4d/a1/bca7fd3d452b272e13335db8d6b0b3ecde0f90ad6f16f3328c6fb150c889/rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05", size = 359053, upload-time = "2025-11-30T20:22:19.297Z" }, - { url = "https://files.pythonhosted.org/packages/65/1c/ae157e83a6357eceff62ba7e52113e3ec4834a84cfe07fa4b0757a7d105f/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28", size = 390763, upload-time = "2025-11-30T20:22:21.661Z" }, - { url = "https://files.pythonhosted.org/packages/d4/36/eb2eb8515e2ad24c0bd43c3ee9cd74c33f7ca6430755ccdb240fd3144c44/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1010ed9524c73b94d15919ca4d41d8780980e1765babf85f9a2f90d247153dd", size = 408951, upload-time = "2025-11-30T20:22:23.408Z" }, - { url = "https://files.pythonhosted.org/packages/d6/65/ad8dc1784a331fabbd740ef6f71ce2198c7ed0890dab595adb9ea2d775a1/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d1736cfb49381ba528cd5baa46f82fdc65c06e843dab24dd70b63d09121b3f", size = 514622, upload-time = "2025-11-30T20:22:25.16Z" }, - { url = "https://files.pythonhosted.org/packages/63/8e/0cfa7ae158e15e143fe03993b5bcd743a59f541f5952e1546b1ac1b5fd45/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d948b135c4693daff7bc2dcfc4ec57237a29bd37e60c2fabf5aff2bbacf3e2f1", size = 414492, upload-time = "2025-11-30T20:22:26.505Z" }, - { url = "https://files.pythonhosted.org/packages/60/1b/6f8f29f3f995c7ffdde46a626ddccd7c63aefc0efae881dc13b6e5d5bb16/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47f236970bccb2233267d89173d3ad2703cd36a0e2a6e92d0560d333871a3d23", size = 394080, upload-time = "2025-11-30T20:22:27.934Z" }, - { url = "https://files.pythonhosted.org/packages/6d/d5/a266341051a7a3ca2f4b750a3aa4abc986378431fc2da508c5034d081b70/rpds_py-0.30.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:2e6ecb5a5bcacf59c3f912155044479af1d0b6681280048b338b28e364aca1f6", size = 408680, upload-time = "2025-11-30T20:22:29.341Z" }, - { url = "https://files.pythonhosted.org/packages/10/3b/71b725851df9ab7a7a4e33cf36d241933da66040d195a84781f49c50490c/rpds_py-0.30.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a8fa71a2e078c527c3e9dc9fc5a98c9db40bcc8a92b4e8858e36d329f8684b51", size = 423589, upload-time = "2025-11-30T20:22:31.469Z" }, - { url = "https://files.pythonhosted.org/packages/00/2b/e59e58c544dc9bd8bd8384ecdb8ea91f6727f0e37a7131baeff8d6f51661/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73c67f2db7bc334e518d097c6d1e6fed021bbc9b7d678d6cc433478365d1d5f5", size = 573289, upload-time = "2025-11-30T20:22:32.997Z" }, - { url = "https://files.pythonhosted.org/packages/da/3e/a18e6f5b460893172a7d6a680e86d3b6bc87a54c1f0b03446a3c8c7b588f/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba103fb455be00f3b1c2076c9d4264bfcb037c976167a6047ed82f23153f02e", size = 599737, upload-time = "2025-11-30T20:22:34.419Z" }, - { url = "https://files.pythonhosted.org/packages/5c/e2/714694e4b87b85a18e2c243614974413c60aa107fd815b8cbc42b873d1d7/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7cee9c752c0364588353e627da8a7e808a66873672bcb5f52890c33fd965b394", size = 563120, upload-time = "2025-11-30T20:22:35.903Z" }, - { url = "https://files.pythonhosted.org/packages/6f/ab/d5d5e3bcedb0a77f4f613706b750e50a5a3ba1c15ccd3665ecc636c968fd/rpds_py-0.30.0-cp312-cp312-win32.whl", hash = "sha256:1ab5b83dbcf55acc8b08fc62b796ef672c457b17dbd7820a11d6c52c06839bdf", size = 223782, upload-time = "2025-11-30T20:22:37.271Z" }, - { url = "https://files.pythonhosted.org/packages/39/3b/f786af9957306fdc38a74cef405b7b93180f481fb48453a114bb6465744a/rpds_py-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:a090322ca841abd453d43456ac34db46e8b05fd9b3b4ac0c78bcde8b089f959b", size = 240463, upload-time = "2025-11-30T20:22:39.021Z" }, - { url = "https://files.pythonhosted.org/packages/f3/d2/b91dc748126c1559042cfe41990deb92c4ee3e2b415f6b5234969ffaf0cc/rpds_py-0.30.0-cp312-cp312-win_arm64.whl", hash = "sha256:669b1805bd639dd2989b281be2cfd951c6121b65e729d9b843e9639ef1fd555e", size = 230868, upload-time = "2025-11-30T20:22:40.493Z" }, - { url = "https://files.pythonhosted.org/packages/ed/dc/d61221eb88ff410de3c49143407f6f3147acf2538c86f2ab7ce65ae7d5f9/rpds_py-0.30.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f83424d738204d9770830d35290ff3273fbb02b41f919870479fab14b9d303b2", size = 374887, upload-time = "2025-11-30T20:22:41.812Z" }, - { url = "https://files.pythonhosted.org/packages/fd/32/55fb50ae104061dbc564ef15cc43c013dc4a9f4527a1f4d99baddf56fe5f/rpds_py-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e7536cd91353c5273434b4e003cbda89034d67e7710eab8761fd918ec6c69cf8", size = 358904, upload-time = "2025-11-30T20:22:43.479Z" }, - { url = "https://files.pythonhosted.org/packages/58/70/faed8186300e3b9bdd138d0273109784eea2396c68458ed580f885dfe7ad/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2771c6c15973347f50fece41fc447c054b7ac2ae0502388ce3b6738cd366e3d4", size = 389945, upload-time = "2025-11-30T20:22:44.819Z" }, - { url = "https://files.pythonhosted.org/packages/bd/a8/073cac3ed2c6387df38f71296d002ab43496a96b92c823e76f46b8af0543/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0a59119fc6e3f460315fe9d08149f8102aa322299deaa5cab5b40092345c2136", size = 407783, upload-time = "2025-11-30T20:22:46.103Z" }, - { url = "https://files.pythonhosted.org/packages/77/57/5999eb8c58671f1c11eba084115e77a8899d6e694d2a18f69f0ba471ec8b/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76fec018282b4ead0364022e3c54b60bf368b9d926877957a8624b58419169b7", size = 515021, upload-time = "2025-11-30T20:22:47.458Z" }, - { url = "https://files.pythonhosted.org/packages/e0/af/5ab4833eadc36c0a8ed2bc5c0de0493c04f6c06de223170bd0798ff98ced/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bef75a5525db97318e8cd061542b5a79812d711ea03dbc1f6f8dbb0c5f0d2", size = 414589, upload-time = "2025-11-30T20:22:48.872Z" }, - { url = "https://files.pythonhosted.org/packages/b7/de/f7192e12b21b9e9a68a6d0f249b4af3fdcdff8418be0767a627564afa1f1/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9027da1ce107104c50c81383cae773ef5c24d296dd11c99e2629dbd7967a20c6", size = 394025, upload-time = "2025-11-30T20:22:50.196Z" }, - { url = "https://files.pythonhosted.org/packages/91/c4/fc70cd0249496493500e7cc2de87504f5aa6509de1e88623431fec76d4b6/rpds_py-0.30.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:9cf69cdda1f5968a30a359aba2f7f9aa648a9ce4b580d6826437f2b291cfc86e", size = 408895, upload-time = "2025-11-30T20:22:51.87Z" }, - { url = "https://files.pythonhosted.org/packages/58/95/d9275b05ab96556fefff73a385813eb66032e4c99f411d0795372d9abcea/rpds_py-0.30.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4796a717bf12b9da9d3ad002519a86063dcac8988b030e405704ef7d74d2d9d", size = 422799, upload-time = "2025-11-30T20:22:53.341Z" }, - { url = "https://files.pythonhosted.org/packages/06/c1/3088fc04b6624eb12a57eb814f0d4997a44b0d208d6cace713033ff1a6ba/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5d4c2aa7c50ad4728a094ebd5eb46c452e9cb7edbfdb18f9e1221f597a73e1e7", size = 572731, upload-time = "2025-11-30T20:22:54.778Z" }, - { url = "https://files.pythonhosted.org/packages/d8/42/c612a833183b39774e8ac8fecae81263a68b9583ee343db33ab571a7ce55/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ba81a9203d07805435eb06f536d95a266c21e5b2dfbf6517748ca40c98d19e31", size = 599027, upload-time = "2025-11-30T20:22:56.212Z" }, - { url = "https://files.pythonhosted.org/packages/5f/60/525a50f45b01d70005403ae0e25f43c0384369ad24ffe46e8d9068b50086/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:945dccface01af02675628334f7cf49c2af4c1c904748efc5cf7bbdf0b579f95", size = 563020, upload-time = "2025-11-30T20:22:58.2Z" }, - { url = "https://files.pythonhosted.org/packages/0b/5d/47c4655e9bcd5ca907148535c10e7d489044243cc9941c16ed7cd53be91d/rpds_py-0.30.0-cp313-cp313-win32.whl", hash = "sha256:b40fb160a2db369a194cb27943582b38f79fc4887291417685f3ad693c5a1d5d", size = 223139, upload-time = "2025-11-30T20:23:00.209Z" }, - { url = "https://files.pythonhosted.org/packages/f2/e1/485132437d20aa4d3e1d8b3fb5a5e65aa8139f1e097080c2a8443201742c/rpds_py-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:806f36b1b605e2d6a72716f321f20036b9489d29c51c91f4dd29a3e3afb73b15", size = 240224, upload-time = "2025-11-30T20:23:02.008Z" }, - { url = "https://files.pythonhosted.org/packages/24/95/ffd128ed1146a153d928617b0ef673960130be0009c77d8fbf0abe306713/rpds_py-0.30.0-cp313-cp313-win_arm64.whl", hash = "sha256:d96c2086587c7c30d44f31f42eae4eac89b60dabbac18c7669be3700f13c3ce1", size = 230645, upload-time = "2025-11-30T20:23:03.43Z" }, - { url = "https://files.pythonhosted.org/packages/ff/1b/b10de890a0def2a319a2626334a7f0ae388215eb60914dbac8a3bae54435/rpds_py-0.30.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:eb0b93f2e5c2189ee831ee43f156ed34e2a89a78a66b98cadad955972548be5a", size = 364443, upload-time = "2025-11-30T20:23:04.878Z" }, - { url = "https://files.pythonhosted.org/packages/0d/bf/27e39f5971dc4f305a4fb9c672ca06f290f7c4e261c568f3dea16a410d47/rpds_py-0.30.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:922e10f31f303c7c920da8981051ff6d8c1a56207dbdf330d9047f6d30b70e5e", size = 353375, upload-time = "2025-11-30T20:23:06.342Z" }, - { url = "https://files.pythonhosted.org/packages/40/58/442ada3bba6e8e6615fc00483135c14a7538d2ffac30e2d933ccf6852232/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdc62c8286ba9bf7f47befdcea13ea0e26bf294bda99758fd90535cbaf408000", size = 383850, upload-time = "2025-11-30T20:23:07.825Z" }, - { url = "https://files.pythonhosted.org/packages/14/14/f59b0127409a33c6ef6f5c1ebd5ad8e32d7861c9c7adfa9a624fc3889f6c/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47f9a91efc418b54fb8190a6b4aa7813a23fb79c51f4bb84e418f5476c38b8db", size = 392812, upload-time = "2025-11-30T20:23:09.228Z" }, - { url = "https://files.pythonhosted.org/packages/b3/66/e0be3e162ac299b3a22527e8913767d869e6cc75c46bd844aa43fb81ab62/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f3587eb9b17f3789ad50824084fa6f81921bbf9a795826570bda82cb3ed91f2", size = 517841, upload-time = "2025-11-30T20:23:11.186Z" }, - { url = "https://files.pythonhosted.org/packages/3d/55/fa3b9cf31d0c963ecf1ba777f7cf4b2a2c976795ac430d24a1f43d25a6ba/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39c02563fc592411c2c61d26b6c5fe1e51eaa44a75aa2c8735ca88b0d9599daa", size = 408149, upload-time = "2025-11-30T20:23:12.864Z" }, - { url = "https://files.pythonhosted.org/packages/60/ca/780cf3b1a32b18c0f05c441958d3758f02544f1d613abf9488cd78876378/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51a1234d8febafdfd33a42d97da7a43f5dcb120c1060e352a3fbc0c6d36e2083", size = 383843, upload-time = "2025-11-30T20:23:14.638Z" }, - { url = "https://files.pythonhosted.org/packages/82/86/d5f2e04f2aa6247c613da0c1dd87fcd08fa17107e858193566048a1e2f0a/rpds_py-0.30.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:eb2c4071ab598733724c08221091e8d80e89064cd472819285a9ab0f24bcedb9", size = 396507, upload-time = "2025-11-30T20:23:16.105Z" }, - { url = "https://files.pythonhosted.org/packages/4b/9a/453255d2f769fe44e07ea9785c8347edaf867f7026872e76c1ad9f7bed92/rpds_py-0.30.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6bdfdb946967d816e6adf9a3d8201bfad269c67efe6cefd7093ef959683c8de0", size = 414949, upload-time = "2025-11-30T20:23:17.539Z" }, - { url = "https://files.pythonhosted.org/packages/a3/31/622a86cdc0c45d6df0e9ccb6becdba5074735e7033c20e401a6d9d0e2ca0/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c77afbd5f5250bf27bf516c7c4a016813eb2d3e116139aed0096940c5982da94", size = 565790, upload-time = "2025-11-30T20:23:19.029Z" }, - { url = "https://files.pythonhosted.org/packages/1c/5d/15bbf0fb4a3f58a3b1c67855ec1efcc4ceaef4e86644665fff03e1b66d8d/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:61046904275472a76c8c90c9ccee9013d70a6d0f73eecefd38c1ae7c39045a08", size = 590217, upload-time = "2025-11-30T20:23:20.885Z" }, - { url = "https://files.pythonhosted.org/packages/6d/61/21b8c41f68e60c8cc3b2e25644f0e3681926020f11d06ab0b78e3c6bbff1/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c5f36a861bc4b7da6516dbdf302c55313afa09b81931e8280361a4f6c9a2d27", size = 555806, upload-time = "2025-11-30T20:23:22.488Z" }, - { url = "https://files.pythonhosted.org/packages/f9/39/7e067bb06c31de48de3eb200f9fc7c58982a4d3db44b07e73963e10d3be9/rpds_py-0.30.0-cp313-cp313t-win32.whl", hash = "sha256:3d4a69de7a3e50ffc214ae16d79d8fbb0922972da0356dcf4d0fdca2878559c6", size = 211341, upload-time = "2025-11-30T20:23:24.449Z" }, - { url = "https://files.pythonhosted.org/packages/0a/4d/222ef0b46443cf4cf46764d9c630f3fe4abaa7245be9417e56e9f52b8f65/rpds_py-0.30.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f14fc5df50a716f7ece6a80b6c78bb35ea2ca47c499e422aa4463455dd96d56d", size = 225768, upload-time = "2025-11-30T20:23:25.908Z" }, - { url = "https://files.pythonhosted.org/packages/86/81/dad16382ebbd3d0e0328776d8fd7ca94220e4fa0798d1dc5e7da48cb3201/rpds_py-0.30.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:68f19c879420aa08f61203801423f6cd5ac5f0ac4ac82a2368a9fcd6a9a075e0", size = 362099, upload-time = "2025-11-30T20:23:27.316Z" }, - { url = "https://files.pythonhosted.org/packages/2b/60/19f7884db5d5603edf3c6bce35408f45ad3e97e10007df0e17dd57af18f8/rpds_py-0.30.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ec7c4490c672c1a0389d319b3a9cfcd098dcdc4783991553c332a15acf7249be", size = 353192, upload-time = "2025-11-30T20:23:29.151Z" }, - { url = "https://files.pythonhosted.org/packages/bf/c4/76eb0e1e72d1a9c4703c69607cec123c29028bff28ce41588792417098ac/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f251c812357a3fed308d684a5079ddfb9d933860fc6de89f2b7ab00da481e65f", size = 384080, upload-time = "2025-11-30T20:23:30.785Z" }, - { url = "https://files.pythonhosted.org/packages/72/87/87ea665e92f3298d1b26d78814721dc39ed8d2c74b86e83348d6b48a6f31/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac98b175585ecf4c0348fd7b29c3864bda53b805c773cbf7bfdaffc8070c976f", size = 394841, upload-time = "2025-11-30T20:23:32.209Z" }, - { url = "https://files.pythonhosted.org/packages/77/ad/7783a89ca0587c15dcbf139b4a8364a872a25f861bdb88ed99f9b0dec985/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e62880792319dbeb7eb866547f2e35973289e7d5696c6e295476448f5b63c87", size = 516670, upload-time = "2025-11-30T20:23:33.742Z" }, - { url = "https://files.pythonhosted.org/packages/5b/3c/2882bdac942bd2172f3da574eab16f309ae10a3925644e969536553cb4ee/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e7fc54e0900ab35d041b0601431b0a0eb495f0851a0639b6ef90f7741b39a18", size = 408005, upload-time = "2025-11-30T20:23:35.253Z" }, - { url = "https://files.pythonhosted.org/packages/ce/81/9a91c0111ce1758c92516a3e44776920b579d9a7c09b2b06b642d4de3f0f/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47e77dc9822d3ad616c3d5759ea5631a75e5809d5a28707744ef79d7a1bcfcad", size = 382112, upload-time = "2025-11-30T20:23:36.842Z" }, - { url = "https://files.pythonhosted.org/packages/cf/8e/1da49d4a107027e5fbc64daeab96a0706361a2918da10cb41769244b805d/rpds_py-0.30.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:b4dc1a6ff022ff85ecafef7979a2c6eb423430e05f1165d6688234e62ba99a07", size = 399049, upload-time = "2025-11-30T20:23:38.343Z" }, - { url = "https://files.pythonhosted.org/packages/df/5a/7ee239b1aa48a127570ec03becbb29c9d5a9eb092febbd1699d567cae859/rpds_py-0.30.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4559c972db3a360808309e06a74628b95eaccbf961c335c8fe0d590cf587456f", size = 415661, upload-time = "2025-11-30T20:23:40.263Z" }, - { url = "https://files.pythonhosted.org/packages/70/ea/caa143cf6b772f823bc7929a45da1fa83569ee49b11d18d0ada7f5ee6fd6/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0ed177ed9bded28f8deb6ab40c183cd1192aa0de40c12f38be4d59cd33cb5c65", size = 565606, upload-time = "2025-11-30T20:23:42.186Z" }, - { url = "https://files.pythonhosted.org/packages/64/91/ac20ba2d69303f961ad8cf55bf7dbdb4763f627291ba3d0d7d67333cced9/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ad1fa8db769b76ea911cb4e10f049d80bf518c104f15b3edb2371cc65375c46f", size = 591126, upload-time = "2025-11-30T20:23:44.086Z" }, - { url = "https://files.pythonhosted.org/packages/21/20/7ff5f3c8b00c8a95f75985128c26ba44503fb35b8e0259d812766ea966c7/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:46e83c697b1f1c72b50e5ee5adb4353eef7406fb3f2043d64c33f20ad1c2fc53", size = 553371, upload-time = "2025-11-30T20:23:46.004Z" }, - { url = "https://files.pythonhosted.org/packages/72/c7/81dadd7b27c8ee391c132a6b192111ca58d866577ce2d9b0ca157552cce0/rpds_py-0.30.0-cp314-cp314-win32.whl", hash = "sha256:ee454b2a007d57363c2dfd5b6ca4a5d7e2c518938f8ed3b706e37e5d470801ed", size = 215298, upload-time = "2025-11-30T20:23:47.696Z" }, - { url = "https://files.pythonhosted.org/packages/3e/d2/1aaac33287e8cfb07aab2e6b8ac1deca62f6f65411344f1433c55e6f3eb8/rpds_py-0.30.0-cp314-cp314-win_amd64.whl", hash = "sha256:95f0802447ac2d10bcc69f6dc28fe95fdf17940367b21d34e34c737870758950", size = 228604, upload-time = "2025-11-30T20:23:49.501Z" }, - { url = "https://files.pythonhosted.org/packages/e8/95/ab005315818cc519ad074cb7784dae60d939163108bd2b394e60dc7b5461/rpds_py-0.30.0-cp314-cp314-win_arm64.whl", hash = "sha256:613aa4771c99f03346e54c3f038e4cc574ac09a3ddfb0e8878487335e96dead6", size = 222391, upload-time = "2025-11-30T20:23:50.96Z" }, - { url = "https://files.pythonhosted.org/packages/9e/68/154fe0194d83b973cdedcdcc88947a2752411165930182ae41d983dcefa6/rpds_py-0.30.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7e6ecfcb62edfd632e56983964e6884851786443739dbfe3582947e87274f7cb", size = 364868, upload-time = "2025-11-30T20:23:52.494Z" }, - { url = "https://files.pythonhosted.org/packages/83/69/8bbc8b07ec854d92a8b75668c24d2abcb1719ebf890f5604c61c9369a16f/rpds_py-0.30.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a1d0bc22a7cdc173fedebb73ef81e07faef93692b8c1ad3733b67e31e1b6e1b8", size = 353747, upload-time = "2025-11-30T20:23:54.036Z" }, - { url = "https://files.pythonhosted.org/packages/ab/00/ba2e50183dbd9abcce9497fa5149c62b4ff3e22d338a30d690f9af970561/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d08f00679177226c4cb8c5265012eea897c8ca3b93f429e546600c971bcbae7", size = 383795, upload-time = "2025-11-30T20:23:55.556Z" }, - { url = "https://files.pythonhosted.org/packages/05/6f/86f0272b84926bcb0e4c972262f54223e8ecc556b3224d281e6598fc9268/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5965af57d5848192c13534f90f9dd16464f3c37aaf166cc1da1cae1fd5a34898", size = 393330, upload-time = "2025-11-30T20:23:57.033Z" }, - { url = "https://files.pythonhosted.org/packages/cb/e9/0e02bb2e6dc63d212641da45df2b0bf29699d01715913e0d0f017ee29438/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a4e86e34e9ab6b667c27f3211ca48f73dba7cd3d90f8d5b11be56e5dbc3fb4e", size = 518194, upload-time = "2025-11-30T20:23:58.637Z" }, - { url = "https://files.pythonhosted.org/packages/ee/ca/be7bca14cf21513bdf9c0606aba17d1f389ea2b6987035eb4f62bd923f25/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d3e6b26f2c785d65cc25ef1e5267ccbe1b069c5c21b8cc724efee290554419", size = 408340, upload-time = "2025-11-30T20:24:00.2Z" }, - { url = "https://files.pythonhosted.org/packages/c2/c7/736e00ebf39ed81d75544c0da6ef7b0998f8201b369acf842f9a90dc8fce/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626a7433c34566535b6e56a1b39a7b17ba961e97ce3b80ec62e6f1312c025551", size = 383765, upload-time = "2025-11-30T20:24:01.759Z" }, - { url = "https://files.pythonhosted.org/packages/4a/3f/da50dfde9956aaf365c4adc9533b100008ed31aea635f2b8d7b627e25b49/rpds_py-0.30.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:acd7eb3f4471577b9b5a41baf02a978e8bdeb08b4b355273994f8b87032000a8", size = 396834, upload-time = "2025-11-30T20:24:03.687Z" }, - { url = "https://files.pythonhosted.org/packages/4e/00/34bcc2565b6020eab2623349efbdec810676ad571995911f1abdae62a3a0/rpds_py-0.30.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe5fa731a1fa8a0a56b0977413f8cacac1768dad38d16b3a296712709476fbd5", size = 415470, upload-time = "2025-11-30T20:24:05.232Z" }, - { url = "https://files.pythonhosted.org/packages/8c/28/882e72b5b3e6f718d5453bd4d0d9cf8df36fddeb4ddbbab17869d5868616/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:74a3243a411126362712ee1524dfc90c650a503502f135d54d1b352bd01f2404", size = 565630, upload-time = "2025-11-30T20:24:06.878Z" }, - { url = "https://files.pythonhosted.org/packages/3b/97/04a65539c17692de5b85c6e293520fd01317fd878ea1995f0367d4532fb1/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3e8eeb0544f2eb0d2581774be4c3410356eba189529a6b3e36bbbf9696175856", size = 591148, upload-time = "2025-11-30T20:24:08.445Z" }, - { url = "https://files.pythonhosted.org/packages/85/70/92482ccffb96f5441aab93e26c4d66489eb599efdcf96fad90c14bbfb976/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40", size = 556030, upload-time = "2025-11-30T20:24:10.956Z" }, - { url = "https://files.pythonhosted.org/packages/20/53/7c7e784abfa500a2b6b583b147ee4bb5a2b3747a9166bab52fec4b5b5e7d/rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0", size = 211570, upload-time = "2025-11-30T20:24:12.735Z" }, - { url = "https://files.pythonhosted.org/packages/d0/02/fa464cdfbe6b26e0600b62c528b72d8608f5cc49f96b8d6e38c95d60c676/rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3", size = 226532, upload-time = "2025-11-30T20:24:14.634Z" }, - { url = "https://files.pythonhosted.org/packages/69/71/3f34339ee70521864411f8b6992e7ab13ac30d8e4e3309e07c7361767d91/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58", size = 372292, upload-time = "2025-11-30T20:24:16.537Z" }, - { url = "https://files.pythonhosted.org/packages/57/09/f183df9b8f2d66720d2ef71075c59f7e1b336bec7ee4c48f0a2b06857653/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a", size = 362128, upload-time = "2025-11-30T20:24:18.086Z" }, - { url = "https://files.pythonhosted.org/packages/7a/68/5c2594e937253457342e078f0cc1ded3dd7b2ad59afdbf2d354869110a02/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb", size = 391542, upload-time = "2025-11-30T20:24:20.092Z" }, - { url = "https://files.pythonhosted.org/packages/49/5c/31ef1afd70b4b4fbdb2800249f34c57c64beb687495b10aec0365f53dfc4/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c", size = 404004, upload-time = "2025-11-30T20:24:22.231Z" }, - { url = "https://files.pythonhosted.org/packages/e3/63/0cfbea38d05756f3440ce6534d51a491d26176ac045e2707adc99bb6e60a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3", size = 527063, upload-time = "2025-11-30T20:24:24.302Z" }, - { url = "https://files.pythonhosted.org/packages/42/e6/01e1f72a2456678b0f618fc9a1a13f882061690893c192fcad9f2926553a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5", size = 413099, upload-time = "2025-11-30T20:24:25.916Z" }, - { url = "https://files.pythonhosted.org/packages/b8/25/8df56677f209003dcbb180765520c544525e3ef21ea72279c98b9aa7c7fb/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738", size = 392177, upload-time = "2025-11-30T20:24:27.834Z" }, - { url = "https://files.pythonhosted.org/packages/4a/b4/0a771378c5f16f8115f796d1f437950158679bcd2a7c68cf251cfb00ed5b/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f", size = 406015, upload-time = "2025-11-30T20:24:29.457Z" }, - { url = "https://files.pythonhosted.org/packages/36/d8/456dbba0af75049dc6f63ff295a2f92766b9d521fa00de67a2bd6427d57a/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877", size = 423736, upload-time = "2025-11-30T20:24:31.22Z" }, - { url = "https://files.pythonhosted.org/packages/13/64/b4d76f227d5c45a7e0b796c674fd81b0a6c4fbd48dc29271857d8219571c/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a", size = 573981, upload-time = "2025-11-30T20:24:32.934Z" }, - { url = "https://files.pythonhosted.org/packages/20/91/092bacadeda3edf92bf743cc96a7be133e13a39cdbfd7b5082e7ab638406/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4", size = 599782, upload-time = "2025-11-30T20:24:35.169Z" }, - { url = "https://files.pythonhosted.org/packages/d1/b7/b95708304cd49b7b6f82fdd039f1748b66ec2b21d6a45180910802f1abf1/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e", size = 562191, upload-time = "2025-11-30T20:24:36.853Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0.tar.gz", hash = "sha256:dd8ff7cf90014af0c0f787eea34794ebf6415242ee1d6fa91eaba725cc441e84" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:679ae98e00c0e8d68a7fda324e16b90fd5260945b45d3b824c892cec9eea3288" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4cc2206b76b4f576934f0ed374b10d7ca5f457858b157ca52064bdfc26b9fc00" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:389a2d49eded1896c3d48b0136ead37c48e221b391c052fba3f4055c367f60a6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:32c8528634e1bf7121f3de08fa85b138f4e0dc47657866630611b03967f041d7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f207f69853edd6f6700b86efb84999651baf3789e78a466431df1331608e5324" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:67b02ec25ba7a9e8fa74c63b6ca44cf5707f2fbfadae3ee8e7494297d56aa9df" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0c0e95f6819a19965ff420f65578bacb0b00f251fefe2c8b23347c37174271f3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_31_riscv64.whl", hash = "sha256:a452763cc5198f2f98898eb98f7569649fe5da666c2dc6b5ddb10fde5a574221" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e0b65193a413ccc930671c55153a03ee57cecb49e6227204b04fae512eb657a7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:858738e9c32147f78b3ac24dc0edb6610000e56dc0f700fd5f651d0a0f0eb9ff" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:da279aa314f00acbb803da1e76fa18666778e8a8f83484fba94526da5de2cba7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7c64d38fb49b6cdeda16ab49e35fe0da2e1e9b34bc38bd78386530f218b37139" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-win32.whl", hash = "sha256:6de2a32a1665b93233cde140ff8b3467bdb9e2af2b91079f0333a0974d12d464" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp310-cp310-win_amd64.whl", hash = "sha256:1726859cd0de969f88dc8673bdd954185b9104e05806be64bcd87badbe313169" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a2bffea6a4ca9f01b3f8e548302470306689684e61602aa3d141e34da06cf425" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:dc4f992dfe1e2bc3ebc7444f6c7051b4bc13cd8e33e43511e8ffd13bf407010d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:422c3cb9856d80b09d30d2eb255d0754b23e090034e1deb4083f8004bd0761e4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:07ae8a593e1c3c6b82ca3292efbe73c30b61332fd612e05abee07c79359f292f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12f90dd7557b6bd57f40abe7747e81e0c0b119bef015ea7726e69fe550e394a4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:99b47d6ad9a6da00bec6aabe5a6279ecd3c06a329d4aa4771034a21e335c3a97" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:33f559f3104504506a44bb666b93a33f5d33133765b0c216a5bf2f1e1503af89" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:946fe926af6e44f3697abbc305ea168c2c31d3e3ef1058cf68f379bf0335a78d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:495aeca4b93d465efde585977365187149e75383ad2684f81519f504f5c13038" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9a0ca5da0386dee0655b4ccdf46119df60e0f10da268d04fe7cc87886872ba7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:8d6d1cc13664ec13c1b84241204ff3b12f9bb82464b8ad6e7a5d3486975c2eed" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:3896fa1be39912cf0757753826bc8bdc8ca331a28a7c4ae46b7a21280b06bb85" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-win32.whl", hash = "sha256:55f66022632205940f1827effeff17c4fa7ae1953d2b74a8581baaefb7d16f8c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:a51033ff701fca756439d641c0ad09a41d9242fa69121c7d8769604a0a629825" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp311-cp311-win_arm64.whl", hash = "sha256:47b0ef6231c58f506ef0b74d44e330405caa8428e770fec25329ed2cb971a229" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a161f20d9a43006833cd7068375a94d035714d73a172b681d8881820600abfad" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6abc8880d9d036ecaafe709079969f56e876fcf107f7a8e9920ba6d5a3878d05" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca28829ae5f5d569bb62a79512c842a03a12576375d5ece7d2cadf8abe96ec28" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1010ed9524c73b94d15919ca4d41d8780980e1765babf85f9a2f90d247153dd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8d1736cfb49381ba528cd5baa46f82fdc65c06e843dab24dd70b63d09121b3f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d948b135c4693daff7bc2dcfc4ec57237a29bd37e60c2fabf5aff2bbacf3e2f1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47f236970bccb2233267d89173d3ad2703cd36a0e2a6e92d0560d333871a3d23" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:2e6ecb5a5bcacf59c3f912155044479af1d0b6681280048b338b28e364aca1f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a8fa71a2e078c527c3e9dc9fc5a98c9db40bcc8a92b4e8858e36d329f8684b51" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:73c67f2db7bc334e518d097c6d1e6fed021bbc9b7d678d6cc433478365d1d5f5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5ba103fb455be00f3b1c2076c9d4264bfcb037c976167a6047ed82f23153f02e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7cee9c752c0364588353e627da8a7e808a66873672bcb5f52890c33fd965b394" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-win32.whl", hash = "sha256:1ab5b83dbcf55acc8b08fc62b796ef672c457b17dbd7820a11d6c52c06839bdf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:a090322ca841abd453d43456ac34db46e8b05fd9b3b4ac0c78bcde8b089f959b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp312-cp312-win_arm64.whl", hash = "sha256:669b1805bd639dd2989b281be2cfd951c6121b65e729d9b843e9639ef1fd555e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f83424d738204d9770830d35290ff3273fbb02b41f919870479fab14b9d303b2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e7536cd91353c5273434b4e003cbda89034d67e7710eab8761fd918ec6c69cf8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2771c6c15973347f50fece41fc447c054b7ac2ae0502388ce3b6738cd366e3d4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0a59119fc6e3f460315fe9d08149f8102aa322299deaa5cab5b40092345c2136" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:76fec018282b4ead0364022e3c54b60bf368b9d926877957a8624b58419169b7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:692bef75a5525db97318e8cd061542b5a79812d711ea03dbc1f6f8dbb0c5f0d2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9027da1ce107104c50c81383cae773ef5c24d296dd11c99e2629dbd7967a20c6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:9cf69cdda1f5968a30a359aba2f7f9aa648a9ce4b580d6826437f2b291cfc86e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a4796a717bf12b9da9d3ad002519a86063dcac8988b030e405704ef7d74d2d9d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5d4c2aa7c50ad4728a094ebd5eb46c452e9cb7edbfdb18f9e1221f597a73e1e7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ba81a9203d07805435eb06f536d95a266c21e5b2dfbf6517748ca40c98d19e31" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:945dccface01af02675628334f7cf49c2af4c1c904748efc5cf7bbdf0b579f95" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-win32.whl", hash = "sha256:b40fb160a2db369a194cb27943582b38f79fc4887291417685f3ad693c5a1d5d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:806f36b1b605e2d6a72716f321f20036b9489d29c51c91f4dd29a3e3afb73b15" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313-win_arm64.whl", hash = "sha256:d96c2086587c7c30d44f31f42eae4eac89b60dabbac18c7669be3700f13c3ce1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:eb0b93f2e5c2189ee831ee43f156ed34e2a89a78a66b98cadad955972548be5a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:922e10f31f303c7c920da8981051ff6d8c1a56207dbdf330d9047f6d30b70e5e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdc62c8286ba9bf7f47befdcea13ea0e26bf294bda99758fd90535cbaf408000" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:47f9a91efc418b54fb8190a6b4aa7813a23fb79c51f4bb84e418f5476c38b8db" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1f3587eb9b17f3789ad50824084fa6f81921bbf9a795826570bda82cb3ed91f2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:39c02563fc592411c2c61d26b6c5fe1e51eaa44a75aa2c8735ca88b0d9599daa" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51a1234d8febafdfd33a42d97da7a43f5dcb120c1060e352a3fbc0c6d36e2083" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_31_riscv64.whl", hash = "sha256:eb2c4071ab598733724c08221091e8d80e89064cd472819285a9ab0f24bcedb9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6bdfdb946967d816e6adf9a3d8201bfad269c67efe6cefd7093ef959683c8de0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c77afbd5f5250bf27bf516c7c4a016813eb2d3e116139aed0096940c5982da94" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:61046904275472a76c8c90c9ccee9013d70a6d0f73eecefd38c1ae7c39045a08" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:4c5f36a861bc4b7da6516dbdf302c55313afa09b81931e8280361a4f6c9a2d27" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-win32.whl", hash = "sha256:3d4a69de7a3e50ffc214ae16d79d8fbb0922972da0356dcf4d0fdca2878559c6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp313-cp313t-win_amd64.whl", hash = "sha256:f14fc5df50a716f7ece6a80b6c78bb35ea2ca47c499e422aa4463455dd96d56d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:68f19c879420aa08f61203801423f6cd5ac5f0ac4ac82a2368a9fcd6a9a075e0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:ec7c4490c672c1a0389d319b3a9cfcd098dcdc4783991553c332a15acf7249be" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f251c812357a3fed308d684a5079ddfb9d933860fc6de89f2b7ab00da481e65f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac98b175585ecf4c0348fd7b29c3864bda53b805c773cbf7bfdaffc8070c976f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3e62880792319dbeb7eb866547f2e35973289e7d5696c6e295476448f5b63c87" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4e7fc54e0900ab35d041b0601431b0a0eb495f0851a0639b6ef90f7741b39a18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47e77dc9822d3ad616c3d5759ea5631a75e5809d5a28707744ef79d7a1bcfcad" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:b4dc1a6ff022ff85ecafef7979a2c6eb423430e05f1165d6688234e62ba99a07" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4559c972db3a360808309e06a74628b95eaccbf961c335c8fe0d590cf587456f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:0ed177ed9bded28f8deb6ab40c183cd1192aa0de40c12f38be4d59cd33cb5c65" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ad1fa8db769b76ea911cb4e10f049d80bf518c104f15b3edb2371cc65375c46f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:46e83c697b1f1c72b50e5ee5adb4353eef7406fb3f2043d64c33f20ad1c2fc53" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-win32.whl", hash = "sha256:ee454b2a007d57363c2dfd5b6ca4a5d7e2c518938f8ed3b706e37e5d470801ed" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-win_amd64.whl", hash = "sha256:95f0802447ac2d10bcc69f6dc28fe95fdf17940367b21d34e34c737870758950" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314-win_arm64.whl", hash = "sha256:613aa4771c99f03346e54c3f038e4cc574ac09a3ddfb0e8878487335e96dead6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:7e6ecfcb62edfd632e56983964e6884851786443739dbfe3582947e87274f7cb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a1d0bc22a7cdc173fedebb73ef81e07faef93692b8c1ad3733b67e31e1b6e1b8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0d08f00679177226c4cb8c5265012eea897c8ca3b93f429e546600c971bcbae7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5965af57d5848192c13534f90f9dd16464f3c37aaf166cc1da1cae1fd5a34898" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a4e86e34e9ab6b667c27f3211ca48f73dba7cd3d90f8d5b11be56e5dbc3fb4e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d3e6b26f2c785d65cc25ef1e5267ccbe1b069c5c21b8cc724efee290554419" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:626a7433c34566535b6e56a1b39a7b17ba961e97ce3b80ec62e6f1312c025551" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:acd7eb3f4471577b9b5a41baf02a978e8bdeb08b4b355273994f8b87032000a8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:fe5fa731a1fa8a0a56b0977413f8cacac1768dad38d16b3a296712709476fbd5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:74a3243a411126362712ee1524dfc90c650a503502f135d54d1b352bd01f2404" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3e8eeb0544f2eb0d2581774be4c3410356eba189529a6b3e36bbbf9696175856" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:dbd936cde57abfee19ab3213cf9c26be06d60750e60a8e4dd85d1ab12c8b1f40" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-win32.whl", hash = "sha256:dc824125c72246d924f7f796b4f63c1e9dc810c7d9e2355864b3c3a73d59ade0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-cp314-cp314t-win_amd64.whl", hash = "sha256:27f4b0e92de5bfbc6f86e43959e6edd1425c33b5e69aab0984a72047f2bcf1e3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:c2262bdba0ad4fc6fb5545660673925c2d2a5d9e2e0fb603aad545427be0fc58" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:ee6af14263f25eedc3bb918a3c04245106a42dfd4f5c2285ea6f997b1fc3f89a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3adbb8179ce342d235c31ab8ec511e66c73faa27a47e076ccc92421add53e2bb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:250fa00e9543ac9b97ac258bd37367ff5256666122c2d0f2bc97577c60a1818c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9854cf4f488b3d57b9aaeb105f06d78e5529d3145b1e4a41750167e8c213c6d3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:993914b8e560023bc0a8bf742c5f303551992dcb85e247b1e5c7f4a7d145bda5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58edca431fb9b29950807e301826586e5bbf24163677732429770a697ffe6738" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:dea5b552272a944763b34394d04577cf0f9bd013207bc32323b5a89a53cf9c2f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ba3af48635eb83d03f6c9735dfb21785303e73d22ad03d489e88adae6eab8877" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:dff13836529b921e22f15cb099751209a60009731a68519630a24d61f0b1b30a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:1b151685b23929ab7beec71080a8889d4d6d9fa9a983d213f07121205d48e2c4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-0.30.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:ac37f9f516c51e5753f27dfdef11a88330f04de2d564be3991384b2f3535d02e" }, ] [[package]] name = "rpds-py" version = "2026.6.3" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } resolution-markers = [ "python_full_version >= '3.14'", "python_full_version == '3.13.*'", "python_full_version >= '3.11' and python_full_version < '3.13'", ] -sdist = { url = "https://files.pythonhosted.org/packages/aa/2a/9618a122aeb2a169a28b03889a2995fe297588964333d4a7d67bdf46e147/rpds_py-2026.6.3.tar.gz", hash = "sha256:1cebd1337c242e4ec2293e541f712b2da849b29f48f0c293684b71c0632625d4", size = 64051, upload-time = "2026-06-30T07:17:53.009Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/1f/a2dca5ffdbf1d475ffc4e80e4d5d720ff3a00f691795910116960ee12511/rpds_py-2026.6.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:7b689145a1485c335569bd056464f3243a29af7ed3871c7be31ad624ba239bc7", size = 342174, upload-time = "2026-06-30T07:14:54.821Z" }, - { url = "https://files.pythonhosted.org/packages/4d/dc/323d08583c0832911768663d1944f0107fcd4088704858d84b5e06d105a0/rpds_py-2026.6.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:db08f45aecde626498fb3df07bcf6d2ec040af42e859a4f5040d79c200342911", size = 345513, upload-time = "2026-06-30T07:14:56.515Z" }, - { url = "https://files.pythonhosted.org/packages/0b/2a/e31989834d18d2f26ec1d2774c5b1eb3331df4ea8ada525175294c94b48a/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:acc992ab27b15f852c76755eb2ab7dce86585ddadba6fa5946e58556088845b4", size = 373783, upload-time = "2026-06-30T07:14:57.736Z" }, - { url = "https://files.pythonhosted.org/packages/87/fe/e80107ee3639585c9941c17d6a42cd65325022f656c023191fce78c324c8/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f88d653e7b3b779d71ae7454e20dcc9b6bae903f33c269db9f2be41bda3f261", size = 378316, upload-time = "2026-06-30T07:14:59.077Z" }, - { url = "https://files.pythonhosted.org/packages/22/6f/81e3adf81acfb6fa694de2a6e4e7d8863121e3e0799e0a7725e6cf5679c4/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e52655eaf81e32593abedaa4bfe33170c8cfedf3365ed9be6e11e07f148f0278", size = 499423, upload-time = "2026-06-30T07:15:00.488Z" }, - { url = "https://files.pythonhosted.org/packages/2d/9a/41263969df0ce3d9af2a96d5005a288200af1989aed3354bfceb5fc0b21f/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dfcc8b909769d19db55c7cc9541eb64b9b774b1057ffffb4f1048070475bb9f9", size = 386077, upload-time = "2026-06-30T07:15:01.911Z" }, - { url = "https://files.pythonhosted.org/packages/5e/19/7e98f468bd50346faff5b10e5297374b443bfdddacc8e9fbc65984539597/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c1255b302953c86a486b81d330d5ee1d5bd937691ce271b6be0ef0e299eaab7", size = 371315, upload-time = "2026-06-30T07:15:03.317Z" }, - { url = "https://files.pythonhosted.org/packages/99/3c/2b973b4d371906a134b03decfea7f5d9835a2c6d263454392e15b64b5b18/rpds_py-2026.6.3-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:8d2294a31386bfa251d8c8a39472beee17db67d4f1a6eabea665d35c9a4461c3", size = 383502, upload-time = "2026-06-30T07:15:04.627Z" }, - { url = "https://files.pythonhosted.org/packages/98/2a/12e2799500af0a307bca76b63361c51f9fe479223561489c29eea1f2ee41/rpds_py-2026.6.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8f23ead891a3b762f35ab3b04623da7056545b48aa60d59957e6789914545da", size = 402673, upload-time = "2026-06-30T07:15:05.856Z" }, - { url = "https://files.pythonhosted.org/packages/2d/e3/21e5872d165fe08be4f229e3d5ee9d90019c0bf0e5538de60dbd54009450/rpds_py-2026.6.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:421aba32367055614287a4292b6a17f1939c9452299f7a0209c117e990b646d4", size = 549964, upload-time = "2026-06-30T07:15:07.159Z" }, - { url = "https://files.pythonhosted.org/packages/1a/d0/5ee0fe36844297de8123bee27bc12078c1a7416ad9f1b8a8ca18d6b0c0ac/rpds_py-2026.6.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1e5822dfc2f0d4ab7e745eaa6d85945069329beeccef965af3f3bb26058fcab6", size = 615446, upload-time = "2026-06-30T07:15:08.531Z" }, - { url = "https://files.pythonhosted.org/packages/b1/80/1ea5873cb683f2fbe5f21b23ea1f6d179ead19f3c5b249b7eb5dca568ef2/rpds_py-2026.6.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:83e35b57523816c8613fd0776b40cd8bb9f596b37ddd2692eb4a6bb5ab2f8c93", size = 576975, upload-time = "2026-06-30T07:15:09.97Z" }, - { url = "https://files.pythonhosted.org/packages/c9/e1/90ef639217a5ddb15b7f4f61b1c33911fd044ad03c311bafdd2bcab85582/rpds_py-2026.6.3-cp311-cp311-win32.whl", hash = "sha256:de3eceba0b683bcbb1ab93da016d0270df1f9ae7be716b40214c5dafac6ea45a", size = 204453, upload-time = "2026-06-30T07:15:11.324Z" }, - { url = "https://files.pythonhosted.org/packages/f2/b7/b7a1695d7af36f521fb11e80d6d3adbd744f73b921859bd3c2a2c0dc706f/rpds_py-2026.6.3-cp311-cp311-win_amd64.whl", hash = "sha256:2c54a076ca4d370980ab57bc0e31df57bbe8d41340436a90ef8b1219a3cbb127", size = 223219, upload-time = "2026-06-30T07:15:12.476Z" }, - { url = "https://files.pythonhosted.org/packages/d7/a2/145afacf796e4506062825941176ad9445c2dcf2b3b6a1f13d3030a15e19/rpds_py-2026.6.3-cp311-cp311-win_arm64.whl", hash = "sha256:168c733a7112e071bb7a66460e667edfcff06c017a3c523f7a8a8e08d0140804", size = 219137, upload-time = "2026-06-30T07:15:13.631Z" }, - { url = "https://files.pythonhosted.org/packages/5c/be/2e8974163072e7bab7df1a5acd54c4498e75e35d6d18b864d3a9d5dadc92/rpds_py-2026.6.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a0811d33247c3d6128a3001d763f2aa056bb3425204335400ac54f89eec3a0d0", size = 343691, upload-time = "2026-06-30T07:15:14.96Z" }, - { url = "https://files.pythonhosted.org/packages/a4/73/319dfa745dd668efe89309141ded489126461fcecd2b8f3a3cda185129b6/rpds_py-2026.6.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:538949e262e46caa31ac01bdb3c1e8f642622922cacbabbae6a8445d9dc33eaf", size = 338542, upload-time = "2026-06-30T07:15:16.267Z" }, - { url = "https://files.pythonhosted.org/packages/21/63/4239893be1c4d09b709b1a8f6be4188f0870084ff547f46606b8a75f1b03/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55927d532399c2c646100ff7feb48eaa940ad70f42cd68e1328f3ded9f81ca24", size = 368180, upload-time = "2026-06-30T07:15:17.62Z" }, - { url = "https://files.pythonhosted.org/packages/1c/ca/9c5de382225234ceb37b1844ebdb140db12b2a278bb9efe2fcd19f6c82ce/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f56f1695bc5c0871cbc33dc0130fcf503aab0c57dcc5a6700a4f49eba4f2652e", size = 375067, upload-time = "2026-06-30T07:15:18.952Z" }, - { url = "https://files.pythonhosted.org/packages/87/dc/863f69d1bf04ade34b7fe0d59b9fdf6f0135fe2d7cbca74f1d665589559d/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:270b293dae9058fc9fcedab50f13cebf46fb8ed1d1d54e0521a9da5d6b211975", size = 490509, upload-time = "2026-06-30T07:15:20.434Z" }, - { url = "https://files.pythonhosted.org/packages/ce/ef/eac16a12048b45ec7c7fa94f2be3438a5f26bf9cc8580b18a1cfd609b7f6/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:127565fead0a10943b282957bd5447804ff3160ad79f2ad2635e6d249e380680", size = 382754, upload-time = "2026-06-30T07:15:21.831Z" }, - { url = "https://files.pythonhosted.org/packages/04/8f/d2f3f532616be4d06c316ef119683e832bd3d41e112bf3a88f4151c95b17/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecabd69db66de867690f9797f2f8fa27ba501bbc24540cbdbdc649cd15888ba6", size = 366189, upload-time = "2026-06-30T07:15:23.371Z" }, - { url = "https://files.pythonhosted.org/packages/e3/29/41a7b0e98a4b44cd676ab7598419623373eb43b20be68c084935c1a8cf88/rpds_py-2026.6.3-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:58eadac9cd119677b60e1cf8ac4052f35949d71b8a9e5556efccbe82533cf22a", size = 377750, upload-time = "2026-06-30T07:15:24.659Z" }, - { url = "https://files.pythonhosted.org/packages/2e/05/ecda0bec46f9a1565090bcdc941d023f6a25aff85fda28f89f8d19878152/rpds_py-2026.6.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7491ee23305ac3eb59e492b6945881f5cd77a6f731061a3f25b77fd40f9e99a4", size = 395576, upload-time = "2026-06-30T07:15:25.987Z" }, - { url = "https://files.pythonhosted.org/packages/68/a8/6ed52f03ee6cb854ce78785cc9a9a672eb880e83fd7224d471f667d151f1/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2c99f7e8ccb3dd6e3e4bfeac657a7b208c9bac8075f4b078c02d7404c34107fa", size = 543807, upload-time = "2026-06-30T07:15:27.356Z" }, - { url = "https://files.pythonhosted.org/packages/8f/d6/156c0d3eea27ba09b92562ba2364ba124c0a061b199e17eac637cd25a5e2/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:62698275682bf121181861295c9181e789030a2d516071f5b8f3c23c170cd0fc", size = 611187, upload-time = "2026-06-30T07:15:28.931Z" }, - { url = "https://files.pythonhosted.org/packages/f1/31/774212ed989c62f7f310220089f9b0a3fb8f40f5443d1727abd5d9f52bc9/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a214c993455f99a89aaeadc9b21241900037adc9d97203e374d75513c5911822", size = 573030, upload-time = "2026-06-30T07:15:30.553Z" }, - { url = "https://files.pythonhosted.org/packages/c9/50/22f73127a41f1ce4f87fe39aadfb9a126345801c274aa93ae88456249327/rpds_py-2026.6.3-cp312-cp312-win32.whl", hash = "sha256:501f9f04a588d6a09179368c57071301445191767c64e4b52a6aa9871f1ef5ed", size = 202185, upload-time = "2026-06-30T07:15:32.027Z" }, - { url = "https://files.pythonhosted.org/packages/04/3a/f0ee4d4dde9d3b69dedf1b5f74e7a40017046d55052d173e418c6a94f960/rpds_py-2026.6.3-cp312-cp312-win_amd64.whl", hash = "sha256:2c958bf94822e9290a40aaf2a822d4bc5c88099093e3948ad6c571eca9272e5f", size = 220394, upload-time = "2026-06-30T07:15:33.359Z" }, - { url = "https://files.pythonhosted.org/packages/f3/83/3382fe37f809b59f02aac04dbc4e765b480b46ee0227ed516e3bdc4d3dfc/rpds_py-2026.6.3-cp312-cp312-win_arm64.whl", hash = "sha256:22bffe6042b9bcb0822bcd1955ec00e245daf17b4344e4ed8e9551b976b63e96", size = 215753, upload-time = "2026-06-30T07:15:34.778Z" }, - { url = "https://files.pythonhosted.org/packages/a4/9e/b818ee580026ec578138e961027a68820c40afeb1ec8f6819b54fb99e196/rpds_py-2026.6.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:3cfe765c1da0072636ca06628261e0ea05688e160d5c8a03e0217c3854037223", size = 343012, upload-time = "2026-06-30T07:15:36.005Z" }, - { url = "https://files.pythonhosted.org/packages/f3/6b/686d9dc4359a8f163cfbbf89ee0b4e586431de22fe8248edb63a8cf50d49/rpds_py-2026.6.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f4d78253f6996be4901669ad25319f842f740eccf4d58e3c7f3dd39e6dde1d8f", size = 338203, upload-time = "2026-06-30T07:15:37.462Z" }, - { url = "https://files.pythonhosted.org/packages/9e/9b/069aa329940f8207615e091f5eedbbd40e1e15eac68a0790fd05ccdf796c/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54f45a148e28767bf343d33a684693c70e451c6f4c0e9904709a723fafbdfc1f", size = 367984, upload-time = "2026-06-30T07:15:39.008Z" }, - { url = "https://files.pythonhosted.org/packages/14/db/34c203e4becff3703e4d3bc121842c00b8689197f398161203a880052f4e/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:842e7b070435622248c7a2c44ae53fa1440e073cc3023bc919fed570884097a7", size = 374815, upload-time = "2026-06-30T07:15:40.253Z" }, - { url = "https://files.pythonhosted.org/packages/ee/7d/8071067d2cc453d916ad836e828c943f575e8a44612537759002a1e07381/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8020133a74bd81b4572dd8e4be028a6b1ebcd70e6726edc3918008c08bee6ee6", size = 490545, upload-time = "2026-06-30T07:15:41.729Z" }, - { url = "https://files.pythonhosted.org/packages/a3/42/da06c5aa8f0484ff07f270787434204d9f4535e2f8c3b51ed402267e63c3/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cdc7e35386f3847df728fbcb5e887e2d79c19e2fa1eba9e51b6621d23e3243af", size = 382828, upload-time = "2026-06-30T07:15:43.327Z" }, - { url = "https://files.pythonhosted.org/packages/57/d7/fe978efc2ae50abe48eb7464668ea99f53c010c60aeebb7b35ad27f23661/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acac386b453c2516111b50985d60ce46e7fadb5ea71ae7b25f4c946935bf27cf", size = 365678, upload-time = "2026-06-30T07:15:44.992Z" }, - { url = "https://files.pythonhosted.org/packages/69/9d/1d8922e1990b2a6eb532b6ff53d3e73d2b3bbffc84116c75826bee73dfc6/rpds_py-2026.6.3-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:425560c6fa0415f27261727bb20bd097568485e5eb0c121f1949417d1c516885", size = 377811, upload-time = "2026-06-30T07:15:46.523Z" }, - { url = "https://files.pythonhosted.org/packages/b1/3d/198dceafb4fb034a6a47347e1b0735d34e0bd4a50be4e898d408ee66cb14/rpds_py-2026.6.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a550fb4950a06dde3beb4721f5ad4b25bf4513784665b0a8522c792e2bd822a4", size = 395382, upload-time = "2026-06-30T07:15:47.955Z" }, - { url = "https://files.pythonhosted.org/packages/1f/f1/13968e49655d40b6b19d8b9140296bbc6f1d86b3f0f6c346cf9f1adddf4b/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f4bca01b63096f606e095734dd56e74e175f94cfbf24ff3d63281cec61f7bb7", size = 543832, upload-time = "2026-06-30T07:15:49.33Z" }, - { url = "https://files.pythonhosted.org/packages/ac/ab/289bcb1b90bd3e40a2900c561fa0e2087345ecbb094f0b870f2345142b7c/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ccffae9a092a00deb7efd545fe5e2c33c33b88e7c054337e9a74c179347d0b7d", size = 611011, upload-time = "2026-06-30T07:15:50.847Z" }, - { url = "https://files.pythonhosted.org/packages/1e/16/5043105e679436ccfbc8e5e0dd2d663ed18a8b8113515fd06a5e5d77c83e/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1cf01971c4f2c5553b772a542e4aaf191789cd331bc2cd4ff0e6e65ba49e1e97", size = 572431, upload-time = "2026-06-30T07:15:52.394Z" }, - { url = "https://files.pythonhosted.org/packages/85/ed/adab103321c0a6565d5ae1c2998349bc3ee175b82ccc5ae8fc04cc413075/rpds_py-2026.6.3-cp313-cp313-win32.whl", hash = "sha256:8c3d1e9c15b9d51ca0391e13da1a25a0a4df3c58a37c9dc368e0736cf7f69df0", size = 201710, upload-time = "2026-06-30T07:15:53.894Z" }, - { url = "https://files.pythonhosted.org/packages/7b/ed/a03b09668e74e5dabbf2e211f6468e1820c0552f7b0500082da31841bf7b/rpds_py-2026.6.3-cp313-cp313-win_amd64.whl", hash = "sha256:9250a9a0a6fd4648b3f868da8d91a4c52b5811a62df58e753d50ae4454a36f80", size = 219454, upload-time = "2026-06-30T07:15:55.25Z" }, - { url = "https://files.pythonhosted.org/packages/27/17/b8642c12930b71bc2b25831f6708ccf0f75abcd11883932ec9ce54ba3a78/rpds_py-2026.6.3-cp313-cp313-win_arm64.whl", hash = "sha256:900a67df3fd1660b035a4761c4ce73c382ea6b35f90f9863c36c6fd8bf8b09bb", size = 215063, upload-time = "2026-06-30T07:15:56.573Z" }, - { url = "https://files.pythonhosted.org/packages/b6/36/7fbe9dcdaf857fb3f63c2a2284b62492d95f5e8334e947e5fb6e7f68c9be/rpds_py-2026.6.3-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:931908d9fc855d8f74783377822be318edb6dcb19e47169dc038f9a1bf60b06e", size = 344510, upload-time = "2026-06-30T07:15:57.921Z" }, - { url = "https://files.pythonhosted.org/packages/ba/54/f785cc3d3f60839ca57a5af4927a9f347b07b2799c373fc20f7949f87c7e/rpds_py-2026.6.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d7469697dce35be237db177d42e2a2ee26e6dcc5fc052078a6fefabd288c6edd", size = 339495, upload-time = "2026-06-30T07:15:59.238Z" }, - { url = "https://files.pythonhosted.org/packages/63/ef/d4cdaf309e6b095b43597103cf8c0b951d6cca2acce68c474f75ec12e0c7/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcfbcf66006befb9fd2aeaa9e01feaf881b4dc330a02ba07d2322b1c11be7b5d", size = 369454, upload-time = "2026-06-30T07:16:01.021Z" }, - { url = "https://files.pythonhosted.org/packages/96/4a/9559a68b7ee15db09d7981212e8c2e219d2a1d6d4faa0391d813c3496a36/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:847927daf4cffbd4e90e42bc890069897101edd015f956cb8721b3473372edda", size = 374583, upload-time = "2026-06-30T07:16:02.287Z" }, - { url = "https://files.pythonhosted.org/packages/ef/75/8964aa7d2c6e8ac43eba8eb6e6b0fdda1f46d39f2fc3e6aa9f2cb17f485d/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aca6c1ef08a82bfe327cc156da694660f599923e2e6665b6d81c9c2d0ac9ffc8", size = 492919, upload-time = "2026-06-30T07:16:03.723Z" }, - { url = "https://files.pythonhosted.org/packages/8f/97/6908094ac804115e65aedfd90f1b5fee4eebebd3f6c4cfc5419939267565/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ae50181a047c871561212bb97f7932a2d45fb53e947bd9b57ebad85b529cbc53", size = 383725, upload-time = "2026-06-30T07:16:05.305Z" }, - { url = "https://files.pythonhosted.org/packages/d1/9c/0d1fdc2e7aba23e290d603bc494e97bd205bae262ce33c6b32a69768ed5e/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc319e5a1de4b6913aac94bf6a2f9e847371e0a140a43dd4991db1a09bc2d504", size = 367255, upload-time = "2026-06-30T07:16:07.086Z" }, - { url = "https://files.pythonhosted.org/packages/c4/fe/f0209ca4a9ed074bc8acb44dfd0e81c3122e94c9689f5645b7973a866719/rpds_py-2026.6.3-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:e4316bf32babbed84e691e352faf967ce2f0f024174a8643c37c94a1080374fc", size = 379060, upload-time = "2026-06-30T07:16:08.525Z" }, - { url = "https://files.pythonhosted.org/packages/c6/8d/f1cc54c616b9d8897de8738aac148d20afca93f68187475fe194d09a71b9/rpds_py-2026.6.3-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8c6e5a2f750cc71c3e3b11d71661f21d6f9bc6cebc6564b1466417a1ec03ec77", size = 395960, upload-time = "2026-06-30T07:16:09.989Z" }, - { url = "https://files.pythonhosted.org/packages/fb/04/aafff00f73aeca2945f734f1d483c64ab8f472d0864ab02377fd8e89c3b2/rpds_py-2026.6.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4470ce197d4090875cf6affbf1f853338387428df97c4fb7b7106317b8214698", size = 545356, upload-time = "2026-06-30T07:16:11.816Z" }, - { url = "https://files.pythonhosted.org/packages/fd/cc/e229663b9e4ddac5a4acbe9085dd80a71af2a5d356b8b39d6bff233f24b0/rpds_py-2026.6.3-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ea964164cc9afa72d4d9b23cc28dafae93693c0a53e0b42acbff15b22c3f9ddd", size = 612319, upload-time = "2026-06-30T07:16:13.586Z" }, - { url = "https://files.pythonhosted.org/packages/e3/7a/8a0e6d3e6cd066af108b71b43122c3fe158dd9eb86acac626593a2582eb1/rpds_py-2026.6.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:639c8929aa0afe81be836b04de888460d6bed38b9c54cfc18da8f6bfabf5af5d", size = 573508, upload-time = "2026-06-30T07:16:15.23Z" }, - { url = "https://files.pythonhosted.org/packages/87/03/2a69ab618a789cf6cf85c86bb844c62d090e700ab1a2aa676b3741b6c516/rpds_py-2026.6.3-cp314-cp314-win32.whl", hash = "sha256:882076c00c0a608b131187055ddc5ae29f2e7eaf870d6168980420d58528a5c8", size = 202504, upload-time = "2026-06-30T07:16:16.893Z" }, - { url = "https://files.pythonhosted.org/packages/85/62/a3892ba945f4e24c78f352e5de3c7620d8479f73f211406a97263d13c7d2/rpds_py-2026.6.3-cp314-cp314-win_amd64.whl", hash = "sha256:0be972be84cfcaf46c8c6edf690ca0f154ac17babf1f6a955a51579b34ad2dc5", size = 220380, upload-time = "2026-06-30T07:16:18.108Z" }, - { url = "https://files.pythonhosted.org/packages/3d/e7/c2bd44dc831931815ad11ebb5f430b5a0a4d3caa9de837107876c30c3432/rpds_py-2026.6.3-cp314-cp314-win_arm64.whl", hash = "sha256:2a9c6f195058cb45335e8cc3802745c603d716eb96bc9625950c1aac71c0c703", size = 215976, upload-time = "2026-06-30T07:16:19.654Z" }, - { url = "https://files.pythonhosted.org/packages/79/9c/fff7b74bce9a091ec9a012a03f9ff5f69364eaf9451060dfc4486da2ffdd/rpds_py-2026.6.3-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:f90938e92afda60266da758ee7d363447f7f0138c9559f9e1811629580582d90", size = 346840, upload-time = "2026-06-30T07:16:21.268Z" }, - { url = "https://files.pythonhosted.org/packages/e9/44/77bcb1168b33704908295533d27f10eb811e9e3e193e8993dc99572211d3/rpds_py-2026.6.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ec829541c45bca16e61c7ae50c20501f213605beb75d1aba91a6ee37fbbb56a4", size = 340282, upload-time = "2026-06-30T07:16:22.875Z" }, - { url = "https://files.pythonhosted.org/packages/87/3c/7a9081c7c9e645b39efe19e4ffbeccd80add246327cd9b888aecffd72317/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afd70d95892096cdb26f15a00c45907b17817577aa8d1c76b2dcc2788391f9e9", size = 370403, upload-time = "2026-06-30T07:16:24.415Z" }, - { url = "https://files.pythonhosted.org/packages/f7/69/af47021eb7dad6ff3396cb001c08f0f3c4d06c20253f75be6421a59fe6b7/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:29dfa0533a5d4c94d4dfa1b694fcb56c9c63aad8330ffdd816fd225d0a7a162f", size = 376055, upload-time = "2026-06-30T07:16:26.111Z" }, - { url = "https://files.pythonhosted.org/packages/81/fc/a3bcf517084396a6dd258c592567a3c011ba4557f2fde23dceaf26e74f2e/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:af05d726809bff6b141be124d4c7ce998f9c9c7f30edb1f46c07aa103d540b41", size = 494419, upload-time = "2026-06-30T07:16:27.596Z" }, - { url = "https://files.pythonhosted.org/packages/c9/eb/13d529d1788135425c7bf207f8463458ca5d92e43f3f701365b83e9dffc1/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9826217f048f620d9a712672818bf231442c1b35d96b227a07eabd11b4bb6945", size = 384848, upload-time = "2026-06-30T07:16:29.183Z" }, - { url = "https://files.pythonhosted.org/packages/8e/f4/b7ac49f30013aba8f7b9566b1dd07e81de95e708c1374b7bacc5b9bc5c9c/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:536bceea4fa4acf7e1c61da2b5786304367c816c8895be71b8f537c480b0ea1f", size = 371369, upload-time = "2026-06-30T07:16:30.912Z" }, - { url = "https://files.pythonhosted.org/packages/31/86/6260bafa622f788b07ddec0e52d810305c8b9b0b8c27f58a2ab04bf62b4f/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:bc0011654b91cc4fb2ae701bec0a0ba1e552c0714247fa7af6c59e0ccfa3a4e1", size = 379673, upload-time = "2026-06-30T07:16:32.486Z" }, - { url = "https://files.pythonhosted.org/packages/19/c3/03f1ee79a047b48daeca157c89a18509cde22b6b951d642b9b0af1be660a/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:539d75de9e0d536c84ff18dfeb805398e58227001ce09231a26a08b9aed1ee0e", size = 397500, upload-time = "2026-06-30T07:16:34.471Z" }, - { url = "https://files.pythonhosted.org/packages/f0/95/8ed0cd8c377dca12aea498f119fe639fc474d1461545c39d2b5872eb1c0f/rpds_py-2026.6.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:166cf54d9f44fc6ceb53c7860258dde44a81406646de79f8ed3234fca3b6e538", size = 545978, upload-time = "2026-06-30T07:16:36.45Z" }, - { url = "https://files.pythonhosted.org/packages/d3/f2/0eb57f0eaa83f8fc152a7e03de968ab77e1f00732bebc892b190c6eebde7/rpds_py-2026.6.3-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:d34c20167764fbcf927194d532dd7e0c56772f0a5f943fa5ef9e9afbba8fb9db", size = 613350, upload-time = "2026-06-30T07:16:38.213Z" }, - { url = "https://files.pythonhosted.org/packages/5b/de/e0674bdbc3ef7634989b3f854c3f34bc1f587d36e5bfdc5c378d57034619/rpds_py-2026.6.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ea7bb13b7c9a29791f87a0387ba7d3ad3a6d783d827e4d3f27b40a0ff44495e2", size = 576486, upload-time = "2026-06-30T07:16:39.797Z" }, - { url = "https://files.pythonhosted.org/packages/f2/f6/21101359743cd136ada781e8210a85769578422ba460672eea0e29739200/rpds_py-2026.6.3-cp314-cp314t-win32.whl", hash = "sha256:6de4744d05bd1aa1be4ed7ea1189e3979196808008113bbbf899a460966b925e", size = 201068, upload-time = "2026-06-30T07:16:41.316Z" }, - { url = "https://files.pythonhosted.org/packages/a6/b2/9574d4d44f7760c2aa32d92a0a4f41698e33f5b204a0bf5c9758f52c79d5/rpds_py-2026.6.3-cp314-cp314t-win_amd64.whl", hash = "sha256:c7b9a2f8f4d8e90af72571d3d495deebdd7e3c75451f5b41719aee166e940fc2", size = 220600, upload-time = "2026-06-30T07:16:43.091Z" }, - { url = "https://files.pythonhosted.org/packages/08/ae/f23a2697e6ee6340a578b0f136be6483657bef0c6f9497b752bb5c0964bb/rpds_py-2026.6.3-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:e059c5dde6452b44424bd1834557556c226b57781dee1227af23518459722b13", size = 344726, upload-time = "2026-06-30T07:16:44.5Z" }, - { url = "https://files.pythonhosted.org/packages/c3/63/e7b3a1a5358dd32c930a1062d8e15b67fd6e8922e81df9e91706d66ee5c8/rpds_py-2026.6.3-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:2f7c26fbc5acd2522b95d4177fe4710ffd8e9b20529e703ffbf8db4d93903f05", size = 339587, upload-time = "2026-06-30T07:16:46.255Z" }, - { url = "https://files.pythonhosted.org/packages/ec/64/10a85681916ca55fffb91b0a211f84e34297c109243484dd6394660a8a7c/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3086b538543802f84c843911242db20447de00d8752dd0efc936dbcf02218ba", size = 369585, upload-time = "2026-06-30T07:16:48.101Z" }, - { url = "https://files.pythonhosted.org/packages/76/c2/baf95c7c38823e12ba34407c5f5767a89e5cf2233895e56f608167ae9493/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f2e5c5ee828d42cb11760761c0af6507927bec42d0ad5458f97c9203b054617", size = 375479, upload-time = "2026-06-30T07:16:49.93Z" }, - { url = "https://files.pythonhosted.org/packages/6a/94/0aad06c72d65101e11d33528d438cda99a39ce0da99466e156158f2541d3/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed0c1e5d10cdc7135537988c74a0188da68e2f3c30813ba3744ab1e42e0480f9", size = 492418, upload-time = "2026-06-30T07:16:51.641Z" }, - { url = "https://files.pythonhosted.org/packages/b5/17/de3f5a479a1f056535d7489819639d8cd591ea6281d700390b43b1abd745/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c2642a7603ec0b16ed77da4555db3b4b472341904873788327c0b0d7b95f1bb", size = 384123, upload-time = "2026-06-30T07:16:53.622Z" }, - { url = "https://files.pythonhosted.org/packages/46/7d/bf09bd1b145bb2671c03e1e6d1ab8651858d90d8c7dfeadd85a37a934fd8/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e4320744c1ffdd95a603def63344bfab2d33edeab301c5007e7de9f9f5b3885", size = 367351, upload-time = "2026-06-30T07:16:55.241Z" }, - { url = "https://files.pythonhosted.org/packages/a3/ea/1bb734f314b8be319149ddee80b18bd41372bdcfbdf88d28131c0cd37719/rpds_py-2026.6.3-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:a9f4645593036b81bbdb36b9c8e0ea0d1c3fee968c4d59db0344c14087ef143a", size = 378827, upload-time = "2026-06-30T07:16:56.841Z" }, - { url = "https://files.pythonhosted.org/packages/4b/93/d9611e5b25e26df9a3649813ed66193ace9347a7c7fc4ab7cf70e94851c0/rpds_py-2026.6.3-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e55d236be29255554da47abe5c577637db7c24a02b8b46f0ca9524c855801868", size = 395966, upload-time = "2026-06-30T07:16:58.557Z" }, - { url = "https://files.pythonhosted.org/packages/c3/cb/99d77e16e5534ae1d90629bbe419ba6ee170833a6a85e3aa1cc41726fbbc/rpds_py-2026.6.3-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:24e9c5386e16669b674a69c156c8eeefcb578f3b3397b713b08e6d60f3c7b187", size = 545680, upload-time = "2026-06-30T07:17:00.164Z" }, - { url = "https://files.pythonhosted.org/packages/59/15/11a29755f790cef7a2f755e8e14f4f0c33f39489e1893a632a2eee59672b/rpds_py-2026.6.3-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:c60924535c75f1566b6eb75b5c31a48a43fef04fa2d0d201acbad8a9969c6107", size = 611853, upload-time = "2026-06-30T07:17:01.962Z" }, - { url = "https://files.pythonhosted.org/packages/68/86/0c27547e21644da938fb530f7e1a8148dd24d02db07e7a5f2567a17ce710/rpds_py-2026.6.3-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:38a2fea2787428f811719ceb9114cb78964a3138838320c29ac39526c79c16ba", size = 573715, upload-time = "2026-06-30T07:17:03.693Z" }, - { url = "https://files.pythonhosted.org/packages/29/71/4d8fcf700931815594bce892255bbd973b94efaf0fc1932b0590df18d886/rpds_py-2026.6.3-cp315-cp315-win32.whl", hash = "sha256:d483fe17f01ad64b7bf7cc38fcefff1ca9fb83f8c2b2542b68f97ffe0611b369", size = 202864, upload-time = "2026-06-30T07:17:05.746Z" }, - { url = "https://files.pythonhosted.org/packages/eb/62/b577562de0edbb55b2be85ce5fd09c33e386b9b13eee09833af4240fd5c4/rpds_py-2026.6.3-cp315-cp315-win_amd64.whl", hash = "sha256:67e3a721ffc5d8d2210d3671872298c4a84e4b8035cfe42ffd7cde35d772b146", size = 220430, upload-time = "2026-06-30T07:17:07.471Z" }, - { url = "https://files.pythonhosted.org/packages/c8/95/d6d0b2509825141eef60669a5739eec88dbc6a48053d6c92993a5704defe/rpds_py-2026.6.3-cp315-cp315-win_arm64.whl", hash = "sha256:6e84adbcf4bf841aed8116a8264b9f50b4cb3e7bd89b516122e616ac56ca269e", size = 215877, upload-time = "2026-06-30T07:17:09.008Z" }, - { url = "https://files.pythonhosted.org/packages/b7/bf/f3ea278f0afd615c1d0f19cb69043a41526e2bb600c2b536eb192218eb27/rpds_py-2026.6.3-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:ae6dd8f10bd17aad820876d24caec9efdafd80a318d16c0a48edb5e136902c6b", size = 346933, upload-time = "2026-06-30T07:17:10.762Z" }, - { url = "https://files.pythonhosted.org/packages/9d/29/9907bdf1c5346763cf10b7f6852aad86652168c259def904cbe0082c5864/rpds_py-2026.6.3-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:bdbd97738551fca3917c1bd7188bec1920bb520104f28e7e1007f9ceb17b7690", size = 340274, upload-time = "2026-06-30T07:17:12.266Z" }, - { url = "https://files.pythonhosted.org/packages/6f/2c/8e03767b5778ef25cebf74a7a91a2c3806f8eced4c92cb7406bbe060756d/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b95977e7211527ab0ba576e286d023389fbeeb32a6b7b771665d333c60e5342", size = 370763, upload-time = "2026-06-30T07:17:14.107Z" }, - { url = "https://files.pythonhosted.org/packages/2e/e1/df2a7e1ba2efd796af26194250b8d42c821b46592311595162af9ef0528d/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d15fde0e6fb0d88a60d221204873743e5d9f0b7d29165e62cd86d0413ad74ba6", size = 376467, upload-time = "2026-06-30T07:17:15.76Z" }, - { url = "https://files.pythonhosted.org/packages/6b/de/8a0814d1946af29cb068fb259aa8622f856df1d0bab58429448726b537f5/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a136d453475ac0fcbda502ef1e6504bd28d6d904700915d278deeab0d00fe140", size = 496689, upload-time = "2026-06-30T07:17:17.308Z" }, - { url = "https://files.pythonhosted.org/packages/df/f3/f19e0c852ba13694f5a79f3b719331051573cb5693feacf8a88ffffc3a71/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f826877d462181e5eb1c26a0026b8d0cab05d99844ecb6d8bf3627a2ca0c0442", size = 385340, upload-time = "2026-06-30T07:17:18.928Z" }, - { url = "https://files.pythonhosted.org/packages/e2/ae/7ec3a9d2d4351f99e37bcb06b6b6f954512646bfdbf9742e1de727865daf/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79486287de1730dbaff3dbd124d0ca4d2ef7f9d29bf2544f1f93c09b5bcbbd12", size = 372179, upload-time = "2026-06-30T07:17:20.539Z" }, - { url = "https://files.pythonhosted.org/packages/d3/ac/9cee911dff2aaa9a5a8354f6610bf2e6a616de9197c5fff4f54f82585f1e/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:808345f53cb952433ca2816f1604ff3515608a81784954f38d4452acfe8e61d5", size = 379993, upload-time = "2026-06-30T07:17:22.212Z" }, - { url = "https://files.pythonhosted.org/packages/83/6b/7c2a07ba88d1e9a936612f7a5d067467ed03d971d5a06f7d309dff044a7e/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1967debc37f64f2c4dc90a7f563aec558b471966e12adcac4e1c4240496b6ebf", size = 398909, upload-time = "2026-06-30T07:17:23.66Z" }, - { url = "https://files.pythonhosted.org/packages/97/0b/776ffcb66783637b0031f6d58d6fb55913c8b5abf00aeecd46bf933fb477/rpds_py-2026.6.3-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:f0840b5b17057f7fd918b76183a4b5a0635f43e14eb2ce60dce1d4ee4707ea00", size = 546584, upload-time = "2026-06-30T07:17:25.264Z" }, - { url = "https://files.pythonhosted.org/packages/55/33/ba3bc04d7092bd553c9b2b195624992d2cc4f3de1f380b7b93cbee67bd79/rpds_py-2026.6.3-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:faa679d19a6696fd54259ad321251ad77a13e70e03dd834daa762a44fb6196ef", size = 614357, upload-time = "2026-06-30T07:17:26.888Z" }, - { url = "https://files.pythonhosted.org/packages/8b/71/14edf065f04630b1a8472f7653cad03f6c478bcf95ea0e6aed55451e33ea/rpds_py-2026.6.3-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:23a439f31ccbeff1574e24889128821d1f7917470e830cf6544dced1c662262a", size = 576533, upload-time = "2026-06-30T07:17:28.546Z" }, - { url = "https://files.pythonhosted.org/packages/ba/76/65002b08596c389105720a8c0d22298b8dc25a4baf89b2ce431343c8b1de/rpds_py-2026.6.3-cp315-cp315t-win32.whl", hash = "sha256:913ca42ccad3f8cc6e292b587ae8ae49c8c823e5dce51a736252fc7c7cdfa577", size = 201204, upload-time = "2026-06-30T07:17:30.193Z" }, - { url = "https://files.pythonhosted.org/packages/8c/97/d855d6b3c322d1f27e26f5241c42016b56cf01377ea8ed348285f54652f0/rpds_py-2026.6.3-cp315-cp315t-win_amd64.whl", hash = "sha256:ae3d4fe8c0b9213624fdce7279d70e3b148b682ca20719ebd193a23ebfa47324", size = 220719, upload-time = "2026-06-30T07:17:31.788Z" }, - { url = "https://files.pythonhosted.org/packages/b4/9c/f0d19ac587fd0e4ab6b72cda355e9c5a6166b01ef7e064e437aef8eb9fef/rpds_py-2026.6.3-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:4cf2d36a2357e4d07bb5a4f98801265327b48256867816cfd2ceb001e9754a8f", size = 349791, upload-time = "2026-06-30T07:17:33.315Z" }, - { url = "https://files.pythonhosted.org/packages/38/c7/1d49d204c9fd2ee6c537601dc4c1ba921e03363ca576bfab94a00254ac9a/rpds_py-2026.6.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:30c6dc199b24a5e3e81d50da0f00858c5bbdb2617a750395687f4339c5818171", size = 352842, upload-time = "2026-06-30T07:17:34.897Z" }, - { url = "https://files.pythonhosted.org/packages/ac/e5/c0b5dc93cd0d4c06ce1f438907649514e2ea077bcd911e3154a51e96c38e/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9891e594296ab9dada6551c8e7b387b2721f27a67eecd528412e8906247a7b90", size = 382094, upload-time = "2026-06-30T07:17:36.514Z" }, - { url = "https://files.pythonhosted.org/packages/0d/54/ec0e907b4ca8d541112db352409bd15f871c9b243e0c92c9b5a46ae96f01/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b5c2dc92304aa48a4a60443b548bb12f12e119d4b72f314015e67b9e1be97fca", size = 388662, upload-time = "2026-06-30T07:17:38.235Z" }, - { url = "https://files.pythonhosted.org/packages/d3/f4/921c22a4fd0f1c1ac13a3996ffbf0aa67951e2c8ad0d1d9574938a2932e8/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:127e08c0642d880cf32ca47ec2a4a77b901f7e2dd1ad9762adb13955d72ffcc9", size = 504896, upload-time = "2026-06-30T07:17:39.689Z" }, - { url = "https://files.pythonhosted.org/packages/0b/1b/a114b972cefa1ab1cdb3c7bb177cd3844a12826c507c722d3a73516dbbaf/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8bb68f03f395eb793220b45c097bd4d8c32944393da0fad8b999efac0868fc8c", size = 391545, upload-time = "2026-06-30T07:17:41.336Z" }, - { url = "https://files.pythonhosted.org/packages/4e/98/af9b3db77d47fcbe6c8c1f36e2c2147ec70292819e99c325f871584a1c11/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3450b693fde92133e9f51060568a4c31fcca76d5e53bbd611e689ca446517e9", size = 380059, upload-time = "2026-06-30T07:17:42.857Z" }, - { url = "https://files.pythonhosted.org/packages/c9/ba/0efd8668b97c1d26a61566386c636a7a7a09829e474fdf807caa15a2c844/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:5e8d07bddee435a2ff6f1920e18feff28d0bc4533e42f4bf6927fbd073312c41", size = 393235, upload-time = "2026-06-30T07:17:44.637Z" }, - { url = "https://files.pythonhosted.org/packages/62/90/8c139ee9690f73b0829f32647de6f40d826f8f443af6fa72644f96351aac/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3a83ae6c67b7676b9878378547ca8e93ed77a580037bcbcd1d32f739e1e6089c", size = 413008, upload-time = "2026-06-30T07:17:46.225Z" }, - { url = "https://files.pythonhosted.org/packages/9c/97/0043896fdd7828ce09a1d9a8b06433714d0960fc4ff3fc4aa72b666b764e/rpds_py-2026.6.3-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2bfd04c19ddbd6640de0b51894d764bd2758854d5b75bd102d2ef10cb9c293a9", size = 558118, upload-time = "2026-06-30T07:17:47.759Z" }, - { url = "https://files.pythonhosted.org/packages/f6/40/02355f0e134f783a8f9814c4680a1bd311d37671577a5964ea838573ff37/rpds_py-2026.6.3-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:ca6546b66be9dc4738b1b043d5ebd5488c66c578c5ff0fd0e8065313fe3afb76", size = 623138, upload-time = "2026-06-30T07:17:49.355Z" }, - { url = "https://files.pythonhosted.org/packages/10/85/48f0abdcef5cce4e034c7a5b0ceeceba0b01bf0d942824f4bb720afe2dec/rpds_py-2026.6.3-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:8e65860d238379ed982fd9ba690579b5e95af2f4840f99c772816dbe573cb826", size = 586486, upload-time = "2026-06-30T07:17:51.141Z" }, +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3.tar.gz", hash = "sha256:1cebd1337c242e4ec2293e541f712b2da849b29f48f0c293684b71c0632625d4" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:7b689145a1485c335569bd056464f3243a29af7ed3871c7be31ad624ba239bc7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:db08f45aecde626498fb3df07bcf6d2ec040af42e859a4f5040d79c200342911" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:acc992ab27b15f852c76755eb2ab7dce86585ddadba6fa5946e58556088845b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7f88d653e7b3b779d71ae7454e20dcc9b6bae903f33c269db9f2be41bda3f261" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e52655eaf81e32593abedaa4bfe33170c8cfedf3365ed9be6e11e07f148f0278" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dfcc8b909769d19db55c7cc9541eb64b9b774b1057ffffb4f1048070475bb9f9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c1255b302953c86a486b81d330d5ee1d5bd937691ce271b6be0ef0e299eaab7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_31_riscv64.whl", hash = "sha256:8d2294a31386bfa251d8c8a39472beee17db67d4f1a6eabea665d35c9a4461c3" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8f23ead891a3b762f35ab3b04623da7056545b48aa60d59957e6789914545da" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:421aba32367055614287a4292b6a17f1939c9452299f7a0209c117e990b646d4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1e5822dfc2f0d4ab7e745eaa6d85945069329beeccef965af3f3bb26058fcab6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:83e35b57523816c8613fd0776b40cd8bb9f596b37ddd2692eb4a6bb5ab2f8c93" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-win32.whl", hash = "sha256:de3eceba0b683bcbb1ab93da016d0270df1f9ae7be716b40214c5dafac6ea45a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-win_amd64.whl", hash = "sha256:2c54a076ca4d370980ab57bc0e31df57bbe8d41340436a90ef8b1219a3cbb127" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp311-cp311-win_arm64.whl", hash = "sha256:168c733a7112e071bb7a66460e667edfcff06c017a3c523f7a8a8e08d0140804" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a0811d33247c3d6128a3001d763f2aa056bb3425204335400ac54f89eec3a0d0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:538949e262e46caa31ac01bdb3c1e8f642622922cacbabbae6a8445d9dc33eaf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55927d532399c2c646100ff7feb48eaa940ad70f42cd68e1328f3ded9f81ca24" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f56f1695bc5c0871cbc33dc0130fcf503aab0c57dcc5a6700a4f49eba4f2652e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:270b293dae9058fc9fcedab50f13cebf46fb8ed1d1d54e0521a9da5d6b211975" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:127565fead0a10943b282957bd5447804ff3160ad79f2ad2635e6d249e380680" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ecabd69db66de867690f9797f2f8fa27ba501bbc24540cbdbdc649cd15888ba6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_31_riscv64.whl", hash = "sha256:58eadac9cd119677b60e1cf8ac4052f35949d71b8a9e5556efccbe82533cf22a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7491ee23305ac3eb59e492b6945881f5cd77a6f731061a3f25b77fd40f9e99a4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2c99f7e8ccb3dd6e3e4bfeac657a7b208c9bac8075f4b078c02d7404c34107fa" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:62698275682bf121181861295c9181e789030a2d516071f5b8f3c23c170cd0fc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a214c993455f99a89aaeadc9b21241900037adc9d97203e374d75513c5911822" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-win32.whl", hash = "sha256:501f9f04a588d6a09179368c57071301445191767c64e4b52a6aa9871f1ef5ed" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-win_amd64.whl", hash = "sha256:2c958bf94822e9290a40aaf2a822d4bc5c88099093e3948ad6c571eca9272e5f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp312-cp312-win_arm64.whl", hash = "sha256:22bffe6042b9bcb0822bcd1955ec00e245daf17b4344e4ed8e9551b976b63e96" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:3cfe765c1da0072636ca06628261e0ea05688e160d5c8a03e0217c3854037223" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f4d78253f6996be4901669ad25319f842f740eccf4d58e3c7f3dd39e6dde1d8f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54f45a148e28767bf343d33a684693c70e451c6f4c0e9904709a723fafbdfc1f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:842e7b070435622248c7a2c44ae53fa1440e073cc3023bc919fed570884097a7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8020133a74bd81b4572dd8e4be028a6b1ebcd70e6726edc3918008c08bee6ee6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cdc7e35386f3847df728fbcb5e887e2d79c19e2fa1eba9e51b6621d23e3243af" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acac386b453c2516111b50985d60ce46e7fadb5ea71ae7b25f4c946935bf27cf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_31_riscv64.whl", hash = "sha256:425560c6fa0415f27261727bb20bd097568485e5eb0c121f1949417d1c516885" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a550fb4950a06dde3beb4721f5ad4b25bf4513784665b0a8522c792e2bd822a4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f4bca01b63096f606e095734dd56e74e175f94cfbf24ff3d63281cec61f7bb7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:ccffae9a092a00deb7efd545fe5e2c33c33b88e7c054337e9a74c179347d0b7d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1cf01971c4f2c5553b772a542e4aaf191789cd331bc2cd4ff0e6e65ba49e1e97" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-win32.whl", hash = "sha256:8c3d1e9c15b9d51ca0391e13da1a25a0a4df3c58a37c9dc368e0736cf7f69df0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-win_amd64.whl", hash = "sha256:9250a9a0a6fd4648b3f868da8d91a4c52b5811a62df58e753d50ae4454a36f80" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp313-cp313-win_arm64.whl", hash = "sha256:900a67df3fd1660b035a4761c4ce73c382ea6b35f90f9863c36c6fd8bf8b09bb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:931908d9fc855d8f74783377822be318edb6dcb19e47169dc038f9a1bf60b06e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:d7469697dce35be237db177d42e2a2ee26e6dcc5fc052078a6fefabd288c6edd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcfbcf66006befb9fd2aeaa9e01feaf881b4dc330a02ba07d2322b1c11be7b5d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:847927daf4cffbd4e90e42bc890069897101edd015f956cb8721b3473372edda" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aca6c1ef08a82bfe327cc156da694660f599923e2e6665b6d81c9c2d0ac9ffc8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ae50181a047c871561212bb97f7932a2d45fb53e947bd9b57ebad85b529cbc53" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc319e5a1de4b6913aac94bf6a2f9e847371e0a140a43dd4991db1a09bc2d504" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:e4316bf32babbed84e691e352faf967ce2f0f024174a8643c37c94a1080374fc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8c6e5a2f750cc71c3e3b11d71661f21d6f9bc6cebc6564b1466417a1ec03ec77" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4470ce197d4090875cf6affbf1f853338387428df97c4fb7b7106317b8214698" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:ea964164cc9afa72d4d9b23cc28dafae93693c0a53e0b42acbff15b22c3f9ddd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:639c8929aa0afe81be836b04de888460d6bed38b9c54cfc18da8f6bfabf5af5d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-win32.whl", hash = "sha256:882076c00c0a608b131187055ddc5ae29f2e7eaf870d6168980420d58528a5c8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-win_amd64.whl", hash = "sha256:0be972be84cfcaf46c8c6edf690ca0f154ac17babf1f6a955a51579b34ad2dc5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314-win_arm64.whl", hash = "sha256:2a9c6f195058cb45335e8cc3802745c603d716eb96bc9625950c1aac71c0c703" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:f90938e92afda60266da758ee7d363447f7f0138c9559f9e1811629580582d90" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:ec829541c45bca16e61c7ae50c20501f213605beb75d1aba91a6ee37fbbb56a4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afd70d95892096cdb26f15a00c45907b17817577aa8d1c76b2dcc2788391f9e9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:29dfa0533a5d4c94d4dfa1b694fcb56c9c63aad8330ffdd816fd225d0a7a162f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:af05d726809bff6b141be124d4c7ce998f9c9c7f30edb1f46c07aa103d540b41" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9826217f048f620d9a712672818bf231442c1b35d96b227a07eabd11b4bb6945" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:536bceea4fa4acf7e1c61da2b5786304367c816c8895be71b8f537c480b0ea1f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:bc0011654b91cc4fb2ae701bec0a0ba1e552c0714247fa7af6c59e0ccfa3a4e1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:539d75de9e0d536c84ff18dfeb805398e58227001ce09231a26a08b9aed1ee0e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:166cf54d9f44fc6ceb53c7860258dde44a81406646de79f8ed3234fca3b6e538" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:d34c20167764fbcf927194d532dd7e0c56772f0a5f943fa5ef9e9afbba8fb9db" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ea7bb13b7c9a29791f87a0387ba7d3ad3a6d783d827e4d3f27b40a0ff44495e2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-win32.whl", hash = "sha256:6de4744d05bd1aa1be4ed7ea1189e3979196808008113bbbf899a460966b925e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp314-cp314t-win_amd64.whl", hash = "sha256:c7b9a2f8f4d8e90af72571d3d495deebdd7e3c75451f5b41719aee166e940fc2" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-macosx_10_12_x86_64.whl", hash = "sha256:e059c5dde6452b44424bd1834557556c226b57781dee1227af23518459722b13" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:2f7c26fbc5acd2522b95d4177fe4710ffd8e9b20529e703ffbf8db4d93903f05" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3086b538543802f84c843911242db20447de00d8752dd0efc936dbcf02218ba" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8f2e5c5ee828d42cb11760761c0af6507927bec42d0ad5458f97c9203b054617" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed0c1e5d10cdc7135537988c74a0188da68e2f3c30813ba3744ab1e42e0480f9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c2642a7603ec0b16ed77da4555db3b4b472341904873788327c0b0d7b95f1bb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e4320744c1ffdd95a603def63344bfab2d33edeab301c5007e7de9f9f5b3885" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_31_riscv64.whl", hash = "sha256:a9f4645593036b81bbdb36b9c8e0ea0d1c3fee968c4d59db0344c14087ef143a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e55d236be29255554da47abe5c577637db7c24a02b8b46f0ca9524c855801868" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:24e9c5386e16669b674a69c156c8eeefcb578f3b3397b713b08e6d60f3c7b187" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:c60924535c75f1566b6eb75b5c31a48a43fef04fa2d0d201acbad8a9969c6107" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:38a2fea2787428f811719ceb9114cb78964a3138838320c29ac39526c79c16ba" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-win32.whl", hash = "sha256:d483fe17f01ad64b7bf7cc38fcefff1ca9fb83f8c2b2542b68f97ffe0611b369" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-win_amd64.whl", hash = "sha256:67e3a721ffc5d8d2210d3671872298c4a84e4b8035cfe42ffd7cde35d772b146" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315-win_arm64.whl", hash = "sha256:6e84adbcf4bf841aed8116a8264b9f50b4cb3e7bd89b516122e616ac56ca269e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-macosx_10_12_x86_64.whl", hash = "sha256:ae6dd8f10bd17aad820876d24caec9efdafd80a318d16c0a48edb5e136902c6b" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:bdbd97738551fca3917c1bd7188bec1920bb520104f28e7e1007f9ceb17b7690" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b95977e7211527ab0ba576e286d023389fbeeb32a6b7b771665d333c60e5342" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d15fde0e6fb0d88a60d221204873743e5d9f0b7d29165e62cd86d0413ad74ba6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a136d453475ac0fcbda502ef1e6504bd28d6d904700915d278deeab0d00fe140" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f826877d462181e5eb1c26a0026b8d0cab05d99844ecb6d8bf3627a2ca0c0442" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79486287de1730dbaff3dbd124d0ca4d2ef7f9d29bf2544f1f93c09b5bcbbd12" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_31_riscv64.whl", hash = "sha256:808345f53cb952433ca2816f1604ff3515608a81784954f38d4452acfe8e61d5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1967debc37f64f2c4dc90a7f563aec558b471966e12adcac4e1c4240496b6ebf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:f0840b5b17057f7fd918b76183a4b5a0635f43e14eb2ce60dce1d4ee4707ea00" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-musllinux_1_2_i686.whl", hash = "sha256:faa679d19a6696fd54259ad321251ad77a13e70e03dd834daa762a44fb6196ef" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:23a439f31ccbeff1574e24889128821d1f7917470e830cf6544dced1c662262a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-win32.whl", hash = "sha256:913ca42ccad3f8cc6e292b587ae8ae49c8c823e5dce51a736252fc7c7cdfa577" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-cp315-cp315t-win_amd64.whl", hash = "sha256:ae3d4fe8c0b9213624fdce7279d70e3b148b682ca20719ebd193a23ebfa47324" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:4cf2d36a2357e4d07bb5a4f98801265327b48256867816cfd2ceb001e9754a8f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:30c6dc199b24a5e3e81d50da0f00858c5bbdb2617a750395687f4339c5818171" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9891e594296ab9dada6551c8e7b387b2721f27a67eecd528412e8906247a7b90" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b5c2dc92304aa48a4a60443b548bb12f12e119d4b72f314015e67b9e1be97fca" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:127e08c0642d880cf32ca47ec2a4a77b901f7e2dd1ad9762adb13955d72ffcc9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8bb68f03f395eb793220b45c097bd4d8c32944393da0fad8b999efac0868fc8c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a3450b693fde92133e9f51060568a4c31fcca76d5e53bbd611e689ca446517e9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_31_riscv64.whl", hash = "sha256:5e8d07bddee435a2ff6f1920e18feff28d0bc4533e42f4bf6927fbd073312c41" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3a83ae6c67b7676b9878378547ca8e93ed77a580037bcbcd1d32f739e1e6089c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl", hash = "sha256:2bfd04c19ddbd6640de0b51894d764bd2758854d5b75bd102d2ef10cb9c293a9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-musllinux_1_2_i686.whl", hash = "sha256:ca6546b66be9dc4738b1b043d5ebd5488c66c578c5ff0fd0e8065313fe3afb76" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/rpds-py/rpds_py-2026.6.3-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl", hash = "sha256:8e65860d238379ed982fd9ba690579b5e95af2f4840f99c772816dbe573cb826" }, ] [[package]] name = "ruff" version = "0.16.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/70/25/7113f6d5498888c5fb7db34081cba7d5971c4cb1bfb26819966eee68f003/ruff-0.16.1.tar.gz", hash = "sha256:fedad7c801dabd3fb9741d76aca39246e6ddd9ca446a015875207bf19f1e6bc7", size = 4877500, upload-time = "2026-07-30T19:37:01.379Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1b/bd/694da69368e0973de65df2ddc73ab18d43c469d5963d9b150911de6bc513/ruff-0.16.1-py3-none-linux_armv6l.whl", hash = "sha256:58edb313b88f0c5460a26adf5f39a37a3be789494a15e3e411e35fa78b89f9a0", size = 10839126, upload-time = "2026-07-30T19:36:13.697Z" }, - { url = "https://files.pythonhosted.org/packages/3f/f0/b626e5d5bd0dd9576263658ef12885e2288afd1029a48e26ffed65ec1ac1/ruff-0.16.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fde5a99e2f97479af66edd6622c6d5a2a7592c77cf4153d9e4428f5eeb55b60c", size = 11070253, upload-time = "2026-07-30T19:36:17.14Z" }, - { url = "https://files.pythonhosted.org/packages/83/63/f40acfb6b35b88623e71684942b552c3edd96035f5d98f313815f7b277de/ruff-0.16.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6", size = 10561425, upload-time = "2026-07-30T19:36:20.04Z" }, - { url = "https://files.pythonhosted.org/packages/aa/dd/14ec0e9c2b4d315547dd38765004b4863e354e1b52cb308272215d9f6f6d/ruff-0.16.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30affbcedf59ad5703d9c91f82266e02b47739f797e1a7b6e158e5526a6dae38", size = 10948879, upload-time = "2026-07-30T19:36:22.476Z" }, - { url = "https://files.pythonhosted.org/packages/33/e9/9d870cbae575030fdef595f04b4b97573c525b5497cce4f4498cf2f85446/ruff-0.16.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24e9c631573cbca9d20f1283f8f479b2afa4a8503504822bd71a293889f16743", size = 10643691, upload-time = "2026-07-30T19:36:24.914Z" }, - { url = "https://files.pythonhosted.org/packages/c4/09/12743d544e2173f53ecd27217c65f90d2bc0f8424a66a60339e56bbc0457/ruff-0.16.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b41bdd48fb420987a9b5212e4957c26ad4abce401fa9ea9d4d85843727945f4f", size = 11435354, upload-time = "2026-07-30T19:36:28.447Z" }, - { url = "https://files.pythonhosted.org/packages/7f/89/a1652b2daee52083c9554a6333b678a8b01d0400f976827bb87857f9449a/ruff-0.16.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0d1e1393b7648079e13669de1c1f4fde06d4583e84d8fd5c1551e0a77a2aa75", size = 12259033, upload-time = "2026-07-30T19:36:31.326Z" }, - { url = "https://files.pythonhosted.org/packages/16/96/ecdcb8c54ee7b123b487f807eb014e6e019155a0b81dfb669acd52f28ce3/ruff-0.16.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07bf434b1c95f4e093be4532068ef4fcf00924eb2ade8796075980902d6fd54a", size = 11667981, upload-time = "2026-07-30T19:36:34.394Z" }, - { url = "https://files.pythonhosted.org/packages/cd/90/c52e12e0d862e9572f2a33aa227409143520abe53111e9a6babbac7b4af8/ruff-0.16.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c", size = 11468183, upload-time = "2026-07-30T19:36:37.339Z" }, - { url = "https://files.pythonhosted.org/packages/2c/6b/4ffb7ad1d83eb16cf8cbb3c8815d3f11c88460fd162d4b372a2059be1c2a/ruff-0.16.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:82ae3c0c0d74daf17b968a10b7b3bb3ef297ab7de0c1f749646b25e690ccb150", size = 11470071, upload-time = "2026-07-30T19:36:39.91Z" }, - { url = "https://files.pythonhosted.org/packages/9c/72/32ae7db4c0b5e32ab611787caa19d1546800676d79f7483b7100a3561bf4/ruff-0.16.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4d5f2ed10f8242d83fc08d521301089364e3375375705356f20c0e31606ef3ef", size = 10919503, upload-time = "2026-07-30T19:36:42.65Z" }, - { url = "https://files.pythonhosted.org/packages/f7/ca/3d901ba6ad6fc38da39c3448fc6c59ac945679293a17c3ceb6d6c1cba13e/ruff-0.16.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a4665b309891f83f3e3c25447935f1213e9abbd4b5640af7a1f2def9f8d413c1", size = 10649861, upload-time = "2026-07-30T19:36:45.18Z" }, - { url = "https://files.pythonhosted.org/packages/92/79/894ef1ced26552d5f8c9cf6d85b0687840e1128c55aeab7b9c2d54a0d880/ruff-0.16.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26e9ca5c9bc3971f20d3cf18a957f52ffd6a5f6564ff15c4912a144dcac22494", size = 11148137, upload-time = "2026-07-30T19:36:47.936Z" }, - { url = "https://files.pythonhosted.org/packages/2d/69/3609a09fa1cb46cc28b762363e440a354204e5dff01bd0c8d7437874d6b9/ruff-0.16.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:67e1e1e3fa4f0c82f0e36d4cd61e661f6e7a6196cb1aa92fe0828fa7b8f257cd", size = 11559211, upload-time = "2026-07-30T19:36:50.448Z" }, - { url = "https://files.pythonhosted.org/packages/fc/8a/fb22af2fd78a736e241fabf67e30ce1799a64244026377a49e133af90762/ruff-0.16.1-py3-none-win32.whl", hash = "sha256:d31765e131295b8445caf301e3e8a85b34d1b9b211b4109b7ba457888b051806", size = 10838258, upload-time = "2026-07-30T19:36:53.298Z" }, - { url = "https://files.pythonhosted.org/packages/d4/35/e57fd9fb5d423961df087a00b12d42c0a830288dc2f3b45ecca299158b4f/ruff-0.16.1-py3-none-win_amd64.whl", hash = "sha256:09b05e8b90c2cb06ad63464350e7a45e8e44a2dfe52072ebfba6666ca8d3f596", size = 11961111, upload-time = "2026-07-30T19:36:56.107Z" }, - { url = "https://files.pythonhosted.org/packages/cb/46/240ea004bf6dc4feb40e9832f2205a476a47dd5b8a3f8211a5fc5f95e20e/ruff-0.16.1-py3-none-win_arm64.whl", hash = "sha256:dbaadaac38c70239f056d306b7476f246b0bf000fa6b3876402acbf5b227eaf8", size = 11309414, upload-time = "2026-07-30T19:36:58.79Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1.tar.gz", hash = "sha256:fedad7c801dabd3fb9741d76aca39246e6ddd9ca446a015875207bf19f1e6bc7" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-linux_armv6l.whl", hash = "sha256:58edb313b88f0c5460a26adf5f39a37a3be789494a15e3e411e35fa78b89f9a0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:fde5a99e2f97479af66edd6622c6d5a2a7592c77cf4153d9e4428f5eeb55b60c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e0d4c20532fca4f7fa609369161d968dd28f65d83dabbd61d8e9c7edbf7001f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30affbcedf59ad5703d9c91f82266e02b47739f797e1a7b6e158e5526a6dae38" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:24e9c631573cbca9d20f1283f8f479b2afa4a8503504822bd71a293889f16743" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b41bdd48fb420987a9b5212e4957c26ad4abce401fa9ea9d4d85843727945f4f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b0d1e1393b7648079e13669de1c1f4fde06d4583e84d8fd5c1551e0a77a2aa75" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:07bf434b1c95f4e093be4532068ef4fcf00924eb2ade8796075980902d6fd54a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39897739f112253ee4fdd2e8aa9a4f9ded99fb2be367d5f31dfa4ded6025584c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:82ae3c0c0d74daf17b968a10b7b3bb3ef297ab7de0c1f749646b25e690ccb150" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4d5f2ed10f8242d83fc08d521301089364e3375375705356f20c0e31606ef3ef" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a4665b309891f83f3e3c25447935f1213e9abbd4b5640af7a1f2def9f8d413c1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-musllinux_1_2_i686.whl", hash = "sha256:26e9ca5c9bc3971f20d3cf18a957f52ffd6a5f6564ff15c4912a144dcac22494" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:67e1e1e3fa4f0c82f0e36d4cd61e661f6e7a6196cb1aa92fe0828fa7b8f257cd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-win32.whl", hash = "sha256:d31765e131295b8445caf301e3e8a85b34d1b9b211b4109b7ba457888b051806" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-win_amd64.whl", hash = "sha256:09b05e8b90c2cb06ad63464350e7a45e8e44a2dfe52072ebfba6666ca8d3f596" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/ruff/ruff-0.16.1-py3-none-win_arm64.whl", hash = "sha256:dbaadaac38c70239f056d306b7476f246b0bf000fa6b3876402acbf5b227eaf8" }, ] [[package]] name = "tomli" version = "2.4.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz", hash = "sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f", size = 17543, upload-time = "2026-03-25T20:22:03.828Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30", size = 154704, upload-time = "2026-03-25T20:21:10.473Z" }, - { url = "https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a", size = 149454, upload-time = "2026-03-25T20:21:12.036Z" }, - { url = "https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076", size = 237561, upload-time = "2026-03-25T20:21:13.098Z" }, - { url = "https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9", size = 243824, upload-time = "2026-03-25T20:21:14.569Z" }, - { url = "https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c", size = 242227, upload-time = "2026-03-25T20:21:15.712Z" }, - { url = "https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc", size = 247859, upload-time = "2026-03-25T20:21:17.001Z" }, - { url = "https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl", hash = "sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049", size = 97204, upload-time = "2026-03-25T20:21:18.079Z" }, - { url = "https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e", size = 108084, upload-time = "2026-03-25T20:21:18.978Z" }, - { url = "https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece", size = 95285, upload-time = "2026-03-25T20:21:20.309Z" }, - { url = "https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a", size = 155924, upload-time = "2026-03-25T20:21:21.626Z" }, - { url = "https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085", size = 150018, upload-time = "2026-03-25T20:21:23.002Z" }, - { url = "https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9", size = 244948, upload-time = "2026-03-25T20:21:24.04Z" }, - { url = "https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5", size = 253341, upload-time = "2026-03-25T20:21:25.177Z" }, - { url = "https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585", size = 248159, upload-time = "2026-03-25T20:21:26.364Z" }, - { url = "https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1", size = 253290, upload-time = "2026-03-25T20:21:27.46Z" }, - { url = "https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl", hash = "sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917", size = 98141, upload-time = "2026-03-25T20:21:28.492Z" }, - { url = "https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9", size = 108847, upload-time = "2026-03-25T20:21:29.386Z" }, - { url = "https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257", size = 95088, upload-time = "2026-03-25T20:21:30.677Z" }, - { url = "https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54", size = 155866, upload-time = "2026-03-25T20:21:31.65Z" }, - { url = "https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a", size = 149887, upload-time = "2026-03-25T20:21:33.028Z" }, - { url = "https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897", size = 243704, upload-time = "2026-03-25T20:21:34.51Z" }, - { url = "https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f", size = 251628, upload-time = "2026-03-25T20:21:36.012Z" }, - { url = "https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d", size = 247180, upload-time = "2026-03-25T20:21:37.136Z" }, - { url = "https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5", size = 251674, upload-time = "2026-03-25T20:21:38.298Z" }, - { url = "https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl", hash = "sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd", size = 97976, upload-time = "2026-03-25T20:21:39.316Z" }, - { url = "https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36", size = 108755, upload-time = "2026-03-25T20:21:40.248Z" }, - { url = "https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd", size = 95265, upload-time = "2026-03-25T20:21:41.219Z" }, - { url = "https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf", size = 155726, upload-time = "2026-03-25T20:21:42.23Z" }, - { url = "https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac", size = 149859, upload-time = "2026-03-25T20:21:43.386Z" }, - { url = "https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662", size = 244713, upload-time = "2026-03-25T20:21:44.474Z" }, - { url = "https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853", size = 252084, upload-time = "2026-03-25T20:21:45.62Z" }, - { url = "https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15", size = 247973, upload-time = "2026-03-25T20:21:46.937Z" }, - { url = "https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba", size = 256223, upload-time = "2026-03-25T20:21:48.467Z" }, - { url = "https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl", hash = "sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6", size = 98973, upload-time = "2026-03-25T20:21:49.526Z" }, - { url = "https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7", size = 109082, upload-time = "2026-03-25T20:21:50.506Z" }, - { url = "https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232", size = 96490, upload-time = "2026-03-25T20:21:51.474Z" }, - { url = "https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4", size = 164263, upload-time = "2026-03-25T20:21:52.543Z" }, - { url = "https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c", size = 160736, upload-time = "2026-03-25T20:21:53.674Z" }, - { url = "https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d", size = 270717, upload-time = "2026-03-25T20:21:55.129Z" }, - { url = "https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41", size = 278461, upload-time = "2026-03-25T20:21:56.228Z" }, - { url = "https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c", size = 274855, upload-time = "2026-03-25T20:21:57.653Z" }, - { url = "https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f", size = 283144, upload-time = "2026-03-25T20:21:59.089Z" }, - { url = "https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8", size = 108683, upload-time = "2026-03-25T20:22:00.214Z" }, - { url = "https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26", size = 121196, upload-time = "2026-03-25T20:22:01.169Z" }, - { url = "https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396", size = 100393, upload-time = "2026-03-25T20:22:02.137Z" }, - { url = "https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe", size = 14583, upload-time = "2026-03-25T20:22:03.012Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1.tar.gz", hash = "sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-win32.whl", hash = "sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-win32.whl", hash = "sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-win32.whl", hash = "sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-win32.whl", hash = "sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli/tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe" }, ] [[package]] name = "tomli-w" version = "1.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz", hash = "sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021", size = 7184, upload-time = "2025-01-15T12:07:24.262Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli-w/tomli_w-1.2.0.tar.gz", hash = "sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", size = 6675, upload-time = "2025-01-15T12:07:22.074Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tomli-w/tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90" }, ] [[package]] name = "towncrier" version = "25.8.0" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "click" }, { name = "jinja2" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c2/eb/5bf25a34123698d3bbab39c5bc5375f8f8bcbcc5a136964ade66935b8b9d/towncrier-25.8.0.tar.gz", hash = "sha256:eef16d29f831ad57abb3ae32a0565739866219f1ebfbdd297d32894eb9940eb1", size = 76322, upload-time = "2025-08-30T11:41:55.393Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/towncrier/towncrier-25.8.0.tar.gz", hash = "sha256:eef16d29f831ad57abb3ae32a0565739866219f1ebfbdd297d32894eb9940eb1" } wheels = [ - { url = "https://files.pythonhosted.org/packages/42/06/8ba22ec32c74ac1be3baa26116e3c28bc0e76a5387476921d20b6fdade11/towncrier-25.8.0-py3-none-any.whl", hash = "sha256:b953d133d98f9aeae9084b56a3563fd2519dfc6ec33f61c9cd2c61ff243fb513", size = 65101, upload-time = "2025-08-30T11:41:53.644Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/towncrier/towncrier-25.8.0-py3-none-any.whl", hash = "sha256:b953d133d98f9aeae9084b56a3563fd2519dfc6ec33f61c9cd2c61ff243fb513" }, ] [[package]] name = "tox" version = "4.56.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "cachetools" }, { name = "colorama" }, @@ -2004,118 +2004,118 @@ dependencies = [ { name = "typing-extensions", marker = "python_full_version < '3.11'" }, { name = "virtualenv" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/60/6a/d20d405fc6661902ff803a9fa048d8aae27597c3b5dc750369ded82d08f7/tox-4.56.1.tar.gz", hash = "sha256:db1c2610802553189cf40de251661d066a635ee0ed9bf2a60093b5f1a7f36ef8", size = 283155, upload-time = "2026-06-25T06:18:36.802Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tox/tox-4.56.1.tar.gz", hash = "sha256:db1c2610802553189cf40de251661d066a635ee0ed9bf2a60093b5f1a7f36ef8" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d8/97/560a5dfde154619d9643b1e208119dddc29bbb35a38a4ce4d095c16cf8f0/tox-4.56.1-py3-none-any.whl", hash = "sha256:4d06b925c4dd67872099b39c5a46fba79a2169c5f6e32060f95a8b1181f0ef55", size = 216469, upload-time = "2026-06-25T06:18:35.229Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tox/tox-4.56.1-py3-none-any.whl", hash = "sha256:4d06b925c4dd67872099b39c5a46fba79a2169c5f6e32060f95a8b1181f0ef55" }, ] [[package]] name = "tox-uv" version = "1.35.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "tox-uv-bare" }, { name = "uv" }, ] wheels = [ - { url = "https://files.pythonhosted.org/packages/ca/dc/6e9994c799bdbb309f829dd6b8d98764dd0757302f3433c380438a3a127b/tox_uv-1.35.2-py3-none-any.whl", hash = "sha256:2d99b0e3c782ba49e7cbe521c8d344758595961b17a3633738d67096641c1bde", size = 6565, upload-time = "2026-05-05T01:34:16.07Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tox-uv/tox_uv-1.35.2-py3-none-any.whl", hash = "sha256:2d99b0e3c782ba49e7cbe521c8d344758595961b17a3633738d67096641c1bde" }, ] [[package]] name = "tox-uv-bare" version = "1.35.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "packaging" }, { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "tox" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/0a/cb/168dc1ccf24e4065a9a0a33df55709ed2b5eb73bd2b13ddd53187e5dffb8/tox_uv_bare-1.35.2.tar.gz", hash = "sha256:49e28a804c97f23ea17e25859960c0fa78f35bccb7e14344cfd840e89a9aade9", size = 32333, upload-time = "2026-05-05T01:34:18.916Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tox-uv-bare/tox_uv_bare-1.35.2.tar.gz", hash = "sha256:49e28a804c97f23ea17e25859960c0fa78f35bccb7e14344cfd840e89a9aade9" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5f/53/4a33dc81da39db7b31e5622333df361e8fe055b7ec636bd5fea762c9182d/tox_uv_bare-1.35.2-py3-none-any.whl", hash = "sha256:c0d590a41d1054a1ad0874e9e5943ff52402786e3d4599d8f8d37a65b566ef53", size = 22307, upload-time = "2026-05-05T01:34:17.681Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/tox-uv-bare/tox_uv_bare-1.35.2-py3-none-any.whl", hash = "sha256:c0d590a41d1054a1ad0874e9e5943ff52402786e3d4599d8f8d37a65b566ef53" }, ] [[package]] name = "typeguard" version = "4.5.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/67/1c/dfba5c4633cafc4c701f237d2ba63b416805047fd6d96aab4cfc40969f98/typeguard-4.5.2.tar.gz", hash = "sha256:5a16dcac23502039299c97c8941651bc33d7ea8cc4b2f7d6bbb1b528f6eea423", size = 80240, upload-time = "2026-05-14T12:59:40.857Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/typeguard/typeguard-4.5.2.tar.gz", hash = "sha256:5a16dcac23502039299c97c8941651bc33d7ea8cc4b2f7d6bbb1b528f6eea423" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5b/29/74eeb4d3f3ae61ca096b018ad486b3b3c74b17bec09ab4edab721cbefec3/typeguard-4.5.2-py3-none-any.whl", hash = "sha256:fcf9de18bd945cdb4c7b996e12b4c51ce83f92f191314a6d7cf1739586ec98cf", size = 36748, upload-time = "2026-05-14T12:59:39.473Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/typeguard/typeguard-4.5.2-py3-none-any.whl", hash = "sha256:fcf9de18bd945cdb4c7b996e12b4c51ce83f92f191314a6d7cf1739586ec98cf" }, ] [[package]] name = "types-protobuf" version = "7.34.1.20260518" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/29/59/e2b13b499d15e6720150c4b1a8d91e31fcacf716b432397475b3151ff7e4/types_protobuf-7.34.1.20260518.tar.gz", hash = "sha256:28cfaded25889cb83ebfb63cfb0a43628f0b6f3785767bec17287dc6468795f2", size = 68936, upload-time = "2026-05-18T06:01:47.332Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/types-protobuf/types_protobuf-7.34.1.20260518.tar.gz", hash = "sha256:28cfaded25889cb83ebfb63cfb0a43628f0b6f3785767bec17287dc6468795f2" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/1f/ec5caf72c2e3b688ca3927e0979a04ddad19e1afc4bf1c199bd743e0f419/types_protobuf-7.34.1.20260518-py3-none-any.whl", hash = "sha256:a0a5337413347166439c0e07cbc26c6164d091401c6f01b1dfd8cdb966c4dd8f", size = 85992, upload-time = "2026-05-18T06:01:45.696Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/types-protobuf/types_protobuf-7.34.1.20260518-py3-none-any.whl", hash = "sha256:a0a5337413347166439c0e07cbc26c6164d091401c6f01b1dfd8cdb966c4dd8f" }, ] [[package]] name = "typing-extensions" version = "4.16.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/typing-extensions/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5" } wheels = [ - { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/typing-extensions/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8" }, ] [[package]] name = "typing-inspection" version = "0.4.2" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/typing-inspection/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464" } wheels = [ - { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/typing-inspection/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7" }, ] [[package]] name = "urllib3" version = "2.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/53/0c/06f8b233b8fd13b9e5ee11424ef85419ba0d8ba0b3138bf360be2ff56953/urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c", size = 433602, upload-time = "2026-05-07T16:13:18.596Z" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/urllib3/urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7f/3e/5db95bcf282c52709639744ca2a8b149baccf648e39c8cc87553df9eae0c/urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897", size = 131087, upload-time = "2026-05-07T16:13:17.151Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/urllib3/urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897" }, ] [[package]] name = "uv" version = "0.11.26" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d0/cb/5efc713948ddb10b00abfb51bfd429221c720175557f9c7965fea2448fe4/uv-0.11.26.tar.gz", hash = "sha256:2a433ece2ace088dd572d8abb0e6bd9a4ecb0e10bc9856447bbb37545f384f29", size = 4331220, upload-time = "2026-06-30T14:52:03.77Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c2/71/86dbffac9e26df28a16639c426cf4ba572aaf43d9231463e0dca337895b2/uv-0.11.26-py3-none-linux_armv6l.whl", hash = "sha256:fb97bf04512dfe16d86084e75d8129701fc8da9fb40de8746b73c3aa617c5897", size = 25197324, upload-time = "2026-06-30T14:50:51.75Z" }, - { url = "https://files.pythonhosted.org/packages/ec/80/525b73c8188e7052343e7109466a08fcd5195055aff4b0346ce3622e48cb/uv-0.11.26-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a58a06e5a4b0035538d3ab4160ad74c716076ea7148eb3317171c6276ac020b4", size = 24179172, upload-time = "2026-06-30T14:50:56.52Z" }, - { url = "https://files.pythonhosted.org/packages/7b/5e/cf7b94ed3b1932c2a62573dcd388ad6c1da5c52111cd71ab7f20faa4a0aa/uv-0.11.26-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b6d078d2ce83897884c2330c0676f27be4bf3d223fb2a409460f579fb5f0a98", size = 22949576, upload-time = "2026-06-30T14:51:00.538Z" }, - { url = "https://files.pythonhosted.org/packages/bf/fd/71fa021f6909c4139d8354bea623b5e0ef0ce4a08da250da1a1645528da2/uv-0.11.26-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:1cd9ba4951681ce17f1703106266fcbe27aaa7d37f07d53cce8b5686d68a8755", size = 24936673, upload-time = "2026-06-30T14:51:04.496Z" }, - { url = "https://files.pythonhosted.org/packages/7d/5e/273425e58a8812423e3d1f6c5da1015e636fbf13a83d104317ca37e16304/uv-0.11.26-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:e4f4c3268e69ac96f01972274a62f5f930c03cbc680adba6f21e63237ba3a639", size = 24719617, upload-time = "2026-06-30T14:51:08.419Z" }, - { url = "https://files.pythonhosted.org/packages/81/f8/1601e2acc7c54963814b4831eab996d8599e690712722c5acec5114860be/uv-0.11.26-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:efcbe0e187846f5ddba23bcaed17e4f9cd2463da5c45bdb5869616f686d713ff", size = 24734176, upload-time = "2026-06-30T14:51:12.685Z" }, - { url = "https://files.pythonhosted.org/packages/88/d2/a8a422e54c08cf4b8d51bedb9dbdd3cc233aa290ad8b3ee0438c0c02a3a5/uv-0.11.26-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:120ab2de93164d08cf5950f7fe18cbebe3ff670865ae41a292452bab2346477f", size = 26158780, upload-time = "2026-06-30T14:51:16.514Z" }, - { url = "https://files.pythonhosted.org/packages/db/e6/647fe5fdc888a3d27f79977877ce4e88052fe9be5398371e51bb134fc262/uv-0.11.26-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9052bf27c7ee426901f35a48715fa9288ce631c1878b91c9a6c950288f4b8633", size = 27009550, upload-time = "2026-06-30T14:51:20.659Z" }, - { url = "https://files.pythonhosted.org/packages/72/c2/85d8e762ad83b0f14fae2255b0578c4fd7dc915746f81b64ed786342627a/uv-0.11.26-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:efdddfcc9b1b790c5f7985c5c183c851682ced165b44ffa914f4947f5cad1fbf", size = 26183777, upload-time = "2026-06-30T14:51:24.715Z" }, - { url = "https://files.pythonhosted.org/packages/d3/00/478c3a870dcac690b8c337ee950a60a952e817f574945e85155c3cc0ab34/uv-0.11.26-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4dcf4e0b5b5cbdc242dcb002f1f8d99e7cf8c043609869228a9ce15e095c0b18", size = 26260589, upload-time = "2026-06-30T14:51:28.809Z" }, - { url = "https://files.pythonhosted.org/packages/a7/51/e4e43e106fb8cdc026b97491ea4600f4194a9c4da0b4e4e30c2a7dceb268/uv-0.11.26-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:866ae8d28f7381c15de0906a284c1e97916424c635bf40f7960b3fc889cd725e", size = 25073850, upload-time = "2026-06-30T14:51:32.717Z" }, - { url = "https://files.pythonhosted.org/packages/f2/c2/e772b7e6c8a835e8bf6739a391cdfc8e8e244c5c496d9b40625068b59ff4/uv-0.11.26-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl", hash = "sha256:22f6d62e794b252ff3a1e2dfe5010cc76208f90b2c906e54971a0223ad6f16bc", size = 25682609, upload-time = "2026-06-30T14:51:36.888Z" }, - { url = "https://files.pythonhosted.org/packages/1a/69/ea77209a224a23a399cb7f6414f77ef032bd9e083e01199a0ebebf0d3ff2/uv-0.11.26-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:edd0c12b75141a6d830d138a91e366ad66e630f1c1dcaf83b8325b80cbacfcbb", size = 25800556, upload-time = "2026-06-30T14:51:40.937Z" }, - { url = "https://files.pythonhosted.org/packages/77/60/b6c0c03d2538a016b6624fa251960012e564ea02f841e958c7d60e974685/uv-0.11.26-py3-none-musllinux_1_1_i686.whl", hash = "sha256:af6a45b11a569cc4d2437e89a25a53dcf753f2a02a8f2de96be09b9b942cb3ec", size = 25385658, upload-time = "2026-06-30T14:51:45.103Z" }, - { url = "https://files.pythonhosted.org/packages/8d/e7/46881ff9164aa2e7c649901837d58eee3c57beb3b0fcc0fea6a4e40cf8f3/uv-0.11.26-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:c28822517d03aebbe9549aaaecc88ad580e4b2b6a927abffe5774a74d6ba09f6", size = 26551013, upload-time = "2026-06-30T14:51:49.062Z" }, - { url = "https://files.pythonhosted.org/packages/d6/94/380dad6c2bbe12417025aacd12cfc08322ed4c9dd8f760bff7035b86f22d/uv-0.11.26-py3-none-win32.whl", hash = "sha256:79e5c1b3410047e1962290c3b7b8f512d2c1bb95200c60b016f7729287cf34c0", size = 23947180, upload-time = "2026-06-30T14:51:53.065Z" }, - { url = "https://files.pythonhosted.org/packages/d0/13/9c588226d5b478328d739e654944430719f3ffe8999d6a24d425ec9664ab/uv-0.11.26-py3-none-win_amd64.whl", hash = "sha256:d95567e9470dc48ff03265f420c3c6973f6437f18a79d5e00b6eb4b2d9379907", size = 26909320, upload-time = "2026-06-30T14:51:57.235Z" }, - { url = "https://files.pythonhosted.org/packages/21/1d/ea66b12813878797126e2b3aca124b1c9c5ef53120702d1c00172f90a21d/uv-0.11.26-py3-none-win_arm64.whl", hash = "sha256:7e69d1569afbb936e7bf4e4ab2f72d606405f4a68f380f088a0b2233e84e056a", size = 25176820, upload-time = "2026-06-30T14:52:01.05Z" }, +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26.tar.gz", hash = "sha256:2a433ece2ace088dd572d8abb0e6bd9a4ecb0e10bc9856447bbb37545f384f29" } +wheels = [ + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-linux_armv6l.whl", hash = "sha256:fb97bf04512dfe16d86084e75d8129701fc8da9fb40de8746b73c3aa617c5897" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a58a06e5a4b0035538d3ab4160ad74c716076ea7148eb3317171c6276ac020b4" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7b6d078d2ce83897884c2330c0676f27be4bf3d223fb2a409460f579fb5f0a98" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:1cd9ba4951681ce17f1703106266fcbe27aaa7d37f07d53cce8b5686d68a8755" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:e4f4c3268e69ac96f01972274a62f5f930c03cbc680adba6f21e63237ba3a639" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:efcbe0e187846f5ddba23bcaed17e4f9cd2463da5c45bdb5869616f686d713ff" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:120ab2de93164d08cf5950f7fe18cbebe3ff670865ae41a292452bab2346477f" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9052bf27c7ee426901f35a48715fa9288ce631c1878b91c9a6c950288f4b8633" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:efdddfcc9b1b790c5f7985c5c183c851682ced165b44ffa914f4947f5cad1fbf" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4dcf4e0b5b5cbdc242dcb002f1f8d99e7cf8c043609869228a9ce15e095c0b18" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:866ae8d28f7381c15de0906a284c1e97916424c635bf40f7960b3fc889cd725e" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_31_riscv64.musllinux_1_1_riscv64.whl", hash = "sha256:22f6d62e794b252ff3a1e2dfe5010cc76208f90b2c906e54971a0223ad6f16bc" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:edd0c12b75141a6d830d138a91e366ad66e630f1c1dcaf83b8325b80cbacfcbb" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-musllinux_1_1_i686.whl", hash = "sha256:af6a45b11a569cc4d2437e89a25a53dcf753f2a02a8f2de96be09b9b942cb3ec" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:c28822517d03aebbe9549aaaecc88ad580e4b2b6a927abffe5774a74d6ba09f6" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-win32.whl", hash = "sha256:79e5c1b3410047e1962290c3b7b8f512d2c1bb95200c60b016f7729287cf34c0" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-win_amd64.whl", hash = "sha256:d95567e9470dc48ff03265f420c3c6973f6437f18a79d5e00b6eb4b2d9379907" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/uv/uv-0.11.26-py3-none-win_arm64.whl", hash = "sha256:7e69d1569afbb936e7bf4e4ab2f72d606405f4a68f380f088a0b2233e84e056a" }, ] [[package]] name = "virtualenv" version = "21.5.1" -source = { registry = "https://pypi.org/simple" } +source = { registry = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/simple/" } dependencies = [ { name = "distlib" }, { name = "filelock" }, @@ -2123,7 +2123,7 @@ dependencies = [ { name = "python-discovery" }, { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f1/a5/81f987504738e6defeed61ec1c47e2aefab3c35d8eeb87e1b3f38cf28254/virtualenv-21.5.1.tar.gz", hash = "sha256:dca3bf98275a59c652b69d68e73433e597d977c2da9198882479d1a7188009c8", size = 4578798, upload-time = "2026-06-16T16:23:58.603Z" } +sdist = { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/virtualenv/virtualenv-21.5.1.tar.gz", hash = "sha256:dca3bf98275a59c652b69d68e73433e597d977c2da9198882479d1a7188009c8" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/02/3623e6169bed617ed1e2d372f7c69f92ec28d54c4dfc997055c8578ec148/virtualenv-21.5.1-py3-none-any.whl", hash = "sha256:55aa670b67bbfb991b03fda39bd3276d92c419d702376e98c5df1c9989a26783", size = 4558820, upload-time = "2026-06-16T16:23:56.963Z" }, + { url = "https://us-python.pkg.dev/artifact-foundry-prod/ah-3p-staging-python/virtualenv/virtualenv-21.5.1-py3-none-any.whl", hash = "sha256:55aa670b67bbfb991b03fda39bd3276d92c419d702376e98c5df1c9989a26783" }, ]