You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Udi Meiri (Jira)" <ji...@apache.org> on 2019/09/05 21:17:00 UTC
[jira] [Commented] (BEAM-7060) Design Py3-compatible typehints
annotation support in Beam 3.
[ https://issues.apache.org/jira/browse/BEAM-7060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16923735#comment-16923735 ]
Udi Meiri commented on BEAM-7060:
---------------------------------
Py3 annotations support has been merged. Closing.
Other aspects such as mypy support and using the official types in the typing module will be handled in other JIRAs.
> Design Py3-compatible typehints annotation support in Beam 3.
> -------------------------------------------------------------
>
> Key: BEAM-7060
> URL: https://issues.apache.org/jira/browse/BEAM-7060
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Reporter: Valentyn Tymofieiev
> Assignee: Udi Meiri
> Priority: Major
> Fix For: 2.16.0
>
> Time Spent: 15.5h
> Remaining Estimate: 0h
>
> 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|https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=245&view=detail] 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: [~udim], [~altay], [~robertwb].
--
This message was sent by Atlassian Jira
(v8.3.2#803003)