pypi pyparsing 3.2.0b1
Pyparsing 3.2.0b1

7 days ago
  • Discontinued support for Python 3.6, 3.7, and 3.8. Adopted new Python features from Python versions 3.7-3.9:

    • Updated type annotations to use built-in container types instead of names imported from the typing module (e.g., list[str] vs List[str]).
    • Reworked portions of the packrat cache to leverage insertion-preserving ordering in dicts.
    • Changed pdb.set_trace() call in ParserElement.set_break() to breakpoint().
    • Converted typing.NamedTuple to dataclasses.dataclass in railroad diagramming code.
    • Added from __future__ import annotations to clean up some type annotations.
  • POSSIBLE BREAKING CHANGE: Fixed code in ParseElementEnhance subclasses that replaced detailed exception messages raised in contained expressions with a less-specific and less-informative generic exception message and location.

    If your code has conditional logic based on the message content in raised ParseExceptions, this bugfix may require changes in your code.

  • Fixed the displayed output of Regex terms to deduplicate repeated backslashes, for easier reading in debugging, printing, and railroad diagrams.

  • Fixed (or at least reduced) elusive bug when generating railroad diagrams, where some diagram elements were just empty blocks. Fix submitted by RoDuth, thanks a ton!

  • Added indent and base_1 arguments to pyparsing.testing.with_line_numbers. When using with_line_numbers inside a parse action, set base_1=False, since the reported loc value is 0-based. indent can be a leading string (typically of spaces or tabs) to indent the numbered string passed to with_line_numbers. Added while working on #557, reported by Bernd Wechner.

  • Added query syntax to mongodb_query_expression.py with better support for array fields ("contains", "contains all", "contains any", and "contains none"); and "like" and "not like" operators to support SQL "%" wildcard matching and "=~" operator to support regex matching. Also:

    • added support for dates and datetimes as query values
    • added support for a[0] style array referencing
  • Added lox_parser.py example, a parser for the Lox language used as a tutorial in Robert Nystrom's "Crafting Interpreters" (http://craftinginterpreters.com/). With helpful corrections from RoDuth.

  • Added complex_chemical_formulas.py example, to add parsing capability for formulas such as "3(C₆H₅OH)₂".

Don't miss a new pyparsing release

NewReleases is sending notifications on new releases.