Skip to content

Commit

Permalink
Prevent accidental warning (#4559)
Browse files Browse the repository at this point in the history
Prevent accidental warning from deprecated entrypoint in `pypa/wheel#631`
  • Loading branch information
abravalheri authored Aug 13, 2024
2 parents 7aa30d0 + e3cd584 commit 638128c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions newsfragments/4559.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Prevent deprecation warning from ``pypa/wheel#631`` to accidentally
trigger when validating ``pyproject.toml``.
5 changes: 5 additions & 0 deletions setuptools/config/_apply_pyprojecttoml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 638128c

Please sign in to comment.