8000 feat(py_wheel): Normalize name and version by vonschultz · Pull Request #1331 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content

feat(py_wheel): Normalize name and version #1331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Oct 5, 2023

Conversation

vonschultz
Copy link
Contributor
@vonschultz vonschultz commented Jul 20, 2023

Added the incompatible_normalize_name feature flag to normalize the package distribution name according to latest Python packaging standards. Defaults to False for the time being.

Added the incompatible_normalize_version feature flag to normalize the package version according to PEP440 standard. This also adds support for local version specifiers (versions with a + in them), in accordance with PEP440. Defaults to False for the time being.

Instead of following the obsolete PEP 427 escaping procedure for distribution names and versions, we should use the rules specified by https://packaging.python.org/en/latest/specifications (sections "Package name normalization" and "Binary distribution format"). For the versions, this means normalizing them according to PEP 440.

Added as feature flags to avoid forcing the user to deal with breaking changes when upgrading rules_python:

  • Distribution names have stronger requirements now: "A valid name consists only of ASCII letters and numbers, period, underscore and hyphen. It must start and end with a letter or number." https://packaging.python.org/en/latest/specifications/name-normalization/

  • Versions must be valid PEP 440 version identifiers. Previously versions such as "0.1-2-3" would have been accepted; that is no longer the case.

  • The file name of generated wheels may have changed, if the distribution name or the version identifier wasn't in normalized form.

  • The wheelmaker now depends on packaging.version, which means the py_wheel user now needs to load pip dependencies in their WORKSPACE.bazel file:

    load("@rules_python//python/pip_install:repositories.bzl", "pip_install_dependencies")
    
    pip_install_dependencies()
    

Fixes #883. Fixes #1132.

Instead of following the obsolete PEP 427 escaping procedure for
distribution names and versions, use the rules specified by
https://packaging.python.org/en/latest/specifications (sections
"Package name normalization" and "Binary distribution format"). For
the versions, this means normalizing them according to PEP 440.

This adds full support for PEP 440-compliant version identifiers,
including local version identifiers (the part after "+" in versions
such as "1.0+ubuntu.1").

BREAKING CHANGE:

- Distribution names have stronger requirements now: "A valid name
  consists only of ASCII letters and numbers, period, underscore and
  hyphen. It must start and end with a letter or number."
  https://packaging.python.org/en/latest/specifications/name-normalization/

- Versions must be valid PEP 440 version identifiers. Previously
  versions such as "0.1-2-3" would have been accepted; that is no
  longer the case.

- The file name of generated wheels may have changed, if the
  distribution name or the version identifier wasn't in normalized
  form.

Fixes bazel-contrib#883
@vonschultz vonschultz requested a review from rickeylev as a code owner July 20, 2023 11:17
@vonschultz
Copy link
Contributor Author

Could I get some help with the test failures? They seem to be related to this line:
https://github.com/bazelbuild/rules_python/blob/5c5ab5bd9577a284784d1c8b27bf58336de06010/python/runfiles/BUILD.bazel#L55
where, of course, {BUILD_EMBED_LABEL} is not a valid version according to PEP 440. Now, I have been assuming that once we get to wheelmaker.py any stamping should already have taken place, taking care of all the placeholders, and the version we get should be a valid PEP 440 version. Is this mistaken? Should wheelmaker.py be forced to handle invalid versions with placeholders in them? Or should the {BUILD_EMBED_LABEL} be replaced with a valid version identifier?

Looks like @alexeagle and @rickeylev were involved in the patch (1722988c) that introduced {BUILD_EMBED_LABEL}. Any insights or opinions?

@aignas
Copy link
Collaborator
aignas commented Jul 24, 2023

I think by default we are not stamping the builds within the CI, so the embed-label is not substituted. This would mean that a restrictive version name validation may need to be conditional based on whether the build is being stamped.

Another approach could be to do --stamp --embed-label 0.0.0 for the affected tests, but I am not sure if this is the right approach, but usage of some escape latch might be necessary here because of the fact that this wheel is being built within the rules_python workspace.

@chrislovecnm
Copy link
Contributor

@vonschultz does this change fix this issue: #1132

@alexeagle
Copy link
Contributor

Even in an unstamped build, version placeholders should be replaced by a constant value like 0.0.0-PLACEHOLDER. IMO it was always incorrect that we left literal {BUILD_EMBED_LABEL} segments in output filenames.

We need a valid PEP 440 version even if we're doing a non-stamped
build, even if there are placeholders (stamping keys) in the version
string. In that case, replace the placeholders with 0, and append the
original version string, sanitized to dot-separated alphanumerics.
@vonschultz
Copy link
Contributor Author

Yes, @chrislovecnm, this fixes #1132. I updated the pull request message accordingly.

@chrislovecnm
Copy link
Contributor

@aignas or @rickeylev PTAL

Copy link
Collaborator
@rickeylev rickeylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re: requiring pep 440 compliant names: I don't think we should try to perform such strict validation. Doing the basic transforms to make a string more pep 440 compatible (e.g. - to . or w/e) makes sense because we want to produce output that other tools can consume. But we don't really care if a user does e.g. .after instead of .post, or does .post0.dev4.rc1.

The wheelmaker now depends on packaging.version, which means the py_wheel user now needs to load pip dependencies in their WORKSPACE.bazel file

I'm pretty sure we call pip_install_dependencies() internally, so users don't need to worry about this. You can remove this from the description.

)
return escaped

def normalize_pep440(version):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, wow. Now this is some Starlark!

But, this is very hard to follow -- this looks like a stack-based parser, and there's several hundred lines of nested defs that close over local state and modify that same state.

This is going to take some effort to review, which doesn't bode well for others to figure out, and thus its maintainability. We'll need to change it so that it's more approachable to other devs. I'll give some more concrete feedback after I take a closer look.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a parser, yes. If you have ideas on how to make it more approachable, I'm all for that.

My preference would have been to use a regular expression instead — in particular because PEP 440 includes a regular expression that we could take more or less as it is. But regular expressions aren't supported in Starlark, so here I am writing a parser instead. (Though whether a regular expression is more approachable than a parser is perhaps debatable, unless you're really into regular expressions.)

My apologies for the complexity, but PEP 440 is hundreds of lines of English, so some of the complexity seems unavoidable. On the other hand, PEP 440 is a fixed document. Once we have a normalize_pep440() function that works to our satisfaction, there will be few (if any) reasons to go back and change it. That's good for maintainability, isn't it, functions that have no conceivable reason to change as the product evolves.

@vonschultz
Copy link
Contributor Author

re: requiring pep 440 compliant names: I don't think we should try to perform such strict validation. Doing the basic transforms to make a string more pep 440 compatible (e.g. - to . or w/e) makes sense because we want to produce output that other tools can consume. But we don't really care if a user does e.g. .after instead of .post, or does .post0.dev4.rc1.

I don't think we in rules_python should be making up our own rules for how Python versions work. The authoritative source is the specification for the binary distribution format at https://packaging.python.org/en/latest/specifications/binary-distribution-format/, and it says "Version numbers should be normalised according to PEP 440." We might also look at how influential projects such as setuptools handle it, and they require PEP 440-conforming versions. https://setuptools.pypa.io/en/latest/history.html#v66-0-0

In my mind one of two approaches makes sense. Either we take it upon us to do the normalization, in which case we should do it according to the specification, or we put the responsibility on the user entirely, documenting that the version attribute of a py_wheel needs to be a version normalized according to PEP 440, and skip any validation and sanitation whatsoever. That would certainly make for a less complex implementation, but I'm not sure that's a good idea.

The wheelmaker now depends on packaging.version, which means the py_wheel user now needs to load pip dependencies in their WORKSPACE.bazel file

I'm pretty sure we call pip_install_dependencies() internally, so users don't need to worry about this. You can remove this from the description.

I tested this. If I just do a minimal WORKSPACE.bazel file,

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "0a8003b044294d7840ac7d9d73eef05d6ceb682d7516781a4ec62eeb34702578",
    strip_prefix = "rules_python-0.24.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.24.0/rules_python-0.24.0.tar.gz",
)

load("@rules_python//python:repositories.bzl", "py_repositories")

py_repositories()

in a toy project, as documented on https://github.com/bazelbuild/rules_python/releases/tag/0.24.0, and then try to use a py_wheel it will work with the 0.24.0 release, and it won't work when running with bazel build --override_repository=rules_python=/home/von/src/github.com/vonschultz/rules_python ..., unless we change the toy project to include a call to pip_install_dependencies().

It's true that we call pip_install_dependencies() internally in rules_python, but the end user doesn't benefit from that, so from the point of view of the end user it's a breaking c 8000 hange.

@alexmirrington
Copy link
alexmirrington commented Aug 24, 2023

For wheel builds that don't require specific semantic versioning (e.g. for internal tools that are installed in multiple other projects at a company), I think it's pretty common to append a +sha suffix to the wheel version. Currently the validation doesn't support this, and it would be very helpful if it did as proposed in #883

edit: My apologies - was following along on #883 and #1132 but misplaced my comment. Super happy to see this happening! 🎉

@vonschultz
Copy link
Contributor Author

For wheel builds that don't require specific semantic versioning (e.g. for internal tools that are installed in multiple other projects at a company), I think it's pretty common to append a +sha suffix to the wheel version. Currently the validation doesn't support this, and it would be very helpful if it did as proposed in #883

Not sure I follow @alexmirrington. What you are talking about is a local version identifier. That is not currently supported on the main branch, which is #883. Fixing #883 that is the purpose of this pull request, and the validation that's done here does support local version identifiers:
https://github.com/bazelbuild/rules_python/pull/1331/files#diff-e5abf313ad5bebb5c80d6984829326c40288f734daecb0217f5d13ef75adad23R600-R610

Copy link
Collaborator
@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general the parsing approach LGTM, but the tests could be improved to unit test parts of the parser and then sanity check that the parts work together. Right now we only have integration tests.

I have made some experiments in my branch and created a PR to this branch in vonschultz#1 so that it would be easy for you to review and merge.

@rickeylev, I agree that this looks a little bit daunting at first and may require a few iterations of cleanup whilst we get to understand the code, however, once the nested defs are removed and we have a stack-like parser with very few methods it suddenly becomes much easier to grok in my opinion.

token = version[context["start"]]

if predicate(token):
if type(value) in ["function", "builtin_function_or_method"]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is called many times, consider optimizing and doing

Suggested change
if type(value) in ["function", "builtin_function_or_method"]:
t = type(value)
if t == "function" or t == "builtin_function_or_method":

That way we are not creating a list just for comparison.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? I'm not measuring any noticeable speed-up. Measuring with

time bazelisk test //tests/py_wheel:test_pep440_normalization

(with bazelisk clean in between), and sometimes the first approach is faster, sometimes the second approach is faster.

If it's speed we're after, it was noticeably faster before the readability improvements you suggested. (Sorry, I do like the readability improvements.) If we're going for readability over speed, I like the list comprehension.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for being rigorous and checking it. LGTM.

vonschultz and others added 5 commits August 28, 2023 11:56
PEP440 normalization code structure suggestions
//python/private:py_wheel.bzl depends on a new file,
py_wheel_normalize_pep440.bzl, which therefore needs to
be exported by the python/private package and listed in
the //docs:packaging_bzl sources.
In the case where the epoch parsed to "0!", it should be reset to the
empty string. The previous way of doing that forgot to return
acceptance to the caller; the new way of doing it is clearer than
manipulating the "start" of the context.
The buildifier-lint checker wants arguments and return values to be
documented.
The reviewers apparently like long lines. Not sold on that, but
contributors should follow the style of the projects they contribute
to.
Copy link
Collaborator
@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @rickeylev, with the new structure of having fewer things being passed via the closure and nested defs, does this look better?

_escape_filename_segment(ctx.attr.distribution),
_escape_filename_segment(version),
_escape_filename_distribution_name(ctx.attr.distribution),
normalize_pep440(version),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if we could make this new behaviour optional and gated under a boolean flag so that users that depend on the broken behaviour have more time to migrate.

The plan could be:

  • Add a flag named normalize_version_pep440 which defaults to False for now.
  • If the flag is set to True then the new codepath is used.
  • In a future release the incompatible_normalize_version is set to True but users have ability to set it to False if required.

That way the change is no longer breaking.

Consider adding an extra dictionary with args named:

_feature_flags = {
    "incompatible_normalize_version": attr.bool(
        default = False,
        doc = "Normalize the package version according to PEP440 standard",
    ),
    "incompatible_explicit_distribution_stamp_vars": attr.bool(
        default = False,
        doc = "Change the format of how the stamp variables can be used to " +
              "in the distribution name. With this option set to True, the " +
              "user has to pass stamp variables enclosed in '{}', e.g. " +
              "'{BUILD_TIMESTAMP}'."
    ),
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add some context (I was out and about on my phone when Ignas asked me about this, so I didn't have time to respond in full):

The key point is to decouple upgrading the rules_python version from having to address incompatible changes. This allows a more incremental and manageable upgrade process. A user can upgrade rules_python, opt into behavior where they can, and followup later where they can't. The next version (which has the incompatible behavior by default) blocks them from upgrading, but they're still able to make their current version forward compatible.

To avoid having breaking changes, add feature flags
"incompatible_normalize_name" and "incompatible_normalize_version",
which default to False for the time being.
Add the "incompatible_normalize_version" and
"incompatible_normalize_name" feature flags to
the documentation.
Copy link
Collaborator
@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for doing the extra work to add the feature flags. I think the only thing remaining before merging is to add a line in the CHANGELOG.md file.

Add links to the specifications. 
Note that we have support for placeholders.

Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
@vonschultz
Copy link
Contributor Author

Should I update the pull request description? Does this still count as a breaking change? Does this still count as fixing #883 and #1132, or should that wait for a pull request that changes the default value of the feature flags to "True"?

Just a `bazelisk run //docs:update` after having changed the
description of "incompatible_normalize_name".
@aignas
Copy link
Collaborator
aignas commented Oct 4, 2023

Yes, the PR title and description should be updated and I would be of an opinion that it still fixes #883 and #1132 as users have a way to opt-into the new behavior.

@aignas aignas added this to the v0.26.0 milestone Oct 5, 2023
Add a note about the two new feature flags in the change log:
incompatible_normalize_name and incompatible_normalize_version.
@vonschultz vonschultz changed the title feat(py_wheel)!: Normalize name and version feat(py_wheel): Normalize name and version Oct 5, 2023
@aignas aignas added this pull request to the merge queue Oct 5, 2023
Merged via the queue into bazel-contrib:main with commit 382b678 Oct 5, 2023
@vonschultz vonschultz deleted the pep440 branch October 5, 2023 14:28
renovate bot referenced this pull request in bazel-contrib/rules_bazel_integration_test Oct 6, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [rules_python](https://togithub.com/bazelbuild/rules_python) |
http_archive | minor | `0.25.0` -> `0.26.0` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_python (rules_python)</summary>

###
[`v0.26.0`](https://togithub.com/bazelbuild/rules_python/releases/tag/0.26.0)

[Compare
Source](https://togithub.com/bazelbuild/rules_python/compare/0.25.0...0.26.0)

#### Using Bzlmod with Bazel 6

**NOTE: bzlmod support is still beta. APIs subject to change.**

Add to your `MODULE.bazel` file:

```starlark
bazel_dep(name = "rules_python", version = "0.26.0")

pip = use_extension("@&#8203;rules_python//python/extensions:pip.bzl", "pip")

pip.parse(
    name = "pip",
    requirements_lock = "//:requirements_lock.txt",
)

use_repo(pip, "pip")
```

#### Using WORKSPACE

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_python",
    sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
    strip_prefix = "rules_python-0.26.0",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
)

load("@&#8203;rules_python//python:repositories.bzl", "py_repositories")

py_repositories()
```

##### Gazelle plugin

Paste this snippet into your `WORKSPACE` file:

```starlark
load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_python_gazelle_plugin",
    sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
    strip_prefix = "rules_python-0.26.0/gazelle",
    url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
)

### To compile the rules_python gazelle extension from source,
### we must fetch some third-party go dependencies that it uses.

load("@&#8203;rules_python_gazelle_plugin//:deps.bzl", _py_gazelle_deps = "gazelle_deps")

_py_gazelle_deps()
```

#### What's Changed

- doc: Note Python version changes in CHANGELOG by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1391](https://togithub.com/bazelbuild/rules_python/pull/1391)
- fix: bcr releaser email by
[@&#8203;f0rmiga](https://togithub.com/f0rmiga) in
[https://github.com/bazelbuild/rules_python/pull/1392](https://togithub.com/bazelbuild/rules_python/pull/1392)
- Adding kwargs to gazelle_python_manifest by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_python/pull/1289](https://togithub.com/bazelbuild/rules_python/pull/1289)
- docs: Use correct link to build badge image and build status page. by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1390](https://togithub.com/bazelbuild/rules_python/pull/1390)
- feat(py_console_script_binary)!: entry points with custom dependencies
by [@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1363](https://togithub.com/bazelbuild/rules_python/pull/1363)
- fix(whl_library): avoid unnecessary repository rule restarts by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1400](https://togithub.com/bazelbuild/rules_python/pull/1400)
- refactor: add missing `//python/config_settings/private:distribution`
target by [@&#8203;philsc](https://togithub.com/philsc) in
[https://github.com/bazelbuild/rules_python/pull/1402](https://togithub.com/bazelbuild/rules_python/pull/1402)
- Import pycross_wheel_library by
[@&#8203;philsc](https://togithub.com/philsc) in
[https://github.com/bazelbuild/rules_python/pull/1403](https://togithub.com/bazelbuild/rules_python/pull/1403)
- refactor: upgrade certifi by
[@&#8203;cflewis](https://togithub.com/cflewis) in
[https://github.com/bazelbuild/rules_python/pull/1397](https://togithub.com/bazelbuild/rules_python/pull/1397)
- fix: don't set distribs in version transitioning rule by
[@&#8203;comius](https://togithub.com/comius) in
[https://github.com/bazelbuild/rules_python/pull/1412](https://togithub.com/bazelbuild/rules_python/pull/1412)
- fix(gazelle): upgrade rules_go: 0.39.1 -> 0.41.0 to work with upcoming
Bazel versions by [@&#8203;sgowroji](https://togithub.com/sgowroji) in
[https://github.com/bazelbuild/rules_python/pull/1410](https://togithub.com/bazelbuild/rules_python/pull/1410)
- fix: gazelle: Fix non-hermetic runfiles lookup by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_python/pull/1415](https://togithub.com/bazelbuild/rules_python/pull/1415)
- feat: create toolchain type for py_proto_library by
[@&#8203;comius](https://togithub.com/comius) in
[https://github.com/bazelbuild/rules_python/pull/1416](https://togithub.com/bazelbuild/rules_python/pull/1416)
- internal: copy Starlark rule implementation from Bazel by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1418](https://togithub.com/bazelbuild/rules_python/pull/1418)
- feat: add new Python toolchain versions by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1414](https://togithub.com/bazelbuild/rules_python/pull/1414)
- internal(pystar): make starlark impl (mostly) loadable by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1422](https://togithub.com/bazelbuild/rules_python/pull/1422)
- feat: generate py_library per file by
[@&#8203;raylu](https://togithub.com/raylu) in
[https://github.com/bazelbuild/rules_python/pull/1398](https://togithub.com/bazelbuild/rules_python/pull/1398)
- chore: bump default python versions by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1425](https://togithub.com/bazelbuild/rules_python/pull/1425)
- feat: Support netrc-based authentication for python_repository rule by
[@&#8203;LINKIWI](https://togithub.com/LINKIWI) in
[https://github.com/bazelbuild/rules_python/pull/1417](https://togithub.com/bazelbuild/rules_python/pull/1417)
- refactor(pystar): load (but don't use) Starlark implementation. by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1428](https://togithub.com/bazelbuild/rules_python/pull/1428)
- fix(gazelle): runfiles discovery by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1429](https://togithub.com/bazelbuild/rules_python/pull/1429)
- feat, refactor(pystar): bzl_library for packaging.bzl; fix pystar doc
building and py_wheel by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1432](https://togithub.com/bazelbuild/rules_python/pull/1432)
- refactor(toolchain): use a helper method to convert an X.Y version to
X.Y.Z by [@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1423](https://togithub.com/bazelbuild/rules_python/pull/1423)
- pycross: Rename `pycross_wheel_library` and make it work by
[@&#8203;philsc](https://togithub.com/philsc) in
[https://github.com/bazelbuild/rules_python/pull/1413](https://togithub.com/bazelbuild/rules_python/pull/1413)
- fix: Skip printing unneccesary warning. by
[@&#8203;matts1](https://togithub.com/matts1) in
[https://github.com/bazelbuild/rules_python/pull/1407](https://togithub.com/bazelbuild/rules_python/pull/1407)
- refactor(bzlmod)!: simplify pip.parse repository layout by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1395](https://togithub.com/bazelbuild/rules_python/pull/1395)
- feat(bzlmod): mark pip extension as os/arch dependent by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1433](https://togithub.com/bazelbuild/rules_python/pull/1433)
- chore: bump internal_deps by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1322](https://togithub.com/bazelbuild/rules_python/pull/1322)
- tests(pystar): CI configs that uses Starlark implementation of rules
by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1435](https://togithub.com/bazelbuild/rules_python/pull/1435)
- internal(pystar): Copy @&#8203;bazel_tools//tools/python files to
rules_python by [@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1437](https://togithub.com/bazelbuild/rules_python/pull/1437)
- internal(pystar): Make py_runtime_pair and autodetecting toolchain
mostly loadable. by [@&#8203;rickeylev](https://togithub.com/rickeylev)
in
[https://github.com/bazelbuild/rules_python/pull/1439](https://togithub.com/bazelbuild/rules_python/pull/1439)
- tests: Move base rule tests under tests instead of
//tools/build_defs/python by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1440](https://togithub.com/bazelbuild/rules_python/pull/1440)
- tests(pystar): py_runtime_pair and py_runtime analysis tests by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1441](https://togithub.com/bazelbuild/rules_python/pull/1441)
- fix(pystar): Use py_internal for runfiles_enabled,
declare_shareable_artifact, share_native_deps by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1443](https://togithub.com/bazelbuild/rules_python/pull/1443)
- build(deps): bump urllib3 from 1.26.13 to 1.26.17 in
/examples/pip_repository_annotations by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/bazelbuild/rules_python/pull/1447](https://togithub.com/bazelbuild/rules_python/pull/1447)
- build(deps): bump urllib3 from 1.25.11 to 1.26.17 in
/examples/pip_install by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/bazelbuild/rules_python/pull/1444](https://togithub.com/bazelbuild/rules_python/pull/1444)
- fix: add missing `@bazel_tools` files to bzl_library dependencies. by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1457](https://togithub.com/bazelbuild/rules_python/pull/1457)
- tests(pystar): add analysis tests to cover basic windows building by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1452](https://togithub.com/bazelbuild/rules_python/pull/1452)
- docs: move dependency management into respective bzl packages by
[@&#8203;rickeylev](https://togithub.com/rickeylev) in
[https://github.com/bazelbuild/rules_python/pull/1459](https://togithub.com/bazelbuild/rules_python/pull/1459)
- feat(py_wheel): Normalize name and version by
[@&#8203;vonschultz](https://togithub.com/vonschultz) in
[https://github.com/bazelbuild/rules_python/pull/1331](https://togithub.com/bazelbuild/rules_python/pull/1331)
- chore: add new Python toolchains from indygreg by
[@&#8203;aignas](https://togithub.com/aignas) in
[https://github.com/bazelbuild/rules_python/pull/1461](https://togithub.com/bazelbuild/rules_python/pull/1461)

#### New Contributors

- [@&#8203;cflewis](https://togithub.com/cflewis) made their first
contribution in
[https://github.com/bazelbuild/rules_python/pull/1397](https://togithub.com/bazelbuild/rules_python/pull/1397)
- [@&#8203;sgowroji](https://togithub.com/sgowroji) made their first
contribution in
[https://github.com/bazelbuild/rules_python/pull/1410](https://togithub.com/bazelbuild/rules_python/pull/1410)
- [@&#8203;raylu](https://togithub.com/raylu) made their first
contribution in
[https://github.com/bazelbuild/rules_python/pull/1398](https://togithub.com/bazelbuild/rules_python/pull/1398)
- [@&#8203;LINKIWI](https://togithub.com/LINKIWI) made their first
contribution in
[https://github.com/bazelbuild/rules_python/pull/1417](https://togithub.com/bazelbuild/rules_python/pull/1417)

**Full Changelog**:
bazel-contrib/rules_python@0.25.0...0.26.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/bazel-contrib/rules_bazel_integration_test).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@aignas aignas mentioned this pull request Oct 19, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect wheel filename for distribution names with hyphen Support for PEP 440 local version identifiers is broken
6 participants
0