You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "AnandInguva (via GitHub)" <gi...@apache.org> on 2023/03/22 15:02:30 UTC

[GitHub] [beam] AnandInguva commented on a diff in pull request #25919: Allow PTransforms to be applied directly to dataframes.

AnandInguva commented on code in PR #25919:
URL: https://github.com/apache/beam/pull/25919#discussion_r1144959615


##########
sdks/python/gen_protos.py:
##########
@@ -123,7 +123,19 @@ def generate_urn_files(out_dir, api_path):
   This is executed at build time rather than dynamically on import to ensure
   that it is compatible with static type checkers like mypy.
   """
-  from google._upb import _message
+  try:
+    from google._upb import _message
+    list_types = (
+        list,
+        _message.RepeatedScalarContainer,
+        _message.RepeatedCompositeContainer,
+    )  # pylint: disable=c-extension-no-member
+  except ImportError:
+    from google.protobuf.internal import containers
+    list_types = (
+        list,
+        containers.RepeatedScalarFieldContainer,
+        containers.RepeatedCompositeFieldContainer)

Review Comment:
   i think this change is part of https://github.com/apache/beam/pull/25914.  @robertwb is this change required here, if not can we continue discussion on https://github.com/apache/beam/pull/25914?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org