yuval9313/FastApi-RESTful

[BUG] ModuleNotFoundError: No module named 'typing_inspect'

Opened this issue · 0 comments

Describe the bug

Cannot import cbv due to missing dependency

  File "...py", line 4, in <module>
    from fastapi_restful.cbv import cbv
  File "/Users/aidar/.pyenv/versions/3.12.3/envs/.../lib/python3.12/site-packages/fastapi_restful/__init__.py", line 4, in <module>
    from .cbv_base import Api, Resource, set_responses, take_init_parameters
  File "/Users/aidar/.pyenv/versions/3.12.3/envs/.../lib/python3.12/site-packages/fastapi_restful/cbv_base.py", line 5, in <module>
    from .cbv import INCLUDE_INIT_PARAMS_KEY, RETURN_TYPES_FUNC_KEY, _cbv
  File "/Users/aidar/.pyenv/versions/3.12.3/envs/.../lib/python3.12/site-packages/fastapi_restful/cbv.py", line 21, in <module>
    from typing_inspect import is_classvar
ModuleNotFoundError: No module named 'typing_inspect'

To Reproduce
Steps to reproduce the behavior:

  1. Import cbv: from fastapi_restful.cbv import cbv

Expected behavior
No error ocurred

Screenshots
If applicable, add screenshots to help explain your problem.

Environment:

  • OS: macOS
  • Python 3.12.3
  • pydantic 2.7.1
  • fastapi 0.111.0
  • fastapi-restful 0.6.0

Additional context
typing_inspect marked as optional package. However, it is required when using pydantic v2.