Sync from SUSE:SLFO:Main python-lark revision 523c4161bd7a695c0515b4ab51732204

This commit is contained in:
Adrian Schröter 2024-05-03 21:22:21 +02:00
commit 8f1d898b5a
4 changed files with 313 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
lark-1.1.5.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

216
python-lark.changes Normal file
View File

@ -0,0 +1,216 @@
-------------------------------------------------------------------
Fri Apr 21 12:27:48 UTC 2023 - Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
-------------------------------------------------------------------
Thu Apr 13 22:42:25 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
-------------------------------------------------------------------
Tue Dec 13 15:41:34 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to v1.1.5
* What's Changed
setup.cfg: Replace deprecated license_file with license_files by @mgorny in #1209
Fix Github shenanigans by @erezsh in #1220
Fix AmbiguousExpander (Issue #1214) by @chanicpanic in #1216
Fix EOF line information in InteractiveParser.resume_parse() by @erezsh in #1224
Use generator instead of list expand or add method by @jmishra01 in #1225
-------------------------------------------------------------------
Fri Dec 2 18:23:05 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to v1.1.4
ci: Python 3.11 final by @henryiii in #1204
Add __all__ to __init__ by @aspizu in #1200
PropagatePositions: Allow any object to carry the metadata,
by returning it in __lark_meta__() by @erezsh in #1203
fix: Token now pattern matches correctly by @marcinplatek in #1181
Updates to merge PR #1151 by @erezsh in #1205
style: pre-commit basic config by @henryiii in #1151
PR for v1.1.4 by @erezsh in #1208
-------------------------------------------------------------------
Fri Oct 28 17:58:49 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to v1.1.3
Various fixes and refactors
* Add user to cache filename; better handle cache load/save failures by @klauer in #1179
* refactor: add 'usedforsecurity=False' arg to hashlib.md5 usage by @cquick01 in #1190
* Create lark/grammars/init.py by @chanicpanic in #1171
* Adjust imports for Python 3.11 by @The-Compiler in #1140
* Fix for issue #1173 by @erezsh in #1198
* Add match stmt support to python.lark by @joseph-e-k in #1123
* Added match stmt support to python.lark by @MegaIng in #1016
* Linting to fix minor issues by @Erotemic in #1128
* Simplify lexer: Use Match.lastgroup instead of lastindex by @erezsh in #1129
* Fix confusing import in examples by @JonasLoos in #1138
* Move iter_subtrees_topdown into standalone by @camgunz in #1137
* Fix 1146: use the class's get instead of the instance's get by @MegaIng in #1147
* fix: remove Python 2 legacy packaging code by @henryiii in #1148
* Fix for PR #1149 by @erezsh in #1150
* Old link for sppf is no longer valid. Point to web archive instead. by @patrickhuber in #1159
* Fix ForestToPyDotVisitor by @chanicpanic in #1167
* Close file-like objects to address ResourceWarning. by @shawnbrown in #1183
* Minor adjustments to PR #1179 by @erezsh in #1189
* Adjustments for PR #1152 by @erezsh in #1191
* Remove trailing whitespace by @bcr in #1196
-------------------------------------------------------------------
Sun Oct 9 10:06:19 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Rename to python-lark
- Update dependencies
- Fix License identifier: LICENSE was changed 6 years ago
-------------------------------------------------------------------
Thu Jul 14 18:24:01 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- BuildRequire pytest >= 6.0.0, to avoid '/home/abuild/rpmbuild/BUILD/lark-1.1.2/pytest.ini:2: requires pytest-6.0, actual pytest-3.10.1'
-------------------------------------------------------------------
Tue May 24 07:13:03 UTC 2022 - Alberto Planas Dominguez <aplanas@suse.com>
- Update to 1.1.2
* Tree instances now have a pretty print with the "rich" library,
when doing rich.print(tree)
* Bugfix for recursive regexes (with the "regex" library)
* Refactors, cleanups, and better mypy support
* Clean up tree templates implementation to reduce mypy errors
* Remove redefinitions related to standalone parser
* Added Tree.rich() method to make Tree a Rich renderable
* Rename lexer_state->lexer_thread, and make a few adjustments for
the benefit of Lark-Cython
* Use isinstance() checks in expcetions match_examples()
* change MAXREPEAT to int
* Tests: Small fixes
- For previous changes check
https://github.com/lark-parser/lark/releases
- Drop Python2 support
-------------------------------------------------------------------
Wed May 26 08:33:40 UTC 2021 - pgajdos@suse.com
- version update to 0.11.3
* lot of changes, see
https://github.com/lark-parser/lark/releases
- removed sources
* testdata.tar.gz (unneeded)
- %check: use %pytest rpm macro
-------------------------------------------------------------------
Fri Jul 3 09:25:30 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Update to 0.9.0
* Added error handling to LALR!
+ on_error option to Lark.parse().
+ Parser now comes with a puppet for advanced error handling.
* Support for better regexps with the regex module, when using
Lark(..., regex=True)
- Update to 0.8.9
* Bugfix for PyInstaller (2) (Fixing the last two releases)
- Update to 0.8.8
* Reverted EOF commit due to unexpected problems.
- Update to 0.8.7
* Bugfix for PyInstaller
- Update to 0.8.6
* Grammar caching: It's now possible to cache the results of the
LALR grammar analysis, for x2 to x3 faster loading. Use
Lark(..., cache=True) or specify a file name.
* Grammar templates: Added support for grammar "functions" that
expand in preprocessing.
* Lark online IDE: Technically not a feature, but it's possible to
run Lark in the browser. Now we also have a simple IDE on github
pages: https://lark-parser.github.io/lark/ide/app.html
* Other changes:
+ Improved performance for large grammars
+ More debug prints when in debug mode
+ Better support for PyInstaller
+ Lots of bugfixes: mypy stubs, v_args, docs, and more.
-------------------------------------------------------------------
Wed Apr 15 10:54:30 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- Update to 0.8.5
* Updated js2py version (for the optional nearley support)
* Added the g_regex_flags option, to allow applying flags to all terminals.
* The standalone parser is now MPL2, instead of GPL. The Mozilla
Public License is much less restrictive, so this shouldn't affect
anyone who's already using the standalone parser. But it should
make it easier for other users to adopt it.
* The biggest change to this release is a new LALR engine, that is
capable of dealing with a few edge cases that the previous parser couldn't.
* Transformers now visit tokens, as well as rules (an alternative to
lexer_callbacks)
-------------------------------------------------------------------
Sun Oct 27 14:28:26 UTC 2019 - Lars Vogdt <lars@linux-schulserver.de>
- Update to 0.7.7:
* Fixed a bug in Earley where running it from different threads
produced bad results
* Improved error reporting when using LALR
* Added 'edit_terminals' option, to allow programmatical manipulation
of terminals, for example to support keywords in different languages.
-------------------------------------------------------------------
Wed Sep 11 13:06:32 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.7.5:
* Lark transformers can now visit tokens as wel
* Fixed long-standing non-determinism and prioritization bugs in Earley.
* Serialize tool now supports multiple start symbols
* iter_subtrees, find_data and find_pred methods are now included in standalone parser
* Bugfixes for the transformer interface, for the custom lexer, for grammar imports, and many more
-------------------------------------------------------------------
Mon Aug 26 13:28:28 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Drop no longer necessary disable_test.patch
- Replace %doc entry docs/ with docs/* to avoid extra sub-directory
- Added Suggests: python-Js2Py for optional runtime dependency
- Update to v0.7.3
* Added a new tool called Serialize, that stores Lark's internal
state as JSON. That will allow for integration with other languages.
* Minor bugfix regarding line-counting and the \s regex
- from v0.7.2
* Lark now allows you to specify the start symbol when calling
Lark.parse() (requires pre-declaration of all possible start states,
see the start option)
* Negative priority now allowed in rules and terminals
* Also includes many minor bugfixes, optimizations, and improvements
to documentation
-------------------------------------------------------------------
Tue May 21 14:06:52 UTC 2019 - pgajdos@suse.com
- version update to 0.7.1
Lark can now serialize its parsers, resulting in simplified stand-alone code.
Bugfix for v_args (Issue #350)
Improvements and bugfixes for importing rules from grammar files
Performance improvement for the reconstructor feature
New Earley implementation with SPPF support
Added support for importing rules between grammars. The import mechanism
is namespace-aware.
Added the maybe_placeholders option, which causes optionals of the form
[expr] to return None when not matched, instead of just not appearing.
(optionals of the form expr? maintain the previous behavior of not
appearing unless matched)
Plenty of bugfixes, better errors, and better docs
-------------------------------------------------------------------
Thu Mar 14 16:41:11 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Trim bias from description.
-------------------------------------------------------------------
Wed Mar 13 15:21:17 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- initial commit
- add disable_test.patch - skip test without needed data

71
python-lark.spec Normal file
View File

@ -0,0 +1,71 @@
#
# spec file for package python-lark
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-lark
Version: 1.1.5
Release: 0
Summary: A parsing library for Python
License: MIT
Group: Development/Languages/Python
URL: https://github.com/lark-parser/lark
Source: https://github.com/lark-parser/lark/archive/%{version}.tar.gz#/lark-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Suggests: python-regex
Suggests: python-Js2Py
Suggests: python-atomicwrites
# SECTION TEST
BuildRequires: %{python_module regex}
BuildRequires: %{python_module Js2Py}
BuildRequires: %{python_module pytest >= 6}
# /SECTION
BuildArch: noarch
# Upstream renamed the package with v0.12.0, SUSE had the old name until 1.1.2
Provides: python-lark-parser = %{version}-%{release}
Obsoletes: python-lark-parser <= 1.1.2
%python_subpackages
%description
Lark is a general-purpose parsing library for Python.
With Lark, one can parse any context-free grammar with little code.
%prep
%setup -q -n lark-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%license LICENSE
%doc README.md docs/*
%{python_sitelib}/lark
%{python_sitelib}/lark-%{version}*-info
%changelog