Skip to content

--dry-run does not work as expected #910

Description

@mb-wali

Overview Description

We would like to add a command to our tests and check if we are frailer-free for message extractions.
found this --dry-run command on the docs, but this does not work and I still see changes to my .pot file.

Steps to Reproduce

  1. See the CLI help:
$ ./setup.py extract_messages --help
Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message

Options for 'extract_messages' command:
   ...
  1. extract with --dry-run command.
$ ./setup.py extract_messages --dry-run

Actual Results

# *.pot
-"POT-Creation-Date: 2022-10-12 11:37+0000\n"
+"POT-Creation-Date: 2022-10-14 11:06+0200\n"

Expected Results

don't actually do anything The .pot file should not have been updated or touched.

Additional Information

Please let me know if we have forgotten to add some options, or if its a bug in the code, feel free to ask questions. and thanks in advance.

Activity

  1. akx commented on Feb 20, 2023

    @akx
    Member

    Yeah, it looks like --dry-run has been broken for a while.

    Which version of Babel are you running? Could you also show the relevant parts of setup.py..? I'd rather like to get rid of the setuptools/distutils command compatibility stuff in Babel in favor of the stand-alone CLI, but if there are users for this...

  2. adelboshna commented on Aug 17, 2023

    @adelboshna

    $ ./setup.py extract_messages --help
    Global options:
    --verbose (-v) run verbosely (default)
    --quiet (-q) run quietly (turns verbosity off)
    --dry-run (-n) don't actually do anything
    --help (-h) show detailed help message

    Options for 'extract_messages' command:
    ...

  3. added theissue type on Dec 30, 2025
  4. nightcityblade commented on Aug 12, 2026

    @nightcityblade

    Hi, I'd like to work on this. I'll submit a focused PR with regression coverage shortly.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions