From b4646d01bf9f76ae7f1c3ad2e6eb42dbe9d244a0 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Thu, 12 Dec 2019 13:49:59 +0100 Subject: dev-ros/test_rosmaster: upstream fixes to yaml.load Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Alexis Ballier --- dev-ros/test_rosmaster/files/yaml.patch | 53 ++++++++++++++++++++++ .../test_rosmaster/test_rosmaster-1.14.3-r1.ebuild | 34 ++++++++++++++ .../test_rosmaster/test_rosmaster-1.14.3.ebuild | 33 -------------- 3 files changed, 87 insertions(+), 33 deletions(-) create mode 100644 dev-ros/test_rosmaster/files/yaml.patch create mode 100644 dev-ros/test_rosmaster/test_rosmaster-1.14.3-r1.ebuild delete mode 100644 dev-ros/test_rosmaster/test_rosmaster-1.14.3.ebuild (limited to 'dev-ros/test_rosmaster') diff --git a/dev-ros/test_rosmaster/files/yaml.patch b/dev-ros/test_rosmaster/files/yaml.patch new file mode 100644 index 000000000000..2eb9c086b7e4 --- /dev/null +++ b/dev-ros/test_rosmaster/files/yaml.patch @@ -0,0 +1,53 @@ +From 29053c4832229efa7160fb944c05e3bc82e11540 Mon Sep 17 00:00:00 2001 +From: Martijn Buijs +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_rosmaster/test/client_verification/test_slave_api.py b/test/test_rosmaster/test/client_verification/test_slave_api.py +index 63d919c72..8614c045d 100755 +--- a/test/test_rosmaster/test/client_verification/test_slave_api.py ++++ b/test/test_rosmaster/test/client_verification/test_slave_api.py +@@ -106,7 +106,7 @@ def __init__(self, *args, **kwds): + def load_profile(self, filename): + import yaml + with open(filename) as f: +- d = yaml.load(f) ++ d = yaml.safe_load(f) + self.required_pubs = d.get('pubs', {}) + self.required_subs = d.get('subs', {}) + diff --git a/dev-ros/test_rosmaster/test_rosmaster-1.14.3-r1.ebuild b/dev-ros/test_rosmaster/test_rosmaster-1.14.3-r1.ebuild new file mode 100644 index 000000000000..2eda0a57767c --- /dev/null +++ b/dev-ros/test_rosmaster/test_rosmaster-1.14.3-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +ROS_REPO_URI="https://github.com/ros/ros_comm" +KEYWORDS="~amd64 ~arm" +ROS_SUBDIR=test/${PN} +CATKIN_HAS_MESSAGES=yes + +PYTHON_COMPAT=( python2_7 ) + +inherit ros-catkin + +DESCRIPTION="Unit tests for rosmaster" +LICENSE="BSD" +SLOT="0" +IUSE="" + +RDEPEND="dev-ros/rosgraph[${PYTHON_USEDEP}] + dev-ros/rostest[${PYTHON_USEDEP}] + dev-ros/std_msgs[${PYTHON_USEDEP}]" +DEPEND="${RDEPEND} + test? ( dev-ros/roslib[${PYTHON_USEDEP}] ) +" +PATCHES=( "${FILESDIR}/yaml.patch" ) + +mycatkincmakeargs=( "-DCATKIN_ENABLE_TESTING=ON" ) + +src_install() { + ros-catkin_src_install + dodir /usr/share/${PN} + cp -a test "${ED}//usr/share/${PN}/" || die +} diff --git a/dev-ros/test_rosmaster/test_rosmaster-1.14.3.ebuild b/dev-ros/test_rosmaster/test_rosmaster-1.14.3.ebuild deleted file mode 100644 index f9547e8381b1..000000000000 --- a/dev-ros/test_rosmaster/test_rosmaster-1.14.3.ebuild +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -ROS_REPO_URI="https://github.com/ros/ros_comm" -KEYWORDS="~amd64 ~arm" -ROS_SUBDIR=test/${PN} -CATKIN_HAS_MESSAGES=yes - -PYTHON_COMPAT=( python2_7 ) - -inherit ros-catkin - -DESCRIPTION="Unit tests for rosmaster" -LICENSE="BSD" -SLOT="0" -IUSE="" - -RDEPEND="dev-ros/rosgraph[${PYTHON_USEDEP}] - dev-ros/rostest[${PYTHON_USEDEP}] - dev-ros/std_msgs[${PYTHON_USEDEP}]" -DEPEND="${RDEPEND} - test? ( dev-ros/roslib[${PYTHON_USEDEP}] ) -" - -mycatkincmakeargs=( "-DCATKIN_ENABLE_TESTING=ON" ) - -src_install() { - ros-catkin_src_install - dodir /usr/share/${PN} - cp -a test "${ED}//usr/share/${PN}/" || die -} -- cgit v1.2.3-65-gdbad