From 60906f115d5243a247aaf4602b4abe12821d9bc3 Mon Sep 17 00:00:00 2001 From: Charley Peng Date: Mon, 9 Mar 2026 02:07:18 +1100 Subject: [PATCH] build(pyproject): declare `requires-python` via PEP 621 `[project]` metadata Add a minimal `[project]` table to `pyproject.toml` and set: - `requires-python = ">=3.9"` - `name = "folium"` - `dynamic = [...]` for fields still sourced from `setup.py` Why this is needed: `python_requires` in `setup.py` is not enough for tools that read interpreter constraints from `pyproject.toml` metadata. Per PEP 621, `requires-python` belongs in `[project]`, which allows `uv` to resolve/lock against the correct Python range instead of defaulting incorrectly (see https://github.com/astral-sh/uv/issues/11424). --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d6b14f958a..51c532f0c4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,21 @@ requires = ["setuptools>=41.2", "setuptools_scm", "wheel"] build-backend = "setuptools.build_meta" +[project] +name = "folium" +dynamic = [ + "version", + "description", + "readme", + "license", + "authors", + "keywords", + "classifiers", + "dependencies", + "optional-dependencies", +] +requires-python = ">=3.9" + [tool.interrogate] ignore-init-method = true ignore-init-module = false