Fix extract_messages dry-run behavior - #1313
Open
nightcityblade wants to merge 1 commit into
Open
Conversation
akx
requested changes
Aug 12, 2026
akx
left a comment
Member
There was a problem hiding this comment.
Erm. Doesn't this mean that passing --dry-run is equivalent to not calling the command at all? That's not the point.
nightcityblade
force-pushed
the
fix/issue-910
branch
from
August 13, 2026 03:08
5c42f13 to
8389535
Compare
Author
|
Thanks — you're right. I reworked the implementation so dry-run now performs mapping, extraction, and serialization into an in-memory buffer while leaving the output catalog untouched. The regression test also asserts that extraction actually occurred. The full messages test suite passes (353 tests), and Ruff passes on all changed files. |
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.
Fixes #910
The setuptools
extract_messagescommand now honors the distutils dry-run flag and returns before creating or overwriting its output catalog. A regression test verifies that an existing POT file remains unchanged.Tests:
pytest -q tests/messages(353 passed)uvx ruff==0.14.10 check babel/messages/setuptools_frontend.py tests/messages/test_setuptools_frontend.py