You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SyntaxError: multiple exception types must be parenthesized #3
❯ uv tool run --from talk-python-cli talkpython --help
Traceback (most recent call last):
File "/Users/lxj/Library/Caches/uv/archive-v0/oLV9FJJw4Kx0AzFX1pLrG/bin/talkpython", line 6, in <module>
from talk_python_cli.app import main
File "/Users/lxj/Library/Caches/uv/archive-v0/oLV9FJJw4Kx0AzFX1pLrG/lib/python3.12/site-packages/talk_python_cli/app.py", line 15, in <module>
from talk_python_cli.formatting import console, display_json, print_error
File "/Users/lxj/Library/Caches/uv/archive-v0/oLV9FJJw4Kx0AzFX1pLrG/lib/python3.12/site-packages/talk_python_cli/formatting.py", line 71
except json.JSONDecodeError, TypeError:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
The fix for this is already merged — it just hasn't been released.
#2 added the parentheses and was merged on 2026-02-09, and main currently has:
except (json.JSONDecodeError, TypeError):
But talk-python-cli 0.2.0 was uploaded to PyPI on 2026-02-07, one day before that PR was opened. Since there's been no release since, uv tool install talk-python-cli still pulls the pre-fix build — which is why installing from the repo works while installing from PyPI doesn't.
Root cause, for anyone hitting this: unparenthesized except A, B: only became valid syntax in Python 3.14 (PEP 758). The package metadata declares Requires-Python >=3.12, so on 3.12 and 3.13 it's a hard SyntaxError at import — the released artifact is broken across most of its own supported range.
Two workarounds until a release goes out:
uv tool install "git+http://github.com/talkpython/talk-python-cli"# has the fix
uv tool install --python 3.14 talk-python-cli # dodges the syntax error
A 0.2.1 release should close this out. Thanks for the CLI — working nicely here otherwise.
Activity
alexjaw commentedon Feb 15, 2026
Works from repo
alekseyev commentedon Feb 24, 2026
Getting the same error
MDGrey33 commentedon Sep 4, 2026
The fix for this is already merged — it just hasn't been released.
#2 added the parentheses and was merged on 2026-02-09, and
maincurrently has:But
talk-python-cli0.2.0 was uploaded to PyPI on 2026-02-07, one day before that PR was opened. Since there's been no release since,uv tool install talk-python-clistill pulls the pre-fix build — which is why installing from the repo works while installing from PyPI doesn't.Root cause, for anyone hitting this: unparenthesized
except A, B:only became valid syntax in Python 3.14 (PEP 758). The package metadata declaresRequires-Python >=3.12, so on 3.12 and 3.13 it's a hardSyntaxErrorat import — the released artifact is broken across most of its own supported range.Two workarounds until a release goes out:
A 0.2.1 release should close this out. Thanks for the CLI — working nicely here otherwise.