Skip to content

Commit bbba03a

Browse files
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 2c75523 commit bbba03a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ dependencies = [
4343
"tenacity>=8.2.3",
4444
"pyroaring>=1.0.0",
4545
"cachetools>=5.5",
46-
"zstandard>=0.13.0"
46+
"zstandard>=0.13.0",
47+
"typing-extensions>=4.4.0,<5.0.0",
4748
]
4849

4950
[project.urls]

uv.lock

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)