Skip to content

Commit f54c238

Browse files
Upgrade to protobuf v6 (#11)
* Upgrade to protobuf v6 * Fix configure_otel on windows * Add network error base exceptions
1 parent 38da2f5 commit f54c238

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+568
-463
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.40.0] - 2025-07-29
11+
12+
### Added
13+
14+
- Added `NetworkError` and `NetworkTimeoutError` exceptions classes to indicate network related errors in grpc calls.
15+
16+
### Changed
17+
18+
- Dropped support for `protobuf v5` and below, minimum supported version is now `protobuf>=6`.
19+
20+
### Fixed
21+
22+
- `tilebox-workflows`: Fix opentelemetry logging and tracing initialization on Windows, which was relying on `os.uname`,
23+
a stdlib function that does not exist on Windows python SDKs.
24+
1025
## [0.39.0] - 2025-07-16
1126

1227
### Added
@@ -208,7 +223,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
208223
- Released packages: `tilebox-datasets`, `tilebox-workflows`, `tilebox-storage`, `tilebox-grpc`
209224

210225

211-
[Unreleased]: https://github.com/tilebox/tilebox-python/compare/v0.39.0...HEAD
226+
[Unreleased]: https://github.com/tilebox/tilebox-python/compare/v0.40.0...HEAD
227+
[0.40.0]: https://github.com/tilebox/tilebox-python/compare/v0.39.0...v0.40.0
212228
[0.39.0]: https://github.com/tilebox/tilebox-python/compare/v0.38.0...v0.39.0
213229
[0.38.0]: https://github.com/tilebox/tilebox-python/compare/v0.37.1...v0.38.0
214230
[0.37.1]: https://github.com/tilebox/tilebox-python/compare/v0.37.0...v0.37.1

buf.gen.datasets.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ managed:
66
plugins:
77
- remote: buf.build/grpc/python
88
out: tilebox-datasets/tilebox/datasets
9-
- remote: buf.build/protocolbuffers/python:v29.3 # v30.0 onwards requires protobuf > 6
9+
- remote: buf.build/protocolbuffers/python:v30.0 # use the minimum version that supports protobuf 6
1010
out: tilebox-datasets/tilebox/datasets
11-
- remote: buf.build/protocolbuffers/pyi:v29.3 # v30.0 onwards requires protobuf > 6
11+
- remote: buf.build/protocolbuffers/pyi:v30.0 # use the minimum version that supports protobuf 6
1212
out: tilebox-datasets/tilebox/datasets
1313
inputs:
1414
# for local development

buf.gen.workflows.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ managed:
66
plugins:
77
- remote: buf.build/grpc/python
88
out: tilebox-workflows/tilebox/workflows
9-
- remote: buf.build/protocolbuffers/python:v29.3 # v30.0 onwards requires protobuf > 6
9+
- remote: buf.build/protocolbuffers/python:v30.0 # use the minimum version that supports protobuf 6
1010
out: tilebox-workflows/tilebox/workflows
11-
- remote: buf.build/protocolbuffers/pyi:v29.3 # v30.0 onwards requires protobuf > 6
11+
- remote: buf.build/protocolbuffers/pyi:v30.0 # use the minimum version that supports protobuf 6
1212
out: tilebox-workflows/tilebox/workflows
1313
inputs:
1414
# for local development

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dev = [
2727
# pyright 1.1.401 reports many wrong false positives, let's wait until that is fixed before upgrading
2828
"pyright>=1.1.379,<1.1.401",
2929
"pre-commit>=3.8.0",
30-
"types-protobuf>=5.27.0.20240907",
30+
"types-protobuf>=6.30",
3131
"junitparser>=3.2.0",
3232
]
3333

tilebox-datasets/tests/example_dataset/example_dataset_pb2.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
# Generated by the protocol buffer compiler. DO NOT EDIT!
66
# NO CHECKED-IN PROTOBUF GENCODE
77
# source: datasets/v1/example_dataset.proto
8-
# Protobuf Python Version: 5.29.3
8+
# Protobuf Python Version: 6.30.0
99
"""Generated protocol buffer code."""
1010
from google.protobuf import descriptor as _descriptor
1111
from google.protobuf import descriptor_pool as _descriptor_pool
1212
from google.protobuf import runtime_version as _runtime_version
1313
from google.protobuf import symbol_database as _symbol_database
1414
from google.protobuf.internal import builder as _builder
15-
1615
_runtime_version.ValidateProtobufRuntimeVersion(
1716
_runtime_version.Domain.PUBLIC,
18-
5,
19-
29,
20-
3,
17+
6,
18+
30,
19+
0,
2120
'',
2221
'datasets/v1/example_dataset.proto'
2322
)
@@ -30,15 +29,15 @@
3029
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
3130
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
3231

33-
DESCRIPTOR_PROTO = b'\n!datasets/v1/example_dataset.proto\x12\x0b\x64\x61tasets.v1\x1a\"datasets/v1/well_known_types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\n\n\x10\x45xampleDatapoint\x12.\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x04time\x12!\n\x02id\x18\x02 \x01(\x0b\x32\x11.datasets.v1.UUIDR\x02id\x12\x41\n\x0eingestion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ringestionTime\x12\x31\n\x08geometry\x18\x04 \x01(\x0b\x32\x15.datasets.v1.GeometryR\x08geometry\x12\x1f\n\x0bsome_string\x18\x05 \x01(\tR\nsomeString\x12\x19\n\x08some_int\x18\x06 \x01(\x03R\x07someInt\x12\x1f\n\x0bsome_double\x18\x07 \x01(\x01R\nsomeDouble\x12\x37\n\tsome_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x08someTime\x12>\n\rsome_duration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x0csomeDuration\x12\x1d\n\nsome_bytes\x18\n \x01(\x0cR\tsomeBytes\x12\x1b\n\tsome_bool\x18\x0b \x01(\x08R\x08someBool\x12:\n\x0fsome_identifier\x18\x0c \x01(\x0b\x32\x11.datasets.v1.UUIDR\x0esomeIdentifier\x12.\n\tsome_vec3\x18\r \x01(\x0b\x32\x11.datasets.v1.Vec3R\x08someVec3\x12@\n\x0fsome_quaternion\x18\x0e \x01(\x0b\x32\x17.datasets.v1.QuaternionR\x0esomeQuaternion\x12:\n\rsome_geometry\x18\x0f \x01(\x0b\x32\x15.datasets.v1.GeometryR\x0csomeGeometry\x12\x39\n\tsome_enum\x18\x10 \x01(\x0e\x32\x1c.datasets.v1.ProcessingLevelR\x08someEnum\x12\x30\n\x14some_repeated_string\x18\x11 \x03(\tR\x12someRepeatedString\x12*\n\x11some_repeated_int\x18\x12 \x03(\x03R\x0fsomeRepeatedInt\x12\x30\n\x14some_repeated_double\x18\x13 \x03(\x01R\x12someRepeatedDouble\x12.\n\x13some_repeated_bytes\x18\x14 \x03(\x0cR\x11someRepeatedBytes\x12,\n\x12some_repeated_bool\x18\x15 \x03(\x08R\x10someRepeatedBool\x12H\n\x12some_repeated_time\x18\x16 \x03(\x0b\x32\x1a.google.protobuf.TimestampR\x10someRepeatedTime\x12O\n\x16some_repeated_duration\x18\x17 \x03(\x0b\x32\x19.google.protobuf.DurationR\x14someRepeatedDuration\x12K\n\x18some_repeated_identifier\x18\x18 \x03(\x0b\x32\x11.datasets.v1.UUIDR\x16someRepeatedIdentifier\x12?\n\x12some_repeated_vec3\x18\x19 \x03(\x0b\x32\x11.datasets.v1.Vec3R\x10someRepeatedVec3\x12K\n\x16some_repeated_geometry\x18\x1a \x03(\x0b\x32\x15.datasets.v1.GeometryR\x14someRepeatedGeometryB\xb5\x01\n\x0f\x63om.datasets.v1B\x13\x45xampleDatasetProtoP\x01[email protected]/tilebox/tilebox-go/protogen/go/datasets/v1;datasetsv1\xa2\x02\x03\x44XX\xaa\x02\x0b\x44\x61tasets.V1\xca\x02\x0b\x44\x61tasets\\V1\xe2\x02\x17\x44\x61tasets\\V1\\GPBMetadata\xea\x02\x0c\x44\x61tasets::V1b\x06proto3'
32+
DESCRIPTOR_PROTO = b'\n!datasets/v1/example_dataset.proto\x12\x0b\x64\x61tasets.v1\x1a\"datasets/v1/well_known_types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf6\n\n\x10\x45xampleDatapoint\x12.\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x04time\x12!\n\x02id\x18\x02 \x01(\x0b\x32\x11.datasets.v1.UUIDR\x02id\x12\x41\n\x0eingestion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ringestionTime\x12\x31\n\x08geometry\x18\x04 \x01(\x0b\x32\x15.datasets.v1.GeometryR\x08geometry\x12\x1f\n\x0bsome_string\x18\x05 \x01(\tR\nsomeString\x12\x19\n\x08some_int\x18\x06 \x01(\x03R\x07someInt\x12\x1f\n\x0bsome_double\x18\x07 \x01(\x01R\nsomeDouble\x12\x37\n\tsome_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x08someTime\x12>\n\rsome_duration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x0csomeDuration\x12\x1d\n\nsome_bytes\x18\n \x01(\x0cR\tsomeBytes\x12\x1b\n\tsome_bool\x18\x0b \x01(\x08R\x08someBool\x12:\n\x0fsome_identifier\x18\x0c \x01(\x0b\x32\x11.datasets.v1.UUIDR\x0esomeIdentifier\x12.\n\tsome_vec3\x18\r \x01(\x0b\x32\x11.datasets.v1.Vec3R\x08someVec3\x12@\n\x0fsome_quaternion\x18\x0e \x01(\x0b\x32\x17.datasets.v1.QuaternionR\x0esomeQuaternion\x12:\n\rsome_geometry\x18\x0f \x01(\x0b\x32\x15.datasets.v1.GeometryR\x0csomeGeometry\x12\x39\n\tsome_enum\x18\x10 \x01(\x0e\x32\x1c.datasets.v1.ProcessingLevelR\x08someEnum\x12\x30\n\x14some_repeated_string\x18\x11 \x03(\tR\x12someRepeatedString\x12*\n\x11some_repeated_int\x18\x12 \x03(\x03R\x0fsomeRepeatedInt\x12\x30\n\x14some_repeated_double\x18\x13 \x03(\x01R\x12someRepeatedDouble\x12.\n\x13some_repeated_bytes\x18\x14 \x03(\x0cR\x11someRepeatedBytes\x12,\n\x12some_repeated_bool\x18\x15 \x03(\x08R\x10someRepeatedBool\x12H\n\x12some_repeated_time\x18\x16 \x03(\x0b\x32\x1a.google.protobuf.TimestampR\x10someRepeatedTime\x12O\n\x16some_repeated_duration\x18\x17 \x03(\x0b\x32\x19.google.protobuf.DurationR\x14someRepeatedDuration\x12K\n\x18some_repeated_identifier\x18\x18 \x03(\x0b\x32\x11.datasets.v1.UUIDR\x16someRepeatedIdentifier\x12?\n\x12some_repeated_vec3\x18\x19 \x03(\x0b\x32\x11.datasets.v1.Vec3R\x10someRepeatedVec3\x12K\n\x16some_repeated_geometry\x18\x1a \x03(\x0b\x32\x15.datasets.v1.GeometryR\x14someRepeatedGeometryB\x05\x92\x03\x02\x08\x02\x62\x08\x65\x64itionsp\xe8\x07'
3433
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(DESCRIPTOR_PROTO)
3534

3635
_globals = globals()
3736
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
3837
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'datasets.v1.example_dataset_pb2', _globals)
3938
if not _descriptor._USE_C_DESCRIPTORS:
4039
_globals['DESCRIPTOR']._loaded_options = None
41-
_globals['DESCRIPTOR']._serialized_options = b'\n\017com.datasets.v1B\023ExampleDatasetProtoP\001[email protected]/tilebox/tilebox-go/protogen/go/datasets/v1;datasetsv1\242\002\003DXX\252\002\013Datasets.V1\312\002\013Datasets\\V1\342\002\027Datasets\\V1\\GPBMetadata\352\002\014Datasets::V1'
40+
_globals['DESCRIPTOR']._serialized_options = b'\222\003\002\010\002'
4241
_globals['_EXAMPLEDATAPOINT']._serialized_start=152
4342
_globals['_EXAMPLEDATAPOINT']._serialized_end=1550
4443
# @@protoc_insertion_point(module_scope)

tilebox-datasets/tilebox/datasets/buf/validate/validate_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tilebox-datasets/tilebox/datasets/buf/validate/validate_pb2.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
66
from google.protobuf.internal import python_message as _python_message
77
from google.protobuf import descriptor as _descriptor
88
from google.protobuf import message as _message
9-
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
9+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
10+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
1011

1112
DESCRIPTOR: _descriptor.FileDescriptor
1213

tilebox-datasets/tilebox/datasets/datasets/v1/collections_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tilebox-datasets/tilebox/datasets/datasets/v1/collections_pb2.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ from tilebox.datasets.datasets.v1 import core_pb2 as _core_pb2
33
from tilebox.datasets.tilebox.v1 import id_pb2 as _id_pb2
44
from google.protobuf import descriptor as _descriptor
55
from google.protobuf import message as _message
6-
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
6+
from collections.abc import Mapping as _Mapping
7+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
78

89
DESCRIPTOR: _descriptor.FileDescriptor
910

tilebox-datasets/tilebox/datasets/datasets/v1/core_pb2.py

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)