jrmccluskey commented on code in PR #36709:
URL: https://github.com/apache/beam/pull/36709#discussion_r2494936768


##########
sdks/python/apache_beam/typehints/native_type_compatibility.py:
##########
@@ -332,6 +338,14 @@ def convert_to_beam_type(typ):
       sys.version_info.minor >= 10) and (isinstance(typ, types.UnionType)):
     typ = typing.Union[typ]
 
+  # Unwrap Python 3.12 `type` aliases (TypeAliasType) to their underlying 
value.

Review Comment:
   I'd like one or two unit test cases for this just to cover us. Nothing 
fancy, just alias a simple built-in type and make sure that the type gets 
converted as expected 



##########
sdks/python/apache_beam/typehints/native_type_compatibility.py:
##########
@@ -35,6 +35,12 @@
 except ImportError:
   from typing_extensions import is_typeddict
 
+# Python 3.12 adds TypeAliasType for `type` statements; keep optional import.

Review Comment:
   ```suggestion
   # Python 3.12 adds TypeAliasType for `type` statements; keep optional import.
   # pylint: dissable=ungrouped-imports
   # isort: off
   ```
   
   Preemptively avoid breaking the new isort/pylint versions when they get 
merged



-- 
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]

Reply via email to