f94ccc242e
- update to 3.3.2: * Defined pyparsing-specific warning classes so that they can be selectively enabled or disabled without affecting warnings raised by other libraries in the same Python * Added as_datetime parse action to pyparsing.common - a more generalized version of the convert_to_datetime parse action (supports any expression that extracts date/time fields into "year", "month", "day", etc. results names), and validates that the parsed fields represent a valid date and time. * Added iso8601_date_validated and iso8601_datetime_validated expressions to pyparsing.common, which return a Python datetime.datetime * Various performance improvements in ParseResults class and core functions, with 10-20% performance overall. * Added regex_inverter web page (using PyScript) to demonstrate using the inv_regex.py example. * The version 3.3.0 release will begin emitting DeprecationWarnings for pyparsing methods that have been renamed to PEP8-compliant names (introduced in pyparsing 3.0.0, in August, 2021, with legacy names retained as aliases). In preparation, I added in pyparsing 3.2.2 a utility for finding and replacing the legacy method names with the new names. * Deprecated indentedBlock, when converted using the cvt_pyparsing_pep8_names utility, will emit UserWarnings that additional code changes will be required. * Deprecated locatedExpr, when converted using the cvt_pyparsing_pep8_names utility, will emit UserWarnings that additional code changes may be required. * Updated all examples and test cases to use PEP8 names (unless
Dirk Mueller2026-01-26 08:13:02 +00:00
9bdc87208d
Accepting request 1320161 from devel:languages:python
Ana Guerrero2025-11-27 14:17:49 +00:00
64dc8cae75
Accepting request 1320151 from home:glaubitz:branches:devel:languages:python
Markéta Machová2025-11-26 11:27:44 +00:00
a853f1308b
Accepting request 1268466 from devel:languages:python
Ana Guerrero2025-04-11 14:45:56 +00:00
a2473d2d8d
- update to 3.2.3: * Fixed bug released in 3.2.2 in which nested_expr could overwrite parse actions for defined content, and could truncate list of items within a nested list. * Released cvt_pyparsing_pep8_names.py conversion utility to upgrade pyparsing-based programs and libraries that use legacy camelCase names to use the new PEP8-compliant snake_case method names. * Fixed bug in nested_expr where nested contents were stripped of whitespace when the default whitespace characters were cleared * Fixed bug in rest_of_line and the underlying Regex class, in which matching a pattern that could match an empty string (such as ".*" or "[A-Z]*" would not raise a ParseException at or beyond the end of the input string. This could cause an infinite parsing loop when parsing rest_of_line at the end of the input string. * Fixed syntax warning raised in bigquery_view_parser.py, invalid escape sequence "\s". * Added support for Python 3.14.
Dirk Mueller2025-04-10 17:10:44 +00:00
dc298832cf
- update to 3.2.3: * Fixed bug released in 3.2.2 in which nested_expr could overwrite parse actions for defined content, and could truncate list of items within a nested list. * Released cvt_pyparsing_pep8_names.py conversion utility to upgrade pyparsing-based programs and libraries that use legacy camelCase names to use the new PEP8-compliant snake_case method names. * Fixed bug in nested_expr where nested contents were stripped of whitespace when the default whitespace characters were cleared * Fixed bug in rest_of_line and the underlying Regex class, in which matching a pattern that could match an empty string (such as ".*" or "[A-Z]*" would not raise a ParseException at or beyond the end of the input string. This could cause an infinite parsing loop when parsing rest_of_line at the end of the input string. * Fixed syntax warning raised in bigquery_view_parser.py, invalid escape sequence "\s". * Added support for Python 3.14.
Dirk Mueller2025-04-10 17:10:44 +00:00
b64aba0d51
Accepting request 1245159 from devel:languages:python
Ana Guerrero2025-02-12 20:30:59 +00:00
88ba9e403f
Accepting request 1245159 from devel:languages:python
Ana Guerrero2025-02-12 20:30:59 +00:00
86a1d6ffc9
- update to 3.2.1: * Updated generated railroad diagrams to make non-terminal elements links to their related sub-diagrams. This _greatly_ improves navigation of the diagram, especially for large, complex parsers. * Simplified railroad diagrams emitted for parsers using infix_notation, by hiding lookahead terms. Renamed internally generated expressions for clarity, and improved diagramming. * Improved performance of cpp_style_comment, c_style_comment, common.fnumber and common.ieee_float Regex expressions. * Add missing type annotations to match_only_at_col, replace_with, remove_quotes, with_attribute, and with_class. Issue #585 reported by rafrafrek.
Dirk Mueller2025-02-04 18:56:45 +00:00
9222cd0d4f
- update to 3.2.1: * Updated generated railroad diagrams to make non-terminal elements links to their related sub-diagrams. This _greatly_ improves navigation of the diagram, especially for large, complex parsers. * Simplified railroad diagrams emitted for parsers using infix_notation, by hiding lookahead terms. Renamed internally generated expressions for clarity, and improved diagramming. * Improved performance of cpp_style_comment, c_style_comment, common.fnumber and common.ieee_float Regex expressions. * Add missing type annotations to match_only_at_col, replace_with, remove_quotes, with_attribute, and with_class. Issue #585 reported by rafrafrek.
Dirk Mueller2025-02-04 18:56:45 +00:00
2cc21bd34a
Accepting request 1225956 from devel:languages:python
Ana Guerrero2024-11-26 19:55:19 +00:00
155668997c
Accepting request 1225956 from devel:languages:python
Ana Guerrero2024-11-26 19:55:19 +00:00
d6ca0e168d
- update to 3.2.0: * Discontinued support for Python 3.6, 3.7, and 3.8. Adopted new Python features from Python versions 3.7-3.9: - Updated type annotations to use built-in container types instead of names imported from the typing module (e.g., list[str] vs List[str]). - Reworked portions of the packrat cache to leverage insertion-preserving ordering in dicts (including removal of uses of OrderedDict). - Changed pdb.set_trace() call in ParserElement.set_break() to breakpoint(). - Converted typing.NamedTuple to dataclasses.dataclass in railroad diagramming code. - Added from __future__ import annotations to clean up some type annotations.
Dirk Mueller2024-10-28 17:01:14 +00:00
557b2c000d
- update to 3.2.0: * Discontinued support for Python 3.6, 3.7, and 3.8. Adopted new Python features from Python versions 3.7-3.9: - Updated type annotations to use built-in container types instead of names imported from the typing module (e.g., list[str] vs List[str]). - Reworked portions of the packrat cache to leverage insertion-preserving ordering in dicts (including removal of uses of OrderedDict). - Changed pdb.set_trace() call in ParserElement.set_break() to breakpoint(). - Converted typing.NamedTuple to dataclasses.dataclass in railroad diagramming code. - Added from __future__ import annotations to clean up some type annotations.
Dirk Mueller2024-10-28 17:01:14 +00:00
b94867e9fb
- update to 3.1.4: * Fix to type annotation that referenced re.Pattern. Since this type was introduced in Python 3.7, using this type definition broke Python 3.6 installs of pyparsing. * Added new Tag ParserElement, for inserting metadata into the parsed results. This allows a parser to add metadata or annotations to the parsed tokens. * The Tag element also accepts an optional value parameter, defaulting to True. See the new tag_metadata.py example in the examples directory. * Fixed issue where PEP8 compatibility names for ParserElement static methods were not themselves defined as staticmethods. When called using a ParserElement instance, this resulted in a TypeError exception. * To address a compatibility issue in RDFLib, added a property setter for the ParserElement.name property, to call ParserElement.set_name. * Modified ParserElement.set_name() to accept a None value, to clear the defined name and corresponding error message for a ParserElement. * Updated railroad diagram generation for ZeroOrMore and OneOrMore expressions with stop_on expressions, while investigating #558 * Added exception type to trace_parse_action exception output, while investigating SO question posted by medihack. * Added set_name calls to internal expressions generated in infix_notation, for improved railroad diagramming.
Dirk Mueller2024-08-31 12:02:09 +00:00
b144ec7f54
- update to 3.1.4: * Fix to type annotation that referenced re.Pattern. Since this type was introduced in Python 3.7, using this type definition broke Python 3.6 installs of pyparsing. * Added new Tag ParserElement, for inserting metadata into the parsed results. This allows a parser to add metadata or annotations to the parsed tokens. * The Tag element also accepts an optional value parameter, defaulting to True. See the new tag_metadata.py example in the examples directory. * Fixed issue where PEP8 compatibility names for ParserElement static methods were not themselves defined as staticmethods. When called using a ParserElement instance, this resulted in a TypeError exception. * To address a compatibility issue in RDFLib, added a property setter for the ParserElement.name property, to call ParserElement.set_name. * Modified ParserElement.set_name() to accept a None value, to clear the defined name and corresponding error message for a ParserElement. * Updated railroad diagram generation for ZeroOrMore and OneOrMore expressions with stop_on expressions, while investigating #558 * Added exception type to trace_parse_action exception output, while investigating SO question posted by medihack. * Added set_name calls to internal expressions generated in infix_notation, for improved railroad diagramming.
Dirk Mueller2024-08-31 12:02:09 +00:00
f0022a47f2
Accepting request 1158443 from devel:languages:python
Ana Guerrero2024-03-18 15:44:11 +00:00
fd8d5f18c8
Accepting request 1158443 from devel:languages:python
Ana Guerrero2024-03-18 15:44:11 +00:00
6f62d9a8ca
- update to 3.1.2: * Added ieee_float expression to pyparsing.common, which parses float values, plus "NaN", "Inf", "Infinity". * Updated pep8 synonym wrappers for better type checking compatibility. * Fixed empty error message bug, PR submitted by InSync (#534). This _should_ return pyparsing's exception messages to a former, more helpful form. If you have code that parses the exception messages returned by pyparsing, this may require some code changes. * Some code refactoring to reduce code nesting, PRs submitted by InSync. * All internal string expressions using '%' string interpolation and str.format() converted to f-strings.
Dirk Mueller2024-03-16 10:02:40 +00:00
d71574550c
- update to 3.1.2: * Added ieee_float expression to pyparsing.common, which parses float values, plus "NaN", "Inf", "Infinity". * Updated pep8 synonym wrappers for better type checking compatibility. * Fixed empty error message bug, PR submitted by InSync (#534). This _should_ return pyparsing's exception messages to a former, more helpful form. If you have code that parses the exception messages returned by pyparsing, this may require some code changes. * Some code refactoring to reduce code nesting, PRs submitted by InSync. * All internal string expressions using '%' string interpolation and str.format() converted to f-strings.
Dirk Mueller2024-03-16 10:02:40 +00:00
3a9ef2c2a2
Accepting request 1149912 from devel:languages:python
Ana Guerrero2024-02-25 13:04:53 +00:00
8dbb6cb977
Accepting request 1149912 from devel:languages:python
Ana Guerrero2024-02-25 13:04:53 +00:00
0a362603c0
Accepting request 1149904 from home:dimstar:Factory
Markéta Machová2024-02-23 12:33:20 +00:00
e7e5897d50
Accepting request 1149904 from home:dimstar:Factory
Markéta Machová2024-02-23 12:33:20 +00:00
b486e54fa3
- update to 3.1.1: * Fixed regression in Word(min), reported by Ricardo Coccioli, good catch! * Fixed bug in bad exception messages raised by Forward * Fixed regression in SkipTo, where ignored expressions were not checked when looking for the target expression. * Fixed type annotation for enable_packrat * Some general internal code cleanup - drop limit-error-messages.patch (upstream) - Add upstream patch limit-error-messages.patch as a part of * Added new class property identifier to all Unicode set classes in pyparsing.unicode, using the class's values for cls.identchars * ParseResults now has a new method deepcopy(), in addition to the * Updated create_diagram()` code to be compatible with - do primary/all split only for tumbleweed (similar to flit-core)
Dirk Mueller2023-12-01 17:07:32 +00:00
2dcf4ed093
- update to 3.1.1: * Fixed regression in Word(min), reported by Ricardo Coccioli, good catch! * Fixed bug in bad exception messages raised by Forward * Fixed regression in SkipTo, where ignored expressions were not checked when looking for the target expression. * Fixed type annotation for enable_packrat * Some general internal code cleanup - drop limit-error-messages.patch (upstream) - Add upstream patch limit-error-messages.patch as a part of * Added new class property identifier to all Unicode set classes in pyparsing.unicode, using the class's values for cls.identchars * ParseResults now has a new method deepcopy(), in addition to the * Updated create_diagram()` code to be compatible with - do primary/all split only for tumbleweed (similar to flit-core)
Dirk Mueller2023-12-01 17:07:32 +00:00
1db5aae19e
- update to 2.4.7: . Each bug with Regex expressions . And expressions not properly constructing with generator . Traceback abbreviation . Bug in delta_time example . Fix regexen in pyparsing_common.real and .sci_real . Avoid FutureWarning on Python 3.7 or later . Cleanup output in runTests if comments are embedded in test string
Dirk Mueller2020-05-05 09:10:51 +00:00
ba8a697302
- update to 2.4.7: . Each bug with Regex expressions . And expressions not properly constructing with generator . Traceback abbreviation . Bug in delta_time example . Fix regexen in pyparsing_common.real and .sci_real . Avoid FutureWarning on Python 3.7 or later . Cleanup output in runTests if comments are embedded in test string
Dirk Mueller2020-05-05 09:10:51 +00:00
8aff5559af
Accepting request 773486 from devel:languages:python
Oliver Kurz
2020-02-14 15:23:24 +00:00
26f860d7d4
Accepting request 773486 from devel:languages:python
Oliver Kurz
2020-02-14 15:23:24 +00:00
cf0acc0212
- update to 2.4.6 * Fixed typos in White mapping of whitespace characters, to use correct "\u" prefix instead of "u". *fix bug in left-associative ternary operators defined using infixNotation. First reported on StackOverflow by user Jeronimo. * Backport of pyparsing_test namespace from 3.0.0, including TestParseResultsAsserts mixin class defining unittest-helper methods: . def assertParseResultsEquals( self, result, expected_list=None, expected_dict=None, msg=None) . def assertParseAndCheckList( self, expr, test_string, expected_list, msg=None, verbose=True) . def assertParseAndCheckDict( self, expr, test_string, expected_dict, msg=None, verbose=True) . def assertRunTestResults( self, run_tests_report, expected_parse_results=None, msg=None) . def assertRaisesParseException(self, exc_type=ParseException, msg=None)
Ondřej Súkup2020-02-11 15:50:39 +00:00
02ac1fdcdd
- update to 2.4.6 * Fixed typos in White mapping of whitespace characters, to use correct "\u" prefix instead of "u". *fix bug in left-associative ternary operators defined using infixNotation. First reported on StackOverflow by user Jeronimo. * Backport of pyparsing_test namespace from 3.0.0, including TestParseResultsAsserts mixin class defining unittest-helper methods: . def assertParseResultsEquals( self, result, expected_list=None, expected_dict=None, msg=None) . def assertParseAndCheckList( self, expr, test_string, expected_list, msg=None, verbose=True) . def assertParseAndCheckDict( self, expr, test_string, expected_dict, msg=None, verbose=True) . def assertRunTestResults( self, run_tests_report, expected_parse_results=None, msg=None) . def assertRaisesParseException(self, exc_type=ParseException, msg=None)
Ondřej Súkup2020-02-11 15:50:39 +00:00