diff --git a/fix-yaml-loader.patch b/fix-yaml-loader.patch new file mode 100644 index 0000000..910e81e --- /dev/null +++ b/fix-yaml-loader.patch @@ -0,0 +1,13 @@ +Index: invoke-1.6.0/invoke/config.py +=================================================================== +--- invoke-1.6.0.orig/invoke/config.py ++++ invoke-1.6.0/invoke/config.py +@@ -906,7 +906,7 @@ class Config(DataProxy): + + def _load_yaml(self, path): + with open(path) as fd: +- return yaml.load(fd) ++ return yaml.load(fd, Loader=yaml.SafeLoader) + + def _load_yml(self, path): + return self._load_yaml(path) diff --git a/python-invoke.changes b/python-invoke.changes index 2f7e151..82318f3 100644 --- a/python-invoke.changes +++ b/python-invoke.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 28 21:43:30 UTC 2021 - Ben Greiner + +- Add fix-yaml-loader.patch, PyYAML 6 broke it. + ------------------------------------------------------------------- Wed Aug 18 13:52:50 UTC 2021 - John Paul Adrian Glaubitz diff --git a/python-invoke.spec b/python-invoke.spec index 718cc1e..43e594a 100644 --- a/python-invoke.spec +++ b/python-invoke.spec @@ -30,6 +30,8 @@ URL: http://www.pyinvoke.org Source: https://files.pythonhosted.org/packages/source/i/invoke/invoke-%{version}.tar.gz Patch0: 0001-Make-test-fallback-to-system-modules-when-vendorized.patch Patch1: pytest4.patch +# PATCH-FIX-OPENSUSE fix-yaml-loader.patch -- we devendorize PyYAML, which requires the Loader flag now. code@bnavigator.de +Patch2: fix-yaml-loader.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -60,13 +62,10 @@ Invoke is a Python (2.7 and 3.4+) task execution tool & library, drawing inspiration from various sources to arrive at a powerful & clean feature set. %prep -%setup -q -n invoke-%{version} +%autosetup -p1 -n invoke-%{version} # Remove bundled libs, import will fallback to system provided libs rm -fr invoke/vendor/* -%patch0 -p1 -%patch1 -p1 - %build %python_build