fix: pin jsonschema-rs>=0.40.4 for Python 3.14 compatibility - #309
fix: pin jsonschema-rs>=0.40.4 for Python 3.14 compatibility#309ly6751 wants to merge 5 commits into
Conversation
run_scan gated the LLM pass on resolve_provider_credentials(), which resolves only the active provider's credentials. create_chat_model() falls back to a standard OpenAI client (OPENAI_API_KEY / OPENAI_BASE_URL) when the active provider is unconfigured, so an OpenAI-only setup reported llm_available=false and the semantic pass was skipped even though the CLI would have run it. Gate on resolve_chat_model_credentials(), which includes that fallback, so the MCP server's accounting matches the model path the graph actually takes. Update the existing accounting tests to patch the new resolver and add a regression test for the OpenAI-fallback case. Refs NVIDIA#200 Signed-off-by: Werner Kasselman <145896621+wernerkasselman-au@users.noreply.github.com>
Issue NVIDIA#111: build failure on Python 3.14 due to jsonschema-rs shipping with an outdated pyo3 that does not support 3.14. Root cause: jsonschema-rs is pulled in transitively via langgraph-cli[inmem] -> langgraph-api. Releases 0.35.0-0.40.3 ship no cp314 wheels; an unlocked fresh resolve could pick one and force-build from source against an old pyo3, failing on 3.14. The committed lock already selected 0.44.1 (cp314/abi3 wheel), but the floor prevents regressions on fresh resolves. Fix: add minimum-version floor jsonschema-rs>=0.40.4 (lowest version that begins a continuous run of cp314-compatible wheels through the langgraph-api cap of <0.45). Resolved lock keeps 0.44.1 (cp310-abi3, forward-compatible to 3.14, no source build).
…x/issue-111 Resolved merge conflicts: - src/skillspector/mcp_server.py: accepted upstream's is_llm_available() approach (our pin change is only in pyproject.toml) - tests/unit/test_mcp_server.py: accepted upstream's injected provider tests
rng1995
left a comment
There was a problem hiding this comment.
[Automated SkillSpector Review]
Approved. Adding jsonschema-rs>=0.40.4 as a direct constraint prevents fresh Python 3.14 resolution from selecting the incompatible transitive range, while the existing langgraph-api constraint still supplies the upper bound. The lockfile records the direct requirement consistently. The unrelated MCP whitespace-only change is harmless; the focused MCP smoke suite passes (9 tests).
|
@ly6751 - Please address CI failures, resolve comments and any merge conflicts that arise. |
|
@ly6751 - Gently ping to address review comments |
| from skillspector.llm_utils import is_llm_available | ||
| from skillspector.logging_config import get_logger | ||
|
|
||
|
|
There was a problem hiding this comment.
[P1] Restore the import block required by Ruff
This extra blank line splits the TYPE_CHECKING import from the import block, and the current required lint job fails with Ruff I001 here. Remove the extra line (or run ruff check --fix) so the head is lint-clean.
rng1995
left a comment
There was a problem hiding this comment.
[SkillSpector Review]
Re-review: requesting changes. The dependency constraint remains sound and unit/docker checks pass, but the current head fails two required checks: Ruff I001 at the extra blank line in mcp_server.py, and DCO reports four commits without Signed-off-by trailers (f868484, 9b54c7e, 227f80c, and 0b52913). Fix both required checks before approval.
Fixes #111
Problem
Build fails on Python 3.14 because transitive dependency jsonschema-rs (via langgraph-cli[inmem] -> langgraph-api) may pull a version without cp314 wheels on a fresh resolve, triggering a source build against outdated pyo3 (v0.23.4) that does not support 3.14.
Root Cause
jsonschema-rs only ships prebuilt cp314 wheels continuously from v0.40.4 onward. Releases 0.35.0–0.40.3 have no cp314 wheels, so an unlocked resolve could pick one and force-build from source.
Fix
Pin minimum jsonschema-rs>=0.40.4 as an explicit dependency. This is the lowest version that begins a continuous run of cp314-compatible wheels through the langgraph-api cap of <0.45. The committed lock already selected 0.44.1 (cp310-abi3, forward-compatible to 3.14).
Verification