pypi pyparsing 3.1.0b1
Pyparsing 3.1.0b1

latest releases: 3.2.0, 3.2.0rc1, 3.2.0b3...
19 months ago
  • Added support for Python 3.12.

  • API CHANGE: A slight change has been implemented when unquoting a quoted string parsed using the QuotedString class. Formerly, when unquoting and processing whitespace markers such as \t and \n, these substitutions would occur first, and then any additional '' escaping would be done on the resulting string. This would parse "\n" as "<newline>". Now escapes and whitespace markers are all processed in a single pass working left to right, so the quoted string "\n" would get unquoted to "\n" (a backslash followed by "n"). Fixes issue #474 raised by jakeanq, thanks!

  • Added named field "url" to pyparsing.common.url, returning the entire parsed URL string.

  • Fixed bug when parse actions returned an empty string for an expression that had a results name, that the results name was not saved. That is:

    expr = Literal("X").add_parse_action(lambda tokens: "")("value")
    result = expr.parse_string("X")
    print(result["value"])
    

    would raise a KeyError. Now empty strings will be saved with the associated results name. Raised in Issue #470 by Nicco Kunzmann, thank you.

  • Fixed bug in SkipTo where ignore expressions were not properly handled while scanning for the target expression. Issue #475, reported by elkniwt, thanks (this bug has been there for a looooong time!).

  • Updated ci.yml permissions to limit default access to source - submitted by Joyce Brum of Google. Thanks so much!

  • Updated the lucene_grammar.py example (better support for '*' and '?' wildcards) and corrected the test cases - brought to my attention by Elijah Nicol, good catch!

Don't miss a new pyparsing release

NewReleases is sending notifications on new releases.