diff --git a/.chronus/changes/update-python-setuptools-2026-8-5.md b/.chronus/changes/update-python-setuptools-2026-8-5.md new file mode 100644 index 00000000000..ac116dd827e --- /dev/null +++ b/.chronus/changes/update-python-setuptools-2026-8-5.md @@ -0,0 +1,7 @@ +--- +changeKind: dependencies +packages: + - "@typespec/http-client-python" +--- + +Update setuptools to 83.0.0 to address CVE-2026-59890. diff --git a/packages/http-client-python/generator/pygen/codegen/templates/packaging_templates/pyproject.toml.jinja2 b/packages/http-client-python/generator/pygen/codegen/templates/packaging_templates/pyproject.toml.jinja2 index 68915429341..5f63b5a2a03 100644 --- a/packages/http-client-python/generator/pygen/codegen/templates/packaging_templates/pyproject.toml.jinja2 +++ b/packages/http-client-python/generator/pygen/codegen/templates/packaging_templates/pyproject.toml.jinja2 @@ -5,7 +5,7 @@ {% endif %} [build-system] -requires = ["setuptools>=77.0.3", "wheel"] +requires = ["setuptools>=83.0.0", "wheel"] build-backend = "setuptools.build_meta" [project] diff --git a/packages/http-client-python/generator/setup.py b/packages/http-client-python/generator/setup.py index cb08938e73d..a2e69410646 100644 --- a/packages/http-client-python/generator/setup.py +++ b/packages/http-client-python/generator/setup.py @@ -52,6 +52,6 @@ "Jinja2==3.1.6", "PyYAML==6.0.1", "tomli==2.0.1", - "setuptools==75.3.2", + "setuptools==83.0.0", ], ) diff --git a/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml b/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml index c31cd4a1a76..58165878495 100644 --- a/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml +++ b/packages/http-client-python/tests/generated/azure/authentication-union/pyproject.toml @@ -6,7 +6,7 @@ # -------------------------------------------------------------------------- [build-system] -requires = ["setuptools>=77.0.3", "wheel"] +requires = ["setuptools>=83.0.0", "wheel"] build-backend = "setuptools.build_meta" [project] diff --git a/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py b/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py index b58c4ef6000..a74ecbabf9f 100644 --- a/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py +++ b/packages/http-client-python/tests/unit/test_pyproject_keep_fields.py @@ -213,6 +213,11 @@ def _render_pyproject(option_value, existing_content): """ +def test_render_requires_patched_setuptools(): + parsed = _render_pyproject("", _EXISTING) + assert parsed["build-system"]["requires"] == ["setuptools>=83.0.0", "wheel"] + + def test_render_keeps_selected_fields(): parsed = _render_pyproject("authors,description", _EXISTING)["project"] # Selected fields are preserved from the existing file.