diff --git a/newsfragments/4559.misc.rst b/newsfragments/4559.misc.rst new file mode 100644 index 0000000000..34b5a30664 --- /dev/null +++ b/newsfragments/4559.misc.rst @@ -0,0 +1,2 @@ +Prevent deprecation warning from ``pypa/wheel#631`` to accidentally +trigger when validating ``pyproject.toml``. diff --git a/setuptools/config/_apply_pyprojecttoml.py b/setuptools/config/_apply_pyprojecttoml.py index 8224a02631..7b9c0b1a59 100644 --- a/setuptools/config/_apply_pyprojecttoml.py +++ b/setuptools/config/_apply_pyprojecttoml.py @@ -276,6 +276,11 @@ def _valid_command_options(cmdclass: Mapping = EMPTY) -> dict[str, set[str]]: def _load_ep(ep: metadata.EntryPoint) -> tuple[str, type] | None: + if ep.value.startswith("wheel.bdist_wheel"): + # Ignore deprecated entrypoint from wheel and avoid warning pypa/wheel#631 + # TODO: remove check when `bdist_wheel` has been fully removed from pypa/wheel + return None + # Ignore all the errors try: return (ep.name, ep.load())