From nobody Mon Mar 7 18:27:21 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 307BC1A06E75; Mon, 7 Mar 2022 18:27:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KC6Pk1B26z3h2X; Mon, 7 Mar 2022 18:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646677642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtTtyPvX7QLx3S1qmpSY8RVDG3nWyYyXLZmE8Bld6G8=; b=soO4vAu3skhM9l23YY7cnjdSwwtEW6g9f5ashxSfFivE6/PSIt7XcfGGThLSj5GzlMWmjr nIZxNLikK1mjU9KVUy0f4qdQIZwdIkC9sK7+AMCw1QxX6P/6m8BuVnP1p0XdGz/Uhu92RK R3ymNkhrOMmgNxhSySDeawd6I6GCeB/QUirBsIqV1Zz7NVsv/xs7cVj3uIvBRWz8xrjfSy s/JV474aEchaP9uHACxMhCcNL+dZZtR9P/+hlzp8V/+TgkobV2Zox9ZAij2ls2tT3NxtWS CV2NBNBWn4bM5QVPMuYVlvjrZz7o1O+aSMVjJfvNNYI9eFuaIwHckjFlYR6mig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99C7658A2; Mon, 7 Mar 2022 18:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 227IRLpD085892; Mon, 7 Mar 2022 18:27:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 227IRLwH085891; Mon, 7 Mar 2022 18:27:21 GMT (envelope-from git) Date: Mon, 7 Mar 2022 18:27:21 GMT Message-Id: <202203071827.227IRLwH085891@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: ee36702e1839 - main - net-mgmt/py-ciscoconfparse: Fix build with setuptools 58.0.0+ List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee36702e183920b2f80ba0221df2c360bf55825d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646677642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtTtyPvX7QLx3S1qmpSY8RVDG3nWyYyXLZmE8Bld6G8=; b=LwqBwWnel7RaEg31VP5yMw8VgrRn9/UZOcM77uZBNKS6N2O/Wud5RRslS/NFedJfwvjYuO 8M9gVWRpCpgBk/VuQmrSs7Bx2t+MSGqjmJNlPbNutLU+Vtne6EjKvV9ZAnNkrhLd9c0h/B Z8Ak7Ltw39w5smLWnEvUdMLb8NVtPjrwj7QYDKZGvZLdGPSUlxBIyP6ZCfiL/V0ucUIjIc MCzVjUr4IB5y9/NABzQ6JFWeYN+PAkSUw5+bCH8qjfaJNWU0SJBJsabmYetcBbEtsDQmLW T1Hp43US4jD1GZJsw0k57nbnQrQiwaJ/XvnAY5pDNQw6y2bnDjoFwYo/hEn8AQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646677642; a=rsa-sha256; cv=none; b=qVBaGRQBGRth7G5YQMVBYeXZhfY8R9YaAATYbxJa8CXAnA3SzzsXlv8WLdfjMGIg4diC3a 9KWhRFgEVOI1kx3NSZjUJoaj/mj8eKWSV0pTW4+JmieQwRJKqbYC7Z6ZAEjVSjh7Vqv6fl 7DZXwKdB9iA5QTAavWRnNBqCkDvvO/Uf+3CgzyGQgllza0aH31AttXkoy7oHhyby3hk6ut N7Dy8IRk1Gg2fVvfNdor6n+KjvV3YKL86Qmh3jtbRWJ1TsK2jPDu/4kM/DE9/9un/JELqO j1uM8DqSFO9MlA0DTjc+1Uxpw9CZdo2d57BfjhKMoJI3bksmmTovADQlCk2log== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=ee36702e183920b2f80ba0221df2c360bf55825d commit ee36702e183920b2f80ba0221df2c360bf55825d Author: Po-Chuan Hsieh AuthorDate: 2022-03-07 18:07:37 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-03-07 18:13:20 +0000 net-mgmt/py-ciscoconfparse: Fix build with setuptools 58.0.0+ With hat: python --- net-mgmt/py-ciscoconfparse/files/patch-2to3 | 461 ++++++++++++++++++++++++++++ 1 file changed, 461 insertions(+) diff --git a/net-mgmt/py-ciscoconfparse/files/patch-2to3 b/net-mgmt/py-ciscoconfparse/files/patch-2to3 new file mode 100644 index 000000000000..9061000f81fb --- /dev/null +++ b/net-mgmt/py-ciscoconfparse/files/patch-2to3 @@ -0,0 +1,461 @@ +--- ciscoconfparse/__init__.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/__init__.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + from ciscoconfparse.ciscoconfparse import __author_email__ + from ciscoconfparse.ciscoconfparse import __author__ + from ciscoconfparse.ciscoconfparse import __license__ +--- ciscoconfparse/__main__.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/__main__.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + + """ __main__.py - Parse, Query, Build, and Modify IOS-style configurations + +--- ciscoconfparse/ccp_abc.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/ccp_abc.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + from operator import methodcaller, attrgetter + from abc import ABCMeta, abstractmethod + from copy import deepcopy +@@ -37,9 +37,7 @@ r""" ccp_abc.py - Parse, Query, Build, and Modify IOS- + ## + + +-class BaseCfgLine(object): +- __metaclass__ = ABCMeta +- ++class BaseCfgLine(object, metaclass=ABCMeta): + def __init__(self, text="", comment_delimiter="!"): + """Accept an IOS line number and initialize family relationship + attributes""" +@@ -313,14 +311,14 @@ class BaseCfgLine(object): + ! + >>> + """ +- cobjs = filter(methodcaller("re_search", linespec), self.children) +- retval = map(attrgetter("text"), cobjs) ++ cobjs = list(filter(methodcaller("re_search", linespec), self.children)) ++ retval = list(map(attrgetter("text"), cobjs)) + # Delete the children +- map(methodcaller("delete"), cobjs) ++ list(map(methodcaller("delete"), cobjs)) + return retval + + def has_child_with(self, linespec): +- return bool(filter(methodcaller("re_search", linespec), self.children)) ++ return bool(list(filter(methodcaller("re_search", linespec), self.children))) + + @junos_unsupported + def insert_before(self, insertstr): +@@ -876,7 +874,7 @@ class BaseCfgLine(object): + a list of all ancestors in the direct line as well as this obj. + Cousins or aunts / uncles are *not* returned. Note: children of this + object are *not* returned.""" +- retval = map(lambda x: x.text, sorted(self.all_parents)) ++ retval = [x.text for x in sorted(self.all_parents)] + retval.append(self.text) + return retval + +--- ciscoconfparse/ccp_util.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/ccp_util.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + from operator import attrgetter + from colorama import Fore + import itertools +@@ -542,7 +542,7 @@ class IPv4Obj(object): + ## For Python3 iteration... + return self.network_object.__next__() + +- def next(self): ++ def __next__(self): + ## For Python2 iteration... + return self.network_object.__next__() + +@@ -998,7 +998,7 @@ class IPv6Obj(object): + ## For Python3 iteration... + return self.network_object.__next__() + +- def next(self): ++ def __next__(self): + ## For Python2 iteration... + return self.network_object.__next__() + +@@ -1399,7 +1399,7 @@ def dns_query(input_str="", query_type="", server="", + elif query_type == "AXFR": + """This is a hack: return text of zone transfer, instead of axfr objs""" + _zone = zone.from_xfr(query.xfr(server, input_str, lifetime=timeout)) +- return [_zone[node].to_text(node) for node in _zone.nodes.keys()] ++ return [_zone[node].to_text(node) for node in list(_zone.nodes.keys())] + elif query_type == "CNAME": + try: + answer = resolver.query(input_str, query_type) +@@ -1689,7 +1689,7 @@ class CiscoRange(MutableSequence): + + # Unicode is the only type with .isnumeric()... + if sys.version_info < (3, 0, 0): +- prefix_removed = unicode(ii[len(common_prefix):], "utf-8") ++ prefix_removed = str(ii[len(common_prefix):], "utf-8") + else: + prefix_removed = ii[len(common_prefix):] + +@@ -1734,7 +1734,7 @@ class CiscoRange(MutableSequence): + begin, end = int(begin.strip()), int(end.strip()) + 1 + assert begin > -1 + assert end > begin +- retval.extend(range(begin, end)) ++ retval.extend(list(range(begin, end))) + return list(set(retval)) + + def _range(self): +@@ -1784,7 +1784,7 @@ class CiscoRange(MutableSequence): + for ii in self._list: + # Removed try / except which is slower than sys.version_info + if sys.version_info < (3, 0, 0): +- unicode_ii = unicode(str(ii)) # Python2.7... ++ unicode_ii = str(str(ii)) # Python2.7... + else: + unicode_ii = str(ii) + +--- ciscoconfparse/ciscoconfparse.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/ciscoconfparse.py +@@ -1,6 +1,6 @@ + +-from __future__ import absolute_import + ++ + from loguru import logger + + from ciscoconfparse.models_cisco import IOSHostnameLine, IOSRouteLine +@@ -886,7 +886,7 @@ class CiscoConfParse(object): + elif exactmatch: + # Return objects whose text attribute matches linespec exactly + linespec_re = re.compile("^{0}$".format(dnaspec)) +- return list(filter(lambda obj: linespec_re.search(obj.dna), self.ConfigObjs)) ++ return list([obj for obj in self.ConfigObjs if linespec_re.search(obj.dna)]) + + def find_objects(self, linespec, exactmatch=False, ignore_ws=False): + """Find all :class:`~models_cisco.IOSCfgLine` objects whose text +@@ -1412,7 +1412,7 @@ class CiscoConfParse(object): + retval = list() + if ignore_ws: + parentspec = self._build_space_tolerant_regex(parentspec) +- childspec = map(self._build_space_tolerant_regex, childspec) ++ childspec = list(map(self._build_space_tolerant_regex, childspec)) + + for parentobj in self.find_objects(parentspec): + results = set([]) +@@ -1450,7 +1450,7 @@ class CiscoConfParse(object): + retval = list() + if ignore_ws: + parentspec = self._build_space_tolerant_regex(parentspec) +- childspec = map(self._build_space_tolerant_regex, childspec) ++ childspec = list(map(self._build_space_tolerant_regex, childspec)) + + for parentobj in self.find_objects(parentspec): + results = set([]) +@@ -2719,7 +2719,7 @@ class CiscoConfParse(object): + tmp = self._find_line_OBJ(linespec) + if uncfgspec is None: + uncfgspec = linespec +- a_lines = map(lambda x: x.text, tmp) ++ a_lines = [x.text for x in tmp] + a = CiscoConfParse(a_lines) + + b = CiscoConfParse(cfgspec, factory=False) +@@ -2758,10 +2758,10 @@ class CiscoConfParse(object): + a_lines.append(obj.text) + a_linenums.append(obj.linenum) + a_lines.extend( +- map(lambda x: getattr(x, "text"), obj.all_children) ++ [getattr(x, "text") for x in obj.all_children] + ) + a_linenums.extend( +- map(lambda x: getattr(x, "linenum"), obj.all_children) ++ [getattr(x, "linenum") for x in obj.all_children] + ) + b_lines = list() + b_linenums = list() +@@ -2769,10 +2769,10 @@ class CiscoConfParse(object): + b_lines.append(obj.text) + b_linenums.append(obj.linenum) + b_lines.extend( +- map(lambda x: getattr(x, "text"), obj.all_children) ++ [getattr(x, "text") for x in obj.all_children] + ) + b_linenums.extend( +- map(lambda x: getattr(x, "linenum"), obj.all_children) ++ [getattr(x, "linenum") for x in obj.all_children] + ) + else: + if ignore_order: +@@ -2784,20 +2784,12 @@ class CiscoConfParse(object): + a_nonparents, b_nonparents + ) + else: +- a_lines = map( +- lambda x: getattr(x, "text"), getattr(adiff_level, attr) +- ) ++ a_lines = [getattr(x, "text") for x in getattr(adiff_level, attr)] + # Build a map from a_lines index to a.ConfigObjs index +- a_linenums = map( +- lambda x: getattr(x, "linenum"), getattr(adiff_level, attr) +- ) +- b_lines = map( +- lambda x: getattr(x, "text"), getattr(bdiff_level, attr) +- ) ++ a_linenums = [getattr(x, "linenum") for x in getattr(adiff_level, attr)] ++ b_lines = [getattr(x, "text") for x in getattr(bdiff_level, attr)] + # Build a map from b_lines index to b.ConfigObjs index +- b_linenums = map( +- lambda x: getattr(x, "linenum"), getattr(bdiff_level, attr) +- ) ++ b_linenums = [getattr(x, "linenum") for x in getattr(bdiff_level, attr)] + + ### + ### Mark diffs here +@@ -2836,7 +2828,7 @@ class CiscoConfParse(object): + aobj = aobjs[idx] + # set aparent_text to all parents' text (joined) + aparent_text = " ".join( +- map(lambda x: x.text, aobj.all_parents) ++ [x.text for x in aobj.all_parents] + ) + except IndexError: + # aobj doesn't exist, if we get an index error +@@ -2851,7 +2843,7 @@ class CiscoConfParse(object): + bobj = bobjs[idx] + # set bparent_text to all parents' text (joined) + bparent_text = " ".join( +- map(lambda x: x.text, bobj.all_parents) ++ [x.text for x in bobj.all_parents] + ) + except IndexError: + # bobj doesn't exist, if we get an index error +@@ -3055,7 +3047,7 @@ class CiscoConfParse(object): + elif exactmatch: + # Return objects whose text attribute matches linespec exactly + linespec_re = re.compile("^%s$" % linespec) +- return list(filter(lambda obj: linespec_re.search(obj.text), self.ConfigObjs)) ++ return list([obj for obj in self.ConfigObjs if linespec_re.search(obj.text)]) + + def _find_sibling_OBJ(self, lineobject): + """SEMI-PRIVATE: Takes a singe object and returns a list of sibling +@@ -3198,7 +3190,7 @@ class IOSConfigList(MutableSequence): + logger.debug("self._list = {0}".format(self._list)) + + def has_line_with(self, linespec): +- return bool(filter(methodcaller("re_search", linespec), self._list)) ++ return bool(list(filter(methodcaller("re_search", linespec), self._list))) + + @junos_unsupported + def insert_before(self, exist_val, new_val, atomic=False): +@@ -3440,7 +3432,7 @@ class IOSConfigList(MutableSequence): + + def _banner_mark_regex(self, REGEX): + # Build a list of all leading banner lines +- banner_objs = list(filter(lambda obj: REGEX.search(obj.text), self._list)) ++ banner_objs = list([obj for obj in self._list if REGEX.search(obj.text)]) + + BANNER_STR_RE = r"^(?:(?P(?:set\s+)*banner\s\w+\s+)(?P\S))" + for parent in banner_objs: +@@ -3582,9 +3574,7 @@ class IOSConfigList(MutableSequence): + if (indent < max_indent) and is_config_line: + parent = None + # walk parents and intelligently prune stale parents +- stale_parent_idxs = filter( +- lambda ii: ii >= indent, sorted(parents.keys(), reverse=True) +- ) ++ stale_parent_idxs = [ii for ii in sorted(list(parents.keys()), reverse=True) if ii >= indent] + for parent_idx in stale_parent_idxs: + del parents[parent_idx] + else: +@@ -3793,7 +3783,7 @@ class NXOSConfigList(MutableSequence): + logger.debug("self._list = {0}".format(self._list)) + + def has_line_with(self, linespec): +- return bool(filter(methodcaller("re_search", linespec), self._list)) ++ return bool(list(filter(methodcaller("re_search", linespec), self._list))) + + def insert_before(self, robj, val, atomic=False): + ## Insert something before robj +@@ -3904,7 +3894,7 @@ class NXOSConfigList(MutableSequence): + + def _banner_mark_regex(self, REGEX): + # Build a list of all leading banner lines +- banner_objs = list(filter(lambda obj: REGEX.search(obj.text), self._list)) ++ banner_objs = list([obj for obj in self._list if REGEX.search(obj.text)]) + + BANNER_STR_RE = r"^(?:(?P(?:set\s+)*banner\s\w+\s+)(?P\S))" + for parent in banner_objs: +@@ -4020,9 +4010,7 @@ class NXOSConfigList(MutableSequence): + if (indent < max_indent) and is_config_line: + parent = None + # walk parents and intelligently prune stale parents +- stale_parent_idxs = filter( +- lambda ii: ii >= indent, sorted(parents.keys(), reverse=True) +- ) ++ stale_parent_idxs = [ii for ii in sorted(list(parents.keys()), reverse=True) if ii >= indent] + for parent_idx in stale_parent_idxs: + del parents[parent_idx] + else: +@@ -4227,7 +4215,7 @@ class ASAConfigList(MutableSequence): + self._list = self._bootstrap_obj_init(list(map(attrgetter("text"), self._list))) + + def has_line_with(self, linespec): +- return bool(filter(methodcaller("re_search", linespec), self._list)) ++ return bool(list(filter(methodcaller("re_search", linespec), self._list))) + + def insert_before(self, robj, val, atomic=False): + ## Insert something before robj +@@ -4357,9 +4345,7 @@ class ASAConfigList(MutableSequence): + if (indent < max_indent) and is_config_line: + parent = None + # walk parents and intelligently prune stale parents +- stale_parent_idxs = filter( +- lambda ii: ii >= indent, sorted(parents.keys(), reverse=True) +- ) ++ stale_parent_idxs = [ii for ii in sorted(list(parents.keys()), reverse=True) if ii >= indent] + for parent_idx in stale_parent_idxs: + del parents[parent_idx] + else: +@@ -4700,7 +4686,7 @@ if __name__ == "__main__": + diff = CiscoConfParse(opts.config).req_cfgspec_all_diff(opts.arg1.split(",")) + elif opts.method == "decrypt": + pp = CiscoPassword() +- print(pp.decrypt(opts.arg1)) ++ print((pp.decrypt(opts.arg1))) + exit(1) + elif opts.method == "help": + print("Valid methods and their arguments:") +@@ -4710,10 +4696,10 @@ if __name__ == "__main__": + print(" find_blocks: arg1=linespec") + print(" find_parents_w_child: arg1=parentspec arg2=childspec") + print(" find_parents_wo_child: arg1=parentspec arg2=childspec") +- print( ++ print(( + " req_cfgspec_excl_diff: arg1=linespec arg2=uncfgspec" + + " arg3=cfgspec" +- ) ++ )) + print(" req_cfgspec_all_diff: arg1=cfgspec") + print(" decrypt: arg1=encrypted_passwd") + exit(1) +--- ciscoconfparse/errors.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/errors.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + + r""" errors.py - Parse, Query, Build, and Modify IOS-style configs + +--- ciscoconfparse/models_asa.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/models_asa.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + import re + + from ciscoconfparse.protocol_values import ( +--- ciscoconfparse/models_cisco.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/models_cisco.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + import traceback + import sys + import re +@@ -1412,7 +1412,7 @@ class BaseIOSIntfLine(IOSCfgLine): + } + + ## Analyze each vdict in sequence and apply to retval sequentially +- for key, val in vdict.items(): ++ for key, val in list(vdict.items()): + if val != "_nomatch_": + ## absolute in the key overrides previous values + if "absolute" in key: +@@ -1851,7 +1851,7 @@ class IOSAccessLine(BaseCfgLine): + retval = self.re_match_typed( + r"([a-zA-Z]+\s+)*(\d+\s*\d*)$", group=2, result_type=str, default="" + ) +- tmp = map(int, retval.strip().split()) ++ tmp = list(map(int, retval.strip().split())) + return tmp + + def manual_exectimeout_min(self): +@@ -1869,7 +1869,7 @@ class IOSAccessLine(BaseCfgLine): + retval = self.re_match_iter_typed( + r"^\s*exec-timeout\s+(\d+\s*\d*)\s*$", group=1, result_type=str, default="" + ) +- tmp = map(int, retval.strip().split()) ++ tmp = list(map(int, retval.strip().split())) + return tmp + + +--- ciscoconfparse/models_junos.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/models_junos.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + import sys + import re + import os +--- ciscoconfparse/models_nxos.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/models_nxos.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + import sys + import re + import os +@@ -1365,7 +1365,7 @@ class BaseNXOSIntfLine(NXOSCfgLine): + } + + ## Analyze each vdict in sequence and apply to retval sequentially +- for key, val in vdict.items(): ++ for key, val in list(vdict.items()): + if val != "_nomatch_": + ## absolute in the key overrides previous values + if "absolute" in key: +@@ -1971,7 +1971,7 @@ class NXOSAccessLine(BaseCfgLine): + retval = self.re_match_typed( + r"([a-zA-Z]+\s+)*(\d+\s*\d*)$", group=2, result_type=str, default="" + ) +- tmp = map(int, retval.strip().split()) ++ tmp = list(map(int, retval.strip().split())) + return tmp + + def manual_exectimeout_min(self): +@@ -1989,7 +1989,7 @@ class NXOSAccessLine(BaseCfgLine): + retval = self.re_match_iter_typed( + r"^\s*exec-timeout\s+(\d+\s*\d*)\s*$", group=1, result_type=str, default="" + ) +- tmp = map(int, retval.strip().split()) ++ tmp = list(map(int, retval.strip().split())) + return tmp + + +--- ciscoconfparse/protocol_values.py.orig 2021-11-02 03:51:35 UTC ++++ ciscoconfparse/protocol_values.py +@@ -1,4 +1,4 @@ +-from __future__ import absolute_import ++ + + """ protocol_values.py - Parse, Query, Build, and Modify IOS-style configurations + Copyright (C) 2020-2021 David Michael Pennington at Cisco Systems +--- setup.py.orig 2021-11-02 03:51:35 UTC ++++ setup.py +@@ -127,7 +127,6 @@ def setup_packages(): + long_description=read("README.rst"), + include_package_data=True, # See MANIFEST.in for explicit rules + packages=find_packages(), +- use_2to3=True, # Reqd for Windows + Py3 - ref Github issue #32 + zip_safe=False, + python_requires='>=3.5', + install_requires=REQUIRES,