diff options
author | Alexis Ballier <aballier@gentoo.org> | 2019-12-12 13:47:53 +0100 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2019-12-12 15:46:55 +0100 |
commit | 42fda506868d929fc6e67121bc9ea9b7a6b66bbf (patch) | |
tree | 3e7b62055067cd20262c9114d404176b08f4c4ef /dev-ros/test_roslib_comm | |
parent | dev-ros/test_roslib_comm: Remove old (diff) | |
download | gentoo-42fda506868d929fc6e67121bc9ea9b7a6b66bbf.tar.gz gentoo-42fda506868d929fc6e67121bc9ea9b7a6b66bbf.tar.bz2 gentoo-42fda506868d929fc6e67121bc9ea9b7a6b66bbf.zip |
dev-ros/test_roslib_comm: upstream fixes to yaml.load
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros/test_roslib_comm')
-rw-r--r-- | dev-ros/test_roslib_comm/files/yaml.patch | 53 | ||||
-rw-r--r-- | dev-ros/test_roslib_comm/test_roslib_comm-1.14.3-r1.ebuild (renamed from dev-ros/test_roslib_comm/test_roslib_comm-1.14.3.ebuild) | 3 |
2 files changed, 55 insertions, 1 deletions
diff --git a/dev-ros/test_roslib_comm/files/yaml.patch b/dev-ros/test_roslib_comm/files/yaml.patch new file mode 100644 index 000000000000..a72173c32b8a --- /dev/null +++ b/dev-ros/test_roslib_comm/files/yaml.patch @@ -0,0 +1,53 @@ +From 29053c4832229efa7160fb944c05e3bc82e11540 Mon Sep 17 00:00:00 2001 +From: Martijn Buijs <Martijn.buijs@gmail.com> +Date: Tue, 23 Apr 2019 18:20:12 +0200 +Subject: [PATCH] Switch to yaml.safe_load(_all) to prevent YAMLLoadWarning + (#1688) + +* Switch to yaml.safe_load(_all) to prevent YAMLLoadWarning + +* Change all usages of yaml.load to yaml.safe_load + +* Extend PyYAML's SafeLoader and use it with `yaml.load` + +Also added convenience functions for using this loader for reuse in +`roslaunch` + +* fix typo in rosparam.yaml_load_all + +* Modify Loader and SafeLoader in yaml module directly + +* Revert whitespace change + +* Revert unrelated change to import through global variable construction +--- + clients/rospy/src/rospy/client.py | 2 +- + .../test/test_roslib_message.py | 2 +- + .../client_verification/test_slave_api.py | 2 +- + test/test_rosparam/test/check_rosparam.py | 8 ++--- + .../check_rosparam_command_line_online.py | 2 +- + .../check_rosservice_command_line_online.py | 4 +-- + test/test_rostopic/test/test_rostopic_unit.py | 30 +++++++++---------- + tools/rosbag/src/rosbag/bag.py | 2 +- + tools/rosgraph/src/rosgraph/roslogging.py | 2 +- + tools/roslaunch/src/roslaunch/loader.py | 4 +-- + .../test/unit/test_roslaunch_dump_params.py | 4 +-- + tools/rosparam/src/rosparam/__init__.py | 7 ++++- + tools/rosservice/src/rosservice/__init__.py | 4 +-- + tools/rostopic/src/rostopic/__init__.py | 6 ++-- + tools/topic_tools/scripts/relay_field | 2 +- + 15 files changed, 43 insertions(+), 38 deletions(-) + +diff --git a/test/test_roslib_comm/test/test_roslib_message.py b/test/test_roslib_comm/test/test_roslib_message.py +index 3d4e7a6fa..288cc375b 100644 +--- a/test/test_roslib_comm/test/test_roslib_message.py ++++ b/test/test_roslib_comm/test/test_roslib_message.py +@@ -61,7 +61,7 @@ def test_strify_message(self): + def roundtrip(m): + yaml_text = strify_message(m) + print(yaml_text) +- loaded = yaml.load(yaml_text) ++ loaded = yaml.safe_load(yaml_text) + print("loaded", loaded) + new_inst = m.__class__() + if loaded is not None: diff --git a/dev-ros/test_roslib_comm/test_roslib_comm-1.14.3.ebuild b/dev-ros/test_roslib_comm/test_roslib_comm-1.14.3-r1.ebuild index 25cb9086d149..4790aa7d9cba 100644 --- a/dev-ros/test_roslib_comm/test_roslib_comm-1.14.3.ebuild +++ b/dev-ros/test_roslib_comm/test_roslib_comm-1.14.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -22,3 +22,4 @@ RDEPEND="" DEPEND="${RDEPEND} test? ( dev-ros/roslib[${PYTHON_USEDEP}] dev-python/nose[${PYTHON_USEDEP}] dev-ros/test_rosmaster ) " +PATCHES=( "${FILESDIR}/yaml.patch" ) |