Instantiate valid DOCX packages from DOTX templates - #1
Draft
pseudosavant wants to merge 1 commit into
Draft
pseudosavant wants to merge 1 commit into
pseudosavant wants to merge 1 commit into
Conversation
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a focused follow-up to your upstream python-openxml#1537 proposal.
The existing loader accepts DOTX packages but retains the template main content type when saving to a .docx path. This follow-up makes
Document(template)instantiate a document and save a genuine DOCX package. Lower-levelPackage.open()keeps the original package type.It also replaces optional, missing-fixture tests with committed Word-authored templates and coverage for paths, streams, content-type detection, macro-enabled format rejection, source immutability, and preservation of styles, numbering, theme, sections, headers, footers, images, and relationships. Documentation defines the distinction between instantiation and template authoring.
Validation:
The branch is based directly on your PR head and includes only this follow-up commit. No fork packaging or other features are included.