From 16469e5721d42b0225dd9fb784815a53747be4f4 Mon Sep 17 00:00:00 2001 From: Diogo Fernandes Date: Fri, 27 Feb 2026 10:28:19 -0300 Subject: [PATCH 1/2] Fix Python 3.7>= x <3.10 support --- html4docx/h4d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html4docx/h4d.py b/html4docx/h4d.py index c4bd260..85b992a 100644 --- a/html4docx/h4d.py +++ b/html4docx/h4d.py @@ -4,6 +4,7 @@ import re from io import BytesIO from html.parser import HTMLParser +from typing import Dict, Any import docx from bs4 import BeautifulSoup @@ -64,7 +65,7 @@ def set_initial_attrs(self, document=None): self.pending_important_styles = None @property - def metadata(self) -> dict[str, any]: + def metadata(self) -> Dict[str, Any]: if not hasattr(self, '_metadata'): self._metadata = Metadata(self.doc) return self._metadata From 263bc161d07c457b2e33a5f160d0dd8fa501e957 Mon Sep 17 00:00:00 2001 From: Diogo Fernandes Date: Fri, 27 Feb 2026 10:30:36 -0300 Subject: [PATCH 2/2] Add history entry --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index d569c56..1414385 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,7 @@ Release History - Fixes `#62 `_ : `tag_style_override` not applying custom styles from a Word template. | `dfop02 `_ - Handle invalid rowspan and colspan values in tables. | `dfop02 `_ inspired by `PR #56 `_ from `kko-harvey `_ . +- Fixes `#67 `_: built-in typing was not supported by old python versions. | `dfop02 `_ **New Features**