Summary
python-redlines==0.3.0 with the [docxodus] extra now resolves python-redlines-docxodus==1.0.0, because the extra has no version constraint (Requires-Dist: python-redlines-docxodus; extra == 'docxodus', in both 0.3.0 and 1.0.0). The 1.0.0 companion bundles a redline binary built on Docxodus v11, which removed --engine. The 0.3.0 wrapper still appends --engine=<name> whenever engine= is passed, so every such call fails:
python-redlines 0.3.0 / python-redlines-docxodus 1.0.0
subprocess.CalledProcessError: Command '[.../docxodus/1.0.0/osx-arm64/redline', '/var/folders/...', ...]' returned non-zero exit status 1.
The actual cause is only in e.stderr (Error: Unknown flag: --engine=wmlcomparer) and e.stdout (usage text). str(e) shows only the command line with temp paths, so it's hard to diagnose. #31 may be a case of this (it shows the same exception shape with the real message hidden).
Repro
# /// script
# dependencies = ["python-redlines[docxodus]==0.3.0", "python-docx"]
# ///
import io, subprocess, docx
from python_redlines.engines import DocxodusEngine
def make(t):
d = docx.Document(); d.add_paragraph(t); b = io.BytesIO(); d.save(b); return b.getvalue()
try:
DocxodusEngine().run_redline("x", original=make("a"), modified=make("b"), engine="wmlcomparer")
except subprocess.CalledProcessError as e:
print(e.stderr) # Error: Unknown flag: --engine=wmlcomparer
This affects anyone who pinned python-redlines==0.3.0 and built a fresh environment after 2026-09-06.
Suggestions
- Constrain the companion in the extra, e.g.
python-redlines-docxodus==<same version> (or a compatible range), so a pinned wrapper can't pair with an incompatible binary.
- When the binary exits non-zero, include its stdout/stderr in the raised exception (for example, re-raise with
e.stderr in the message).
- Optional:
redline --version reports 1.1.0 for both the 0.3.0 and 1.0.0 companion binaries, even though their flag sets differ. The cache directory is named after the companion package version. Neither tells you what the binary supports, which made this harder to track down.
Workaround for users: pin both packages, python-redlines[docxodus]==0.3.0 and python-redlines-docxodus==0.3.0.
Summary
python-redlines==0.3.0with the[docxodus]extra now resolvespython-redlines-docxodus==1.0.0, because the extra has no version constraint (Requires-Dist: python-redlines-docxodus; extra == 'docxodus', in both 0.3.0 and 1.0.0). The 1.0.0 companion bundles aredlinebinary built on Docxodus v11, which removed--engine. The 0.3.0 wrapper still appends--engine=<name>wheneverengine=is passed, so every such call fails:The actual cause is only in
e.stderr(Error: Unknown flag: --engine=wmlcomparer) ande.stdout(usage text).str(e)shows only the command line with temp paths, so it's hard to diagnose. #31 may be a case of this (it shows the same exception shape with the real message hidden).Repro
This affects anyone who pinned
python-redlines==0.3.0and built a fresh environment after 2026-09-06.Suggestions
python-redlines-docxodus==<same version>(or a compatible range), so a pinned wrapper can't pair with an incompatible binary.e.stderrin the message).redline --versionreports1.1.0for both the 0.3.0 and 1.0.0 companion binaries, even though their flag sets differ. The cache directory is named after the companion package version. Neither tells you what the binary supports, which made this harder to track down.Workaround for users: pin both packages,
python-redlines[docxodus]==0.3.0andpython-redlines-docxodus==0.3.0.