Skip to content

Commit

Permalink
Added deprecation warnings to all modules not previously prefixed wit…
Browse files Browse the repository at this point in the history
…h an underscore

This was done to discourage anyone from importing `wheel`.
  • Loading branch information
agronholm committed May 25, 2024
1 parent 1e00742 commit c341c7f
Show file tree
Hide file tree
Showing 43 changed files with 1,591 additions and 1,535 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: ^src/wheel/vendored
exclude: ^src/wheel/_vendored

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
22 changes: 14 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
wheel
=====

This library is the reference implementation of the Python wheel packaging
standard, as defined in `PEP 427`_.
This is a command line tool for manipulating Python wheel files, as defined in
`PEP 427`_. It contains the following functionality:

It has two different roles:
* Convert ``.egg`` archives into ``.whl``
* Unpack wheel archives
* Repack wheel archives
* Add or remove tags in existing wheel archives

#. A setuptools_ extension for building wheels that provides the
``bdist_wheel`` setuptools command
#. A command line tool for working with wheel files
Historical note
---------------

It should be noted that wheel is **not** intended to be used as a library, and
as such there is no stable, public API.
This library used to be the reference implementation of the Python wheel packaging
standard, and a setuptools_ extension containing the ``bdist_wheel`` command. The wheel
file processing functionality has since been moved to the packaging_ library, and the
``bdist_wheel`` command has been merged into setuptools itself, leaving this project to
only contain the command line interface.

.. _PEP 427: https://www.python.org/dev/peps/pep-0427/
.. _packaging: https://pypi.org/project/packaging/
.. _setuptools: https://pypi.org/project/setuptools/

Documentation
Expand Down
1 change: 1 addition & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release Notes
**UNRELEASED**

- Canonicalize requirements in METADATA file (PR by Wim Jeantine-Glenn)
- Added deprecation warnings to all modules not previously prefixed with an underscore

**0.43.0 (2024-03-11)**

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Changelog = "https://wheel.readthedocs.io/en/stable/news.html"
Source = "https://github.com/pypa/wheel"

[project.scripts]
wheel = "wheel.cli:main"
wheel = "wheel._cli:main"

[project.entry-points."distutils.commands"]
bdist_wheel = "wheel.bdist_wheel:bdist_wheel"
Expand Down Expand Up @@ -70,7 +70,7 @@ exclude = [

[tool.black]
extend-exclude = '''
^/src/wheel/vendored/
^/src/wheel/_vendored/
'''

[tool.pytest.ini_options]
Expand All @@ -86,7 +86,7 @@ testpaths = ["test"]

[tool.coverage.run]
source = ["wheel"]
omit = ["*/vendored/*"]
omit = ["*/_vendored/*"]

[tool.coverage.report]
show_missing = true
Expand Down
4 changes: 2 additions & 2 deletions src/wheel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def main(): # needed for console script

path = os.path.dirname(os.path.dirname(__file__))
sys.path[0:0] = [path]
import wheel.cli
from wheel import _cli

Check warning on line 17 in src/wheel/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/wheel/__main__.py#L17

Added line #L17 was not covered by tests

sys.exit(wheel.cli.main())
sys.exit(_cli.main())

Check warning on line 19 in src/wheel/__main__.py

View check run for this annotation

Codecov / codecov/patch

src/wheel/__main__.py#L19

Added line #L19 was not covered by tests


if __name__ == "__main__":
Expand Down
Loading

0 comments on commit c341c7f

Please sign in to comment.