Summary
RHAIENG-5133 PR #2424 adds an explicit dev dependency on typing-extensions>=4.14.0 to fix pytest-tests collection on Python 3.14:
TypeError: _eval_type() got an unexpected keyword argument 'prefer_fwd_module'
Unable to evaluate type annotation 'str'.
That failure is triggered by Pydantic models using from __future__ import annotations (e.g. tests/containers/pydantic_schemas/podman_info.py) when the test environment’s typing stack is not fully aligned with GA CPython 3.14.
pydantic>=2.10.0 (added earlier; see opendatahub-io/notebooks#3105) addresses the primary Pydantic side of this change. The typing-extensions pin is an interim workaround for CI/dev environments where setup-uv / managed Python may still resolve a pre-release or otherwise incomplete 3.14 toolchain.
Goal
Once we upgrade uv / astral-sh/setup-uv so CI and local dev install a GA CPython 3.14 (final, not rc/beta), revisit and remove the explicit typing-extensions dev dependency from pyproject.toml if collection still passes without it.
Scope
- Bump
astral-sh/setup-uv (currently v7.6.0 in .github/workflows/code-quality.yaml and other workflows) to a version that installs stable CPython 3.14.x by default for python-version: "3.14".
- Confirm managed interpreter is GA, e.g.
uv run python -V reports 3.14.x with no pre-release suffix.
- Remove
typing-extensions>=4.14.0 from [dependency-groups].dev in pyproject.toml.
- Regenerate
uv.lock (uv lock) and verify CI.
Keep pydantic>=2.10.0 unless a separate upstream change proves it unnecessary on GA 3.14.
Regression test plan (must pass before/after removing typing-extensions)
Use these checks to ensure the original failure is not reintroduced.
1. Confirm interpreter
uv python list | rg '3\.14'
uv run python -V
uv run python -c "import sys; print(sys.version)"
Expect a final 3.14 release (no rc, b, or a in the version string).
2. Sync and collect tests (local)
uv sync --locked
uv run pytest tests/containers --collect-only -q
Must exit 0 with no prefer_fwd_module / Unable to evaluate type annotation errors.
3. Exercise the original trigger module
uv run python -c "from tests.containers.pydantic_schemas.podman_info import PodmanInfo; print('ok')"
This module uses from __future__ import annotations and was on the collection stack when CI failed.
4. CI-equivalent static test gate
uv run pytest -m 'not buildonlytest' --collect-only -q
# or, on Linux CI runners:
make test
Matches .github/workflows/code-quality.yaml → pytest-tests job.
5. CI verification
pytest-tests job in code-quality.yaml must pass on the PR that removes typing-extensions.
- Optionally add a brief note to
AGENTS.md or PR test plan referencing this issue as the regression checklist.
Acceptance criteria
Backlinks
Summary
RHAIENG-5133 PR #2424 adds an explicit dev dependency on
typing-extensions>=4.14.0to fixpytest-testscollection on Python 3.14:That failure is triggered by Pydantic models using
from __future__ import annotations(e.g.tests/containers/pydantic_schemas/podman_info.py) when the test environment’s typing stack is not fully aligned with GA CPython 3.14.pydantic>=2.10.0(added earlier; see opendatahub-io/notebooks#3105) addresses the primary Pydantic side of this change. Thetyping-extensionspin is an interim workaround for CI/dev environments wheresetup-uv/ managed Python may still resolve a pre-release or otherwise incomplete 3.14 toolchain.Goal
Once we upgrade uv /
astral-sh/setup-uvso CI and local dev install a GA CPython 3.14 (final, notrc/beta), revisit and remove the explicittyping-extensionsdev dependency frompyproject.tomlif collection still passes without it.Scope
astral-sh/setup-uv(currentlyv7.6.0in.github/workflows/code-quality.yamland other workflows) to a version that installs stable CPython 3.14.x by default forpython-version: "3.14".uv run python -Vreports3.14.xwith no pre-release suffix.typing-extensions>=4.14.0from[dependency-groups].devinpyproject.toml.uv.lock(uv lock) and verify CI.Keep
pydantic>=2.10.0unless a separate upstream change proves it unnecessary on GA 3.14.Regression test plan (must pass before/after removing
typing-extensions)Use these checks to ensure the original failure is not reintroduced.
1. Confirm interpreter
Expect a final 3.14 release (no
rc,b, orain the version string).2. Sync and collect tests (local)
Must exit 0 with no
prefer_fwd_module/Unable to evaluate type annotationerrors.3. Exercise the original trigger module
uv run python -c "from tests.containers.pydantic_schemas.podman_info import PodmanInfo; print('ok')"This module uses
from __future__ import annotationsand was on the collection stack when CI failed.4. CI-equivalent static test gate
Matches
.github/workflows/code-quality.yaml→pytest-testsjob.5. CI verification
pytest-testsjob incode-quality.yamlmust pass on the PR that removestyping-extensions.AGENTS.mdor PR test plan referencing this issue as the regression checklist.Acceptance criteria
typing-extensionsremoved from explicit dev deps inpyproject.tomluv.lockupdatedpydantic>=2.10.0retained unless proven redundantsetup-uv/ uv version bump documented in PRBacklinks
.github/workflows/code-quality.yaml(setup-uv,python-version: "3.14")tests/containers/pydantic_schemas/podman_info.py