From dbc8fba6f8f67a7424add612fa05d5adac314634 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Mon, 12 Feb 2024 18:42:53 +0100 Subject: [PATCH] :heavy_minus_sign: Remove explicit defusedxml dependency In 2024 this is no longer essential, using lxml by itself should be sufficient. See also the discussion on python.org: https://discuss.python.org/t/status-of-defusedxml-and-recommendation-in-docs/34762/3 --- digid_eherkenning/_xml.py | 1 + setup.cfg | 1 - tests/mixins.py | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/digid_eherkenning/_xml.py b/digid_eherkenning/_xml.py index e6470c9..45bda52 100644 --- a/digid_eherkenning/_xml.py +++ b/digid_eherkenning/_xml.py @@ -4,6 +4,7 @@ Inspired by https://github.com/mvantellingen/python-zeep/pull/1179/ as their solution for the deprecated defusedxml.lxml module and the defaults applied in defusedxml.lxml. """ + from lxml.etree import XMLParser, parse as _parse diff --git a/setup.cfg b/setup.cfg index e0934bd..72136df 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,7 +39,6 @@ install_requires = django-simple-certmanager django-solo lxml - defusedxml>=0.7.0 furl maykin-python3-saml tests_require = diff --git a/tests/mixins.py b/tests/mixins.py index e8bd554..6103565 100644 --- a/tests/mixins.py +++ b/tests/mixins.py @@ -1,6 +1,7 @@ """ TODO: replace with pytest fixtures? """ + from digid_eherkenning.models import DigidConfiguration, EherkenningConfiguration