Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12465

Fix handling of nested typing.Generic type hints in Py3.7+

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.32.0
    • Component/s: sdk-py-core
    • Labels:
      None

      Description

      When Beam attempts to convert a type hint like `typing.Tuple[PCollection[int], PCollection[int]]` it will fail in Python 3.7+ with something like:

      TypeError: Parameter to List hint must be a non-sequence, a type, or a TypeConstraint. PCollection[int] is an instance of _GenericAlias.
      

        Attachments

          Activity

            People

            • Assignee:
              udim Udi Meiri
              Reporter:
              udim Udi Meiri

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h
                3h

                  Issue deployment