Add back UPB numpy test now that it has been moved in the protobuf directory.
This also includes an update to the newest protobuf commit.
PiperOrigin-RevId: 525551351
diff --git a/bazel/workspace_deps.bzl b/bazel/workspace_deps.bzl
index d0e35fd..88e6164 100644
--- a/bazel/workspace_deps.bzl
+++ b/bazel/workspace_deps.bzl
@@ -23,8 +23,8 @@
_github_archive,
name = "com_google_protobuf",
repo = "https://github.com/protocolbuffers/protobuf",
- commit = "6ae84761bf09db1b9da6c7fed4d708468017b79f",
- sha256 = "1213f82d140326d2d0c570f7114df0478ac61918f25e780ccf99040dff2bec79",
+ commit = "13833b1df01b811c6b0a3a2c83864579d740050f",
+ sha256 = "b029d1a5f84b3f0f424f7524101e3104fae8c59bb3a6104b9cec451b14b3d3e8",
patches = ["@upb//bazel:protobuf.patch"],
)
diff --git a/python/pb_unit_tests/BUILD b/python/pb_unit_tests/BUILD
index 75da55e..5f586c9 100644
--- a/python/pb_unit_tests/BUILD
+++ b/python/pb_unit_tests/BUILD
@@ -47,10 +47,22 @@
pyproto_test_wrapper(name = "message_factory_test")
# begin:github_only
-# pyproto_test_wrapper(
-# name = "numpy_test",
-# deps = [requirement("numpy")],
-# )
+# This target has different dependencies and fails when using the wrapper
+# TODO: Move this to using pyproto_test_wrapper
+py_test(
+ name = "numpy_test",
+ srcs = ["numpy_test_wrapper.py"],
+ main = "numpy_test_wrapper.py",
+ deps = [
+ requirement("numpy"),
+ "@com_google_protobuf//python/google/protobuf/internal/numpy:numpy_test",
+ "//python:_message",
+ ],
+ target_compatible_with = select({
+ "@system_python//:supported": [],
+ "//conditions:default": ["@platforms//:incompatible"],
+ }),
+)
# end:github_only
# begin:google_only
diff --git a/python/pb_unit_tests/numpy_test_wrapper.py b/python/pb_unit_tests/numpy_test_wrapper.py
index 10fd149..ef0998f 100644
--- a/python/pb_unit_tests/numpy_test_wrapper.py
+++ b/python/pb_unit_tests/numpy_test_wrapper.py
@@ -25,7 +25,7 @@
import unittest
-from google.protobuf.internal.numpy_test import *
+from google.protobuf.internal.numpy.numpy_test import *
if __name__ == '__main__':
unittest.main(verbosity=2)