From ef3db9214a254fe5514c7abc6fc6f17c3d8296c3 Mon Sep 17 00:00:00 2001 From: OliveraReeves Date: Wed, 8 Jul 2026 13:02:35 +0100 Subject: [PATCH 1/3] fix(updated lxml): --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d4ea5b..031d414 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ docs = ["Sphinx", "sphinx-rtd-theme"] bandit = "^1.7.0" importlib-metadata = "<9" # Workaround for https://github.com/PyCQA/bandit/issues/951 isort = ">=5.7,<7.0" -lxml = "^5.2.2" +lxml = ">=5.2.2,<7.0.0" mypy = "^1.1" pytest = ">=7,<9" pytest-cov = ">=4,<8" From 16dfbd0c6b99c6b0fd9222921cf1a39ff36f6120 Mon Sep 17 00:00:00 2001 From: OliveraReeves Date: Wed, 8 Jul 2026 13:16:19 +0100 Subject: [PATCH 2/3] does this fix it --- mirth_client/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirth_client/models.py b/mirth_client/models.py index 7e63eba..64f3140 100644 --- a/mirth_client/models.py +++ b/mirth_client/models.py @@ -24,6 +24,7 @@ import typing import pydantic from packaging import version +from xml.parsers.expat import ExpatError if typing.TYPE_CHECKING or version.parse(pydantic.__version__) >= version.parse("2.0"): from pydantic.v1 import ( @@ -226,7 +227,7 @@ def parse_raw( # pylint: disable=arguments-differ ValueError, TypeError, UnicodeDecodeError, - xml.parsers.expat.ExpatError, # pylint: disable=no-member + ExpatError, # pylint: disable=no-member ) as e: raise ValidationError([ErrorWrapper(e, loc="__obj__")], cls) from e return super().parse_raw( # type: ignore From d8e660146af82496a689611978be6f1789a820fc Mon Sep 17 00:00:00 2001 From: OliveraReeves Date: Wed, 8 Jul 2026 14:01:06 +0100 Subject: [PATCH 3/3] linting --- mirth_client/models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/mirth_client/models.py b/mirth_client/models.py index 64f3140..de1e992 100644 --- a/mirth_client/models.py +++ b/mirth_client/models.py @@ -3,7 +3,6 @@ and converting returned data into Python objects """ -import xml from collections import OrderedDict from datetime import datetime from typing import (