From: Alexis Ballier Date: Thu, 12 Dec 2019 12:13:38 +0000 (+0100) Subject: dev-python/vcstools: fix usage of yaml.load X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=19d8681750ee6c2c6933e031ffed1d10cc4b9cf3;p=gentoo.git dev-python/vcstools: fix usage of yaml.load Bug: https://bugs.gentoo.org/698668 Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Alexis Ballier --- diff --git a/dev-python/vcstools/files/yaml.patch b/dev-python/vcstools/files/yaml.patch new file mode 100644 index 000000000000..727131bc5618 --- /dev/null +++ b/dev-python/vcstools/files/yaml.patch @@ -0,0 +1,25 @@ +https://github.com/vcstools/vcstools/issues/158 +https://bugs.gentoo.org/698668 + +Index: vcstools-0.1.42/src/vcstools/tar.py +=================================================================== +--- vcstools-0.1.42.orig/src/vcstools/tar.py ++++ vcstools-0.1.42/src/vcstools/tar.py +@@ -77,7 +77,7 @@ class TarClient(VcsClientBase): + """ + if self.detect_presence(): + with open(self.metadata_path, 'r') as metadata_file: +- metadata = yaml.load(metadata_file.read()) ++ metadata = yaml.full_load(metadata_file.read()) + if 'url' in metadata: + return metadata['url'] + return None +@@ -165,7 +165,7 @@ class TarClient(VcsClientBase): + + if self.detect_presence(): + with open(self.metadata_path, 'r') as metadata_file: +- metadata = yaml.load(metadata_file.read()) ++ metadata = yaml.full_load(metadata_file.read()) + if 'version' in metadata: + return metadata['version'] + return None diff --git a/dev-python/vcstools/vcstools-0.1.42.ebuild b/dev-python/vcstools/vcstools-0.1.42.ebuild index 2526583e223a..84a9cca031f2 100644 --- a/dev-python/vcstools/vcstools-0.1.42.ebuild +++ b/dev-python/vcstools/vcstools-0.1.42.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 PYTHON_COMPAT=( python{2_7,3_5,3_6} ) SCM="" @@ -33,8 +33,8 @@ RDEPEND=" dev-python/pyyaml[${PYTHON_USEDEP}] dev-python/python-dateutil[${PYTHON_USEDEP}] " -DEPEND="${RDEPEND} - test? ( +DEPEND="${RDEPEND}" +BDEPEND="test? ( dev-python/nose[${PYTHON_USEDEP}] dev-vcs/git dev-vcs/bzr @@ -42,6 +42,7 @@ DEPEND="${RDEPEND} dev-vcs/subversion ) " +PATCHES=( "${FILESDIR}/yaml.patch" ) python_test() { # From travis.yml