Hello community,

here is the log from the commit of package python-catkin-pkg for 
openSUSE:Factory checked in at 2020-07-29 17:20:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-catkin-pkg (Old)
 and      /work/SRC/openSUSE:Factory/.python-catkin-pkg.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-catkin-pkg"

Wed Jul 29 17:20:20 2020 rev:5 rq:823291 version:0.4.22

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-catkin-pkg/python-catkin-pkg.changes      
2020-06-10 00:44:41.866376846 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-catkin-pkg.new.3592/python-catkin-pkg.changes
    2020-07-29 17:21:43.396623548 +0200
@@ -1,0 +2,20 @@
+Wed Jul 29 04:04:09 UTC 2020 - Steve Kowalik <[email protected]>
+
+- Update to 0.4.22:
+  * catkin_generate_changelog: hack to allow tag version prefixed with v
+  * add GitLab auto linking for issues in catkin_generate_changelog
+  * enable releasing from Focal with stdeb 0.9.1
+  * fix deprecation warnings in tests
+  * pass stricter pycodestyle 2.6 checks
+  * Restore compatibility with pyparsing < 1.5.7
+  * Respect (AMENT|COLCON|CATKIN)_IGNORE directories
+  * bump min CMake version to avoid CMP0048 warning
+  * Fix travis warning
+  * use parse actions to evaluate conditions
+  * Speed up topological_order by using a per-package cache of all run_depends
+  * Fix crash with pyparsing 3
+  * [enhancement]evaluating more than 1 condition fixes #277
+  * exclude Signed-off-by: lines from changelog
+  * Changes 'install' to 'catkin_install_python' in the CMakeLists.txt template
+
+-------------------------------------------------------------------

Old:
----
  0.4.16.tar.gz

New:
----
  0.4.22.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-catkin-pkg.spec ++++++
--- /var/tmp/diff_new_pack.UXe6hk/_old  2020-07-29 17:21:45.028624952 +0200
+++ /var/tmp/diff_new_pack.UXe6hk/_new  2020-07-29 17:21:45.032624955 +0200
@@ -20,11 +20,10 @@
 %define commands create_pkg find_pkg generate_changelog package_version 
prepare_release tag_changelog test_changelog
 
 Name:           python-catkin-pkg
-Version:        0.4.16
+Version:        0.4.22
 Release:        0
 Summary:        Catkin package library
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
 URL:            https://wiki.ros.org/catkin_pkg
 Source:         
https://github.com/ros-infrastructure/catkin_pkg/archive/%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}

++++++ 0.4.16.tar.gz -> 0.4.22.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/.travis.yml 
new/catkin_pkg-0.4.22/.travis.yml
--- old/catkin_pkg-0.4.16/.travis.yml   2020-01-25 22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/.travis.yml   2020-06-24 19:26:34.000000000 +0200
@@ -1,6 +1,6 @@
 language: python
+os: linux
 dist: xenial
-sudo: false
 python:
   - "2.7"
   - "3.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/setup.py 
new/catkin_pkg-0.4.22/setup.py
--- old/catkin_pkg-0.4.16/setup.py      2020-01-25 22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/setup.py      2020-06-24 19:26:34.000000000 +0200
@@ -20,7 +20,7 @@
     # same version as in:
     # - src/catkin_pkg/__init__.py
     # - stdeb.cfg
-    'version': '0.4.16',
+    'version': '0.4.22',
     'packages': ['catkin_pkg', 'catkin_pkg.cli'],
     'package_dir': {'': 'src'},
     'package_data': {'catkin_pkg': ['templates/*.in']},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/src/catkin_pkg/__init__.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/__init__.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/__init__.py    2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/__init__.py    2020-06-24 
19:26:34.000000000 +0200
@@ -35,4 +35,4 @@
 # same version as in:
 # - setup.py
 # - stdeb.cfg
-__version__ = '0.4.16'
+__version__ = '0.4.22'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/src/catkin_pkg/changelog.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/changelog.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/changelog.py   2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/changelog.py   2020-06-24 
19:26:34.000000000 +0200
@@ -349,7 +349,7 @@
         b = self.bullet_generator(bullet)
         i = indent
         n = '\n' + i + '  '
-        lines = [i + next(b) + _unicode(l).replace('\n', n) for l in self]
+        lines = [i + next(b) + _unicode(item).replace('\n', n) for item in 
self]
         return '\n'.join(lines)
 
     def bullet_generator(self, bullet):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/catkin_pkg-0.4.16/src/catkin_pkg/changelog_generator.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/changelog_generator.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/changelog_generator.py 2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/changelog_generator.py 2020-06-24 
19:26:34.000000000 +0200
@@ -87,16 +87,16 @@
 def _get_version_tags(vcs_client):
     # get all tags in descending order
     tags = vcs_client.get_tags()
-    version_tags = [t for t in tags if re.match(r'^\d+\.\d+.\d+$', t.name)]
+    version_tags = [t for t in tags if re.match(r'^v?\d+\.\d+.\d+$', t.name)]
     return version_tags
 
 
 def _get_latest_version_tag_name(vcs_client):
     # get latest tag
     tag_name = vcs_client.get_latest_tag_name()
-    if not re.match(r'^\d+\.\d+.\d+$', tag_name):
+    if not re.match(r'^v?\d+\.\d+.\d+$', tag_name):
         raise RuntimeError(
-            "The tag name '{}' doesn't match the version pattern 
x.y.z".format(tag_name))
+            "The tag name '{}' doesn't match the version pattern 
v?x.y.z".format(tag_name))
     return tag_name
 
 
@@ -150,7 +150,7 @@
     for tag in sorted_tags(tag2log_entries.keys()):
         log_entries = tag2log_entries[tag]
         if log_entries is not None:
-            blocks.append(generate_version_block(tag.name, tag.timestamp, 
log_entries, vcs_client=vcs_client, skip_contributors=skip_contributors))
+            blocks.append(generate_version_block(version_from_tag(tag.name), 
tag.timestamp, log_entries, vcs_client=vcs_client, 
skip_contributors=skip_contributors))
 
     return '\n'.join(blocks)
 
@@ -164,17 +164,17 @@
         content = generate_version_content(log_entries, vcs_client=vcs_client, 
skip_contributors=skip_contributors)
 
         # check if version section exists
-        match = get_version_section_match(data, tag.name)
+        match = get_version_section_match(data, version_from_tag(tag.name))
         if match:
             # prepend content to existing section
-            data = prepend_version_content(data, tag.name, content)
+            data = prepend_version_content(data, version_from_tag(tag.name), 
content)
             assert data is not None
         else:
             # find injection point of earliest following version
             for next_tag in list(tags)[i:]:
-                match = get_version_section_match(data, next_tag.name)
+                match = get_version_section_match(data, 
version_from_tag(next_tag.name))
                 if match:
-                    block = generate_version_block(tag.name, tag.timestamp, 
log_entries, vcs_client=vcs_client, skip_contributors=skip_contributors)
+                    block = generate_version_block(version_from_tag(tag.name), 
tag.timestamp, log_entries, vcs_client=vcs_client, 
skip_contributors=skip_contributors)
                     data = data[:match.start()] + block + '\n' + 
data[match.start():]
                     break
             if not match:
@@ -218,6 +218,14 @@
     return data if count == 1 else None
 
 
+def version_from_tag(tag_name):
+    if tag_name is None:
+        return None
+    if tag_name.startswith('v'):
+        return tag_name[1:]
+    return tag_name
+
+
 def sorted_tags(tags):
     # first return the forthcoming tag
     for tag in tags:
@@ -225,7 +233,7 @@
             yield tag
     # then return the tags in descending order
     name_and_tag = [(t.name, t) for t in tags if t.name]
-    name_and_tag.sort(key=lambda x: [int(y) for y in x[0].split('.')])
+    name_and_tag.sort(key=lambda x: [int(y) for y in 
version_from_tag(x[0]).split('.')])
     name_and_tag.reverse()
     for (_, tag) in name_and_tag:
         yield tag
@@ -263,9 +271,9 @@
     for entry in log_entries:
         msg = entry.msg
         lines = msg.splitlines()
-        lines = [l.strip() for l in lines]
-        lines = [l for l in lines if l]
-        lines = [escape_trailing_underscores(l) for l in lines]
+        lines = [line.strip() for line in lines]
+        lines = [line for line in lines if line and not 
line.startswith('Signed-off-by:')]
+        lines = [escape_trailing_underscores(line) for line in lines]
         data += '* %s\n' % (replace_repository_references(lines[0], 
vcs_client=vcs_client) if lines else '')
         for line in lines[1:]:
             data += '  %s\n' % replace_repository_references(line, 
vcs_client=vcs_client)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/catkin_pkg-0.4.16/src/catkin_pkg/changelog_generator_vcs.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/changelog_generator_vcs.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/changelog_generator_vcs.py     
2020-01-25 22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/changelog_generator_vcs.py     
2020-06-24 19:26:34.000000000 +0200
@@ -139,6 +139,8 @@
         self._repo_hosting = None
         self._github_base_url = 'https://github.com/'
         self._github_path = None
+        self._gitlab_base_url = 'https://gitlab.com/'
+        self._gitlab_path = None
 
     # query author
     def _get_author(self, hash_):
@@ -220,6 +222,8 @@
                 pass
         if self._repo_hosting == 'github':
             line = self._replace_github_issue_references(line)
+        elif self._repo_hosting == 'gitlab':
+            line = self._replace_gitlab_issue_references(line)
         return line
 
     def _determine_repo_hosting(self):
@@ -239,6 +243,17 @@
                 self._github_path = path
                 break
 
+        # detect gitlab hosting
+        prefixes = ['[email protected]:', 'https://gitlab.com/', 
'git://gitlab.com/']
+        for prefix in prefixes:
+            if result['output'].startswith(prefix):
+                self._repo_hosting = 'gitlab'
+                path = result['output'][len(prefix):]
+                if path.endswith('.git'):
+                    path = path[:-4]
+                self._gitlab_path = path
+                break
+
     def _replace_github_issue_references(self, line):
         valid_name = '[\\w._-]+'
         issue_pattern = '#(\\d+)'
@@ -257,6 +272,38 @@
         line = re.sub(('(%s/%s)?' % (valid_name, valid_name)) + issue_pattern, 
replace_issue_number, line)
         return line
 
+    def _replace_gitlab_issue_references(self, line):
+        valid_name = '[\\w._-]+'
+        issue_pattern = '#(\\d+)'
+        merge_request_pattern = '!(\\d+)'
+
+        def replace_issue_number(match):
+            issue_url = self._gitlab_base_url
+            if match.group(1):
+                path = match.group(1)
+                issue_url += path
+            else:
+                path = ''
+                issue_url += self._gitlab_path
+            issue_number = match.group(3)
+            issue_url += '/-/issues/' + issue_number
+            return '`%s#%s <%s>`_' % (path, issue_number, issue_url)
+        line = re.sub(('(%s(/%s)+)?' % (valid_name, valid_name)) + 
issue_pattern, replace_issue_number, line)
+
+        def replace_merge_request_number(match):
+            merge_request_url = self._gitlab_base_url
+            if match.group(1):
+                path = match.group(1)
+                merge_request_url += path
+            else:
+                path = ''
+                merge_request_url += self._gitlab_path
+            merge_request_number = match.group(3)
+            merge_request_url += '/-/merge_requests/' + merge_request_number
+            return '`%s!%s <%s>`_' % (path, merge_request_number, 
merge_request_url)
+        line = re.sub(('(%s(/%s)+)?' % (valid_name, valid_name)) + 
merge_request_pattern, replace_merge_request_number, line)
+        return line
+
 
 class HgClient(VcsClientBase):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/src/catkin_pkg/condition.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/condition.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/condition.py   2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/condition.py   2020-06-24 
19:26:34.000000000 +0200
@@ -14,7 +14,13 @@
 
 import operator
 
-import pyparsing
+import pyparsing as pp
+
+# operatorPrecedence renamed to infixNotation in 1.5.7
+try:
+    from pyparsing import infixNotation
+except ImportError:
+    from pyparsing import operatorPrecedence as infixNotation
 
 
 def evaluate_condition(condition, context):
@@ -23,10 +29,10 @@
     expr = _get_condition_expression()
     try:
         parse_results = expr.parseString(condition, parseAll=True)
-    except pyparsing.ParseException as e:
+    except pp.ParseException as e:
         raise ValueError(
             "condition '%s' failed to parse: %s" % (condition, e))
-    return _evaluate(parse_results.asList()[0], context)
+    return parse_results[0](context)
 
 
 _condition_expression = None
@@ -35,40 +41,29 @@
 def _get_condition_expression():
     global _condition_expression
     if not _condition_expression:
-        pp = pyparsing
         operator = pp.Regex('==|!=|>=|>|<=|<').setName('operator')
-        identifier = pp.Word('$', pp.alphanums + '_', min=2)
-        value = pp.Word(pp.alphanums + '_-')
+        operator.setParseAction(_Operator)
+
+        identifier = pp.Word('$', pp.alphanums + '_', 
min=2).setName('identifier')
+        identifier.setParseAction(_Identifier)
+
+        value = pp.Word(pp.alphanums + '_-').setName('value')
+        value.setParseAction(_Value)
+
         comparison_term = identifier | value
-        condition = pp.Group(comparison_term + operator + comparison_term)
-        _condition_expression = pp.operatorPrecedence(
+
+        condition = pp.Group(comparison_term + operator + 
comparison_term).setName('condition')
+        condition.setParseAction(_Condition)
+
+        _condition_expression = infixNotation(
             condition, [
-                ('and', 2, pp.opAssoc.LEFT, ),
-                ('or', 2, pp.opAssoc.LEFT, ),
+                ('and', 2, pp.opAssoc.LEFT, _And),
+                ('or', 2, pp.opAssoc.LEFT, _Or),
             ])
     return _condition_expression
 
 
-def _evaluate(parse_results, context):
-    if not isinstance(parse_results, list):
-        if parse_results.startswith('$'):
-            # get variable from context
-            return str(context.get(parse_results[1:], ''))
-        # return literal value
-        return parse_results
-
-    # recursion
-    assert len(parse_results) == 3
-
-    # handle logical operators
-    if parse_results[1] == 'and':
-        return _evaluate(parse_results[0], context) and \
-            _evaluate(parse_results[2], context)
-    if parse_results[1] == 'or':
-        return _evaluate(parse_results[0], context) or \
-            _evaluate(parse_results[2], context)
-
-    # handle comparison operators
+class _Operator:
     operators = {
         '==': operator.eq,
         '!=': operator.ne,
@@ -77,7 +72,82 @@
         '>=': operator.ge,
         '>': operator.gt,
     }
-    assert parse_results[1] in operators.keys()
-    return operators[parse_results[1]](
-        _evaluate(parse_results[0], context),
-        _evaluate(parse_results[2], context))
+
+    def __init__(self, t):
+        self.value = t[0]
+
+    def __call__(self, arg1, arg2, context):
+        assert self.value in self.operators
+        return self.operators[self.value](arg1(context), arg2(context))
+
+    def __str__(self):
+        return self.value
+
+    __repr__ = __str__
+
+
+class _Identifier:
+
+    def __init__(self, t):
+        self.value = t[0]
+
+    def __call__(self, context):
+        return str(context.get(self.value[1:], ''))
+
+    def __str__(self):
+        return self.value
+
+    __repr__ = __str__
+
+
+class _Value:
+
+    def __init__(self, t):
+        self.value = t[0]
+
+    def __call__(self, context):
+        return self.value
+
+    def __str__(self):
+        return self.value
+
+    __repr__ = __str__
+
+
+class _Condition:
+
+    def __init__(self, t):
+        self.value = t[0]
+
+    def __call__(self, context):
+        return self.value[1](self.value[0], self.value[2], context)
+
+    def __str__(self):
+        return ' '.join(map(str, self.value))
+
+    __repr__ = __str__
+
+
+class _BinOp:
+
+    def __init__(self, t):
+        self.args = t[0][0::2]
+
+    def __call__(self, context):
+        return self.evalop(a(context) for a in self.args)
+
+    def __str__(self):
+        sep = ' %s  ' % self.reprsymbol
+        return '(' + sep.join(map(str, self.args)) + ')'
+
+    __repr__ = __str__
+
+
+class _And(_BinOp):
+    reprsymbol = 'and'
+    evalop = all
+
+
+class _Or(_BinOp):
+    reprsymbol = 'or'
+    evalop = any
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/src/catkin_pkg/package.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/package.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/package.py     2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/package.py     2020-06-24 
19:26:34.000000000 +0200
@@ -106,7 +106,7 @@
                         slot.append(deepcopy(d))
             del kwargs['run_depends']
         self.filename = filename
-        self.licenses = [l if isinstance(l, License) else License(l) for l in 
self.licenses]
+        self.licenses = [license_ if isinstance(license_, License) else 
License(license_) for license_ in self.licenses]
         # verify that no unknown keywords are passed
         unknown = set(kwargs.keys()).difference(self.__slots__)
         if unknown:
@@ -265,7 +265,7 @@
 
         if not self.licenses:
             errors.append('The package node must contain at least one 
"license" tag')
-        if [l for l in self.licenses if not l.strip()]:
+        if [license_ for license_ in self.licenses if not license_.strip()]:
             errors.append('The license tag must neither be empty nor only 
contain whitespaces')
 
         if self.authors is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/src/catkin_pkg/packages.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/packages.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/packages.py    2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/packages.py    2020-06-24 
19:26:34.000000000 +0200
@@ -58,9 +58,7 @@
     paths = []
     real_exclude_paths = [os.path.realpath(p) for p in exclude_paths] if 
exclude_paths is not None else []
     for dirpath, dirnames, filenames in os.walk(basepath, followlinks=True):
-        if 'AMENT_IGNORE' in filenames or \
-            'CATKIN_IGNORE' in filenames or \
-            'COLCON_IGNORE' in filenames or \
+        if set(dirnames + filenames) & {'AMENT_IGNORE', 'CATKIN_IGNORE', 
'COLCON_IGNORE'} or \
             os.path.realpath(dirpath) in real_exclude_paths or \
                 (exclude_subspaces and '.catkin' in filenames):
             del dirnames[:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/catkin_pkg-0.4.16/src/catkin_pkg/templates/CMakeLists.txt.in 
new/catkin_pkg-0.4.22/src/catkin_pkg/templates/CMakeLists.txt.in
--- old/catkin_pkg-0.4.16/src/catkin_pkg/templates/CMakeLists.txt.in    
2020-01-25 22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/templates/CMakeLists.txt.in    
2020-06-24 19:26:34.000000000 +0200
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.0.2)
 project(@name)
 
 ## Compile as C++11, supported in ROS Kinetic and newer
@@ -153,7 +153,7 @@
 
 ## Mark executable scripts (Python etc.) for installation
 ## in contrast to setup.py, you can choose the destination
-# install(PROGRAMS
+# catkin_install_python(PROGRAMS
 #   scripts/my_python_script
 #   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
 # )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/catkin_pkg-0.4.16/src/catkin_pkg/topological_order.py 
new/catkin_pkg-0.4.22/src/catkin_pkg/topological_order.py
--- old/catkin_pkg-0.4.16/src/catkin_pkg/topological_order.py   2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/src/catkin_pkg/topological_order.py   2020-06-24 
19:26:34.000000000 +0200
@@ -48,8 +48,11 @@
         self.is_metapackage = 'metapackage' in (e.tagname for e in 
self.package.exports)
         message_generators = [e.content for e in self.package.exports if 
e.tagname == 'message_generator']
         self.message_generator = message_generators[0] if message_generators 
else None
-        # full includes direct build depends and recursive run_depends of 
these build_depends
+        # a set containing this package name, direct build depends
+        # and recursive run_depends of these build_depends
         self.depends_for_topological_order = None
+        # a set containing this package name and recursive run_depends
+        self._recursive_run_depends_for_topological_order = None
 
     def __getattr__(self, name):
         if name.startswith('__'):
@@ -60,9 +63,10 @@
         """
         Set self.depends_for_topological_order to the recursive dependencies 
required for topological order.
 
-        It contains all direct build- and buildtool dependencies and their 
recursive
-        runtime dependencies. The set only contains packages which
-        are in the passed packages dictionary.
+        It contains this package name, all direct build- and buildtool
+        dependencies and their recursive runtime dependencies.
+        The set only contains packages which are in the passed packages
+        dictionary.
 
         :param packages: dict of name to ``_PackageDecorator``
         """
@@ -96,20 +100,25 @@
         :param packages: dict of name to ``_PackageDecorator``
         :param depends_for_topological_order: set to be extended
         """
-        depends_for_topological_order.add(self.package.name)
-        package_names = packages.keys()
-        names = [d.name for d in self.package.run_depends if 
d.evaluated_condition]
+        if self._recursive_run_depends_for_topological_order is None:
+            self._recursive_run_depends_for_topological_order = set()
+            
self._recursive_run_depends_for_topological_order.add(self.package.name)
+            package_names = packages.keys()
+            names = [d.name for d in self.package.run_depends if 
d.evaluated_condition]
+
+            for group_depend in self.package.group_depends:
+                if group_depend.evaluated_condition:
+                    assert group_depend.members is not None, \
+                        'Group members need to be determined before'
+                    names += group_depend.members
+
+            for name in [n for n in names
+                         if (n in package_names and
+                             n not in 
self._recursive_run_depends_for_topological_order)]:
+                packages[name]._add_recursive_run_depends(packages,
+                                                          
self._recursive_run_depends_for_topological_order)
 
-        for group_depend in self.package.group_depends:
-            if group_depend.evaluated_condition:
-                assert group_depend.members is not None, \
-                    'Group members need to be determined before'
-                names += group_depend.members
-
-        for name in [n for n in names
-                     if (n in package_names and
-                         n not in depends_for_topological_order)]:
-            packages[name]._add_recursive_run_depends(packages, 
depends_for_topological_order)
+        
depends_for_topological_order.update(self._recursive_run_depends_for_topological_order)
 
 
 def topological_order(root_dir, whitelisted=None, blacklisted=None, 
underlay_workspaces=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/stdeb.cfg 
new/catkin_pkg-0.4.22/stdeb.cfg
--- old/catkin_pkg-0.4.16/stdeb.cfg     2020-01-25 22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/stdeb.cfg     2020-06-24 19:26:34.000000000 +0200
@@ -3,16 +3,17 @@
 ; catkin-pkg-modules same version as in:
 ; - setup.py
 ; - src/catkin_pkg/__init__.py
-Depends: python-argparse, python-catkin-pkg-modules (>= 0.4.16), 
python-dateutil, python-docutils
+Depends: python-argparse, python-catkin-pkg-modules (>= 0.4.22), 
python-dateutil, python-docutils
 ; catkin-pkg-modules same version as in:
 ; - setup.py
 ; - src/catkin_pkg/__init__.py
-Depends3: python3-catkin-pkg-modules (>= 0.4.16), python3-dateutil, 
python3-docutils
+Depends3: python3-catkin-pkg-modules (>= 0.4.22), python3-dateutil, 
python3-docutils
 Conflicts: catkin, python3-catkin-pkg
 Conflicts3: catkin, python-catkin-pkg
 Copyright-File: LICENSE
 Suite: xenial yakkety zesty artful bionic cosmic disco eoan jessie stretch 
buster
 Suite3: xenial yakkety zesty artful bionic cosmic disco eoan focal jessie 
stretch buster
+Python2-Depends-Name: python
 X-Python3-Version: >= 3.4
 Setup-Env-Vars: SKIP_PYTHON_MODULES=1
 
@@ -27,5 +28,6 @@
 Copyright-File: LICENSE
 Suite: xenial yakkety zesty artful bionic cosmic disco eoan jessie stretch 
buster
 Suite3: xenial yakkety zesty artful bionic cosmic disco eoan focal jessie 
stretch buster
+Python2-Depends-Name: python
 X-Python3-Version: >= 3.4
 Setup-Env-Vars: SKIP_PYTHON_SCRIPTS=1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/test/test_metapackage.py 
new/catkin_pkg-0.4.22/test/test_metapackage.py
--- old/catkin_pkg-0.4.16/test/test_metapackage.py      2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/test/test_metapackage.py      2020-06-24 
19:26:34.000000000 +0200
@@ -72,6 +72,9 @@
 class TestMetapackageValidation(unittest.TestCase):
     """Tests the metapackage validator."""
 
+    if sys.version_info[0] == 2:
+        assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
+
     def test_validate_metapackage(self):
         pkgs_dict = find_packages(test_data_dir)
         for path, package in pkgs_dict.items():
@@ -81,7 +84,7 @@
             with assert_warning(warnreg):
                 if exc is not None:
                     if excreg is not None:
-                        with self.assertRaisesRegexp(exc, excreg):
+                        with self.assertRaisesRegex(exc, excreg):
                             _validate_metapackage(path, package)
                     else:
                         with self.assertRaises(exc):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/test/test_package.py 
new/catkin_pkg-0.4.22/test/test_package.py
--- old/catkin_pkg-0.4.16/test/test_package.py  2020-01-25 22:09:42.000000000 
+0100
+++ new/catkin_pkg-0.4.22/test/test_package.py  2020-06-24 19:26:34.000000000 
+0200
@@ -28,6 +28,9 @@
 
 class PackageTest(unittest.TestCase):
 
+    if sys.version_info[0] == 2:
+        assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
+
     def get_maintainer(self):
         maint = Mock()
         maint.email = '[email protected]'
@@ -52,7 +55,7 @@
         self.assertEqual([], pack.authors)
         self.assertEqual([maint], pack.maintainers)
         self.assertEqual(['BSD'], pack.licenses)
-        self.assertEqual([None], [l.file for l in pack.licenses])
+        self.assertEqual([None], [license_.file for license_ in pack.licenses])
         self.assertEqual([], pack.build_depends)
         self.assertEqual([], pack.buildtool_depends)
         self.assertEqual([], pack.run_depends)
@@ -118,6 +121,31 @@
         dep = Dependency('foo', condition='foo <= bar or bar >= baz')
         self.assertFalse(dep.evaluate_condition({}))
 
+        # Testing for more than 1 conditions
+        dep = Dependency('foo', condition='foo > bar and bar < baz and foo > 
bar')
+        self.assertTrue(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo <= bar and bar >= baz and foo > 
bar')
+        self.assertFalse(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo > bar or bar < baz or foo <= 
bar')
+        self.assertTrue(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo <= bar or bar >= baz or foo <= 
bar')
+        self.assertFalse(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo <= bar and bar < baz or foo > 
bar')
+        self.assertTrue(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo <= bar or bar < baz and foo < 
bar')
+        self.assertFalse(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo > bar and bar >= baz or foo > 
bar')
+        self.assertTrue(dep.evaluate_condition({}))
+
+        dep = Dependency('foo', condition='foo <= bar or bar >= baz and foo < 
bar')
+        self.assertFalse(dep.evaluate_condition({}))
+
     def test_dependency_repr(self):
         dep = Dependency('foo', condition='$foo == 2')
         assert repr(dep) == "Dependency(name='foo', condition='$foo == 2')"
@@ -176,7 +204,7 @@
                        exports=mexp)
         self.assertEqual(mmain, pack.maintainers)
         self.assertEqual(mlis, pack.licenses)
-        self.assertEqual([None, 'LICENSE'], [l.file for l in pack.licenses])
+        self.assertEqual([None, 'LICENSE'], [license_.file for license_ in 
pack.licenses])
         self.assertEqual(murl, pack.urls)
         self.assertEqual(mauth, pack.authors)
         self.assertEqual(mbuilddep, pack.build_depends)
@@ -296,7 +324,7 @@
         except Exception as e:
             self.fail('create_node() raised %s "%s" unexpectedly!' % (type(e), 
str(e)))
 
-        self.assertRaisesRegexp(Exception, 'unbound prefix: line 1, column 0', 
create_node, 'tag', {'ns:key': 'value'})
+        self.assertRaisesRegex(Exception, 'unbound prefix: line 1, column 0', 
create_node, 'tag', {'ns:key': 'value'})
 
         try:
             create_node('tag', {'ns:key': 'value', 'xmlns:ns': 'urn:ns'})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/test/test_topological_order.py 
new/catkin_pkg-0.4.22/test/test_topological_order.py
--- old/catkin_pkg-0.4.16/test/test_topological_order.py        2020-01-25 
22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/test/test_topological_order.py        2020-06-24 
19:26:34.000000000 +0200
@@ -1,5 +1,6 @@
 from __future__ import print_function
 
+import sys
 import unittest
 
 from mock import Mock
@@ -26,6 +27,9 @@
 
 class TopologicalOrderTest(unittest.TestCase):
 
+    if sys.version_info[0] == 2:
+        assertRaisesRegex = unittest.TestCase.assertRaisesRegexp
+
     def test_topological_order_packages(self):
         mc = create_mock('c', [], [], 'pc')
         md = create_mock('d', [], [], 'pd')
@@ -50,13 +54,12 @@
         pkg1 = create_mock('pkg', [], [], 'path/to/pkg1')
         pkg2_dep = create_mock('pkg_dep', [], [], 'path/to/pkg2_dep')
         pkg2 = create_mock('pkg', [pkg2_dep], [], 'path/to/pkg2')
-        if hasattr(self, 'assertRaisesRegexp'):
-            with self.assertRaisesRegexp(RuntimeError, 'Two packages with the 
same name "pkg" in the workspace'):
-                topological_order_packages({
-                    pkg1.path: pkg1,
-                    pkg2_dep.path: pkg2_dep,
-                    pkg2.path: pkg2,
-                })
+        with self.assertRaisesRegex(RuntimeError, 'Two packages with the same 
name "pkg" in the workspace'):
+            topological_order_packages({
+                pkg1.path: pkg1,
+                pkg2_dep.path: pkg2_dep,
+                pkg2.path: pkg2,
+            })
 
     def test_package_decorator_init(self):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/catkin_pkg-0.4.16/test/util.py 
new/catkin_pkg-0.4.22/test/util.py
--- old/catkin_pkg-0.4.16/test/util.py  2020-01-25 22:09:42.000000000 +0100
+++ new/catkin_pkg-0.4.22/test/util.py  2020-06-24 19:26:34.000000000 +0200
@@ -27,7 +27,10 @@
     @functools.wraps(f)
     def decorated(*args, **kwds):
         with temporary_directory() as directory:
-            from inspect import getargspec
+            try:
+                from inspect import getfullargspec as getargspec
+            except ImportError:
+                from inspect import getargspec
             # If it takes directory of kwargs and kwds does already have
             # directory, inject it
             if 'directory' not in kwds and 'directory' in getargspec(f)[0]:


Reply via email to