Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Rust",
"Topic :: Scientific/Engineering",
]
Expand Down
16 changes: 16 additions & 0 deletions python/tests/test_packaging_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

PYTHON_ROOT = Path(__file__).resolve().parents[1]
LANCE_PYTHON_DEPS = {"pylance", "lancedb", "lance-namespace"}
PYTHON_VERSION_CLASSIFIERS = {
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
}


def _dependency_names(dependencies: list[str]) -> set[str]:
Expand All @@ -29,3 +34,14 @@ def test_lance_python_packages_are_optional_runtime_dependencies() -> None:
assert LANCE_PYTHON_DEPS.isdisjoint(runtime_deps)
assert LANCE_PYTHON_DEPS <= _dependency_names(optional_deps["lance-python"])
assert LANCE_PYTHON_DEPS <= _dependency_names(optional_deps["tests"])


def test_python_version_classifiers_match_supported_range() -> None:
pyproject = tomllib.loads((PYTHON_ROOT / "pyproject.toml").read_text())
project = pyproject["project"]
classifiers = set(project["classifiers"])

assert project["requires-python"] == ">=3.11,<3.14"
assert PYTHON_VERSION_CLASSIFIERS <= classifiers
assert "Programming Language :: Python :: 3.9" not in classifiers
assert "Programming Language :: Python :: 3.10" not in classifiers
Loading