Fixes the test_openai_compat.py collection error (ModuleNotFoundError: No module named starlette).
Changes:
Added starlette>=0.36 and httpx>=0.27 to dev dependencies in pyproject.toml
Added pytest.importorskip() guards for both starlette and fastapi in test_openai_compat.py — test file is skipped gracefully when those packages are missing instead of crashing the entire test collection
Fixed import sorting (ruff I001)
Result: 340 tests pass (was 325 with test_openai_compat excluded).
Review & Testing Checklist for Human
Run pip install -e ".[dev]" and verify starlette/httpx are pulled in
Run pytest tests/ without --ignore — all 340 tests should pass
Notes
The 20 warnings in test output are FastAPI deprecation warnings about on_event — pre-existing, not related to this change.
## Summary
Fixes the `test_openai_compat.py` collection error (`ModuleNotFoundError: No module named starlette`).
**Changes:**
- Added `starlette>=0.36` and `httpx>=0.27` to `dev` dependencies in `pyproject.toml`
- Added `pytest.importorskip()` guards for both `starlette` and `fastapi` in `test_openai_compat.py` — test file is skipped gracefully when those packages are missing instead of crashing the entire test collection
- Fixed import sorting (ruff I001)
**Result:** 340 tests pass (was 325 with test_openai_compat excluded).
## Review & Testing Checklist for Human
- [ ] Run `pip install -e ".[dev]"` and verify starlette/httpx are pulled in
- [ ] Run `pytest tests/` without `--ignore` — all 340 tests should pass
### Notes
The 20 warnings in test output are FastAPI deprecation warnings about `on_event` — pre-existing, not related to this change.
- Add starlette>=0.36 and httpx>=0.27 to dev dependencies so
test_openai_compat.py can run in dev environments
- Add pytest.importorskip guards for starlette and fastapi so the
test file is skipped gracefully when those packages are missing
- Fix import sorting (ruff I001)
340 tests now pass (was 325 with test_openai_compat skipped).
Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes the
test_openai_compat.pycollection error (ModuleNotFoundError: No module named starlette).Changes:
starlette>=0.36andhttpx>=0.27todevdependencies inpyproject.tomlpytest.importorskip()guards for bothstarletteandfastapiintest_openai_compat.py— test file is skipped gracefully when those packages are missing instead of crashing the entire test collectionResult: 340 tests pass (was 325 with test_openai_compat excluded).
Review & Testing Checklist for Human
pip install -e ".[dev]"and verify starlette/httpx are pulled inpytest tests/without--ignore— all 340 tests should passNotes
The 20 warnings in test output are FastAPI deprecation warnings about
on_event— pre-existing, not related to this change.