From 3d4fe3cdcced195c7f6ce6d266dbf508aa147e54 Mon Sep 17 00:00:00 2001 From: afourney Date: Mon, 20 Oct 2025 16:07:39 -0700 Subject: [PATCH] Upgrade mammoth to 1.11.0 (#1452) --- packages/markitdown/pyproject.toml | 4 ++-- .../src/markitdown/converters/_docx_converter.py | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/markitdown/pyproject.toml b/packages/markitdown/pyproject.toml index 3056c1c..8fe43ad 100644 --- a/packages/markitdown/pyproject.toml +++ b/packages/markitdown/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ [project.optional-dependencies] all = [ "python-pptx", - "mammoth~=1.10.0", + "mammoth~=1.11.0", "pandas", "openpyxl", "xlrd", @@ -50,7 +50,7 @@ all = [ "azure-identity" ] pptx = ["python-pptx"] -docx = ["mammoth~=1.10.0", "lxml"] +docx = ["mammoth~=1.11.0", "lxml"] xlsx = ["pandas", "openpyxl"] xls = ["pandas", "xlrd"] pdf = ["pdfminer.six"] diff --git a/packages/markitdown/src/markitdown/converters/_docx_converter.py b/packages/markitdown/src/markitdown/converters/_docx_converter.py index 9cb2cbd..3975107 100644 --- a/packages/markitdown/src/markitdown/converters/_docx_converter.py +++ b/packages/markitdown/src/markitdown/converters/_docx_converter.py @@ -15,13 +15,6 @@ from .._exceptions import MissingDependencyException, MISSING_DEPENDENCY_MESSAGE _dependency_exc_info = None try: import mammoth - import mammoth.docx.files - - def mammoth_files_open(self, uri): - warn("DOCX: processing of r:link resources (e.g., linked images) is disabled.") - return io.BytesIO(b"") - - mammoth.docx.files.Files.open = mammoth_files_open except ImportError: # Preserve the error and stack trace for later