From bdccc3151840856fbd334ded66e167ea8ec06669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 18 Mar 2025 15:23:48 +0100 Subject: [PATCH] Drop test-dependency on defusedxml --- python-sphinx.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python-sphinx.spec b/python-sphinx.spec index d508614..722d861 100644 --- a/python-sphinx.spec +++ b/python-sphinx.spec @@ -262,6 +262,16 @@ This package contains documentation in the HTML format. %prep %autosetup -n sphinx-%{upstream_version} -p1 +# Drop test-dependency on defusedxml, +# use xml from the standard library instead. +# defusedxml is safer but this is only used in tests. +# Upstream uses defusedxml to be "safer for future contributors when they +# create/open branches and pull requests" -- that does not concern us. +# https://github.com/sphinx-doc/sphinx/pull/12168#discussion_r1535383868 +# We want to avoid the dependency in RHEL, but no harm in doing so unconditionally. +sed -i '/"defusedxml/d' pyproject.toml +sed -i 's/from defusedxml./from xml.etree./' sphinx/testing/util.py tests/test_theming/test_theming.py + %if %{without imagemagick_tests} rm tests/test_extensions/test_ext_imgconverter.py %endif