Repository navigation
fix: Python 3.9 compatibility for type annotations - #18
Merged
fdaviddpt merged 1 commit intoApr 15, 2026
Merged
Conversation
All pipeline modules use PEP 604 union syntax (`str | None`) and PEP 585 generic syntax (`list[str]`, `dict[str, str]`) in type annotations. These require Python 3.10+ at runtime. macOS ships Python 3.9 via CommandLineTools, causing TypeError on import. Adding `from __future__ import annotations` (PEP 563) to every pipeline module makes all annotations lazy strings, so the newer syntax works on 3.9 without changing any signatures. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
str | None) and PEP 585 (list[str],dict[str, str]) type hint syntax, which requires Python 3.10+ at runtimeTypeError: unsupported operand type(s) for |: 'type' and 'NoneType'on every pipeline importfrom __future__ import annotations(PEP 563) to all pipeline modules, making annotations lazy strings so the newer syntax works on 3.9 without changing any signaturesContext
Discovered while debugging why the plugin produced only empty/error log files when installed via the Claude Code plugin marketplace on macOS. The path resolution bugs were already fixed by
resolve-paths.shin main, but the Python 3.9 issue remained — the extraction pipeline crashes before it can do anything.Test plan
python3.9 -c "from pipeline.extract import extract_session"succeedssave-session.sh --dryproduces extracted output on a macOS machine with system Python 3.9🤖 Generated with Claude Code