when running the examples shipped with pyparsing 2.0.0 many fail with errors that look like possible bugs in pyparsing.
Attached a log of running all. failing files start with "FAIL " followed by the filename.
many are probably due to missing internet connection, but these failures occur inside pyparsing.py and may be bugs:
gen_ctypes.py
htmlStripper.py
parseListString.py
parsePythonValue.py
partial_gene_match.py
stackish.py
wordsToNum.py
e.g.:
gen_ctypes.py:46: SyntaxWarning: Invalid argument to oneOf, expected string or list
primitiveType = oneOf(t for t in typemap if not t.endswith("*"))
Traceback (most recent call last):
File "gen_ctypes.py", line 46, in <module>
primitiveType = oneOf(t for t in typemap if not t.endswith("*"))
File "/pyparsing.py", line 3111, in oneOf
while i < len(symbols)-1:
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I just made a spot check, and most of these problems occur also with Python 2.7 and pyparsing 1.5.7. I only confirmed as failing with 2.7/1.5.7: configParse, htmlStripper, makeHTMLTagExample, parseListString, removeLineBreaks, stackish, test_bibparse and wordsToNum.
excelExpr, greetingInKorean, httpServerLogParser, parsePythonValue, searchParserAppDemo, searchparser, sexpParser, sparser imported/ran without a problem.
partial_gene_match, scanYahoo, urlExtractor, urlExtractorNew failed for me, but that might be due to network proxy issues.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I forgot to mention that I think most of them are failing not due to problems in pyparsing itself,
but due to expectations on the part of the examples, many of which are contributed.
For example, a couple of them refer to modules that aren't part of pyparsing (nose, sets),
some expect the ability to get to an URL, some expect additional files to be available
in the working directory (setup.ini, 'Successful Methods...text', verilog) and some
expect Unicode characters to be available on the console.
The parseListString has a problem with the grammar vs the input being provided.
The parsePythonValue grammar has a setParseAction that won't work (as is) on Python 3.
The removeLineBreaks is using the pre-Python 3 way of opening a file with the 'file' method, instead of 'open'.
Of the ones I ran that didn't require network access, I'm not sure about whether
these are pyparsing or example issues:
gen_ctypes: "UnboundLocalError: local variable 'symbols' referenced before assignment"
httpServerLogParser: AttributeError: 'module' object has no attribute 'uppercase'
partial_gene_match: TypeError: 'in <string>' requires string as left operand, not int