Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-1251 Python 3 Support
  3. BEAM-7060

Design Py3-compatible typehints annotation support in Beam 3.


    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: sdk-py-core
    • Labels:


      Existing [Typehints implementaiton in Beam|[https://github.com/apache/beam/blob/master/sdks/python/apache_beam/typehints/
      ] heavily relies on internal details of CPython implementation, and some of the assumptions of this implementation broke as of Python 3.6, see for example: https://issues.apache.org/jira/browse/BEAM-6877, which makes typehints support unusable on Python 3.6 as of now. Python 3 Kanban Board lists several specific typehints-related breakages, prefixed with "TypeHints Py3 Error".

      We need to decide whether to:

      • Deprecate in-house typehints implementation.
      • Continue to support in-house implementation, which at this point is a stale code and has other known issues.
      • Attempt to use some off-the-shelf libraries for supporting type-annotations, like Pytype, Mypy, PyAnnotate.

      WRT to this decision we also need to plan on immediate next steps to unblock adoption of Beam for Python 3.6+ users. One potential option may be to have Beam SDK ignore any typehint annotations on Py 3.6+.

      cc: Udi Meiri, Ahmet Altay, Robert Bradshaw.




            • Assignee:
              udim Udi Meiri
              tvalentyn Valentyn Tymofieiev
            • Votes:
              0 Vote for this issue
              7 Start watching this issue


              • Created: