Skip to content

Disable implicit Python initializer generation - #23093

Merged
jketema merged 1 commit into
mainfrom
jketema/py-init
Nov 11, 2026
Merged

jketema merged 1 commit into
mainfrom
jketema/py-init

Conversation

@jketema

@jketema jketema commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Adopt explicit initializer handling for all Python targets, including external build tools, to eliminate rules_python's deprecation warnings.

Adopt explicit initializer handling for all Python targets, including external build tools, to eliminate rules_python's deprecation warnings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 647293b6-5562-41ec-a391-8c9fe6e926ab
@jketema
jketema requested a review from a team as a code owner November 11, 2026 10:48
Copilot AI auto review requested due to automatic review settings November 11, 2026 10:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the Bazel Python initializer configuration change.

No open issues 🎉

What changed in this PR

Updates Bazel’s default Python initializer behavior to use explicit __init__.py files, aiming to eliminate rules_python deprecation warnings.

Changes:

  • Enables --incompatible_default_to_explicit_init_py globally, including for external build tools.
  • Adds a comment explaining the configuration’s purpose and scope.
File Description
.bazelrc Disables implicit Python initializer generation by default.

Review effort: Balanced (auto)

@jketema
jketema merged commit 94ab67b into main Nov 11, 2026
17 checks passed
@jketema
jketema deleted the jketema/py-init branch November 11, 2026 12:05
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.

3 participants