Subject: CVS commit: pkgsrc/devel/py-pyparsing
From: Adam Ciarcinski
Date: 2019-04-08 12:41:05
Message id:

Log Message:
py-pyparsing: updated to 2.4.0

Version 2.4.0:

- Well, it looks like the API change that was introduced in 2.3.1 was more
  drastic than expected, so for a friendlier forward upgrade path, this
  . Bumps the current version number to 2.4.0, to reflect this
    incompatible change.
  . Adds a pyparsing.__compat__ object for specifying compatibility with
    future breaking changes.
  . Conditionalizes the API-breaking behavior, based on the value
    pyparsing.__compat__.collect_all_And_tokens.  By default, this value
    will be set to True, reflecting the new bugfixed behavior. To set this
    value to False, add to your code:

        import pyparsing
        pyparsing.__compat__.collect_all_And_tokens = False

  . User code that is dependent on the pre-bugfix behavior can restore
    it by setting this value to False.

  In 2.5 and later versions, the conditional code will be removed and
  setting the flag to True or False in these later versions will have no

- Updated and to be compatible with
  "python test". To run tests using setup, do:

      python test
      python test -s unitTests.suite
      python test -s simple_unit_tests.suite

- Fixed bug in runTests handling '\n' literals in quoted strings.

- Added tag_body attribute to the start tag expressions generated by
  makeHTMLTags, so that you can avoid using SkipTo to roll your own
  tag body expression:

      a, aEnd = pp.makeHTMLTags('a')
      link = a + a.tag_body("displayed_text") + aEnd
      for t in s.searchString(html_page):
          print(t.displayed_text, '->', t.startA.href)

- indentedBlock failure handling was improved

- Address Py2 incompatibility in simpleUnitTests, plus explain() and
  Forward str() cleanup.

- Fixed docstring with embedded '\w', which creates SyntaxWarnings in

- Examples:
  - Added example parser for tutorial compiler.

  - Added example to show how an HTML table can be parsed into a
    collection of Python lists or dicts, one per row.

  - Updated example to handle nested selects, reworked
    'where' expression to use infixNotation.

  - Added, similar to

  - Examples using makeHTMLTags use new tag_body expression when
    retrieving a tag's body text.

  - Updated examples that are runnable as unit tests:
        python test -s examples.antlr_grammar_tests
        python test -s examples.test_bibparse