AnandInguva commented on code in PR #25054:
URL: https://github.com/apache/beam/pull/25054#discussion_r1073695984
##########
sdks/python/apache_beam/typehints/typehints_test.py:
##########
@@ -1610,5 +1610,27 @@ def test_pipe_operator_as_union(self):
native_type_compatibility.convert_to_beam_type(type_b))
+class TestBuiltinsTyping(unittest.TestCase):
+
+ def _assert_equal_convert_to_beam_type(self, type_a, type_b):
+ beam_type_a = native_type_compatibility.convert_to_beam_type(type_a)
Review Comment:
These test would fail on Python 3.8 or lower since built-in type modules are
supported from Python 3.9.
```
def test_convert_to_beam_type(self):
> self._assert_equal_convert_to_beam_type(dict[str, int],
typing.Dict[str, int])
E TypeError: 'type' object is not subscriptable
```
##########
sdks/python/apache_beam/typehints/typehints_test.py:
##########
@@ -1610,5 +1610,27 @@ def test_pipe_operator_as_union(self):
native_type_compatibility.convert_to_beam_type(type_b))
+class TestBuiltinsTyping(unittest.TestCase):
+
+ def _assert_equal_convert_to_beam_type(self, type_a, type_b):
+ beam_type_a = native_type_compatibility.convert_to_beam_type(type_a)
Review Comment:
I guess the changes made are compatible with Python 3.9 or above.
@jrmccluskey is working on similar(same may be) issue.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]