Skip to content

Python 3.14 compatibility for the pcc CLI - #176

Merged
markbackman merged 4 commits into
mainfrom
mb/3.14-support
May 14, 2026
Merged

markbackman merged 4 commits into
mainfrom
mb/3.14-support

Conversation

@markbackman

Copy link
Copy Markdown
Contributor

Summary

  • Rename four Typer command callbacks that shadowed builtins (list, set). Under Python 3.14 (PEP 649), annotations are evaluated lazily against module globals, so a later async def list overwrote the name before Typer inspected an earlier secrets: list[str] annotation — raising TypeError: 'FunctionWithAio' object is not subscriptable at CLI import time. User-facing command names are unchanged since each @*_cli.command(name=...) is explicit.
  • Add a python-compatibility workflow that matrixes 3.11–3.14, runs uv sync --group dev, then uv run pcc --help. The help command walks the full Typer command tree, which is exactly the path that surfaced this regression — import pipecatcloud alone would not have.

Test plan

  • CI: new python-compatibility job passes on all four Python versions
  • CI: existing tests and format jobs still pass
  • Local: uv run pcc --help succeeds (verified on 3.13)
  • Local: uv run --python 3.14 pcc --help succeeds (verified by reporter)
  • Local: uv run pytest tests/test_regions.py passes (the rename touched one import alias here)

🤖 Generated with Claude Code

On Python 3.14 (PEP 649), annotations are evaluated lazily against
module globals at signature-inspection time. Defining `async def list`
and `async def set` at module scope rebinds those names, so by the time
Typer inspects an earlier function annotated `list[str]`, the lookup
resolves to a `FunctionWithAio` and raises `TypeError: not subscriptable`
at CLI import.

Rename to non-shadowing identifiers; the user-facing command names are
unchanged (each `@*_cli.command(name=...)` is already explicit).
Runs `uv sync` plus `uv run pcc --help` across the supported Python
matrix. The help command forces Typer to walk every command's
annotations, which is where the previous 3.14 `FunctionWithAio`
regression surfaced — `import pipecatcloud` alone would not catch it.
@markbackman
markbackman merged commit 4e2a30f into main May 14, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant