From 136b382df842079de250e6a849215f80f0119661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20V=2E=20Treider?= Date: Tue, 26 Mar 2024 23:09:32 +0100 Subject: [PATCH] Drop support for protobuf v3 (#1688) --- .pre-commit-config.yaml | 2 +- cognite/client/_api/datapoint_tasks.py | 14 +- cognite/client/_api/datapoints.py | 30 +- .../_proto/data_point_list_response_pb2.py | 1 + .../_proto/data_point_list_response_pb2.pyi | 118 ++---- cognite/client/_proto/data_points_pb2.py | 29 +- cognite/client/_proto/data_points_pb2.pyi | 236 +++++------- .../data_point_list_response_pb2.py | 194 ---------- .../data_point_list_response_pb2.pyi | 81 ---- .../client/_proto_legacy/data_points_pb2.py | 358 ------------------ .../client/_proto_legacy/data_points_pb2.pyi | 146 ------- cognite/client/utils/_importing.py | 6 - poetry.lock | 7 +- pyproject.toml | 2 +- 14 files changed, 153 insertions(+), 1071 deletions(-) delete mode 100644 cognite/client/_proto_legacy/data_point_list_response_pb2.py delete mode 100644 cognite/client/_proto_legacy/data_point_list_response_pb2.pyi delete mode 100644 cognite/client/_proto_legacy/data_points_pb2.py delete mode 100644 cognite/client/_proto_legacy/data_points_pb2.pyi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0853cc5657..7bec42f500 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,7 +13,7 @@ repos: - --select=E,W,F,I,T,RUF,TID,UP - --fixable=E,W,F,I,T,RUF,TID,UP - --target-version=py38 - - --exclude=cognite/client/_proto,cognite/client/_proto_legacy + - --exclude=cognite/client/_proto - id: ruff-format args: - --line-length=120 diff --git a/cognite/client/_api/datapoint_tasks.py b/cognite/client/_api/datapoint_tasks.py index 40c7bf68ff..717a777c7b 100644 --- a/cognite/client/_api/datapoint_tasks.py +++ b/cognite/client/_api/datapoint_tasks.py @@ -34,10 +34,11 @@ from google.protobuf.message import Message from typing_extensions import NotRequired, TypeAlias +from cognite.client._proto.data_point_list_response_pb2 import DataPointListItem +from cognite.client._proto.data_points_pb2 import AggregateDatapoint, NumericDatapoint, StringDatapoint from cognite.client.data_classes.datapoints import NUMPY_IS_AVAILABLE, Aggregate, Datapoints, DatapointsArray from cognite.client.utils._auxiliary import is_unlimited from cognite.client.utils._identifier import Identifier -from cognite.client.utils._importing import import_legacy_protobuf from cognite.client.utils._text import convert_all_keys_to_snake_case, to_camel_case, to_snake_case from cognite.client.utils._time import ( align_start_and_end_for_granularity, @@ -48,17 +49,6 @@ ) from cognite.client.utils.useful_types import SequenceNotStr -if not import_legacy_protobuf(): - from cognite.client._proto.data_point_list_response_pb2 import DataPointListItem - from cognite.client._proto.data_points_pb2 import AggregateDatapoint, NumericDatapoint, StringDatapoint -else: - from cognite.client._proto_legacy.data_point_list_response_pb2 import DataPointListItem # type: ignore [assignment] - from cognite.client._proto_legacy.data_points_pb2 import ( # type: ignore [assignment] - AggregateDatapoint, - NumericDatapoint, - StringDatapoint, - ) - if NUMPY_IS_AVAILABLE: import numpy as np diff --git a/cognite/client/_api/datapoints.py b/cognite/client/_api/datapoints.py index 055153e087..19d8da26f9 100644 --- a/cognite/client/_api/datapoints.py +++ b/cognite/client/_api/datapoints.py @@ -1,12 +1,10 @@ from __future__ import annotations -import contextlib import functools import heapq import itertools import math import time -import warnings from abc import ABC, abstractmethod from collections.abc import Mapping from datetime import datetime @@ -39,6 +37,7 @@ ) from cognite.client._api.synthetic_time_series import SyntheticDatapointsAPI from cognite.client._api_client import APIClient +from cognite.client._proto.data_point_list_response_pb2 import DataPointListItem, DataPointListResponse from cognite.client.data_classes.datapoints import ( Aggregate, Datapoints, @@ -57,7 +56,7 @@ ) from cognite.client.utils._concurrency import ConcurrencySettings, execute_tasks from cognite.client.utils._identifier import Identifier, IdentifierSequence, IdentifierSequenceCore -from cognite.client.utils._importing import import_as_completed, import_legacy_protobuf, local_import +from cognite.client.utils._importing import import_as_completed, local_import from cognite.client.utils._time import ( align_large_granularity, pandas_date_range_tz, @@ -69,14 +68,6 @@ from cognite.client.utils._validation import assert_type, validate_user_input_dict_with_identifier from cognite.client.utils.useful_types import SequenceNotStr -if not import_legacy_protobuf(): - from cognite.client._proto.data_point_list_response_pb2 import DataPointListItem, DataPointListResponse -else: - from cognite.client._proto_legacy.data_point_list_response_pb2 import ( # type: ignore [assignment] - DataPointListItem, - DataPointListResponse, - ) - if TYPE_CHECKING: from concurrent.futures import Future, ThreadPoolExecutor @@ -140,23 +131,6 @@ def __init__( self.api_subversion = api_subversion self.n_queries = len(all_queries) - # Fetching datapoints relies on protobuf, which, depending on OS and major version used - # might be running in pure python or compiled C code. We issue a warning if we can determine - # that the user is running in pure python mode (quite a bit slower...) - with contextlib.suppress(ImportError): - from google.protobuf.descriptor import _USE_C_DESCRIPTORS - - if _USE_C_DESCRIPTORS is False: - warnings.warn( - "Your installation of 'protobuf' is missing compiled C binaries, and will run in pure-python mode, " - "which causes datapoints fetching to be ~5x slower. To verify, set the environment variable " - "`PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp` before running (this will cause the code to fail). " - "The easiest fix is probably to pin your 'protobuf' dependency to major version 4 (or higher), " - "see: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates", - UserWarning, - stacklevel=3, - ) - def fetch_all_datapoints(self) -> DatapointsList: pool = ConcurrencySettings.get_executor(max_workers=self.max_workers) return DatapointsList( diff --git a/cognite/client/_proto/data_point_list_response_pb2.py b/cognite/client/_proto/data_point_list_response_pb2.py index ca288ffee7..0fdb04c205 100644 --- a/cognite/client/_proto/data_point_list_response_pb2.py +++ b/cognite/client/_proto/data_point_list_response_pb2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: data_point_list_response.proto +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool diff --git a/cognite/client/_proto/data_point_list_response_pb2.pyi b/cognite/client/_proto/data_point_list_response_pb2.pyi index 3e38ee3f07..0f2cf785cc 100644 --- a/cognite/client/_proto/data_point_list_response_pb2.pyi +++ b/cognite/client/_proto/data_point_list_response_pb2.pyi @@ -1,81 +1,37 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import collections.abc -import data_points_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class DataPointListItem(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ID_FIELD_NUMBER: builtins.int - EXTERNALID_FIELD_NUMBER: builtins.int - ISSTRING_FIELD_NUMBER: builtins.int - ISSTEP_FIELD_NUMBER: builtins.int - UNIT_FIELD_NUMBER: builtins.int - NEXTCURSOR_FIELD_NUMBER: builtins.int - UNITEXTERNALID_FIELD_NUMBER: builtins.int - NUMERICDATAPOINTS_FIELD_NUMBER: builtins.int - STRINGDATAPOINTS_FIELD_NUMBER: builtins.int - AGGREGATEDATAPOINTS_FIELD_NUMBER: builtins.int - id: builtins.int - externalId: builtins.str - isString: builtins.bool - isStep: builtins.bool - unit: builtins.str - nextCursor: builtins.str - unitExternalId: builtins.str - @property - def numericDatapoints(self) -> data_points_pb2.NumericDatapoints: ... - @property - def stringDatapoints(self) -> data_points_pb2.StringDatapoints: ... - @property - def aggregateDatapoints(self) -> data_points_pb2.AggregateDatapoints: ... - def __init__( - self, - *, - id: builtins.int = ..., - externalId: builtins.str = ..., - isString: builtins.bool = ..., - isStep: builtins.bool = ..., - unit: builtins.str = ..., - nextCursor: builtins.str = ..., - unitExternalId: builtins.str = ..., - numericDatapoints: data_points_pb2.NumericDatapoints | None = ..., - stringDatapoints: data_points_pb2.StringDatapoints | None = ..., - aggregateDatapoints: data_points_pb2.AggregateDatapoints | None = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["aggregateDatapoints", b"aggregateDatapoints", "datapointType", b"datapointType", "numericDatapoints", b"numericDatapoints", "stringDatapoints", b"stringDatapoints"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["aggregateDatapoints", b"aggregateDatapoints", "datapointType", b"datapointType", "externalId", b"externalId", "id", b"id", "isStep", b"isStep", "isString", b"isString", "nextCursor", b"nextCursor", "numericDatapoints", b"numericDatapoints", "stringDatapoints", b"stringDatapoints", "unit", b"unit", "unitExternalId", b"unitExternalId"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["datapointType", b"datapointType"]) -> typing_extensions.Literal["numericDatapoints", "stringDatapoints", "aggregateDatapoints"] | None: ... - -global___DataPointListItem = DataPointListItem - -@typing_extensions.final -class DataPointListResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ITEMS_FIELD_NUMBER: builtins.int - @property - def items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DataPointListItem]: ... - def __init__( - self, - *, - items: collections.abc.Iterable[global___DataPointListItem] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["items", b"items"]) -> None: ... - -global___DataPointListResponse = DataPointListResponse +import data_points_pb2 as _data_points_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class DataPointListItem(_message.Message): + __slots__ = ("id", "externalId", "isString", "isStep", "unit", "nextCursor", "unitExternalId", "numericDatapoints", "stringDatapoints", "aggregateDatapoints") + ID_FIELD_NUMBER: _ClassVar[int] + EXTERNALID_FIELD_NUMBER: _ClassVar[int] + ISSTRING_FIELD_NUMBER: _ClassVar[int] + ISSTEP_FIELD_NUMBER: _ClassVar[int] + UNIT_FIELD_NUMBER: _ClassVar[int] + NEXTCURSOR_FIELD_NUMBER: _ClassVar[int] + UNITEXTERNALID_FIELD_NUMBER: _ClassVar[int] + NUMERICDATAPOINTS_FIELD_NUMBER: _ClassVar[int] + STRINGDATAPOINTS_FIELD_NUMBER: _ClassVar[int] + AGGREGATEDATAPOINTS_FIELD_NUMBER: _ClassVar[int] + id: int + externalId: str + isString: bool + isStep: bool + unit: str + nextCursor: str + unitExternalId: str + numericDatapoints: _data_points_pb2.NumericDatapoints + stringDatapoints: _data_points_pb2.StringDatapoints + aggregateDatapoints: _data_points_pb2.AggregateDatapoints + def __init__(self, id: _Optional[int] = ..., externalId: _Optional[str] = ..., isString: bool = ..., isStep: bool = ..., unit: _Optional[str] = ..., nextCursor: _Optional[str] = ..., unitExternalId: _Optional[str] = ..., numericDatapoints: _Optional[_Union[_data_points_pb2.NumericDatapoints, _Mapping]] = ..., stringDatapoints: _Optional[_Union[_data_points_pb2.StringDatapoints, _Mapping]] = ..., aggregateDatapoints: _Optional[_Union[_data_points_pb2.AggregateDatapoints, _Mapping]] = ...) -> None: ... + +class DataPointListResponse(_message.Message): + __slots__ = ("items",) + ITEMS_FIELD_NUMBER: _ClassVar[int] + items: _containers.RepeatedCompositeFieldContainer[DataPointListItem] + def __init__(self, items: _Optional[_Iterable[_Union[DataPointListItem, _Mapping]]] = ...) -> None: ... diff --git a/cognite/client/_proto/data_points_pb2.py b/cognite/client/_proto/data_points_pb2.py index d5129c45f1..3975778c67 100644 --- a/cognite/client/_proto/data_points_pb2.py +++ b/cognite/client/_proto/data_points_pb2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: data_points.proto +# Protobuf Python Version: 4.25.3 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -13,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x64\x61ta_points.proto\x12\x1f\x63om.cognite.v1.timeseries.proto\"4\n\x10NumericDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x01\"Z\n\x11NumericDatapoints\x12\x45\n\ndatapoints\x18\x01 \x03(\x0b\x32\x31.com.cognite.v1.timeseries.proto.NumericDatapoint\"3\n\x0fStringDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\t\"X\n\x10StringDatapoints\x12\x44\n\ndatapoints\x18\x01 \x03(\x0b\x32\x30.com.cognite.v1.timeseries.proto.StringDatapoint\"\xee\x01\n\x12\x41ggregateDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x0f\n\x07\x61verage\x18\x02 \x01(\x01\x12\x0b\n\x03max\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\r\n\x05\x63ount\x18\x05 \x01(\x01\x12\x0b\n\x03sum\x18\x06 \x01(\x01\x12\x15\n\rinterpolation\x18\x07 \x01(\x01\x12\x19\n\x11stepInterpolation\x18\x08 \x01(\x01\x12\x1a\n\x12\x63ontinuousVariance\x18\t \x01(\x01\x12\x18\n\x10\x64iscreteVariance\x18\n \x01(\x01\x12\x16\n\x0etotalVariation\x18\x0b \x01(\x01\"^\n\x13\x41ggregateDatapoints\x12G\n\ndatapoints\x18\x01 \x03(\x0b\x32\x33.com.cognite.v1.timeseries.proto.AggregateDatapointB\x02P\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11\x64\x61ta_points.proto\x12\x1f\x63om.cognite.v1.timeseries.proto\"&\n\x06Status\x12\x0c\n\x04\x63ode\x18\x01 \x01(\x03\x12\x0e\n\x06symbol\x18\x02 \x01(\t\"\x80\x01\n\x10NumericDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x01\x12\x37\n\x06status\x18\x03 \x01(\x0b\x32\'.com.cognite.v1.timeseries.proto.Status\x12\x11\n\tnullValue\x18\x04 \x01(\x08\"Z\n\x11NumericDatapoints\x12\x45\n\ndatapoints\x18\x01 \x03(\x0b\x32\x31.com.cognite.v1.timeseries.proto.NumericDatapoint\"3\n\x0fStringDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\t\"X\n\x10StringDatapoints\x12\x44\n\ndatapoints\x18\x01 \x03(\x0b\x32\x30.com.cognite.v1.timeseries.proto.StringDatapoint\"\xf1\x02\n\x12\x41ggregateDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x0f\n\x07\x61verage\x18\x02 \x01(\x01\x12\x0b\n\x03max\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\r\n\x05\x63ount\x18\x05 \x01(\x01\x12\x0b\n\x03sum\x18\x06 \x01(\x01\x12\x15\n\rinterpolation\x18\x07 \x01(\x01\x12\x19\n\x11stepInterpolation\x18\x08 \x01(\x01\x12\x1a\n\x12\x63ontinuousVariance\x18\t \x01(\x01\x12\x18\n\x10\x64iscreteVariance\x18\n \x01(\x01\x12\x16\n\x0etotalVariation\x18\x0b \x01(\x01\x12\x11\n\tcountGood\x18\x0c \x01(\x01\x12\x16\n\x0e\x63ountUncertain\x18\r \x01(\x01\x12\x10\n\x08\x63ountBad\x18\x0e \x01(\x01\x12\x14\n\x0c\x64urationGood\x18\x0f \x01(\x01\x12\x19\n\x11\x64urationUncertain\x18\x10 \x01(\x01\x12\x13\n\x0b\x64urationBad\x18\x11 \x01(\x01\"^\n\x13\x41ggregateDatapoints\x12G\n\ndatapoints\x18\x01 \x03(\x0b\x32\x33.com.cognite.v1.timeseries.proto.AggregateDatapointB\x02P\x01\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,16 +22,18 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'P\001' - _globals['_NUMERICDATAPOINT']._serialized_start=54 - _globals['_NUMERICDATAPOINT']._serialized_end=106 - _globals['_NUMERICDATAPOINTS']._serialized_start=108 - _globals['_NUMERICDATAPOINTS']._serialized_end=198 - _globals['_STRINGDATAPOINT']._serialized_start=200 - _globals['_STRINGDATAPOINT']._serialized_end=251 - _globals['_STRINGDATAPOINTS']._serialized_start=253 - _globals['_STRINGDATAPOINTS']._serialized_end=341 - _globals['_AGGREGATEDATAPOINT']._serialized_start=344 - _globals['_AGGREGATEDATAPOINT']._serialized_end=582 - _globals['_AGGREGATEDATAPOINTS']._serialized_start=584 - _globals['_AGGREGATEDATAPOINTS']._serialized_end=678 + _globals['_STATUS']._serialized_start=54 + _globals['_STATUS']._serialized_end=92 + _globals['_NUMERICDATAPOINT']._serialized_start=95 + _globals['_NUMERICDATAPOINT']._serialized_end=223 + _globals['_NUMERICDATAPOINTS']._serialized_start=225 + _globals['_NUMERICDATAPOINTS']._serialized_end=315 + _globals['_STRINGDATAPOINT']._serialized_start=317 + _globals['_STRINGDATAPOINT']._serialized_end=368 + _globals['_STRINGDATAPOINTS']._serialized_start=370 + _globals['_STRINGDATAPOINTS']._serialized_end=458 + _globals['_AGGREGATEDATAPOINT']._serialized_start=461 + _globals['_AGGREGATEDATAPOINT']._serialized_end=830 + _globals['_AGGREGATEDATAPOINTS']._serialized_start=832 + _globals['_AGGREGATEDATAPOINTS']._serialized_end=926 # @@protoc_insertion_point(module_scope) diff --git a/cognite/client/_proto/data_points_pb2.pyi b/cognite/client/_proto/data_points_pb2.pyi index 4eecc9a0ac..17c0ef367b 100644 --- a/cognite/client/_proto/data_points_pb2.pyi +++ b/cognite/client/_proto/data_points_pb2.pyi @@ -1,146 +1,90 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class NumericDatapoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TIMESTAMP_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - timestamp: builtins.int - value: builtins.float - def __init__( - self, - *, - timestamp: builtins.int = ..., - value: builtins.float = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["timestamp", b"timestamp", "value", b"value"]) -> None: ... - -global___NumericDatapoint = NumericDatapoint - -@typing_extensions.final -class NumericDatapoints(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATAPOINTS_FIELD_NUMBER: builtins.int - @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___NumericDatapoint]: ... - def __init__( - self, - *, - datapoints: collections.abc.Iterable[global___NumericDatapoint] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... - -global___NumericDatapoints = NumericDatapoints - -@typing_extensions.final -class StringDatapoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TIMESTAMP_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - timestamp: builtins.int - value: builtins.str - def __init__( - self, - *, - timestamp: builtins.int = ..., - value: builtins.str = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["timestamp", b"timestamp", "value", b"value"]) -> None: ... - -global___StringDatapoint = StringDatapoint - -@typing_extensions.final -class StringDatapoints(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATAPOINTS_FIELD_NUMBER: builtins.int - @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___StringDatapoint]: ... - def __init__( - self, - *, - datapoints: collections.abc.Iterable[global___StringDatapoint] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... - -global___StringDatapoints = StringDatapoints - -@typing_extensions.final -class AggregateDatapoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TIMESTAMP_FIELD_NUMBER: builtins.int - AVERAGE_FIELD_NUMBER: builtins.int - MAX_FIELD_NUMBER: builtins.int - MIN_FIELD_NUMBER: builtins.int - COUNT_FIELD_NUMBER: builtins.int - SUM_FIELD_NUMBER: builtins.int - INTERPOLATION_FIELD_NUMBER: builtins.int - STEPINTERPOLATION_FIELD_NUMBER: builtins.int - CONTINUOUSVARIANCE_FIELD_NUMBER: builtins.int - DISCRETEVARIANCE_FIELD_NUMBER: builtins.int - TOTALVARIATION_FIELD_NUMBER: builtins.int - timestamp: builtins.int - average: builtins.float - max: builtins.float - min: builtins.float - count: builtins.float - sum: builtins.float - interpolation: builtins.float - stepInterpolation: builtins.float - continuousVariance: builtins.float - discreteVariance: builtins.float - totalVariation: builtins.float - def __init__( - self, - *, - timestamp: builtins.int = ..., - average: builtins.float = ..., - max: builtins.float = ..., - min: builtins.float = ..., - count: builtins.float = ..., - sum: builtins.float = ..., - interpolation: builtins.float = ..., - stepInterpolation: builtins.float = ..., - continuousVariance: builtins.float = ..., - discreteVariance: builtins.float = ..., - totalVariation: builtins.float = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["average", b"average", "continuousVariance", b"continuousVariance", "count", b"count", "discreteVariance", b"discreteVariance", "interpolation", b"interpolation", "max", b"max", "min", b"min", "stepInterpolation", b"stepInterpolation", "sum", b"sum", "timestamp", b"timestamp", "totalVariation", b"totalVariation"]) -> None: ... - -global___AggregateDatapoint = AggregateDatapoint - -@typing_extensions.final -class AggregateDatapoints(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATAPOINTS_FIELD_NUMBER: builtins.int - @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AggregateDatapoint]: ... - def __init__( - self, - *, - datapoints: collections.abc.Iterable[global___AggregateDatapoint] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... - -global___AggregateDatapoints = AggregateDatapoints +from google.protobuf.internal import containers as _containers +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class Status(_message.Message): + __slots__ = ("code", "symbol") + CODE_FIELD_NUMBER: _ClassVar[int] + SYMBOL_FIELD_NUMBER: _ClassVar[int] + code: int + symbol: str + def __init__(self, code: _Optional[int] = ..., symbol: _Optional[str] = ...) -> None: ... + +class NumericDatapoint(_message.Message): + __slots__ = ("timestamp", "value", "status", "nullValue") + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + NULLVALUE_FIELD_NUMBER: _ClassVar[int] + timestamp: int + value: float + status: Status + nullValue: bool + def __init__(self, timestamp: _Optional[int] = ..., value: _Optional[float] = ..., status: _Optional[_Union[Status, _Mapping]] = ..., nullValue: bool = ...) -> None: ... + +class NumericDatapoints(_message.Message): + __slots__ = ("datapoints",) + DATAPOINTS_FIELD_NUMBER: _ClassVar[int] + datapoints: _containers.RepeatedCompositeFieldContainer[NumericDatapoint] + def __init__(self, datapoints: _Optional[_Iterable[_Union[NumericDatapoint, _Mapping]]] = ...) -> None: ... + +class StringDatapoint(_message.Message): + __slots__ = ("timestamp", "value") + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + timestamp: int + value: str + def __init__(self, timestamp: _Optional[int] = ..., value: _Optional[str] = ...) -> None: ... + +class StringDatapoints(_message.Message): + __slots__ = ("datapoints",) + DATAPOINTS_FIELD_NUMBER: _ClassVar[int] + datapoints: _containers.RepeatedCompositeFieldContainer[StringDatapoint] + def __init__(self, datapoints: _Optional[_Iterable[_Union[StringDatapoint, _Mapping]]] = ...) -> None: ... + +class AggregateDatapoint(_message.Message): + __slots__ = ("timestamp", "average", "max", "min", "count", "sum", "interpolation", "stepInterpolation", "continuousVariance", "discreteVariance", "totalVariation", "countGood", "countUncertain", "countBad", "durationGood", "durationUncertain", "durationBad") + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + AVERAGE_FIELD_NUMBER: _ClassVar[int] + MAX_FIELD_NUMBER: _ClassVar[int] + MIN_FIELD_NUMBER: _ClassVar[int] + COUNT_FIELD_NUMBER: _ClassVar[int] + SUM_FIELD_NUMBER: _ClassVar[int] + INTERPOLATION_FIELD_NUMBER: _ClassVar[int] + STEPINTERPOLATION_FIELD_NUMBER: _ClassVar[int] + CONTINUOUSVARIANCE_FIELD_NUMBER: _ClassVar[int] + DISCRETEVARIANCE_FIELD_NUMBER: _ClassVar[int] + TOTALVARIATION_FIELD_NUMBER: _ClassVar[int] + COUNTGOOD_FIELD_NUMBER: _ClassVar[int] + COUNTUNCERTAIN_FIELD_NUMBER: _ClassVar[int] + COUNTBAD_FIELD_NUMBER: _ClassVar[int] + DURATIONGOOD_FIELD_NUMBER: _ClassVar[int] + DURATIONUNCERTAIN_FIELD_NUMBER: _ClassVar[int] + DURATIONBAD_FIELD_NUMBER: _ClassVar[int] + timestamp: int + average: float + max: float + min: float + count: float + sum: float + interpolation: float + stepInterpolation: float + continuousVariance: float + discreteVariance: float + totalVariation: float + countGood: float + countUncertain: float + countBad: float + durationGood: float + durationUncertain: float + durationBad: float + def __init__(self, timestamp: _Optional[int] = ..., average: _Optional[float] = ..., max: _Optional[float] = ..., min: _Optional[float] = ..., count: _Optional[float] = ..., sum: _Optional[float] = ..., interpolation: _Optional[float] = ..., stepInterpolation: _Optional[float] = ..., continuousVariance: _Optional[float] = ..., discreteVariance: _Optional[float] = ..., totalVariation: _Optional[float] = ..., countGood: _Optional[float] = ..., countUncertain: _Optional[float] = ..., countBad: _Optional[float] = ..., durationGood: _Optional[float] = ..., durationUncertain: _Optional[float] = ..., durationBad: _Optional[float] = ...) -> None: ... + +class AggregateDatapoints(_message.Message): + __slots__ = ("datapoints",) + DATAPOINTS_FIELD_NUMBER: _ClassVar[int] + datapoints: _containers.RepeatedCompositeFieldContainer[AggregateDatapoint] + def __init__(self, datapoints: _Optional[_Iterable[_Union[AggregateDatapoint, _Mapping]]] = ...) -> None: ... diff --git a/cognite/client/_proto_legacy/data_point_list_response_pb2.py b/cognite/client/_proto_legacy/data_point_list_response_pb2.py deleted file mode 100644 index 2f84c154d9..0000000000 --- a/cognite/client/_proto_legacy/data_point_list_response_pb2.py +++ /dev/null @@ -1,194 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: data_point_list_response.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -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() - - -import cognite.client._proto_legacy.data_points_pb2 as data__points__pb2 - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='data_point_list_response.proto', - package='com.cognite.v1.timeseries.proto', - syntax='proto3', - serialized_options=b'P\001', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x1e\x64\x61ta_point_list_response.proto\x12\x1f\x63om.cognite.v1.timeseries.proto\x1a\x11\x64\x61ta_points.proto\"\x95\x03\n\x11\x44\x61taPointListItem\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x12\n\nexternalId\x18\x02 \x01(\t\x12\x10\n\x08isString\x18\x06 \x01(\x08\x12\x0e\n\x06isStep\x18\x07 \x01(\x08\x12\x0c\n\x04unit\x18\x08 \x01(\t\x12\x12\n\nnextCursor\x18\t \x01(\t\x12\x16\n\x0eunitExternalId\x18\n \x01(\t\x12O\n\x11numericDatapoints\x18\x03 \x01(\x0b\x32\x32.com.cognite.v1.timeseries.proto.NumericDatapointsH\x00\x12M\n\x10stringDatapoints\x18\x04 \x01(\x0b\x32\x31.com.cognite.v1.timeseries.proto.StringDatapointsH\x00\x12S\n\x13\x61ggregateDatapoints\x18\x05 \x01(\x0b\x32\x34.com.cognite.v1.timeseries.proto.AggregateDatapointsH\x00\x42\x0f\n\rdatapointType\"Z\n\x15\x44\x61taPointListResponse\x12\x41\n\x05items\x18\x01 \x03(\x0b\x32\x32.com.cognite.v1.timeseries.proto.DataPointListItemB\x02P\x01\x62\x06proto3' - , - dependencies=[data__points__pb2.DESCRIPTOR,]) - - - - -_DATAPOINTLISTITEM = _descriptor.Descriptor( - name='DataPointListItem', - full_name='com.cognite.v1.timeseries.proto.DataPointListItem', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.id', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='externalId', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.externalId', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='isString', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.isString', index=2, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='isStep', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.isStep', index=3, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='unit', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.unit', index=4, - number=8, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='nextCursor', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.nextCursor', index=5, - number=9, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='unitExternalId', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.unitExternalId', index=6, - number=10, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='numericDatapoints', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.numericDatapoints', index=7, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='stringDatapoints', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.stringDatapoints', index=8, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='aggregateDatapoints', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.aggregateDatapoints', index=9, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='datapointType', full_name='com.cognite.v1.timeseries.proto.DataPointListItem.datapointType', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), - ], - serialized_start=87, - serialized_end=492, -) - - -_DATAPOINTLISTRESPONSE = _descriptor.Descriptor( - name='DataPointListResponse', - full_name='com.cognite.v1.timeseries.proto.DataPointListResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='items', full_name='com.cognite.v1.timeseries.proto.DataPointListResponse.items', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=494, - serialized_end=584, -) - -_DATAPOINTLISTITEM.fields_by_name['numericDatapoints'].message_type = data__points__pb2._NUMERICDATAPOINTS -_DATAPOINTLISTITEM.fields_by_name['stringDatapoints'].message_type = data__points__pb2._STRINGDATAPOINTS -_DATAPOINTLISTITEM.fields_by_name['aggregateDatapoints'].message_type = data__points__pb2._AGGREGATEDATAPOINTS -_DATAPOINTLISTITEM.oneofs_by_name['datapointType'].fields.append( - _DATAPOINTLISTITEM.fields_by_name['numericDatapoints']) -_DATAPOINTLISTITEM.fields_by_name['numericDatapoints'].containing_oneof = _DATAPOINTLISTITEM.oneofs_by_name['datapointType'] -_DATAPOINTLISTITEM.oneofs_by_name['datapointType'].fields.append( - _DATAPOINTLISTITEM.fields_by_name['stringDatapoints']) -_DATAPOINTLISTITEM.fields_by_name['stringDatapoints'].containing_oneof = _DATAPOINTLISTITEM.oneofs_by_name['datapointType'] -_DATAPOINTLISTITEM.oneofs_by_name['datapointType'].fields.append( - _DATAPOINTLISTITEM.fields_by_name['aggregateDatapoints']) -_DATAPOINTLISTITEM.fields_by_name['aggregateDatapoints'].containing_oneof = _DATAPOINTLISTITEM.oneofs_by_name['datapointType'] -_DATAPOINTLISTRESPONSE.fields_by_name['items'].message_type = _DATAPOINTLISTITEM -DESCRIPTOR.message_types_by_name['DataPointListItem'] = _DATAPOINTLISTITEM -DESCRIPTOR.message_types_by_name['DataPointListResponse'] = _DATAPOINTLISTRESPONSE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -DataPointListItem = _reflection.GeneratedProtocolMessageType('DataPointListItem', (_message.Message,), { - 'DESCRIPTOR' : _DATAPOINTLISTITEM, - '__module__' : 'data_point_list_response_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.DataPointListItem) - }) -_sym_db.RegisterMessage(DataPointListItem) - -DataPointListResponse = _reflection.GeneratedProtocolMessageType('DataPointListResponse', (_message.Message,), { - 'DESCRIPTOR' : _DATAPOINTLISTRESPONSE, - '__module__' : 'data_point_list_response_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.DataPointListResponse) - }) -_sym_db.RegisterMessage(DataPointListResponse) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/cognite/client/_proto_legacy/data_point_list_response_pb2.pyi b/cognite/client/_proto_legacy/data_point_list_response_pb2.pyi deleted file mode 100644 index 3e38ee3f07..0000000000 --- a/cognite/client/_proto_legacy/data_point_list_response_pb2.pyi +++ /dev/null @@ -1,81 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import collections.abc -import data_points_pb2 -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class DataPointListItem(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ID_FIELD_NUMBER: builtins.int - EXTERNALID_FIELD_NUMBER: builtins.int - ISSTRING_FIELD_NUMBER: builtins.int - ISSTEP_FIELD_NUMBER: builtins.int - UNIT_FIELD_NUMBER: builtins.int - NEXTCURSOR_FIELD_NUMBER: builtins.int - UNITEXTERNALID_FIELD_NUMBER: builtins.int - NUMERICDATAPOINTS_FIELD_NUMBER: builtins.int - STRINGDATAPOINTS_FIELD_NUMBER: builtins.int - AGGREGATEDATAPOINTS_FIELD_NUMBER: builtins.int - id: builtins.int - externalId: builtins.str - isString: builtins.bool - isStep: builtins.bool - unit: builtins.str - nextCursor: builtins.str - unitExternalId: builtins.str - @property - def numericDatapoints(self) -> data_points_pb2.NumericDatapoints: ... - @property - def stringDatapoints(self) -> data_points_pb2.StringDatapoints: ... - @property - def aggregateDatapoints(self) -> data_points_pb2.AggregateDatapoints: ... - def __init__( - self, - *, - id: builtins.int = ..., - externalId: builtins.str = ..., - isString: builtins.bool = ..., - isStep: builtins.bool = ..., - unit: builtins.str = ..., - nextCursor: builtins.str = ..., - unitExternalId: builtins.str = ..., - numericDatapoints: data_points_pb2.NumericDatapoints | None = ..., - stringDatapoints: data_points_pb2.StringDatapoints | None = ..., - aggregateDatapoints: data_points_pb2.AggregateDatapoints | None = ..., - ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["aggregateDatapoints", b"aggregateDatapoints", "datapointType", b"datapointType", "numericDatapoints", b"numericDatapoints", "stringDatapoints", b"stringDatapoints"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["aggregateDatapoints", b"aggregateDatapoints", "datapointType", b"datapointType", "externalId", b"externalId", "id", b"id", "isStep", b"isStep", "isString", b"isString", "nextCursor", b"nextCursor", "numericDatapoints", b"numericDatapoints", "stringDatapoints", b"stringDatapoints", "unit", b"unit", "unitExternalId", b"unitExternalId"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["datapointType", b"datapointType"]) -> typing_extensions.Literal["numericDatapoints", "stringDatapoints", "aggregateDatapoints"] | None: ... - -global___DataPointListItem = DataPointListItem - -@typing_extensions.final -class DataPointListResponse(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - ITEMS_FIELD_NUMBER: builtins.int - @property - def items(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DataPointListItem]: ... - def __init__( - self, - *, - items: collections.abc.Iterable[global___DataPointListItem] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["items", b"items"]) -> None: ... - -global___DataPointListResponse = DataPointListResponse diff --git a/cognite/client/_proto_legacy/data_points_pb2.py b/cognite/client/_proto_legacy/data_points_pb2.py deleted file mode 100644 index bbfe460b45..0000000000 --- a/cognite/client/_proto_legacy/data_points_pb2.py +++ /dev/null @@ -1,358 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: data_points.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -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() - - - - -DESCRIPTOR = _descriptor.FileDescriptor( - name='data_points.proto', - package='com.cognite.v1.timeseries.proto', - syntax='proto3', - serialized_options=b'P\001', - create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x11\x64\x61ta_points.proto\x12\x1f\x63om.cognite.v1.timeseries.proto\"4\n\x10NumericDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x01\"Z\n\x11NumericDatapoints\x12\x45\n\ndatapoints\x18\x01 \x03(\x0b\x32\x31.com.cognite.v1.timeseries.proto.NumericDatapoint\"3\n\x0fStringDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\t\"X\n\x10StringDatapoints\x12\x44\n\ndatapoints\x18\x01 \x03(\x0b\x32\x30.com.cognite.v1.timeseries.proto.StringDatapoint\"\xee\x01\n\x12\x41ggregateDatapoint\x12\x11\n\ttimestamp\x18\x01 \x01(\x03\x12\x0f\n\x07\x61verage\x18\x02 \x01(\x01\x12\x0b\n\x03max\x18\x03 \x01(\x01\x12\x0b\n\x03min\x18\x04 \x01(\x01\x12\r\n\x05\x63ount\x18\x05 \x01(\x01\x12\x0b\n\x03sum\x18\x06 \x01(\x01\x12\x15\n\rinterpolation\x18\x07 \x01(\x01\x12\x19\n\x11stepInterpolation\x18\x08 \x01(\x01\x12\x1a\n\x12\x63ontinuousVariance\x18\t \x01(\x01\x12\x18\n\x10\x64iscreteVariance\x18\n \x01(\x01\x12\x16\n\x0etotalVariation\x18\x0b \x01(\x01\"^\n\x13\x41ggregateDatapoints\x12G\n\ndatapoints\x18\x01 \x03(\x0b\x32\x33.com.cognite.v1.timeseries.proto.AggregateDatapointB\x02P\x01\x62\x06proto3' -) - - - - -_NUMERICDATAPOINT = _descriptor.Descriptor( - name='NumericDatapoint', - full_name='com.cognite.v1.timeseries.proto.NumericDatapoint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='com.cognite.v1.timeseries.proto.NumericDatapoint.timestamp', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='com.cognite.v1.timeseries.proto.NumericDatapoint.value', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=54, - serialized_end=106, -) - - -_NUMERICDATAPOINTS = _descriptor.Descriptor( - name='NumericDatapoints', - full_name='com.cognite.v1.timeseries.proto.NumericDatapoints', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='datapoints', full_name='com.cognite.v1.timeseries.proto.NumericDatapoints.datapoints', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=108, - serialized_end=198, -) - - -_STRINGDATAPOINT = _descriptor.Descriptor( - name='StringDatapoint', - full_name='com.cognite.v1.timeseries.proto.StringDatapoint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='com.cognite.v1.timeseries.proto.StringDatapoint.timestamp', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='value', full_name='com.cognite.v1.timeseries.proto.StringDatapoint.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=200, - serialized_end=251, -) - - -_STRINGDATAPOINTS = _descriptor.Descriptor( - name='StringDatapoints', - full_name='com.cognite.v1.timeseries.proto.StringDatapoints', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='datapoints', full_name='com.cognite.v1.timeseries.proto.StringDatapoints.datapoints', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=253, - serialized_end=341, -) - - -_AGGREGATEDATAPOINT = _descriptor.Descriptor( - name='AggregateDatapoint', - full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='timestamp', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.timestamp', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='average', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.average', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='max', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.max', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='min', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.min', index=3, - number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='count', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.count', index=4, - number=5, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='sum', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.sum', index=5, - number=6, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='interpolation', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.interpolation', index=6, - number=7, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='stepInterpolation', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.stepInterpolation', index=7, - number=8, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='continuousVariance', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.continuousVariance', index=8, - number=9, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='discreteVariance', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.discreteVariance', index=9, - number=10, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - _descriptor.FieldDescriptor( - name='totalVariation', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoint.totalVariation', index=10, - number=11, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=344, - serialized_end=582, -) - - -_AGGREGATEDATAPOINTS = _descriptor.Descriptor( - name='AggregateDatapoints', - full_name='com.cognite.v1.timeseries.proto.AggregateDatapoints', - filename=None, - file=DESCRIPTOR, - containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[ - _descriptor.FieldDescriptor( - name='datapoints', full_name='com.cognite.v1.timeseries.proto.AggregateDatapoints.datapoints', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=584, - serialized_end=678, -) - -_NUMERICDATAPOINTS.fields_by_name['datapoints'].message_type = _NUMERICDATAPOINT -_STRINGDATAPOINTS.fields_by_name['datapoints'].message_type = _STRINGDATAPOINT -_AGGREGATEDATAPOINTS.fields_by_name['datapoints'].message_type = _AGGREGATEDATAPOINT -DESCRIPTOR.message_types_by_name['NumericDatapoint'] = _NUMERICDATAPOINT -DESCRIPTOR.message_types_by_name['NumericDatapoints'] = _NUMERICDATAPOINTS -DESCRIPTOR.message_types_by_name['StringDatapoint'] = _STRINGDATAPOINT -DESCRIPTOR.message_types_by_name['StringDatapoints'] = _STRINGDATAPOINTS -DESCRIPTOR.message_types_by_name['AggregateDatapoint'] = _AGGREGATEDATAPOINT -DESCRIPTOR.message_types_by_name['AggregateDatapoints'] = _AGGREGATEDATAPOINTS -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - -NumericDatapoint = _reflection.GeneratedProtocolMessageType('NumericDatapoint', (_message.Message,), { - 'DESCRIPTOR' : _NUMERICDATAPOINT, - '__module__' : 'data_points_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.NumericDatapoint) - }) -_sym_db.RegisterMessage(NumericDatapoint) - -NumericDatapoints = _reflection.GeneratedProtocolMessageType('NumericDatapoints', (_message.Message,), { - 'DESCRIPTOR' : _NUMERICDATAPOINTS, - '__module__' : 'data_points_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.NumericDatapoints) - }) -_sym_db.RegisterMessage(NumericDatapoints) - -StringDatapoint = _reflection.GeneratedProtocolMessageType('StringDatapoint', (_message.Message,), { - 'DESCRIPTOR' : _STRINGDATAPOINT, - '__module__' : 'data_points_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.StringDatapoint) - }) -_sym_db.RegisterMessage(StringDatapoint) - -StringDatapoints = _reflection.GeneratedProtocolMessageType('StringDatapoints', (_message.Message,), { - 'DESCRIPTOR' : _STRINGDATAPOINTS, - '__module__' : 'data_points_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.StringDatapoints) - }) -_sym_db.RegisterMessage(StringDatapoints) - -AggregateDatapoint = _reflection.GeneratedProtocolMessageType('AggregateDatapoint', (_message.Message,), { - 'DESCRIPTOR' : _AGGREGATEDATAPOINT, - '__module__' : 'data_points_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.AggregateDatapoint) - }) -_sym_db.RegisterMessage(AggregateDatapoint) - -AggregateDatapoints = _reflection.GeneratedProtocolMessageType('AggregateDatapoints', (_message.Message,), { - 'DESCRIPTOR' : _AGGREGATEDATAPOINTS, - '__module__' : 'data_points_pb2' - # @@protoc_insertion_point(class_scope:com.cognite.v1.timeseries.proto.AggregateDatapoints) - }) -_sym_db.RegisterMessage(AggregateDatapoints) - - -DESCRIPTOR._options = None -# @@protoc_insertion_point(module_scope) diff --git a/cognite/client/_proto_legacy/data_points_pb2.pyi b/cognite/client/_proto_legacy/data_points_pb2.pyi deleted file mode 100644 index 4eecc9a0ac..0000000000 --- a/cognite/client/_proto_legacy/data_points_pb2.pyi +++ /dev/null @@ -1,146 +0,0 @@ -""" -@generated by mypy-protobuf. Do not edit manually! -isort:skip_file -""" -import builtins -import collections.abc -import google.protobuf.descriptor -import google.protobuf.internal.containers -import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions - -DESCRIPTOR: google.protobuf.descriptor.FileDescriptor - -@typing_extensions.final -class NumericDatapoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TIMESTAMP_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - timestamp: builtins.int - value: builtins.float - def __init__( - self, - *, - timestamp: builtins.int = ..., - value: builtins.float = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["timestamp", b"timestamp", "value", b"value"]) -> None: ... - -global___NumericDatapoint = NumericDatapoint - -@typing_extensions.final -class NumericDatapoints(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATAPOINTS_FIELD_NUMBER: builtins.int - @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___NumericDatapoint]: ... - def __init__( - self, - *, - datapoints: collections.abc.Iterable[global___NumericDatapoint] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... - -global___NumericDatapoints = NumericDatapoints - -@typing_extensions.final -class StringDatapoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TIMESTAMP_FIELD_NUMBER: builtins.int - VALUE_FIELD_NUMBER: builtins.int - timestamp: builtins.int - value: builtins.str - def __init__( - self, - *, - timestamp: builtins.int = ..., - value: builtins.str = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["timestamp", b"timestamp", "value", b"value"]) -> None: ... - -global___StringDatapoint = StringDatapoint - -@typing_extensions.final -class StringDatapoints(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATAPOINTS_FIELD_NUMBER: builtins.int - @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___StringDatapoint]: ... - def __init__( - self, - *, - datapoints: collections.abc.Iterable[global___StringDatapoint] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... - -global___StringDatapoints = StringDatapoints - -@typing_extensions.final -class AggregateDatapoint(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - TIMESTAMP_FIELD_NUMBER: builtins.int - AVERAGE_FIELD_NUMBER: builtins.int - MAX_FIELD_NUMBER: builtins.int - MIN_FIELD_NUMBER: builtins.int - COUNT_FIELD_NUMBER: builtins.int - SUM_FIELD_NUMBER: builtins.int - INTERPOLATION_FIELD_NUMBER: builtins.int - STEPINTERPOLATION_FIELD_NUMBER: builtins.int - CONTINUOUSVARIANCE_FIELD_NUMBER: builtins.int - DISCRETEVARIANCE_FIELD_NUMBER: builtins.int - TOTALVARIATION_FIELD_NUMBER: builtins.int - timestamp: builtins.int - average: builtins.float - max: builtins.float - min: builtins.float - count: builtins.float - sum: builtins.float - interpolation: builtins.float - stepInterpolation: builtins.float - continuousVariance: builtins.float - discreteVariance: builtins.float - totalVariation: builtins.float - def __init__( - self, - *, - timestamp: builtins.int = ..., - average: builtins.float = ..., - max: builtins.float = ..., - min: builtins.float = ..., - count: builtins.float = ..., - sum: builtins.float = ..., - interpolation: builtins.float = ..., - stepInterpolation: builtins.float = ..., - continuousVariance: builtins.float = ..., - discreteVariance: builtins.float = ..., - totalVariation: builtins.float = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["average", b"average", "continuousVariance", b"continuousVariance", "count", b"count", "discreteVariance", b"discreteVariance", "interpolation", b"interpolation", "max", b"max", "min", b"min", "stepInterpolation", b"stepInterpolation", "sum", b"sum", "timestamp", b"timestamp", "totalVariation", b"totalVariation"]) -> None: ... - -global___AggregateDatapoint = AggregateDatapoint - -@typing_extensions.final -class AggregateDatapoints(google.protobuf.message.Message): - DESCRIPTOR: google.protobuf.descriptor.Descriptor - - DATAPOINTS_FIELD_NUMBER: builtins.int - @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___AggregateDatapoint]: ... - def __init__( - self, - *, - datapoints: collections.abc.Iterable[global___AggregateDatapoint] | None = ..., - ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... - -global___AggregateDatapoints = AggregateDatapoints diff --git a/cognite/client/utils/_importing.py b/cognite/client/utils/_importing.py index 0d2c4c55df..a2c9ace42f 100644 --- a/cognite/client/utils/_importing.py +++ b/cognite/client/utils/_importing.py @@ -45,12 +45,6 @@ def local_import(*module: str) -> ModuleType | tuple[ModuleType, ...]: return tuple(modules) -def import_legacy_protobuf() -> bool: - from google.protobuf import __version__ as pb_version - - return 4 > int(pb_version.split(".")[0]) - - def import_as_completed() -> Callable[[Iterable[Future[_T]]], Iterator[Future[_T]]]: from cognite.client._constants import _RUNNING_IN_BROWSER diff --git a/poetry.lock b/poetry.lock index e7bac73fa3..f3147a83b3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "alabaster" @@ -1304,7 +1304,7 @@ files = [ [package.dependencies] numpy = [ {version = ">=1.20.3", markers = "python_version < \"3.10\""}, - {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, + {version = ">=1.21.0", markers = "python_version >= \"3.10\" and python_version < \"3.11\""}, {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, ] python-dateutil = ">=2.8.2" @@ -1841,7 +1841,6 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -2515,4 +2514,4 @@ yaml = ["PyYAML"] [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "e27f5eaff29d01a90d9aaa2e14808755cdea3b81761db255d350368e31938f29" +content-hash = "acb798dae240712f8e94db3193ce3c7727fcd8dcc7f1a8e72fd5d3e4db781d29" diff --git a/pyproject.toml b/pyproject.toml index cff91826dc..f8dcf16b69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ python = "^3.8" requests = "^2" requests_oauthlib = "^1" msal = "^1" -protobuf = ">=3.16.0" +protobuf = ">=4" pip = ">=20.0.0" # make optional once poetry doesn't auto-remove it on "simple install" typing_extensions = ">= 4" numpy = { version = "^1.20", optional = true }