Skip to content

Deprecation of project_wheel_metadata points only at the CLI; the promised wheel_metadata() (from #1084) never shipped #1131

Description

@jaraco

Summary

build.util.project_wheel_metadata was deprecated in 1.5.1, but the deprecation points only at the python -m build --metadata CLI. The programmatic replacement described in #1084build.util.wheel_metadata() with a check_dependencies flag — does not exist in 1.5.1 or on main. The merged diff for #1084 (cd56622) added the deprecation warning but not the new function.

Net effect: consumers of a supported, in-process Python API are being told to migrate to a subprocess, with no supported programmatic path offered.

Why this matters

project_wheel_metadata returns a live importlib.metadata.PackageMetadata object. python -m build --metadata instead emits a JSON core-metadata mapping (snake_case keys, project_urls as a mapping) over stdout. For a library that reads metadata programmatically, the recommended migration therefore means: spawn a child interpreter, capture stdout, parse JSON, and rewrite every consumer that relied on the Message interface — losing the object and the runner customization point.

To make the trade-off concrete, I put up two alternative PRs downstream:

The fact that the tidy fix (#26) just re-inlines build's own non-deprecated internals suggests the capability should stay public.

Request

One of:

  1. Ship the wheel_metadata() described in ⚠️ feat(util): deprecate project_wheel_metadata #1084 (the deprecation message already implies it exists), or
  2. Keep a supported in-process entry point (un-deprecate, or expose the _project_wheel_metadata core), and only then point the deprecation at it.

Until a supported programmatic replacement lands, the deprecation message recommending a CLI leaves library consumers without a like-for-like path. Refs #557, #619, #1084.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions