Skip to content

Commit 53bb648

Browse files
committed
Merge branch 'noetic-devel' into ros2
2 parents e0d6960 + 46f2a79 commit 53bb648

File tree

8 files changed

+14
-20
lines changed

8 files changed

+14
-20
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
ros: [galactic, humble, rolling]
10+
ros: [humble, jazzy, rolling]
1111

1212
name: ${{ matrix.ros }}
1313
runs-on: ubuntu-latest
1414
env:
1515
ROS_DISTRO: ${{ matrix.ros }}
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v5
1818

1919
- name: industrial_ci
2020
uses: ros-industrial/industrial_ci@master

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.12)
22
project(xacro)
33

44
find_package(ament_cmake REQUIRED)

package.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
</description>
88

99
<maintainer email="[email protected]">Robert Haschke</maintainer>
10-
<maintainer email="[email protected]">Morgan Quigley</maintainer>
1110

1211
<license>BSD</license>
1312

test/test-xacro-cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.12)
22
project(xacro-test)
33

44
find_package(xacro REQUIRED)

test/test_xacro.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
# POSSIBILITY OF SUCH DAMAGE.
3131

3232
# Authors: Stuart Glaser, William Woodall, Robert Haschke
33-
# Maintainer: Robert Haschke <[email protected]>
3433

3534
import ast
3635
from contextlib import contextmanager
@@ -1414,12 +1413,10 @@ def test_property_resolution_with_namespaced_include(self):
14141413
<xacro:property name="var" value="main"/>
14151414
<xacro:B.bar arg="${ext}"/>
14161415
<xacro:B.bar arg="${var}"/>
1417-
<xacro:B.bar arg="${inner}"/>
14181416
</a>'''
14191417
res = '''<a version="1.0">
14201418
<a arg="main" ext="main" var="2"/>
1421-
<a arg="2" ext="main" var="2"/>
1422-
<a arg="int" ext="main" var="2"/>
1419+
<a arg="main" ext="main" var="2"/>
14231420
</a>'''
14241421
self.assert_matches(self.quick_xacro(src), res)
14251422

xacro/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
# POSSIBILITY OF SUCH DAMAGE.
2929

3030
# Authors: Stuart Glaser, William Woodall, Robert Haschke
31-
# Maintainer: Morgan Quigley <[email protected]>
3231

3332
import ast
3433
import collections
@@ -200,12 +199,12 @@ def expose(*args, **kwargs):
200199

201200
deprecate_msg = 'Using {name}() directly is deprecated. Use {ns}.{name}() instead.'
202201
# This is the list of symbols we have exposed for years now. Continue exposing them directly
203-
expose('list', 'dict', 'map', 'len', 'str', 'float', 'int', 'True', 'False', 'min', 'max', 'round',
202+
expose('list', 'dict', 'map', 'len', 'str', 'float', 'int', 'bool', 'True', 'False', 'min', 'max', 'round',
204203
source=__builtins__)
205-
# These few were only recently added. The should move into python namespace, but (with a deprecation msg) stay global for now
204+
# These few were only recently added. They should move into the python namespace, but (with a deprecation msg) stay global for now
206205
expose('sorted', 'range', source=__builtins__, ns='python', deprecate_msg=deprecate_msg)
207-
# Expose all builtin symbols into the python namespace. Thus the stay accessible if the global symbol was overriden
208-
expose('list', 'dict', 'map', 'len', 'str', 'float', 'int', 'True', 'False', 'min', 'max', 'round',
206+
# Expose all builtin symbols into the python namespace. Thus, they stay accessible if the global symbol is overridden
207+
expose('list', 'dict', 'map', 'len', 'str', 'float', 'int', 'bool', 'True', 'False', 'min', 'max', 'round',
209208
'abs', 'all', 'any', 'complex', 'divmod', 'enumerate', 'filter', 'frozenset', 'hash', 'isinstance', 'issubclass',
210209
'ord', 'repr', 'reversed', 'slice', 'set', 'sum', 'tuple', 'type', 'vars', 'zip', source=__builtins__, ns='python')
211210

@@ -786,7 +785,7 @@ def handle_macro_call(node, macros, symbols):
786785

787786
name = node.tagName[6:] # drop 'xacro:' prefix
788787
try:
789-
macros, symbols, m = resolve_macro(name, macros, symbols)
788+
scoped_macros, scoped_symbols, m = resolve_macro(name, macros, symbols)
790789
body = m.body.cloneNode(deep=True)
791790

792791
except KeyError:
@@ -795,8 +794,8 @@ def handle_macro_call(node, macros, symbols):
795794
macrostack.append(m)
796795

797796
# Expand the macro
798-
scoped_symbols = Table(symbols) # new local name space for macro evaluation
799-
scoped_macros = Table(macros)
797+
scoped_symbols = Table(scoped_symbols) # new local name space for macro evaluation
798+
scoped_macros = Table(scoped_macros)
800799
params = m.params[:] # deep copy macro's params list
801800
for name, value in node.attributes.items():
802801
if name not in params:
@@ -1115,7 +1114,8 @@ def process_file(input_file_name, **kwargs):
11151114
# add xacro auto-generated banner
11161115
banner = [xml.dom.minidom.Comment(c) for c in
11171116
[" %s " % ('=' * 83),
1118-
" | This document was autogenerated by xacro from %-30s | " % input_file_name,
1117+
# replace consecutive dashes with a single one to yield a XML-compliant comment string
1118+
" | This document was autogenerated by xacro from %-30s | " % re.sub(r'-+', '-', input_file_name),
11191119
" | EDITING THIS FILE BY HAND IS NOT RECOMMENDED %-30s | " % "",
11201120
" %s " % ('=' * 83)]]
11211121
first = doc.firstChild

xacro/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
# POSSIBILITY OF SUCH DAMAGE.
2929

3030
# Authors: Stuart Glaser, William Woodall, Robert Haschke
31-
# Maintainer: Morgan Quigley <[email protected]>
3231

3332
import textwrap
3433
from optparse import OptionParser, IndentedHelpFormatter

xacro/xmlutils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
# POSSIBILITY OF SUCH DAMAGE.
2929

3030
# Authors: Stuart Glaser, William Woodall, Robert Haschke
31-
# Maintainer: Morgan Quigley <[email protected]>
3231

3332
import xml.dom.minidom
3433

0 commit comments

Comments
 (0)