chore: warn on implicit __init__.py creation#3841
Open
rickeylev wants to merge 4 commits into
Open
Conversation
Warn users when targets rely on deprecated implicit __init__.py creation to encourage migration to explicit inits. We add a formatted multiline warning block inside the execution path of `_should_create_init_files(ctx)` in `py_executable.bzl`. The warning identifies the offending target by label and provides instructions on how to explicitly create inits or disable the warning.
Add a changelog news entry for the newly introduced deprecation warning on implicit __init__.py creation.
Clarify in the warning message that implicit __init__.py creation will be disabled by default (rather than completely removed) in a future release.
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a deprecation warning for targets relying on implicit __init__.py creation. The review feedback suggests using more professional language by replacing the word "diabolic" and recommends condensing the multi-line warning message into a single line to prevent excessive console noise in large workspaces.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implicit
__init__.pycreation is deprecated and will be disabled by default in a future release. We need to warn users when their targets rely on this behavior so they can transition to explicit__init__.pyfiles before the default changes and their builds break.Work towards #2945