Parsita

Latest version: v2.1.1

Safety actively analyzes 629908 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

1.3.2

Not secure
Update in supported Python versions:
* Add support for newly released Python 3.7
* Drop support for end-of-life Python 3.3

1.3.1

Not secure
Improvements in ergonomics:

* Whitespace is now consumed from both sides of tokens in `TextParser`s. Previously, it was only consumed from the trailing ends of tokens, leaving the leading whitespace to the previous parser. This resulted in weird interactions between parsers that ignored whitespace and those that did not (e.g. `examples/json.py`). It was thought that consuming whitespace from both sides would harm performance, but that turned out to not be the case. Typical parsers should be completely unaffected, while atypical parsers should be a little more predictable.

* Parsita always reports the failure message of the parser that consumed the most input, which is usually the most helpful message when many alternative branches fail. Previously, if multiple alternatives failed at the same position in the input, the first parser to get that far was the one reported. Now, when multiple alternatives fail at the same place, all expected values are included in the final failure message. This should improve the readability of error messages as the user can see all possible values for the next token at that position.

* Because failure messages need to be mergable, the previously undocumented `failure` parser was changed so that it will not display an arbitrary failure message, but only an arbitrary expected value. Due to the limited utility of `failure`, it was considered a reasonable tradeoff to get better failure messages for the rest of the standard parsers at the expense of `failure`.

* Added `success` and `failure` dummy parsers to the tutorial so that there is some documentation for these.

* If the internal member of a repeated parser matches an empty string, then the repeated parser will match an empty string forever. When this situation is detected, Parsita now raises a runtime exception, rather than hanging.

1.3.0

Not secure
Release documentation was broken on PyPI. Parsita 1.3.1 was released immediately with identical code.

1.2.1

Not secure
Magic classes (`TextParsers` and `GeneralParsers`) now restore the state of the global options (`whitespace`, `handle_literal`, `parse_method`) to what they were when the class started to run rather than to the defaults. This means that magic classes can be now be nested and magic classes will not clobber any manually set options.

1.2.0

Not secure
Improvements to error messages and new utility functions:
* `TextParsers` error messages now provide line and character location rather than index into string
* Added `parsita.util` module with `contant`, `splat`, and `unsplat` helper functions
* Added a URL parser example to source

1.1.1

Not secure
Addition of Python 3.6 support

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.