diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-ros/roslaunch/files | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-ros/roslaunch/files')
-rw-r--r-- | dev-ros/roslaunch/files/py3-2.patch | 29 | ||||
-rw-r--r-- | dev-ros/roslaunch/files/py3.patch | 45 | ||||
-rw-r--r--[-rwxr-xr-x] | dev-ros/roslaunch/files/roscore.initd | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | dev-ros/roslaunch/files/roslaunch.initd | 2 | ||||
-rw-r--r-- | dev-ros/roslaunch/files/yaml.patch | 44 |
5 files changed, 120 insertions, 2 deletions
diff --git a/dev-ros/roslaunch/files/py3-2.patch b/dev-ros/roslaunch/files/py3-2.patch new file mode 100644 index 000000000000..d3ae600e4d7e --- /dev/null +++ b/dev-ros/roslaunch/files/py3-2.patch @@ -0,0 +1,29 @@ +From 1933acfa8107a164ec825d3223d14589fefd1b5b Mon Sep 17 00:00:00 2001 +From: Dirk Thomas <dirk-thomas@users.noreply.github.com> +Date: Tue, 6 Aug 2019 16:06:51 -0700 +Subject: [PATCH] more Python 3 compatibility (#1783) + +--- + test/test_rospy/test/unit/test_genmsg_py.py | 6 +-- + tools/rosgraph/src/rosgraph/roslogging.py | 2 +- + .../test/test_roslogging_user_logger.py | 8 +++- + tools/roslaunch/test/unit/test_xmlloader.py | 2 +- + tools/rosmsg/src/rosmsg/__init__.py | 2 +- + tools/rosmsg/test/test_rosmsg_command_line.py | 46 +++++++++---------- + .../test/test_rosmsgproto_command_line.py | 20 ++++---- + .../test_rostopic_command_line_offline.py | 44 +++++++++--------- + 8 files changed, 67 insertions(+), 63 deletions(-) + +diff --git a/tools/roslaunch/test/unit/test_xmlloader.py b/tools/roslaunch/test/unit/test_xmlloader.py +index ac30189d0..f582ec230 100644 +--- a/tools/roslaunch/test/unit/test_xmlloader.py ++++ b/tools/roslaunch/test/unit/test_xmlloader.py +@@ -218,7 +218,7 @@ def test_params(self): + p = [p for p in mock.params if p.key == '/configfile'][0] + self.assertEquals(contents, p.value, 1) + p = [p for p in mock.params if p.key == '/binaryfile'][0] +- self.assertEquals(Binary(contents), p.value, 1) ++ self.assertEquals(Binary(contents.encode()), p.value, 1) + + f = open(os.path.join(get_example_path(), 'example.launch')) + try: diff --git a/dev-ros/roslaunch/files/py3.patch b/dev-ros/roslaunch/files/py3.patch new file mode 100644 index 000000000000..8fa2c6e2fab2 --- /dev/null +++ b/dev-ros/roslaunch/files/py3.patch @@ -0,0 +1,45 @@ +From 8f22c20e418abe4abe23e789eef517a16a50604d Mon Sep 17 00:00:00 2001 +From: Dirk Thomas <dirk-thomas@users.noreply.github.com> +Date: Tue, 6 Aug 2019 12:50:24 -0700 +Subject: [PATCH] more Python 3 compatibility (#1782) + +--- + test/test_rosmaster/test/nodes/testAllCommonFlows | 2 +- + test/test_rosmaster/test/nodes/testMaster | 2 +- + test/test_rosmaster/test/nodes/testSlave | 2 +- + test/test_rospy/test/unit/test_genmsg_py.py | 8 +++++++- + tools/rosgraph/test/test_roslogging.py | 5 ++++- + tools/rosgraph/test/test_roslogging_user_logger.py | 5 ++++- + tools/roslaunch/src/roslaunch/depends.py | 8 ++++---- + 7 files changed, 22 insertions(+), 10 deletions(-) + +diff --git a/tools/roslaunch/src/roslaunch/depends.py b/tools/roslaunch/src/roslaunch/depends.py +index a3fbf7a41..91ae26998 100644 +--- a/tools/roslaunch/src/roslaunch/depends.py ++++ b/tools/roslaunch/src/roslaunch/depends.py +@@ -86,21 +86,21 @@ def __str__(self): + + def _get_arg_value(tag, context): + name = tag.attributes['name'].value +- if tag.attributes.has_key('value'): ++ if 'value' in tag.attributes.keys(): + return resolve_args(tag.attributes['value'].value, context) + elif name in context['arg']: + return context['arg'][name] +- elif tag.attributes.has_key('default'): ++ elif 'default' in tag.attributes.keys(): + return resolve_args(tag.attributes['default'].value, context) + else: + raise RoslaunchDepsException("No value for arg [%s]"%(name)) + + def _check_ifunless(tag, context): +- if tag.attributes.has_key('if'): ++ if 'if' in tag.attributes.keys(): + val = resolve_args(tag.attributes['if'].value, context) + if not convert_value(val, 'bool'): + return False +- elif tag.attributes.has_key('unless'): ++ elif 'unless' in tag.attributes.keys(): + val = resolve_args(tag.attributes['unless'].value, context) + if convert_value(val, 'bool'): + return False diff --git a/dev-ros/roslaunch/files/roscore.initd b/dev-ros/roslaunch/files/roscore.initd index 3df4be4006b9..d05c3fe98a76 100755..100644 --- a/dev-ros/roslaunch/files/roscore.initd +++ b/dev-ros/roslaunch/files/roscore.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 depend() { diff --git a/dev-ros/roslaunch/files/roslaunch.initd b/dev-ros/roslaunch/files/roslaunch.initd index af38d2abbe68..fa0c0ace1c55 100755..100644 --- a/dev-ros/roslaunch/files/roslaunch.initd +++ b/dev-ros/roslaunch/files/roslaunch.initd @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 depend() { diff --git a/dev-ros/roslaunch/files/yaml.patch b/dev-ros/roslaunch/files/yaml.patch new file mode 100644 index 000000000000..135e9927c408 --- /dev/null +++ b/dev-ros/roslaunch/files/yaml.patch @@ -0,0 +1,44 @@ +Index: roslaunch/src/roslaunch/loader.py +=================================================================== +--- roslaunch.orig/src/roslaunch/loader.py ++++ roslaunch/src/roslaunch/loader.py +@@ -98,7 +98,7 @@ def convert_value(value, type_): + raise ValueError("%s is not a '%s' type"%(value, type_)) + elif type_ == 'yaml': + try: +- return yaml.load(value) ++ return yaml.safe_load(value) + except yaml.parser.ParserError as e: + raise ValueError(e) + else: +@@ -409,7 +409,7 @@ class Loader(object): + if rosparam is None: + import rosparam + try: +- data = yaml.load(text) ++ data = yaml.safe_load(text) + # #3162: if there is no YAML, load() will return an + # empty string. We want an empty dictionary instead + # for our representation of empty. +Index: roslaunch/test/unit/test_roslaunch_dump_params.py +=================================================================== +--- roslaunch.orig/test/unit/test_roslaunch_dump_params.py ++++ roslaunch/test/unit/test_roslaunch_dump_params.py +@@ -53,7 +53,7 @@ class TestDumpParams(unittest.TestCase): + o, e = p.communicate() + self.assert_(p.returncode == 0, "Return code nonzero for param dump! Code: %d" % (p.returncode)) + +- self.assertEquals({'/noop': 'noop'}, yaml.load(o)) ++ self.assertEquals({'/noop': 'noop'}, yaml.safe_load(o)) + + p = Popen([cmd, '--dump-params', 'roslaunch', 'test-dump-rosparam.launch'], stdout = PIPE) + o, e = p.communicate() +@@ -95,7 +95,7 @@ class TestDumpParams(unittest.TestCase): + '/noparam1': 'value1', + '/noparam2': 'value2', + } +- output_val = yaml.load(o) ++ output_val = yaml.safe_load(o) + if not val == output_val: + for k, v in val.items(): + if k not in output_val: |