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

[BUG][Flytekit] Incorrect NamedTuple type in Python 3.9 #1165

Closed
samhita-alla opened this issue Jun 18, 2021 · 1 comment
Closed

[BUG][Flytekit] Incorrect NamedTuple type in Python 3.9 #1165

samhita-alla opened this issue Jun 18, 2021 · 1 comment
Labels
bug Something isn't working flytekit FlyteKit Python related issue python-3.9+ Capture bugs that affect flytekit for versions greater than python3.9 untriaged This issues has not yet been looked at by the Maintainers

Comments

@samhita-alla
Copy link
Contributor

Describe the bug
The test test_proto in the file tests/flytekit/unit/core/test_protobuf.py is failing with the error: TypeError: isinstance() arg 2 must be a type or tuple of types.
The issue is, type transformer is <function NamedTuple> in Python 3.9 and <class 'typing.NamedTuple'> in Python 3.8.

Expected behavior
No error should pop up.

To Reproduce
Steps to reproduce the behavior:
Use errors_pb2.ContainerError as the datatype in a task.

@samhita-alla samhita-alla added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers python-3.9+ Capture bugs that affect flytekit for versions greater than python3.9 labels Jun 18, 2021
@samhita-alla
Copy link
Contributor Author

Same error observed in test_arbit_class test in tests/flytekit/unit/core/test_type_hints.py file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flytekit FlyteKit Python related issue python-3.9+ Capture bugs that affect flytekit for versions greater than python3.9 untriaged This issues has not yet been looked at by the Maintainers
Projects
None yet
Development

No branches or pull requests

2 participants