Skip to content

Commit 6f57997

Browse files
authored
Update python toolchain to 3.12 and upgrade pip deps (#2288)
Summary: Update python toolchain to 3.12 and upgrade pip deps This upgrades our Python targets to a newer protobuf version in preparation for the Bazel 7 upgrade. The Bazel 7 migration requires a protobuf upgrade, and performing the Python/pip dependency updates first ensures compatibility when the protobuf upgrade lands in the next step. Relevant Issues: #2282 Type of change: /kind cleanup Test Plan: Successful build will validate mongo and `src/api/python` changes and verified the following - [x] Followed [amqp_code_generation steps](https://github.com/pixie-io/pixie/tree/68b196b9c2c6f6beed4a6a4c09ace98683bbc936/src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator) and verified generated code is noop - [x] Followed [protocol_inference](https://github.com/pixie-io/pixie/tree/68b196b9c2c6f6beed4a6a4c09ace98683bbc936/src/stirling/protocol_inference) data generation and eval steps. --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 68b196b commit 6f57997

File tree

12 files changed

+782
-573
lines changed

12 files changed

+782
-573
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,17 @@ tf_workspace0()
141141
pl_model_files()
142142

143143
python_register_toolchains(
144-
name = "python3_10",
144+
name = "python3_12",
145145
# Allow the root user to build the code base since this is a current requirement for
146146
# building in a containerized environment. See https://github.com/bazelbuild/rules_python/pull/713
147147
# for more details.
148148
ignore_root_user_error = True,
149149
# Available versions are listed in @rules_python//python:versions.bzl.
150150
# We recommend using the same version your team is already standardized on.
151-
python_version = "3.10",
151+
python_version = "3.12",
152152
)
153153

154-
load("@python3_10//:defs.bzl", "interpreter")
154+
load("@python3_12//:defs.bzl", "interpreter")
155155

156156
# Setup the environment for the open-source python API.
157157
pip_parse(

src/api/python/BUILD.bazel

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ py_wheel(
2323
author_email = "maintainers@px.dev",
2424
classifiers = [
2525
"Programming Language :: Python :: 3",
26-
"Programming Language :: Python :: 3.9",
27-
"Programming Language :: Python :: 3.10",
28-
"Programming Language :: Python :: 3.11",
2926
"Programming Language :: Python :: 3.12",
3027
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
3129
"Operating System :: OS Independent",
3230
"License :: OSI Approved :: Apache Software License",
3331
"Typing :: Typed",
@@ -36,13 +34,13 @@ py_wheel(
3634
distribution = "pxapi",
3735
license = "Apache-2.0",
3836
platform = "any",
39-
python_requires = ">=3.9, < 3.14",
37+
python_requires = ">=3.12, < 3.14",
4038
python_tag = "py3",
4139
requires = [
4240
"Authlib==1.5.1",
43-
"grpcio==1.70.0",
44-
"grpcio-tools==1.70.0",
45-
"protobuf==5.29.3",
41+
"grpcio==1.76.0",
42+
"grpcio-tools==1.76.0",
43+
"protobuf==6.33.1",
4644
],
4745
strip_path_prefixes = ["src/api/python/"],
4846
version = "0.9.0",

src/api/python/doc/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ py_binary(
2626
imports = [
2727
"../",
2828
],
29+
python_version = "PY3",
2930
srcs_version = "PY3",
3031
deps = [
3132
"//src/api/python/pxapi:pxapi_library",

src/api/python/requirements.bazel.txt

Lines changed: 286 additions & 229 deletions
Large diffs are not rendered by default.

src/api/python/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Authlib==1.5.1
2-
grpcio==1.70.0
3-
grpcio-tools==1.70.0
4-
protobuf==5.29.3
2+
grpcio==1.76.0
3+
grpcio-tools==1.76.0
4+
protobuf==6.33.1

src/stirling/protocol_inference/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ lib_srcs.append("__init__.py")
2828
py_library(
2929
name = "protocol_inference_lib",
3030
srcs = lib_srcs,
31+
imports = ["."],
3132
deps = [
3233
requirement("pandas"),
3334
requirement("prettytable"),

src/stirling/protocol_inference/requirements.bazel.txt

Lines changed: 145 additions & 95 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--extra-index-url https://download.pytorch.org/whl/cpu
2-
pandas==1.5.3
3-
prettytable==3.6.0
4-
termcolor==2.2.0
5-
torch==1.13.1+cpu
2+
pandas>=2.2.0
3+
prettytable>=3.9.0
4+
termcolor>=2.4.0
5+
torch==2.9.1+cpu

src/stirling/source_connectors/socket_tracer/protocols/amqp/amqp_code_generator/requirements.bazel.txt

Lines changed: 255 additions & 144 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
fire==0.4.0
2-
Jinja2==3.1.3
3-
pyshark==0.6
4-
dill==0.3.6
1+
fire>=0.5.0
2+
Jinja2>=3.1.4
3+
lxml>=5.0.0
4+
pyshark>=0.6
5+
dill>=0.3.8

0 commit comments

Comments
 (0)