Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

[BUG] ModuleNotFoundError: No module named 'typing_inspect' #294

@a1d4r

Description

@a1d4r

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions