build(deps-dev): Bump pylint from 2.15.10 to 4.0.9 in /gazelle/examples/bzlmod_build_file_generation (#4368)

Bumps [pylint](https://github.com/pylint-dev/pylint) from 2.15.10 to
4.0.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pylint-dev/pylint/releases">pylint's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.9</h2>
<h2>What's new in Pylint 4.0.9?</h2>
<p>Release date: 2026-09-23</p>
<h2>Security Fixes</h2>
<ul>
<li>Someone without access to the configuration or linted code, but with
access
to the cache directory (predictable <code>PYLINT_HOME</code> on a
multi-user host) can no
longer write a crafted pickle that will runs arbitrary code when pylint
access its
stat cache. The result cache is now stored as JSON instead of pickle,
preventing code-execution. The workaround is upgrading or not pointing
<code>PYLINT_HOME</code>
to an untrusted, shared, or group-writable directory. The default value,
<code>~/.cache/pylint</code>,
is writable only by the user running pylint. (CVE with the same
information pending)</li>
</ul>
<h2>False Positives Fixed</h2>
<ul>
<li>
<p>Fixed a false positive for <code>no-self-use</code> on a method that
only uses
<code>self</code> before a locally defined class (or other nested
method), because
the checker's could-be-a-function tracking state was not restored after
visiting the nested method.</p>
<p>Closes <a
href="https://redirect.github.com/pylint-dev/pylint/issues/3705">#3705</a></p>
</li>
<li>
<p>Fix a false positive for :ref:<code>not-callable</code> when calling
functions constructed with
<code>types.FunctionType</code> or <code>types.LambdaType</code>.</p>
<p>Closes <a
href="https://redirect.github.com/pylint-dev/pylint/issues/7500">#7500</a></p>
</li>
<li>
<p>Fix a false positive for <code>unnecessary-direct-lambda-call</code>
when a directly called
lambda in a class body wraps a comprehension containing an assignment
expression.
PEP 572 makes that a <code>SyntaxError</code> without the lambda's
scope, so following the
message produced code that would not compile.</p>
<p>Closes <a
href="https://redirect.github.com/pylint-dev/pylint/issues/9294">#9294</a></p>
</li>
<li>
<p>Fix a false positive for :ref:<code>unnecessary-ellipsis</code> when
an ellipsis is the
sole body statement of a method defined on a <code>Protocol</code>.</p>
<p>Closes <a
href="https://redirect.github.com/pylint-dev/pylint/issues/9319">#9319</a></p>
</li>
<li>
<p>Fix a false positive for :ref:<code>bad-exception-cause</code> when
the bases of the class
being raised from cannot be inferred, such as an exception deriving from
a
C extension class. :ref:<code>raising-non-exception</code> and
:ref:<code>catching-non-exception</code> already guard the same
<code>inherit_from_std_ex</code></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pylint-dev/pylint/commit/303703fe107fa812c42a66edfc88a5702a63f1f1"><code>303703f</code></a>
Bump pylint to 4.0.9, update changelog (<a
href="https://redirect.github.com/pylint-dev/pylint/issues/11448">#11448</a>)</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/b342384e6cb10986f3fa66093d99464b3ced4199"><code>b342384</code></a>
Fix block-scoped disable leaking into sibling elif/else blocks (<a
href="https://redirect.github.com/pylint-dev/pylint/issues/11429">#11429</a>)
(<a
href="https://redirect.github.com/pylint-dev/pylint/issues/11445">#11445</a>)</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/58c87cffca9de2b3e89aa07b89686cbc90cfea2d"><code>58c87cf</code></a>
Store the results cache as JSON instead of pickle</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/e3f4942a2ff51d28b69435587eee53ab44ebfb9c"><code>e3f4942</code></a>
[Backport maintenance/4.0.x] Fix crash on failed attribute inference (<a
href="https://redirect.github.com/pylint-dev/pylint/issues/11443">#11443</a>)</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/faf47f9f079c9461832a7bd7dcea61d44f6348b9"><code>faf47f9</code></a>
[Backport maintenance/4.0.x] Fix false positive no-self-use when a
method con...</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/20c7bb9ef1468b38e61de43d2e3a7314f938e04f"><code>20c7bb9</code></a>
[Backport maintenance/4.0.x] Fix a crash in method-hidden for methods
named a...</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/47e67578bef317ff0feb0211ba84ba3ba958645f"><code>47e6757</code></a>
[Backport maintenance/4.0.x] Fix bad-exception-cause false positive when
the ...</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/ae3ee5354062ca35c0d243f673a2bf3ee2e4f376"><code>ae3ee53</code></a>
[Backport maintenance/4.0.x] Fix not-callable false positive for
types.Functi...</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/3e444be6ef29e675f2f559960a60ee24a0372687"><code>3e444be</code></a>
[Backport maintenance/4.0.x] Fix a crash in
unnecessary-default-type-args for...</li>
<li><a
href="https://github.com/pylint-dev/pylint/commit/8f2dd4fcaa85fa43b33da6b0fed4af3a22314984"><code>8f2dd4f</code></a>
[Backport maintenance/4.0.x] Fix declare-non-slot false positives for
ClassVa...</li>
<li>Additional commits viewable in <a
href="https://github.com/pylint-dev/pylint/compare/v2.15.10...v4.0.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pylint&package-manager=uv&previous-version=2.15.10&new-version=4.0.9)](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 this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
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>
Co-authored-by: Richard Levasseur <richardlev@gmail.com>
4 files changed
tree: a3d23c8fd5197b8d49c408496d0aad0217891f06
  1. .agents/
  2. .bazelci/
  3. .bcr/
  4. .ci/
  5. .github/
  6. command_line_option/
  7. crates/
  8. dev/
  9. docs/
  10. examples/
  11. gazelle/
  12. news/
  13. python/
  14. sphinxdocs/
  15. tests/
  16. tools/
  17. .bazelignore
  18. .bazelrc
  19. .bazelrc.deleted_packages
  20. .bazelversion
  21. .editorconfig
  22. .git-blame-ignore-revs
  23. .gitattributes
  24. .gitignore
  25. .pre-commit-config.yaml
  26. .python-version
  27. .readthedocs.yml
  28. addlicense.sh
  29. AGENTS.md
  30. AUTHORS
  31. BUILD.bazel
  32. buildbuddy.bazelrc
  33. BZLMOD_SUPPORT.md
  34. CHANGELOG.md
  35. CLAUDE.md
  36. CONTRIBUTING.md
  37. CONTRIBUTORS
  38. downloader_config.cfg
  39. GEMINI.md
  40. internal_dev_deps.bzl
  41. internal_dev_setup.bzl
  42. LICENSE
  43. MODULE.bazel
  44. README.md
  45. RELEASING.md
  46. replicate_ci
  47. ruff.toml
  48. specialized_configs.bazelrc
  49. version.bzl
  50. WORKSPACE
  51. WORKSPACE.bzlmod
  52. workspace_bazel9.bzl
README.md

Python Rules for Bazel

Build status GitHub CI status

Overview

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.

Design

  • Supported OSes - as per our supported platform policy, we strive for support on all of the platforms that we have CI for. Some platforms do not have the same backwards compatibility guarantees, but we hope the community can step in where needed to make the support more robust.
  • 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.
  • The 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.
  • Support for standards - we strive to first implement any standards needed within 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.

Documentation

For detailed documentation, see https://rules-python.readthedocs.io

Bzlmod support

See Bzlmod support for more details.