id summary reporter owner description type status priority milestone component version resolution keywords cc port 51364 py34-parsing @ 2.1.2 fails to build josephsacco nerdling "The python3.x build of py-parsing @2.1.2 fails. {{{ Traceback (most recent call last): File ""setup.py"", line 9, in from pyparsing import __version__ as pyparsing_version File ""/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-parsing/py34-parsing/work/pyparsing-2.1.2/pyparsing.py"", line 3478, in _escapedPunc = Word( _bslash, r""\[]-*.$+^?()~ "", exact=2 ).setParseAction(lambda s,l,t:t[0][1]) File ""/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-parsing/py34-parsing/work/pyparsing-2.1.2/pyparsing.py"", line 948, in setParseAction self.parseAction = list(map(_trim_arity, list(fns))) File ""/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-parsing/py34-parsing/work/pyparsing-2.1.2/pyparsing.py"", line 808, in _trim_arity this_line = extract_stack()[-1] File ""/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py-parsing/py34-parsing/work/pyparsing-2.1.2/pyparsing.py"", line 793, in extract_stack return [(frame_summary.filename, frame_summary.lineno)] AttributeError: 'tuple' object has no attribute 'filename' }}} The culprit is found in pyparsing.py: {{{ #!python # this version is Python 2.x-3.x cross-compatible 'decorator to trim function calls to match the arity of the target' def _trim_arity(func, maxargs=2): if func in singleArgBuiltins: return lambda s,l,t: func(t) limit = [0] foundArity = [False] if PY_3: def extract_stack(): frame_summary = traceback.extract_stack()[-3] return [(frame_summary.filename, frame_summary.lineno)] def extract_tb(tb): frames = traceback.extract_tb(tb) frame_summary = frames[-1] return [(frame_summary.filename, frame_summary.lineno)] else: extract_stack = traceback.extract_stack extract_tb = traceback.extract_tb }}} In python3.x 'traceback.extract_stack()' returns a list of quadruples (filename, line number, function name, text), each of whose elements is accessed by index. -Joseph" defect closed Normal ports duplicate mojca py-parsing