Releases: GhostManager/python-docx-template
Releases · GhostManager/python-docx-template
v0.21.0
Summary
This is the first release of the GhostManager fork of python-docx-template. It begins at v0.21.0 to reflect it is built on the upstream project's v0.20.2 + the upstream dev branch as of 15 June 2026. It also incorporated upstream PR 626 and some optimizations to the dev branch changes.
This initial CHANGELOG is a summary of the upstream dev branch changes and optimizations made for this fork.
CHANGELOG
[0.21.0] 15 June 2026
Added
- Regression coverage for custom Jinja delimiters in headers and footers
- Regression coverage for mutable file-like
InlineImagedescriptors - Regression coverage for fast
InlineImageXML template generation and fallback behavior - Repository ignore rules for macOS
.DS_Storefiles
Changed
- Mirrored upstream
devbranch rendering optimizations, including faster XML parsing and body replacement, reduced header/footer processing when no Jinja tags are present, precompiled tag-stripping regexes, and early exit for listing resolution when no listing control characters are present - Improved
InlineImageperformance by prebuilding reusable image XML, deduplicating image parts by stable descriptors, caching image metadata instead of full XML, deriving image part counters from existing media names, and initializing drawing IDs from existing document, header, footer, and footnote IDs - Updated fast
InlineImageXML template generation to write placeholders into explicit XML attributes instead of replacing numeric sentinel values in serialized XML - Added a native
python-docxfallback forInlineImageXML generation if the optimized template is incompatible with a futurepython-docxXML shape - Merged upstream PR elapouya#626 to emit RichText font properties in the OOXML order expected by Word
Fixed
- Fixed header and footer rendering when callers provide a
jinja_envwith custom delimiters, such asvariable_start_string="[[", variable_end_string="]]" - Fixed stale
InlineImagecache reuse for hashable file-like descriptors such asio.BytesIOand open file handles - Fixed
InlineImagehandling forNonefilenames - Fixed Poetry project metadata required by the build configuration