Bishwas-py / djapy

No bullshit, Django Rest API Framework
https://djapy.io
59 stars 3 forks source link

ImportError: cannot import name 'Unpack' from 'typing' #1

Closed Bishwas-py closed 9 months ago

Bishwas-py commented 10 months ago

I am getting for Type issue in Djapy. It probably be issue because of python version or so.

File "/home/ubuntu/my-app/backend/api/generator/urls.py", line 3, in <module>
    from . import views
  File "/home/ubuntu/my-app/backend/api/generator/views.py", line 9, in <module>
    from djapy.wrappers.dec import node_to_json_response, object_to_json_node
  File "/home/ubuntu/.local/lib/python3.10/site-packages/djapy/wrappers/dec.py", line 4, in <module>
    import djapy.utils.types
  File "/home/ubuntu/.local/lib/python3.10/site-packages/djapy/utils/types.py", line 1, in <module>
    from typing import TypedDict, Unpack
ImportError: cannot import name 'Unpack' from 'typing' (/usr/lib/python3.10/typing.py)

Python version:

Python 3.10.12
Bishwas-py commented 10 months ago

Upgrading to python version Python 3.11.0rc1 fixed the issue. But I still think we apply better fixes.

Bishwas-py commented 9 months ago

Solved.