FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix extract_messages dry-run behavior by nightcityblade · Pull Request #1313 · python-babel/babel · GitHub

Fix extract_messages dry-run behavior - #1313

Open
nightcityblade wants to merge 1 commit into
python-babel:masterfrom
nightcityblade:fix/issue-910
Open

Fix extract_messages dry-run behavior#1313
nightcityblade wants to merge 1 commit into
python-babel:masterfrom
nightcityblade:fix/issue-910

Conversation

Copy link
Copy Markdown

Fixes #910

The setuptools extract_messages command 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

akx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Erm. Doesn't this mean that passing --dry-run is equivalent to not calling the command at all? That's not the point.

Copy link
Copy Markdown
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--dry-run does not work as expected

2 participants


Back | FazBrowse Home | New Git URL