NOTE: In the future release 3.2.0, use of many of the pre-PEP8 methods (such as ParserElement.parseString) will start to raise DeprecationWarnings. 3.2.0 should get released some time later in 2023. I currently plan to completely drop the pre-PEP8 methods in pyparsing 4.0, though we won't see that release until at least late 2023 if not 2024. So there is plenty of time to convert existing parsers to the new function names before the old functions are completely removed. (Big help from Devin J. Pohly in structuring the code to enable this peaceful transition.)
Version 3.2.0 will also discontinue support for Python versions 3.6 and 3.7.
API ENHANCEMENT: Optional(expr) may now be written as expr | ""
This will make this code:
"{" + Optional(Literal("A") | Literal("a")) + "}"
writable as:
"{" + (Literal("A") | Literal("a") | "") + "}"
Some related changes implemented as part of this work:
Literal("") now internally generates an Empty() (and no longer raises an exception)
Empty is now a subclass of Literal
Suggested by Antony Lee (issue #412), PR (#413) by Devin J. Pohly.
Added new class property identifier to all Unicode set classes in pyparsing.unicode, using the class's values for cls.identchars and cls.identbodychars. Now Unicode-aware parsers that formerly wrote:
ident = ppu.Greek.identifier
# or
# ident = ppu.Ελληνικά.identifier
Reworked delimited_list function into the new DelimitedList class. DelimitedList has the same constructor interface as delimited_list, and in this release, delimited_list changes from a function to a synonym for DelimitedList. delimited_list and the older delimitedList method will be deprecated in a future release, in favor of DelimitedList.
Added new class method ParserElement.using_each, to simplify code that creates a sequence of Literals, Keywords, or other ParserElement subclasses.
For instance, to define suppressable punctuation, you would previously write:
using_each will also accept optional keyword args, which it will pass through to the class initializer. Here is an expression for single-letter variable names that might be used in an algebraic expression:
Fixed regression in Word(min), reported by Ricardo Coccioli, good catch! (Issue #502)
Fixed bug in bad exception messages raised by Forward expressions. PR submitted
by Kyle Sunden, thanks for your patience and collaboration on this (#493).
Fixed regression in SkipTo, where ignored expressions were not checked when looking
for the target expression. Reported by catcombo, Issue #500.
Fixed type annotation for enable_packrat, PR submitted by Mike Urbach, thanks! (Issue #498)
Some general internal code cleanup. (Instigated by Michal Čihař, Issue #488)
Version 3.1.0 - June, 2023
Added tag_emitter.py to examples. This example demonstrates how to insert
tags into your parsed results that are not part of the original parsed text.
Version 3.1.0b2 - May, 2023
Updated create_diagram() code to be compatible with railroad-diagrams package
version 3.0. Fixes Issue #477 (railroad diagrams generated with black bars),
reported by Sam Morley-Short.
Fixed bug in NotAny, where parse actions on the negated expr were not being run.
This could cause NotAny to incorrectly fail if the expr would normally match,
but would fail to match if a condition used as a parse action returned False.
Fixes Issue #482, raised by byaka, thank you!
Fixed create_diagram() to accept keyword args, to be passed through to the
template.render() method to generate the output HTML (PR submitted by Aussie Schnore,
good catch!)
Fixed bug in python_quoted_string regex.
Added examples/bf.py Brainf*ck parser/executor example. Illustrates using
a pyparsing grammar to parse language syntax, and attach executable AST nodes to
the parsed results.
Version 3.1.0b1 - April, 2023
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
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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the python-packages group with 3 updates: furo, matplotlib and pyparsing.
Updates
furo
from 2023.8.19 to 2023.9.10Changelog
Sourced from furo's changelog.
... (truncated)
Commits
2718ca4
Prepare release: 2023.09.10c22c99d
Update changelogc37e849
Quote a not-runtime-generic type annotation9cfdf44
Rework infrastructure for linting5abeb9f
Fix the check for HTML buildersee2ab54
Tweak how tests are run with noxcdae236
Test against Sphinx minor versions in CI9e40071
Make asset hash injection idempotentaab86f4
Revert "Exclude incompatible Sphinx releases (#711)"4dd6eec
Exclude incompatible Sphinx releases (#711)Updates
matplotlib
from 3.7.1 to 3.7.2Release notes
Sourced from matplotlib's releases.
Commits
d5210e4
REL: v3.7.22dd68ef
Merge branch 'v3.7.1-doc' into v3.7.x1c891e8
DOC: Update GitHub stats for 3.7.2ab837f6
Merge pull request #26260 from meeseeksmachine/auto-backport-of-pr-25960-on-v...ed29435
Backport PR #25960: FIX: wspace and hspace in subfigures without layout enginefef623b
Merge pull request #26239 from meeseeksmachine/auto-backport-of-pr-26237-on-v...c5566a6
Merge pull request #26238 from meeseeksmachine/auto-backport-of-pr-26237-on-v...d78d08b
Backport PR #26237: Update FancyBboxPatch docstring481f99a
Backport PR #26237: Update FancyBboxPatch docstring4e086d3
Merge pull request #26234 from meeseeksmachine/auto-backport-of-pr-26232-on-v...Updates
pyparsing
from 3.0.9 to 3.1.1Release notes
Sourced from pyparsing's releases.
... (truncated)
Changelog
Sourced from pyparsing's changelog.
... (truncated)
Commits
c09eb6e
Minor update to HowToUsePyparsing.rst395431a
Prep for release54b39a5
Fix regression in SkipTo when ignoring an ignoreExpr, and failed to also igno...411c8ab
Handle case where Word(min > 1) with differing init and body chars1936b36
Handle case where Word(min > 1) (fixes #502)421e0fc
Update timestamp and CHANGES file to reflect recent PRs; added another test t...1355e76
Merge branch 'pyparsing_3.1.x'173bc16
Merge pull request #4935b939cc
Use reset_pyparsing_context for each example in test_examples.pyeb9db9e
Add common, unicode, and testing to allDependabot 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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show