Skip to content

Disable legacy implicit __init__.py generation by default - #438

Open
tameware wants to merge 1 commit into
dds-bridge:developfrom
tameware:chore/bazelrc-explicit-init-py
Open

tameware wants to merge 1 commit into
dds-bridge:developfrom
tameware:chore/bazelrc-explicit-init-py

Conversation

@tameware

@tameware tameware commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Set build --incompatible_default_to_explicit_init_py in .bazelrc so rules_python 2.4+ stops warning about deprecated auto-created __init__.py files
  • Covers our targets and dependencies that have not opted out yet (rules_python tools, emsdk, bazel_tools)
  • Comment notes to remove the flag once those dependencies ship explicit-init defaults (rules_python#2945)

Test plan

  • bazelisk build //web:dds_web_html_test //python:solve_board_test — no implicit-__init__.py WARNING lines
  • bazelisk test //python/... smoke (or a representative subset) still passes

Made with Cursor

Silence rules_python 2.4+ warnings from our targets and from dependencies
that still rely on auto-created inits; remove the flag once those deps catch
up.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings October 18, 2026 00:16
@tameware tameware self-assigned this Oct 18, 2026
@tameware
tameware requested a review from zzcgumn October 18, 2026 00:18

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.

🔵 Needs a closer look

The workspace-wide Python import behavior change still needs the planned build and compatibility smoke tests.

No open issues 🎉

What changed in this PR

Disables legacy implicit __init__.py generation by default across the Bazel workspace to suppress rules_python deprecation warnings.

Changes:

  • Enables --incompatible_default_to_explicit_init_py.
  • Documents dependency coverage and when to remove the flag.
File Description
.bazelrc Sets the explicit-init default and explains its purpose.

Review effort: Balanced

@tameware tameware added the Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments. label Oct 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants