Skip to content

Conversation

@dependabot-preview
Copy link
Contributor

@dependabot-preview dependabot-preview bot commented Feb 4, 2019

Bumps pyparsing from 2.3.0 to 2.3.1.

Release notes

Sourced from pyparsing's releases.

Pyparsing 2.3.1

New features in Pyparsing 2.3.1 -

  • ParseException.explain() method, to convert a raw Python traceback into a list of the parse expressions leading up to a parse mismatch.

  • New unicode sets Latin-A and Latin-B, and the ability to define custom sets using multiple inheritance.

      class Turkish_set(pp.pyparsing_unicode.Latin1, pp.pyparsing_unicode.LatinA):
          pass
    
      turkish_word = pp.Word(Turkish_set.alphas)
    
  • State machine examples, showing how to extend Python with your own pyparsing-enabled syntax. The examples implement a 'statemachine' keyword to define a set of classes and transition attribute to implement a State pattern:

      statemachine TrafficLightState:
          Red -> Green
          Green -> Yellow
          Yellow -> Red
    

    Transitions can be named also:

      statemachine LibraryBookState:
          New -(shelve)-> Available
          Available -(reserve)-> OnHold
          OnHold -(release)-> Available
          Available -(checkout)-> CheckedOut
          CheckedOut -(checkin)-> Available
    
  • Example parser for decaf language. This language is commonly used in university CS compiler classes.

  • Fixup of docstrings to Sphinx format, so pyparsing docs are now available on readthedocs.com! (https://pyparsing-docs.readthedocs.io/en/latest/)

Changelog

Sourced from pyparsing's changelog.

Version 2.3.1 - January, 2019

  • POSSIBLE API CHANGE: this release fixes a bug when results names were
    attached to a MatchFirst or Or object containing an And object.
    Previously, a results name on an And object within an enclosing MatchFirst
    or Or could return just the first token in the And. Now, all the tokens
    matched by the And are correctly returned. This may result in subtle
    changes in the tokens returned if you have this condition in your pyparsing
    scripts.

  • New staticmethod ParseException.explain() to help diagnose parse exceptions
    by showing the failing input line and the trace of ParserElements in
    the parser leading up to the exception. explain() returns a multiline
    string listing each element by name. (This is still an experimental
    method, and the method signature and format of the returned string may
    evolve over the next few releases.)

    Example:
    # define a parser to parse an integer followed by an
    # alphabetic word
    expr = pp.Word(pp.nums).setName("int")
    + pp.Word(pp.alphas).setName("word")
    try:
    # parse a string with a numeric second value instead of alpha
    expr.parseString("123 355")
    except pp.ParseException as pe:
    print_(pp.ParseException.explain(pe))

    Prints:
    123 355
    ^
    ParseException: Expected word (at char 4), (line:1, col:5)
    main.ExplainExceptionTest
    pyparsing.And - {int word}
    pyparsing.Word - word

    explain() will accept any exception type and will list the function
    names and parse expressions in the stack trace. This is especially
    useful when an exception is raised in a parse action.

    Note: explain() is only supported under Python 3.

  • Fix bug in dictOf which could match an empty sequence, making it
    infinitely loop if wrapped in a OneOrMore.

  • Added unicode sets to pyparsing_unicode for Latin-A and Latin-B ranges.

  • Added ability to define custom unicode sets as combinations of other sets
    using multiple inheritance.

... (truncated)
Commits
  • 349637f Merge pull request #64 from mcepl/denose
  • afddc54 Add note that explain() is only supported under Python 3.
  • b600b54 Disable explain() tests if running in Py2
  • 17aeb19 Modify explain() for Py2 compat
  • d626c99 Add enumerated place holders for strings that invoke str.format(), for Py2 co...
  • e9ef507 Add enumerated place holders for strings that invoke str.format(), for Py2 co...
  • bf348d6 Update CHANGES to include note on fixing issue #65; generalized the note abou...
  • 898a4b8 Unit test to test fix for issue #65
  • e29bb65 Fix inconsistency between Keyword(caseless=True) and CaselessKeyword (issue #65)
  • fb23d63 Remove dependency on nose
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Feb 4, 2019
@dependabot-preview dependabot-preview bot force-pushed the dependabot/pip/pyparsing-2.3.1 branch 6 times, most recently from 505a60b to 59f0ef9 Compare March 19, 2019 00:32
@dependabot-preview dependabot-preview bot force-pushed the dependabot/pip/pyparsing-2.3.1 branch 3 times, most recently from 3739762 to ec2abc1 Compare March 29, 2019 21:46
@dependabot-preview dependabot-preview bot force-pushed the dependabot/pip/pyparsing-2.3.1 branch from ec2abc1 to fa58cd7 Compare March 30, 2019 11:49
@dependabot-preview dependabot-preview bot force-pushed the dependabot/pip/pyparsing-2.3.1 branch from fa58cd7 to 639f0ea Compare March 31, 2019 13:47
@dependabot-preview
Copy link
Contributor Author

Superseded by #126.

@dependabot-preview dependabot-preview bot deleted the dependabot/pip/pyparsing-2.3.1 branch April 8, 2019 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants