<#1877 Update `typing_extension` Any import to typ...
# flyte-github
a
#1877 Update
typing_extension
Any import to typing due to
typing_extension
version compatibility
Pull request opened by hfurkanvural TL;DR import of type
Any
in
flytekit/core/array_node_map_task.py:9
is not supported for the
typing_extensions
libraries previous versions. This version range should fix it, otherwise dependency resolution might cause the following error:
Copy code
import flytekit
/usr/local/lib/python3.8/dist-packages/flytekit/__init__.py:240: in <module>
    from flytekit.sensor.sensor_engine import SensorEngine
/usr/local/lib/python3.8/dist-packages/flytekit/sensor/__init__.py:1: in <module>
    from .base_sensor import BaseSensor
/usr/local/lib/python3.8/dist-packages/flytekit/sensor/base_sensor.py:12: in <module>
    from flytekit.extend.backend.base_agent import AsyncAgentExecutorMixin
/usr/local/lib/python3.8/dist-packages/flytekit/extend/__init__.py:47: in <module>
    from flytekit.tools.translator import get_serializable
/usr/local/lib/python3.8/dist-packages/flytekit/tools/translator.py:10: in <module>
    from flytekit.core.array_node_map_task import ArrayNodeMapTask
/usr/local/lib/python3.8/dist-packages/flytekit/core/array_node_map_task.py:9: in <module>
    from typing_extensions import Any
E   ImportError: cannot import name 'Any' from 'typing_extensions' (/usr/local/lib/python3.8/dist-packages/typing_extensions.py)
Type ☑︎ Bug Fix ☐ Feature ☐ Plugin Are all requirements met? ☐ Code completed ☐ Smoke tested ☐ Unit tests added ☐ Code documentation added ☐ Any pending items have an associated Issue Complete description Due to too broad version range of
typing_extensions
extensions, dependency resolution does not get the right version sometimes. And code base has a specific type which is introduced on version
4.4.0
. So this will fix/prevent the import issue. Tracking Issue NA Follow-up issue NA flyteorg/flytekit Codecov: 54.85% (-0.21%) compared to 3866bf9 ✅ 29 other checks have passed 29/30 successful checks