summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2019-12-12 14:29:30 +0100
committerAlexis Ballier <aballier@gentoo.org>2019-12-12 15:46:56 +0100
commite1b73e0fc9a0dee61f6aaf2574d7edc03fda8a00 (patch)
treec5c85f1b4200ed723057167bc29630454a495d65 /dev-ros/rosbag
parentdev-ros/rosbag: switch to pycryptodotme (diff)
downloadgentoo-e1b73e0fc9a0dee61f6aaf2574d7edc03fda8a00.tar.gz
gentoo-e1b73e0fc9a0dee61f6aaf2574d7edc03fda8a00.tar.bz2
gentoo-e1b73e0fc9a0dee61f6aaf2574d7edc03fda8a00.zip
dev-ros/rosbag: upstream fix 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/rosbag')
-rw-r--r--dev-ros/rosbag/files/yaml.patch53
-rw-r--r--dev-ros/rosbag/rosbag-1.14.3-r3.ebuild (renamed from dev-ros/rosbag/rosbag-1.14.3-r2.ebuild)1
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-ros/rosbag/files/yaml.patch b/dev-ros/rosbag/files/yaml.patch
new file mode 100644
index 000000000000..aea89788c1ea
--- /dev/null
+++ b/dev-ros/rosbag/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/tools/rosbag/src/rosbag/bag.py b/tools/rosbag/src/rosbag/bag.py
+index 0578aed91..9bdcb693d 100644
+--- a/tools/rosbag/src/rosbag/bag.py
++++ b/tools/rosbag/src/rosbag/bag.py
+@@ -1250,7 +1250,7 @@ def __init__(self, d):
+ else:
+ setattr(self, a, DictObject(b) if isinstance(b, dict) else b)
+
+- obj = DictObject(yaml.load(s))
++ obj = DictObject(yaml.safe_load(s))
+ try:
+ val = eval('obj.' + key)
+ except Exception as ex:
diff --git a/dev-ros/rosbag/rosbag-1.14.3-r2.ebuild b/dev-ros/rosbag/rosbag-1.14.3-r3.ebuild
index e4ca9d626aae..85bf4e8aee9a 100644
--- a/dev-ros/rosbag/rosbag-1.14.3-r2.ebuild
+++ b/dev-ros/rosbag/rosbag-1.14.3-r3.ebuild
@@ -34,3 +34,4 @@ RDEPEND="
DEPEND="${RDEPEND}"
RDEPEND="${RDEPEND}
lz4? ( dev-ros/roslz4[${PYTHON_USEDEP}] )"
+PATCHES=( "${FILESDIR}/yaml.patch" )