Skip to content

Commit

Permalink
infer all PBS-related metadata from the URL (#21789)
Browse files Browse the repository at this point in the history
Infer most PBS-related metadata from the artifact download URL provided
by the user. (The SHA256 checksum and file size are not inferred from
the URL.)

Adds a three field format for
`--python-build-standalone-known-python-versions` which infers all
PBS-related metadata from the URL. Format is `SHA256|FILE_SIZE|URL`. The
five field format is still supported.

Remove the `--python-build-standalone-require-inferrable-release-tag`
option added by #21739 because the PBS release tag can now be optionally
provided in the version field (first field) of the five field format for
`--python-build-standalone-known-python-versions`.
  • Loading branch information
tdyas authored Dec 26, 2024
1 parent d62a605 commit a2a0652
Show file tree
Hide file tree
Showing 4 changed files with 412 additions and 78 deletions.
8 changes: 6 additions & 2 deletions docs/notes/2.25.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ Fixed a bug where linting with the Helm backend enabled could induce serializati

The AWS Lambda backend now provides built-in complete platforms for the Python 3.13 runtime.

The Python Build Standalone backend (`pants.backend.python.providers.experimental.python_build_standalone`) now supports filtering PBS releases via their "release tag" via [the new `--python-build-standalone-release-constraints` option](https://www.pantsbuild.org/2.25/reference/subsystems/python-build-standalone-python-provider#release_constraints). THe PBS "known versions" database now contains metadata on all known PBS versions, and not just the latest PBS release tag per Python patchlevel.
Several improvements to the Python Build Standalone backend (`pants.backend.python.providers.experimental.python_build_standalone`):

Also, the PBS "release tag" will be inferred for PBS releases supplied via the `--python-build-standalone-known-python-versions` option from the given URLs if those URLs conform to the naming convention used by the PBS project. The new advanced option `--python-build-standalone-require-inferrable-release-tag` controls whether Pants requires the tag to be inferrable. This option currently defaults to `False`, but will be migrated to `True` in a future Pants release. (The release tag cannot currently be specified via `--python-build-standalone-known-python-versions` since changing that option would not be a backward compatible change.)
- The backend now supports filtering PBS releases via their "release tag" via [the new `--python-build-standalone-release-constraints` option](https://www.pantsbuild.org/2.25/reference/subsystems/python-build-standalone-python-provider#release_constraints). THe PBS "known versions" database now contains metadata on all known PBS versions, and not just the latest PBS release tag per Python patchlevel.

- The backend will now infer metadata for a PBS release from a given URL if the URL conforms to the naming convention used by the PBS project. The inferred metadata is Python version, PBS release tag, and platform.

- The `--python-build-standalone-known-python-versions` option now accepts a three field format where each value is `SHA256|FILE_SIZE|URL`. All of the PBS release metadata will be parsed from the URL (which must use the naming convention used by the PBS project). (The existing five-field format is still accepted and will now allow the version and platform fields to be blank if that data can be inferred from the URL.)

Reverence to Python Build Standalone not refer to the [GitHub organization](https://github.com/astral-sh/python-build-standalone) as described in [Transferring Python Build Standalone Stewardship to Astral](https://gregoryszorc.com/blog/2024/12/03/transferring-python-build-standalone-stewardship-to-astral/).

Expand Down
Loading

0 comments on commit a2a0652

Please sign in to comment.