Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support type hinting generics in Apache Beam type inference #21593

Closed
damccorm opened this issue Jun 5, 2022 · 2 comments
Closed

Support type hinting generics in Apache Beam type inference #21593

damccorm opened this issue Jun 5, 2022 · 2 comments

Comments

@damccorm
Copy link
Contributor

damccorm commented Jun 5, 2022

See: https://peps.python.org/pep-0585/ that introduces this construct.

Imported from Jira BEAM-14397. Original Jira may contain additional context.
Reported by: tvalentyn.

@yilei
Copy link
Contributor

yilei commented Sep 6, 2022

Adding a comment from Jira:

Also: if Iterator is imported from collections.abc instead of typing (to annotate process() of DoFn classes), then Beam does not consider it to be iterable.

Note typing.Iterator (and other generic collections types) has been deprecated since Python 3.9 in favor of collections.abc.

@TheNeuralBit
Copy link
Member

TheNeuralBit commented Oct 3, 2022

This was raised again in #23366, I'm going to close this as a duplicate since that one has additional information about the errors raised.

@TheNeuralBit TheNeuralBit closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants