Skip to content

[Task] Identify a Path Forward for Docx Dependencies #822

@chrismaddalena

Description

@chrismaddalena

As of 9 February 2026, we had to lock setuptools to < v81 to maintain the availability of pkg_resources because docxcompose, a dependency of docxtpl, requires it. Limiting setuptools is a temporary fix that cannot be maintianed long-term. There are few issues:

  1. The docxcompose project has not been active in several years.
  2. The docxtpl project tried to resolve this by making docxcompose an optional dependency, but it is not optional for Ghostwriter (the new_subdoc() method requires it).
  3. In January 2026, the docxtpl maintainer announced they are looking to hand-off the project.

It is unlikely this issue will be sorted out downstream with the dependencies. Other contributors have started a fork of docxcompose (docxcompose3) that resolves the above issue, but docxtpl does not use it. We have also had issues like this in the past with docxtpl where a release removed or broke a feature we needed.

The best solution may be evaluating the fork of docxcompose and forking docxtpl (like we have done for python-docx) and changing our requirements to pull our forks. This allows us to customize the projects and control releases. However, this does add some overhead.

We will keep tabs on how this issue or is not resolved in the coming weeks and determine the best way forward.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

Status

TODO

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions