Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Release Notes
=============

**UNRELEASED**

- Added a redirection from ``wheel.bdist_wheel.bdist_wheel`` to
``setuptools.command.bdist_wheel.bdist_wheel`` to improve compatibility with
``setuptools``' latest fixes.

Projects are still advised to migrate away from the deprecated module and import
the ``setuptools``' implementation explicitly. (PR by @abravalheri)

**0.44.0 (2024-08-04)**

- Canonicalized requirements in METADATA file (PR by Wim Jeantine-Glenn)
Expand Down
19 changes: 17 additions & 2 deletions src/wheel/bdist_wheel.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
from typing import TYPE_CHECKING
from warnings import warn

from ._bdist_wheel import bdist_wheel as bdist_wheel

warn(
"The 'wheel' package is no longer the canonical location of the 'bdist_wheel' "
"command, and will be removed in a future release. Please update to setuptools "
"v70.1 or later which contains an integrated version of this command.",
DeprecationWarning,
stacklevel=1,
)

if TYPE_CHECKING:
from ._bdist_wheel import bdist_wheel as bdist_wheel

Check warning on line 13 in src/wheel/bdist_wheel.py

View check run for this annotation

Codecov / codecov/patch

src/wheel/bdist_wheel.py#L13

Added line #L13 was not covered by tests
else:
try:
# Better integration/compatibility with setuptools:
# in the case new fixes or PEPs are implemented in setuptools
# there is no need to backport them to the deprecated code base.
# This is useful in the case of old packages in the ecosystem
# that are still used but have low maintenance.
from setuptools.command.bdist_wheel import bdist_wheel
except ImportError:
# Only used in the case of old setuptools versions.
# If the user wants to get the latest fixes/PEPs,
# they are encouraged to address the deprecation warning.
from ._bdist_wheel import bdist_wheel as bdist_wheel
Loading