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