Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pyparsing from 2.4.0 to 2.4.1 in /requirements #250

Closed

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps pyparsing from 2.4.0 to 2.4.1.

Release notes

Sourced from pyparsing's releases.

Pyparsing 2.4.1

For a minor point release, this release contains many new features!

  • A new shorthand notation has been added for repetition expressions: expr[min, max], with ... valid as a min or max value:

    • expr[...] is equivalent to OneOrMore(expr)
    • expr[0, ...] is equivalent to ZeroOrMore(expr)
    • expr[1, ...] is equivalent to OneOrMore(expr)
    • expr[n, ...] or expr[n,] is equivalent to expr*n + ZeroOrMore(expr) (read as "n or more instances of expr")
    • expr[..., n] is equivalent to expr*(0, n)
    • expr[m, n] is equivalent to expr*(m, n)
      Note that expr[..., n] and expr[m, n] do not raise an exception if more than n exprs exist in the input stream. If this behavior is desired, then write expr[..., n] + ~expr.
  • ... can also be used as short hand for SkipTo when used in adding parse expressions to compose an And expression.

    Literal('start') + ... + Literal('end')
    And(['start', ..., 'end'])
    

    are both equivalent to:

    Literal('start') + SkipTo('end')("_skipped*") + Literal('end')
    

    The ... form has the added benefit of not requiring repeating the skip target expression. Note that the skipped text is returned with '_skipped' as a results name, and that the contents of _skipped will contain a list of text from all ...s in the expression.

  • ... can also be used as a "skip forward in case of error" expression:

      expr = "start" + (Word(nums).setName("int") | ...) + "end"
    
      expr.parseString("start 456 end")
      ['start', '456', 'end']
    
      expr.parseString("start 456 foo 789 end")
      ['start', '456', 'foo 789 ', 'end']
      - _skipped: ['foo 789 ']
    
      expr.parseString("start foo end")
      ['start', 'foo ', 'end']
      - _skipped: ['foo ']
    
      expr.parseString("start end")
      ['start', '', 'end']
      - _skipped: ['missing <int>']
    

    Note that in all the error cases, the '_skipped' results name is present, showing a list of the extra or missing items.

    This form is only valid when used with the '|' operator.

  • Improved exception messages to show what was actually found, not just what was expected.

      word = pp.Word(pp.alphas)
      pp.OneOrMore(word).parseString("aaa bbb 123", parseAll=True)
    
... (truncated)
Changelog

Sourced from pyparsing's changelog.

Version 2.4.1 - July, 2019

  • NOTE: Deprecated functions and features that will be dropped
    in pyparsing 2.5.0 (planned next release):

    . support for Python 2 - ongoing users running with
    Python 2 can continue to use pyparsing 2.4.1

    . ParseResults.asXML() - if used for debugging, switch
    to using ParseResults.dump(); if used for data transfer,
    use ParseResults.asDict() to convert to a nested Python
    dict, which can then be converted to XML or JSON or
    other transfer format

    . operatorPrecedence synonym for infixNotation -
    convert to calling infixNotation

    . commaSeparatedList - convert to using
    pyparsing_common.comma_separated_list

    . upcaseTokens and downcaseTokens - convert to using
    pyparsing_common.upcaseTokens and downcaseTokens

    . compat.collect_all_And_tokens will not be settable to
    False to revert to pre-2.3.1 results name behavior -
    review use of names for MatchFirst and Or expressions
    containing And expressions, as they will return the
    complete list of parsed tokens, not just the first one.
    Use diag.warn_multiple_tokens_in_named_alternation
    (described below) to help identify those expressions
    in your parsers that will have changed as a result.

  • A new shorthand notation has been added for repetition
    expressions: expr[min, max], with '...' valid as a min
    or max value:

    • expr[...] is equivalent to OneOrMore(expr)
    • expr[0, ...] is equivalent to ZeroOrMore(expr)
    • expr[1, ...] is equivalent to OneOrMore(expr)
    • expr[n, ...] or expr[n,] is equivalent
      to expr*n + ZeroOrMore(expr)
      (read as "n or more instances of expr")
    • expr[..., n] is equivalent to expr*(0, n)
    • expr[m, n] is equivalent to expr*(m, n)
      Note that expr[..., n] and expr[m, n] do not raise an exception
      if more than n exprs exist in the input stream. If this
      behavior is desired, then write expr[..., n] + ~expr.
  • '...' can also be used as short hand for SkipTo when used
    in adding parse expressions to compose an And expression.

... (truncated)
Commits
  • 07d82bb Fix latent bug if adding a parse action after having cleared parse actions wi...
  • a6203b1 Update coding styles; better comments, attribution of example file
  • 33ca34c Change example to use addCondition instead of parse action that raises ParseE...
  • de00f57 Missing bits in CONTRIBUTING file
  • 6ea260a Add CONTRIBUTING.md guidelines; code and whitespace cleanup
  • 5a566b5 Update/cleanup code in examples
  • 7d96e56 Update __eq__ to Py2/Py3 compat
  • b295bc1 Some code cleanup based on inspection reports
  • 4e54534 Some performance refinements, pre-resolving re.match to re_match attribute, o...
  • ddaf822 Simplify from_dict signature, support nested dict -> nested ParseResults
  • 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.


Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

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 squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @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 the .dependabot/config.yml file in this repo:

  • Update frequency (including time of day and day of week)
  • 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 dependencies Pull requests that update a dependency file maintenance Maintenance task labels Jul 22, 2019
@pmac
Copy link
Member

pmac commented Jul 24, 2019

2.4.1 was removed from PyPI.

see pyparsing/pyparsing#105

@pmac pmac closed this Jul 24, 2019
@dependabot-preview
Copy link
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot-preview dependabot-preview bot deleted the dependabot/pip/requirements/pyparsing-2.4.1 branch July 24, 2019 19:57
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 maintenance Maintenance task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant