Describe the bug
The code imports run_in_threadpool from starlette.concurrency, but this import may fail or be unavailable in some environments or with older Starlette versions.
To Reproduce
Steps to reproduce the behavior:
Use a version of Starlette that does not provide run_in_threadpool.
Run the code or tests.
Observe an ImportError at startup or during execution.
Expected behavior
The code should either:
Check for the presence of run_in_threadpool and provide a fallback, or
Clearly document the minimum required Starlette version in requirements and documentation.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
- OS: macOS
- FastAPI Utils version : 0.8.0
Starlette version: 0.50.0
import fastapi_utils
import fastapi
import pydantic.utils
print(fastapi_utils.__version__)
print(fastapi.__version__)
print(pydantic.utils.version_info())
- Python version, get it with:
Additional context
Add any other context about the problem here.
Describe the bug
The code imports run_in_threadpool from starlette.concurrency, but this import may fail or be unavailable in some environments or with older Starlette versions.
To Reproduce
Steps to reproduce the behavior:
Use a version of Starlette that does not provide run_in_threadpool.
Run the code or tests.
Observe an ImportError at startup or during execution.
Expected behavior
The code should either:
Check for the presence of run_in_threadpool and provide a fallback, or
Clearly document the minimum required Starlette version in requirements and documentation.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Starlette version: 0.50.0
Additional context
Add any other context about the problem here.