From ffcc22146c5ef31ea1bb34759e800c7e8613edda Mon Sep 17 00:00:00 2001 From: Allen Cheng Date: Thu, 11 Jun 2026 16:18:04 -0700 Subject: [PATCH] fix: align Python version classifiers --- python/pyproject.toml | 3 +-- python/tests/test_packaging_metadata.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 7320ee7..a2719f3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -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", ] diff --git a/python/tests/test_packaging_metadata.py b/python/tests/test_packaging_metadata.py index df6a973..945ccb9 100644 --- a/python/tests/test_packaging_metadata.py +++ b/python/tests/test_packaging_metadata.py @@ -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]: @@ -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