Skip to content

The litestar floor installs but cannot be imported #242

Description

@lesnik512

The litestar extra declares litestar>=2.19, which installs cleanly and then fails when the suite imports it:

ImportError: cannot import name 'FromPath' from 'litestar.params'

FromPath arrived in a later Litestar release than 2.19, so the declared floor names a version this package cannot use.

Worth noting this is invisible to an install-only check: everything installs and only fails once something imports it.

Reproduce

uv venv --python 3.10 .venv-lowest
VIRTUAL_ENV=.venv-lowest uv pip install --resolution lowest-direct ".[litestar]"
VIRTUAL_ENV=.venv-lowest uv pip install pytest pytest-asyncio pytest-cov
VIRTUAL_ENV=.venv-lowest python -m pytest -q

Fix

Raise the floor to the Litestar release that introduced FromPath, verified by running the suite at exactly that version.


Found by a lower-bound audit across the org, prompted by modern-python/.github#107. That issue proposes a CI job that would catch this class of defect standing; right now every gate resolves highest, so no floor is ever exercised.

13 of 23 repos audited had at least one broken floor. faststream-outbox had six and is now green at the lower bound on every supported interpreter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions