Skip to content

Remove typing-extensions dev pin after upgrading uv to GA CPython 3.14 #2425

Description

@jiridanek

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

  1. 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".
  2. Confirm managed interpreter is GA, e.g. uv run python -V reports 3.14.x with no pre-release suffix.
  3. Remove typing-extensions>=4.14.0 from [dependency-groups].dev in pyproject.toml.
  4. 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.yamlpytest-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

  • typing-extensions removed from explicit dev deps in pyproject.toml
  • uv.lock updated
  • All regression steps above pass locally and in CI
  • pydantic>=2.10.0 retained unless proven redundant
  • setup-uv / uv version bump documented in PR

Backlinks

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions