Details
-
Sub-task
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
-
None
Description
apache_beam.typehints.trivial_inference.infer_return_type does not return type as expected in Python 3.8.
And this cause testDictComprehensionSimple (apache_beam.typehints.trivial_inference_test.TrivialInferenceTest) FAIL.
- Python 3.7.7
>> from apache_beam.typehints.trivial_inference import infer_return_type >> infer_return_type(lambda _list: {'a': 1 for _ in _list}, [], debug=False, depth=5) Dict[str, int]
- Python 3.8.2
>> from apache_beam.typehints.trivial_inference import infer_return_type >> infer_return_type(lambda _list: {'a': 1 for _ in _list}, [], debug=False, depth=5) Dict[int, str]
CPython bytecode changes[1] may affect.