Accepting request 942990 from home:bnavigator:branches:devel:languages:python

- Add fix-yaml-loader.patch, PyYAML 6 broke it.

OBS-URL: https://build.opensuse.org/request/show/942990
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invoke?expand=0&rev=28
This commit is contained in:
Matej Cepl 2021-12-29 00:05:30 +00:00 committed by Git OBS Bridge
parent 672c47ce9f
commit 3c01f65f82
3 changed files with 21 additions and 4 deletions

13
fix-yaml-loader.patch Normal file
View File

@ -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)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Dec 28 21:43:30 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Add fix-yaml-loader.patch, PyYAML 6 broke it.
-------------------------------------------------------------------
Wed Aug 18 13:52:50 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@ -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