Build: Declare typing-extensions as a core dependency#3616
Open
anxkhn wants to merge 1 commit into
Open
Conversation
typing_extensions is imported unconditionally at module import time: `Self` in pyiceberg/typedef.py (a module imported transitively by nearly the whole package) and `override` in ten catalog and IO modules. Both are top-level runtime imports, not guarded by TYPE_CHECKING, and typing.Self / typing.override are only in the standard library on Python 3.11+ / 3.12+ while pyiceberg supports Python 3.10. However typing-extensions was declared only in the dev dependency group, so the distributed package under-declared a required import. It works today solely because pydantic pulls typing-extensions in transitively; if that transitive edge ever changes, `import pyiceberg` would fail with ModuleNotFoundError. Move it to [project.dependencies] with a floor of 4.4.0 (the release that added `override`; `Self` landed in 4.0.0). deptry (already a dev dependency) flags this as DEP004 at every import site. Regenerate uv.lock accordingly. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
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.
Notes for the ship step (not part of the PR)
Closes #line. (Historical PR Fix dependency withdeptry#534 proposed thesame move but was closed by the stale bot for inactivity, not rejected on merit;
worth mentioning in a PR comment if a maintainer asks, but not required in the body.)
changeloglabel cannot be set by an external contributor (no triage perm);this is a build/packaging fix with no user-visible API change, so a changelog entry
is likely unnecessary. Leave it to maintainer discretion.
patch-15onto the freshly fetchedorigin/main(this repomoves ~10 commits/1.5 days). If upstream bumped deps, re-run
uv lockconflictresolution and
make lint(uv-lock check) after the rebase.gh pr create -R apache/iceberg-python --base main --head anxkhn:patch-15.