gh-144223: Refactor compileall: improve docstrings, add type hints, comments, and tests #144224
+1,127
−305
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.
Proposal: Refactor compileall module
Related Issue: #144223
This proposal aims to improve the
compileallmodule with:The
compileallmodule is currently not very well documented, which makes it harder for both Python users and contributors to understand and maintain. Improving docstrings, comments, and typing will make the module more accessible and maintainable.No logic changes are intended; this is a pure refactoring and documentation improvement.
Feedback welcome — happy to iterate and split this into smaller PRs if needed.