build(deps): bump pip from 26.1.2 to 26.2 in /examples/wheel in the uv group across 1 directory (#4140) Bumps the uv group with 1 update in the /examples/wheel directory: [pip](https://github.com/pypa/pip). Updates `pip` from 26.1.2 to 26.2 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p> <blockquote> <h1>26.2 (2026-07-29)</h1> <h2>Deprecations and Removals</h2> <ul> <li> <p>Newly published packages will no longer be immediately visible to pip if the index uses caching. To install a newly published package, use <code>--refresh-package</code>. (<code>[#13680](https://github.com/pypa/pip/issues/13680) <https://github.com/pypa/pip/issues/13680></code>_)</p> </li> <li> <p>Drop support for detecting legacy, non-:pep:<code>405</code>, <code>virtualenv</code> (< 20) environments. (<code>[#14062](https://github.com/pypa/pip/issues/14062) <https://github.com/pypa/pip/issues/14062></code>_)</p> </li> <li> <p>Constraints files, including <code>PIP_CONSTRAINT</code>, no longer affect isolated build environments. Use <code>--build-constraint</code> or the <code>PIP_BUILD_CONSTRAINT</code> environment variable to constrain build dependencies instead.</p> <p>The <code>--use-feature=build-constraint</code> flag is now always enabled and has no effect. (<code>[#14094](https://github.com/pypa/pip/issues/14094) <https://github.com/pypa/pip/issues/14094></code>_)</p> </li> </ul> <h2>Features</h2> <ul> <li> <p>Declare support for Python 3.15 (<code>[#14208](https://github.com/pypa/pip/issues/14208) <https://github.com/pypa/pip/issues/14208></code>_)</p> </li> <li> <p>Support self-referential extras officially. pip has supported this by accident since version 21.2. (<code>[#11296](https://github.com/pypa/pip/issues/11296) <https://github.com/pypa/pip/issues/11296></code>_)</p> </li> <li> <p>Add <code>--only-deps</code> flag to instruct pip to select only the dependencies of supplied packages. It cannot be used with <code>--no-deps</code>, <code>-r</code>, <code>--group</code>, or <code>--requirements-from-script</code>. (<code>[#11440](https://github.com/pypa/pip/issues/11440) <https://github.com/pypa/pip/issues/11440></code>_)</p> </li> <li> <p>Cache simple responses in accordance to their <code>Cache-Control</code> header instead of always revalidating on every request. To refresh cached package index responses and ensure newly published packages are found, use <code>--refresh-package <package></code>. (<code>[#13680](https://github.com/pypa/pip/issues/13680) <https://github.com/pypa/pip/issues/13680></code>_)</p> </li> <li> <p>Add <code>--no-require-hashes</code> to disable automatic enablement of <code>--require-hashes</code> when encountering a requirement with hashes. (<code>[#14169](https://github.com/pypa/pip/issues/14169) <https://github.com/pypa/pip/issues/14169></code>_)</p> </li> <li> <p>Honor <code>--only-final</code> when sourcing requirements with <code>-r pylock.toml</code>. (<code>[#13950](https://github.com/pypa/pip/issues/13950) <https://github.com/pypa/pip/issues/13950></code>_)</p> </li> <li> <p>Add support for <code>pylock.toml</code> <code>upload-time</code> field, so <code>--uploaded-prior-to</code> works with <code>-r pylock.toml</code>. (<code>[#14168](https://github.com/pypa/pip/issues/14168) <https://github.com/pypa/pip/issues/14168></code>_)</p> </li> <li> <p>Better error messages in case of conflicts with requirements from <code>-r pylock.toml</code>. (<code>[#13963](https://github.com/pypa/pip/issues/13963) <https://github.com/pypa/pip/issues/13963></code>_)</p> </li> <li> <p>Add experimental support for isolating build subprocesses by creating standard virtual environments. This will fix most (if not all) subtle isolation issues that can lead to broken builds exclusive to pip. The feature can be enabled via <code>--use-feature=venv-isolation</code> and will be enabled by default in a future release.</p> <p>Note that the feature has limited compatibility with <code>--use-feature=inprocess-build-deps</code>. While most builds should work with both features enabled, there are known edge cases. <code>inprocess-build-deps</code> will not be enabled by default until they are fixed. (<code>[#14070](https://github.com/pypa/pip/issues/14070) <https://github.com/pypa/pip/issues/14070></code>_)</p> </li> <li> <p>Present more informative diagnostic errors on uncaught network errors. (<code>[#14115](https://github.com/pypa/pip/issues/14115) <https://github.com/pypa/pip/issues/14115></code>_)</p> </li> <li> <p>Allow opting out of Git partial clones with <code>PIP_NO_PARTIAL_CLONE_FOR_BROKEN_GIT_SERVER</code>. (<code>[#11043](https://github.com/pypa/pip/issues/11043) <https://github.com/pypa/pip/issues/11043></code>_)</p> </li> <li> <p>Add a <code>--no-proxy-env</code> (or <code>--proxy ""</code>) option to ignore proxies configured via non-pip environment variables or configuration files. A proxy set with <code>--proxy</code> is still used. (<code>[#5378](https://github.com/pypa/pip/issues/5378) <https://github.com/pypa/pip/issues/5378></code>_)</p> </li> <li> <p>Add support for pulling username from keyring subprocess provider (<code>[#12543](https://github.com/pypa/pip/issues/12543) <https://github.com/pypa/pip/issues/12543></code>_)</p> </li> <li> <p>Speedup tab autocompletion by lazy-importing certain modules. (<code>[#4768](https://github.com/pypa/pip/issues/4768) <https://github.com/pypa/pip/issues/4768></code>_)</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/pip/commit/4b6ae5c4d7d63a61a99fbecbead8dbc35cc8b357"><code>4b6ae5c</code></a> Bump for release</li> <li><a href="https://github.com/pypa/pip/commit/50b6d3cf998e141d106e72ba17380c39f979188d"><code>50b6d3c</code></a> Update AUTHORS.txt</li> <li><a href="https://github.com/pypa/pip/commit/dbddfbde3a2f57401c9ad1b910aee6d195af7b8d"><code>dbddfbd</code></a> Tweak news entries for pip 26.2 (<a href="https://redirect.github.com/pypa/pip/issues/14212">#14212</a>)</li> <li><a href="https://github.com/pypa/pip/commit/6576b7596c97bb95ce02098303d25bf82dd44943"><code>6576b75</code></a> Merge pull request <a href="https://redirect.github.com/pypa/pip/issues/14165">#14165</a> from sbidoul/refactor-pylock-hanling-sbi</li> <li><a href="https://github.com/pypa/pip/commit/0090e0065ae0087d5d6c171a4eb1821e127aa120"><code>0090e00</code></a> Address a variety of typos detected in code review</li> <li><a href="https://github.com/pypa/pip/commit/e12ddd958df6878f38f2a6f777e4653613eb4821"><code>e12ddd9</code></a> Add support for --uploaded-prior-to with -r pylock.toml</li> <li><a href="https://github.com/pypa/pip/commit/5eefdbcb09ab9783ab89f33fb85c48abf45eb7be"><code>5eefdbc</code></a> Better conflict report for requirements from -r pylock.toml</li> <li><a href="https://github.com/pypa/pip/commit/6d71ff83d64b36504761990911e797c0f5d259d1"><code>6d71ff8</code></a> Test --only-final with -r pylock.toml</li> <li><a href="https://github.com/pypa/pip/commit/e7d6eb9983980a6380a12e0822da2c1c560e1bb4"><code>e7d6eb9</code></a> Refactor -r pylock.toml</li> <li><a href="https://github.com/pypa/pip/commit/756506d154a5b5b5746e9c66bc6e52d6ae3803a9"><code>756506d</code></a> Add TODO about pylock.select and --no-binary</li> <li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/26.1.2...26.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/bazel-contrib/rules_python/network/alerts). </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This repository is the home of the core Python rules -- py_library, py_binary, py_test, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
requirements.txt is how users have been defining dependencies for a long time. We support this to support legacy usecases or package managers that we don't support directly. Any additional information that we need will be retrieved from the SimpleAPI during the bzlmod extension evaluation phase. Then it will be written to the MODULE.bazel.lock file for future reuse. We have plans to support uv.lock file directly. uv is recommended for generating a fully locked requirements.txt file and we do provide a rule for it.py_binary, py_test rules should scale to large monorepos and we work hard to minimize the work done during analysis and build phase. What is more, the space requirements for should be minimal, so we strive to use symlinks rather than extracting wheels at build time. This means that for different configurations of the same build, we are not extracting the wheel multiple times thus scaling better over the time. From 2.0 onwards we are creating a virtual env for each target by creating an actual minimal virtual environment using symlinks. We plan on creating the traditional site-packages layout in the future by default.rules_python and this has resulted in a few PEPs supported within pure starlark - PEP440, PEP509.Common misconceptions:
rules_python has to keep backwards compatibility with google3. Whilst this might have been true in the past, rules_python is an open source project and any compatibility needs should come from the community - we have no requirement to keep this compatibility and are allowed to make our decisions. However, we do want to keep backwards compatibility as long as possible to not upset users with never ending migrations.rules_python is not caching pip downloads. With 2.0, we use Bazel's downloader by default and rely on bazel to provide the repository caching mechanisms. This means that for simpler setups this should result in transparent and scalable caching with the most recent bazel versions unless there are issues in the bazel itself.For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.