Skip to content

fix(cookbook): remove dead IS_WINDOWS import in _pip_install_fallback_chain#5528

Open
archdex-art wants to merge 1 commit into
odysseus-dev:devfrom
archdex-art:fix/dead-is-windows-import
Open

fix(cookbook): remove dead IS_WINDOWS import in _pip_install_fallback_chain#5528
archdex-art wants to merge 1 commit into
odysseus-dev:devfrom
archdex-art:fix/dead-is-windows-import

Conversation

@archdex-art

@archdex-art archdex-art commented Jul 14, 2026

Copy link
Copy Markdown

Summary

_pip_install_fallback_chain (routes/cookbook_helpers.py) imports IS_WINDOWS from core.platform_compat at the top of the function but never references it anywhere in the function body — dead code left over from an earlier version of the pip install fallback chain. This removes the unused import. No behavior change.

Target branch

  • This PR targets dev, not main.

Linked Issue

Fixes #5512

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this is not a duplicate.
  • This PR targets dev
  • My changes are limited to the scope described above — no unrelated refactors or whitespace changes mixed in.
  • I actually ran the app (docker compose up or uvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.

How to Test

  1. grep -c IS_WINDOWS routes/cookbook_helpers.py — returns 0 (no remaining references anywhere in the file).
  2. python -m py_compile routes/cookbook_helpers.py — passes.
  3. python -m pytest tests/test_cookbook_helpers.py — 68 passed, 1 pre-existing skip, same as before the change.
  4. Live app run: AUTH_ENABLED=false ODYSSEUS_DATA_DIR=/tmp/odysseus-data uvicorn app:app --host 127.0.0.1 --port 7002, confirmed clean startup with no ImportError/traceback in logs, then curl http://127.0.0.1:7002/api/model/cached returns HTTP 200 — proves routes/cookbook_helpers.py (which _pip_install_fallback_chain lives in) imports and the route registers cleanly with the import removed.

Visual / UI changes — REQUIRED if you touched anything that renders

Not applicable — this change touches no rendering code (backend Python only, one dead import line removed).

…_chain

IS_WINDOWS is imported at the top of _pip_install_fallback_chain but never
referenced in the function body — dead code left over from an earlier
version of the fallback chain.

Fixes odysseus-dev#5512
@github-actions github-actions Bot added needs work PR description incomplete — please update before review ready for review Description complete — ready for maintainer review and removed needs work PR description incomplete — please update before review labels Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead IS_WINDOWS import in cookbook _pip_install_fallback_chain

1 participant