Release notes
*Sourced from [pyparsing's releases](https://github.com/pyparsing/pyparsing/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 ']
>
> 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](https://github.com/pyparsing/pyparsing/blob/master/CHANGES).*
> 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`](https://github.com/pyparsing/pyparsing/commit/07d82bb767d75a0a30bd6f806938c1f9fe50d8ee) Fix latent bug if adding a parse action after having cleared parse actions wi...
- [`a6203b1`](https://github.com/pyparsing/pyparsing/commit/a6203b170a61bd4da24388fb14f83df481159981) Update coding styles; better comments, attribution of example file
- [`33ca34c`](https://github.com/pyparsing/pyparsing/commit/33ca34cc24282f39a1a9185bb713a6cafd38fa58) Change example to use addCondition instead of parse action that raises ParseE...
- [`de00f57`](https://github.com/pyparsing/pyparsing/commit/de00f571f40a7e6478e7446ec1bcdb7472af32ee) Missing bits in CONTRIBUTING file
- [`6ea260a`](https://github.com/pyparsing/pyparsing/commit/6ea260a4211da88f3d28fd6266e6765a6c209baf) Add CONTRIBUTING.md guidelines; code and whitespace cleanup
- [`5a566b5`](https://github.com/pyparsing/pyparsing/commit/5a566b59170fb3fe705a7691806c4afd158df520) Update/cleanup code in examples
- [`7d96e56`](https://github.com/pyparsing/pyparsing/commit/7d96e569a1b5f4505dac8d6f24c4b27562acf875) Update `__eq__` to Py2/Py3 compat
- [`b295bc1`](https://github.com/pyparsing/pyparsing/commit/b295bc146687924af0c51a56157808b528950599) Some code cleanup based on inspection reports
- [`4e54534`](https://github.com/pyparsing/pyparsing/commit/4e54534890245fc98721f9a69ab306380d14e13c) Some performance refinements, pre-resolving re.match to re_match attribute, o...
- [`ddaf822`](https://github.com/pyparsing/pyparsing/commit/ddaf822e2da67f850aebe61e43d616b731a63e48) Simplify from_dict signature, support nested dict -> nested ParseResults
- Additional commits viewable in [compare view](https://github.com/pyparsing/pyparsing/compare/pyparsing_2.4.0...pyparsing_2.4.1)
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 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 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). To ignore the version in this PR you can just close it
- `@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](https://app.dependabot.com):
- 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.
Bumps pyparsing from 2.4.0 to 2.4.1.
Release notes
*Sourced from [pyparsing's releases](https://github.com/pyparsing/pyparsing/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: ['missingChangelog
*Sourced from [pyparsing's changelog](https://github.com/pyparsing/pyparsing/blob/master/CHANGES).* > 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`](https://github.com/pyparsing/pyparsing/commit/07d82bb767d75a0a30bd6f806938c1f9fe50d8ee) Fix latent bug if adding a parse action after having cleared parse actions wi... - [`a6203b1`](https://github.com/pyparsing/pyparsing/commit/a6203b170a61bd4da24388fb14f83df481159981) Update coding styles; better comments, attribution of example file - [`33ca34c`](https://github.com/pyparsing/pyparsing/commit/33ca34cc24282f39a1a9185bb713a6cafd38fa58) Change example to use addCondition instead of parse action that raises ParseE... - [`de00f57`](https://github.com/pyparsing/pyparsing/commit/de00f571f40a7e6478e7446ec1bcdb7472af32ee) Missing bits in CONTRIBUTING file - [`6ea260a`](https://github.com/pyparsing/pyparsing/commit/6ea260a4211da88f3d28fd6266e6765a6c209baf) Add CONTRIBUTING.md guidelines; code and whitespace cleanup - [`5a566b5`](https://github.com/pyparsing/pyparsing/commit/5a566b59170fb3fe705a7691806c4afd158df520) Update/cleanup code in examples - [`7d96e56`](https://github.com/pyparsing/pyparsing/commit/7d96e569a1b5f4505dac8d6f24c4b27562acf875) Update `__eq__` to Py2/Py3 compat - [`b295bc1`](https://github.com/pyparsing/pyparsing/commit/b295bc146687924af0c51a56157808b528950599) Some code cleanup based on inspection reports - [`4e54534`](https://github.com/pyparsing/pyparsing/commit/4e54534890245fc98721f9a69ab306380d14e13c) Some performance refinements, pre-resolving re.match to re_match attribute, o... - [`ddaf822`](https://github.com/pyparsing/pyparsing/commit/ddaf822e2da67f850aebe61e43d616b731a63e48) Simplify from_dict signature, support nested dict -> nested ParseResults - Additional commits viewable in [compare view](https://github.com/pyparsing/pyparsing/compare/pyparsing_2.4.0...pyparsing_2.4.1)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 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 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). To ignore the version in this PR you can just close it - `@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](https://app.dependabot.com): - 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.