Skip to content
This repository was archived by the owner on Jun 11, 2023. It is now read-only.

Conversation

@pyup-bot
Copy link
Collaborator

This PR updates pyparsing from 3.0.6 to 3.0.9.

Changelog

3.0.9

---------------
- Added Unicode set `BasicMultilingualPlane` (may also be referenced
as `BMP`) representing the Basic Multilingual Plane (Unicode
characters up to code point 65535). Can be used to parse
most language characters, but omits emojis, wingdings, etc.
Raised in discussion with Dave Tapley (issue 392).

- To address mypy confusion of `pyparsing.Optional` and `typing.Optional`
resulting in `error: "_SpecialForm" not callable` message
reported in issue 365, fixed the import in exceptions.py. Nice
sleuthing by Iwan Aucamp and Dominic Davis-Foster, thank you!
(Removed definitions of `OptionalType`, `DictType`, and `IterableType`
and replaced them with `typing.Optional`, `typing.Dict`, and
`typing.Iterable` throughout.)

- Fixed typo in jinja2 template for railroad diagrams, thanks for the
catch Nioub (issue 388).

- Removed use of deprecated `pkg_resources` package in
railroad diagramming code (issue 391).

- Updated bigquery_view_parser.py example to parse examples at
https://cloud.google.com/bigquery/docs/reference/legacy-sql

3.0.8

---------------
- API CHANGE: modified pyproject.toml to require Python version
3.6.8 or later for pyparsing 3.x. Earlier minor versions of 3.6
fail in evaluating the `version_info` class (implemented using
`typing.NamedTuple`). If you are using an earlier version of Python
3.6, you will need to use pyparsing 2.4.7.

- Improved pyparsing import time by deferring regex pattern compiles.
PR submitted by Anthony Sottile to fix issue 362, thanks!

- Updated build to use flit, PR by Michał Górny, added BUILDING.md
doc and removed old Windows build scripts - nice cleanup work!

- More type-hinting added for all arithmetic and logical operator
methods in `ParserElement`. PR from Kazantcev Andrey, thank you.

- Fixed `infix_notation`'s definitions of `lpar` and `rpar`, to accept
parse expressions such that they do not get suppressed in the parsed
results. PR submitted by Philippe Prados, nice work.

- Fixed bug in railroad diagramming with expressions containing `Combine`
elements. Reported by Jeremy White, thanks!

- Added `show_groups` argument to `create_diagram` to highlight grouped
elements with an unlabeled bounding box.

- Added `unicode_denormalizer.py` to the examples as a demonstration
of how Python's interpreter will accept Unicode characters in
identifiers, but normalizes them back to ASCII so that identifiers
`print` and `𝕡𝓻ᵢ𝓃𝘁` and `𝖕𝒓𝗂𝑛ᵗ` are all equivalent.

- Removed imports of deprecated `sre_constants` module for catching
exceptions when compiling regular expressions. PR submitted by
Serhiy Storchaka, thank you.

3.0.7

---------------
- Fixed bug 345, in which delimitedList changed expressions in place
using `expr.streamline()`. Reported by Kim Gräsman, thanks!

- Fixed bug 346, when a string of word characters was passed to WordStart
or `WordEnd` instead of just taking the default value. Originally posted
as a question by Parag on StackOverflow, good catch!

- Fixed bug 350, in which `White` expressions could fail to match due to
unintended whitespace-skipping. Reported by Fu Hanxi, thank you!

- Fixed bug 355, when a `QuotedString` is defined with characters in its
quoteChar string containing regex-significant characters such as ., *,
?, [, ], etc.

- Fixed bug in `ParserElement.run_tests` where comments would be displayed
using `with_line_numbers`.

- Added optional "min" and "max" arguments to `delimited_list`. PR
submitted by Marius, thanks!

- Added new API change note in `whats_new_in_pyparsing_3_0_0`, regarding
a bug fix in the `bool()` behavior of `ParseResults`.

Prior to pyparsing 3.0.x, the `ParseResults` class implementation of
`__bool__` would return `False` if the `ParseResults` item list was empty,
even if it contained named results. In 3.0.0 and later, `ParseResults` will
return `True` if either the item list is not empty *or* if the named
results dict is not empty.

    generate an empty ParseResults by parsing a blank string with
    a ZeroOrMore
   result = Word(alphas)[...].parse_string("")
   print(result.as_list())
   print(result.as_dict())
   print(bool(result))

    add a results name to the result
   result["name"] = "empty result"
   print(result.as_list())
   print(result.as_dict())
   print(bool(result))

Prints:

   []
   {}
   False

   []
   {'name': 'empty result'}
   True

In previous versions, the second call to `bool()` would return `False`.

- Minor enhancement to Word generation of internal regular expression, to
emit consecutive characters in range, such as "ab", as "ab", not "a-b".

- Fixed character ranges for search terms using non-Western characters
in booleansearchparser, PR submitted by tc-yu, nice work!

- Additional type annotations on public methods.
Links

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #217 (eaaa4d0) into main (436e1d1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #217   +/-   ##
=======================================
  Coverage   86.85%   86.85%           
=======================================
  Files          21       21           
  Lines         289      289           
=======================================
  Hits          251      251           
  Misses         38       38           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 436e1d1...eaaa4d0. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants