summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2019-12-12 13:45:38 +0100
committerAlexis Ballier <aballier@gentoo.org>2019-12-12 15:46:55 +0100
commit03d17e8719fba52e0de6cdc15126c3337fb66b18 (patch)
tree8930eb8bcf58fff85ac058e478e9543e5b2dcc2a /dev-ros/rospy
parentdev-ros/rospy: Remove old (diff)
downloadgentoo-03d17e8719fba52e0de6cdc15126c3337fb66b18.tar.gz
gentoo-03d17e8719fba52e0de6cdc15126c3337fb66b18.tar.bz2
gentoo-03d17e8719fba52e0de6cdc15126c3337fb66b18.zip
dev-ros/rospy: add upstream yaml.load fixes
Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros/rospy')
-rw-r--r--dev-ros/rospy/files/yaml.patch53
-rw-r--r--dev-ros/rospy/rospy-1.14.3-r1.ebuild (renamed from dev-ros/rospy/rospy-1.14.3.ebuild)1
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-ros/rospy/files/yaml.patch b/dev-ros/rospy/files/yaml.patch
new file mode 100644
index 000000000000..e9e9aa8202a9
--- /dev/null
+++ b/dev-ros/rospy/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/clients/rospy/src/rospy/client.py b/clients/rospy/src/rospy/client.py
+index d543c53ac..c72d6d6f0 100644
+--- a/clients/rospy/src/rospy/client.py
++++ b/clients/rospy/src/rospy/client.py
+@@ -101,7 +101,7 @@ def load_command_line_node_params(argv):
+ src, dst = [x.strip() for x in arg.split(rosgraph.names.REMAP)]
+ if src and dst:
+ if len(src) > 1 and src[0] == '_' and src[1] != '_':
+- mappings[src[1:]] = yaml.load(dst)
++ mappings[src[1:]] = yaml.safe_load(dst)
+ return mappings
+ except Exception as e:
+ raise rospy.exceptions.ROSInitException("invalid command-line parameters: %s"%(str(e)))
diff --git a/dev-ros/rospy/rospy-1.14.3.ebuild b/dev-ros/rospy/rospy-1.14.3-r1.ebuild
index 86a76ec40b17..b82942391322 100644
--- a/dev-ros/rospy/rospy-1.14.3.ebuild
+++ b/dev-ros/rospy/rospy-1.14.3-r1.ebuild
@@ -24,6 +24,7 @@ RDEPEND="
dev-ros/rosgraph_msgs[${CATKIN_MESSAGES_PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
+PATCHES=( "${FILESDIR}/yaml.patch" )
src_install() {
ros-catkin_src_install