fix(deps): declare typing-extensions as runtime dependency#112
Open
straightchlorine wants to merge 1 commit into
Open
fix(deps): declare typing-extensions as runtime dependency#112straightchlorine wants to merge 1 commit into
straightchlorine wants to merge 1 commit into
Conversation
The k-means and median-cut extractors import `override` unconditionally (Pylette/src/extractors/k_means.py:3, median_cut.py:3), but typing-extensions itself was never listed in [project.dependencies]. It was present through the dev tooling - on a clean install it breaks: ModuleNotFoundError: No module named 'typing_extensions' Adding typing-extensions>=4.4.0 and regenerating uv.lock fixes issue. Verified with `uv run pytest` and `python smoke_test.py`
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.
Problem
Pylette/src/extractors/k_means.py:3andmedian_cut.py:3both importfrom typing_extensions import override, unconditionally, buttyping-extensionswas never listed in[project.dependencies]. Present only through the dev tooling, so import doesn't fail on CI.On a clean install:
Reproduce (3.12)
Both the installation and final
uv pip listconfirm that package is absent.Fix
Declaring it unconditionally fixes the issue. Confirmed with
typing-extensions==4.14.1andtyping-extensions==4.15.0.Alternative: guard the import
Versions 3.12+ have
typing.overridein stdlib, while carrying no runtime dep. To take advantage:typing-extensions>=4.4.0; python_version < '3.12'