From 32fb055bc1a952655b9a130e2705062d4417a628 Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Mon, 4 Aug 2025 14:54:16 -0700 Subject: [PATCH 1/3] Allow more protobuf versions --- packages/python-sdk/poetry.lock | 26 ++++++++++++-------------- packages/python-sdk/pyproject.toml | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lock index cde8935605..1221a17ef3 100644 --- a/packages/python-sdk/poetry.lock +++ b/packages/python-sdk/poetry.lock @@ -702,23 +702,21 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "protobuf" -version = "5.29.5" +version = "6.31.1" description = "" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" groups = ["main"] files = [ - {file = "protobuf-5.29.5-cp310-abi3-win32.whl", hash = "sha256:3f1c6468a2cfd102ff4703976138844f78ebd1fb45f49011afc5139e9e283079"}, - {file = "protobuf-5.29.5-cp310-abi3-win_amd64.whl", hash = "sha256:3f76e3a3675b4a4d867b52e4a5f5b78a2ef9565549d4037e06cf7b0942b1d3fc"}, - {file = "protobuf-5.29.5-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:e38c5add5a311f2a6eb0340716ef9b039c1dfa428b28f25a7838ac329204a671"}, - {file = "protobuf-5.29.5-cp38-abi3-manylinux2014_aarch64.whl", hash = "sha256:fa18533a299d7ab6c55a238bf8629311439995f2e7eca5caaff08663606e9015"}, - {file = "protobuf-5.29.5-cp38-abi3-manylinux2014_x86_64.whl", hash = "sha256:63848923da3325e1bf7e9003d680ce6e14b07e55d0473253a690c3a8b8fd6e61"}, - {file = "protobuf-5.29.5-cp38-cp38-win32.whl", hash = "sha256:ef91363ad4faba7b25d844ef1ada59ff1604184c0bcd8b39b8a6bef15e1af238"}, - {file = "protobuf-5.29.5-cp38-cp38-win_amd64.whl", hash = "sha256:7318608d56b6402d2ea7704ff1e1e4597bee46d760e7e4dd42a3d45e24b87f2e"}, - {file = "protobuf-5.29.5-cp39-cp39-win32.whl", hash = "sha256:6f642dc9a61782fa72b90878af134c5afe1917c89a568cd3476d758d3c3a0736"}, - {file = "protobuf-5.29.5-cp39-cp39-win_amd64.whl", hash = "sha256:470f3af547ef17847a28e1f47200a1cbf0ba3ff57b7de50d22776607cd2ea353"}, - {file = "protobuf-5.29.5-py3-none-any.whl", hash = "sha256:6cf42630262c59b2d8de33954443d94b746c952b01434fc58a417fdbd2e84bd5"}, - {file = "protobuf-5.29.5.tar.gz", hash = "sha256:bc1463bafd4b0929216c35f437a8e28731a2b7fe3d98bb77a600efced5a15c84"}, + {file = "protobuf-6.31.1-cp310-abi3-win32.whl", hash = "sha256:7fa17d5a29c2e04b7d90e5e32388b8bfd0e7107cd8e616feef7ed3fa6bdab5c9"}, + {file = "protobuf-6.31.1-cp310-abi3-win_amd64.whl", hash = "sha256:426f59d2964864a1a366254fa703b8632dcec0790d8862d30034d8245e1cd447"}, + {file = "protobuf-6.31.1-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:6f1227473dc43d44ed644425268eb7c2e488ae245d51c6866d19fe158e207402"}, + {file = "protobuf-6.31.1-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:a40fc12b84c154884d7d4c4ebd675d5b3b5283e155f324049ae396b95ddebc39"}, + {file = "protobuf-6.31.1-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:4ee898bf66f7a8b0bd21bce523814e6fbd8c6add948045ce958b73af7e8878c6"}, + {file = "protobuf-6.31.1-cp39-cp39-win32.whl", hash = "sha256:0414e3aa5a5f3ff423828e1e6a6e907d6c65c1d5b7e6e975793d5590bdeecc16"}, + {file = "protobuf-6.31.1-cp39-cp39-win_amd64.whl", hash = "sha256:8764cf4587791e7564051b35524b72844f845ad0bb011704c3736cce762d8fe9"}, + {file = "protobuf-6.31.1-py3-none-any.whl", hash = "sha256:720a6c7e6b77288b85063569baae8536671b39f15cc22037ec7045658d80489e"}, + {file = "protobuf-6.31.1.tar.gz", hash = "sha256:d8cac4c982f0b957a4dc73a80e2ea24fab08e679c0de9deb835f4a12d69aca9a"}, ] [[package]] @@ -1254,4 +1252,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = "^3.9" -content-hash = "9d43737542e60a7da742be97abc39a3ddeef18ad6c9ede85b52a582d95365b36" +content-hash = "9c56815e6597a7da388b45c7bd532a20dc3ed1a476e4a37d45596284d513b783" diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml index 48d2fe2a47..d8311d26da 100644 --- a/packages/python-sdk/pyproject.toml +++ b/packages/python-sdk/pyproject.toml @@ -13,7 +13,7 @@ packages = [{ include = "e2b" }, { include = "e2b_connect" }] python = "^3.9" python-dateutil = ">=2.8.2" -protobuf = ">=5.29.4, <6.0.0" +protobuf = ">=3.20.0" httpcore = "^1.0.5" httpx = ">=0.27.0, <1.0.0" attrs = ">=23.2.0" From 05b43cc8f793b8b5460b5afc2adf479087e264af Mon Sep 17 00:00:00 2001 From: Tomas Valenta Date: Mon, 4 Aug 2025 15:23:26 -0700 Subject: [PATCH 2/3] Add changeset --- .changeset/wicked-carrots-nail.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wicked-carrots-nail.md diff --git a/.changeset/wicked-carrots-nail.md b/.changeset/wicked-carrots-nail.md new file mode 100644 index 0000000000..68999dfaac --- /dev/null +++ b/.changeset/wicked-carrots-nail.md @@ -0,0 +1,5 @@ +--- +'@e2b/python-sdk': patch +--- + +Allow lower and higher protobuf versions From a27ae0c16982f1e8e8409703835db119ba8af3ac Mon Sep 17 00:00:00 2001 From: Jakub Novak Date: Wed, 6 Aug 2025 10:35:53 +0200 Subject: [PATCH 3/3] Decrease codegen tool to support lower protoc version in python --- codegen.Dockerfile | 2 +- packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py | 7 +------ packages/python-sdk/e2b/envd/process/process_pb2.py | 7 +------ packages/python-sdk/poetry.lock | 2 +- packages/python-sdk/pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/codegen.Dockerfile b/codegen.Dockerfile index c119eaba96..cb47be9cbf 100644 --- a/codegen.Dockerfile +++ b/codegen.Dockerfile @@ -15,7 +15,7 @@ FROM python:3.9 # Set working directory WORKDIR /workspace -ENV PROTOC_VERSION=29.3 +ENV PROTOC_VERSION=26.1 RUN ARCH=$(uname -m) && \ case "$ARCH" in \ x86_64) PROTOC_ARCH="x86_64" ;; \ diff --git a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py index f7a1c3b8d1..15cd0a9384 100644 --- a/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py +++ b/packages/python-sdk/e2b/envd/filesystem/filesystem_pb2.py @@ -1,18 +1,13 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: filesystem/filesystem.proto -# Protobuf Python Version: 5.29.3 +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, 5, 29, 3, "", "filesystem/filesystem.proto" -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/packages/python-sdk/e2b/envd/process/process_pb2.py b/packages/python-sdk/e2b/envd/process/process_pb2.py index e5296c582a..22f2cdd34c 100644 --- a/packages/python-sdk/e2b/envd/process/process_pb2.py +++ b/packages/python-sdk/e2b/envd/process/process_pb2.py @@ -1,18 +1,13 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: process/process.proto -# Protobuf Python Version: 5.29.3 +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, 5, 29, 3, "", "process/process.proto" -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/packages/python-sdk/poetry.lock b/packages/python-sdk/poetry.lock index 1221a17ef3..819dd353a4 100644 --- a/packages/python-sdk/poetry.lock +++ b/packages/python-sdk/poetry.lock @@ -1252,4 +1252,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = "^3.9" -content-hash = "9c56815e6597a7da388b45c7bd532a20dc3ed1a476e4a37d45596284d513b783" +content-hash = "ea7aba4a9e6cc671fc18a440eaa42519edc08501e80caa283df64b765c1d67bc" diff --git a/packages/python-sdk/pyproject.toml b/packages/python-sdk/pyproject.toml index d8311d26da..248156c01b 100644 --- a/packages/python-sdk/pyproject.toml +++ b/packages/python-sdk/pyproject.toml @@ -13,7 +13,7 @@ packages = [{ include = "e2b" }, { include = "e2b_connect" }] python = "^3.9" python-dateutil = ">=2.8.2" -protobuf = ">=3.20.0" +protobuf = ">=4.21.0" httpcore = "^1.0.5" httpx = ">=0.27.0, <1.0.0" attrs = ">=23.2.0"