fix(deps): missing requirements.txt entries + drop dead pydantic/asyncpg/jose - #15
Merged
Conversation
…ones Found by actually importing every module through a fresh requirements.txt- only install (same class of bug as the earlier aiofiles fix, just not yet caught for these): prometheus-client (velocix/monitoring/metrics.py) and httpx (velocix/http/client.py) are both unconditional top-level imports of real, hard dependencies, declared only in pyproject.toml -- installing from requirements.txt alone (CI, or any app built on velocix) would ImportError the moment either module is touched. Added both for real. Also applied a cleanup that's been sitting stashed since early this session, blocked on issue #4's dead-code audit landing first (it has, via #9): pydantic, pydantic-settings, asyncpg, and python-jose are all still listed as pyproject.toml dependencies with zero real callers -- velocix/config/settings.py (the only file that used the pydantic ones) was already dead code with zero references anywhere, deleted here. python-jose was fully replaced by PyJWT (velocix/security/jwt.py) and asyncpg was never wired to anything. The one guarded, optional pydantic import (openapi/auto_docs.py's is_pydantic_model try/except) is untouched and doesn't need pydantic installed to work. Verified: fresh venv, pip install -r requirements.txt only, then importing velocix.http.client / velocix.monitoring.metrics / every other previously-broken module succeeds. 252/252 tests, mypy clean, ruff clean.
…mport CI failure: dropping pydantic as a hard dependency (this branch) left is_pydantic_model's guarded `from pydantic import BaseModel` unresolvable under mypy, since it's no longer installed anywhere. A scoped ignore_missing_imports override (matching yaml/redis) would have fixed the type check, but pydantic support itself has zero real usage in this project -- velocix's own request/response validation is msgspec-only, and nothing in tests/examples exercises the pydantic body-param path. Removed is_pydantic_model and generate_schema_from_pydantic and both call sites instead of keeping dead optional-integration code around. 252/252 tests, mypy clean (no override needed), ruff clean -- verified in a fresh venv matching CI's install steps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by importing every module through a fresh requirements.txt-only install (same bug class as the earlier aiofiles fix): prometheus-client (monitoring/metrics.py) and httpx (http/client.py) are both unconditional real imports declared only in pyproject.toml, missing from requirements.txt. Added both.
Also applied a cleanup that's been stashed since early in the dependency-hygiene work, blocked on issue #4's dead-code audit landing first (it has, via #9): pydantic, pydantic-settings, asyncpg, python-jose are all still in pyproject.toml with zero real callers. velocix/config/settings.py (the only file using the pydantic ones) was already dead, deleted. python-jose was fully replaced by PyJWT; asyncpg was never wired to anything. The one guarded optional pydantic import (openapi/auto_docs.py) is untouched.
Verified in a fresh venv: pip install -r requirements.txt alone, then every previously-broken module imports clean. 252/252 tests, mypy clean, ruff clean.