Commit fbc375d
committed
Build: Declare typing-extensions as a core dependency
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>1 parent 1a87aa3 commit fbc375d
3 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments