commit d370c5b785ce567234bad016bd1129644959f04fecca5ece17a440014746ff02 Author: Markéta Machová Date: Thu Jan 23 13:02:18 2025 +0000 Accepting request 1239847 from home:glaubitz:branches:devel:languages:python - Update to 4.7.0 * Fix fragment argument usage (issue #81) * Fix constructors nud() to skip argument check with XP31+ arrow operator (issue #83) OBS-URL: https://build.opensuse.org/request/show/1239847 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-elementpath?expand=0&rev=43 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-elementpath.changes b/python-elementpath.changes new file mode 100644 index 0000000..eec0129 --- /dev/null +++ b/python-elementpath.changes @@ -0,0 +1,248 @@ +------------------------------------------------------------------- +Thu Jan 23 11:40:57 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 4.7.0 + * Fix fragment argument usage (issue #81) + * Fix constructors nud() to skip argument check + with XP31+ arrow operator (issue #83) + +------------------------------------------------------------------- +Mon Oct 28 11:35:48 UTC 2024 - Dirk Müller + +- update to 4.6.0: + * Fix XsdAttributeGroupProtocol + * Improve Unicode support with installable UnicodeData.txt + versions + * Extend names disambiguation with a fix for issue #78 + * Refactor tree builders to fix document position of tails + (issue #79) + * Fix and clean node trees iteration methods (issue #72) + * Fix missing raw string for '[^rn]' (pull request #76) + * Full and more specific type annotations + +------------------------------------------------------------------- +Tue Apr 2 09:45:18 UTC 2024 - Dirk Müller + +- update to 4.4.0: + * Improve stand-alone XPath functions builder (issue #70) + * Update tokens and parsers __repr__ + * Fix static typing protocols to work with etree and XSD elements + * Change the purpose of the evaluation with a dynamic schema + context + * Add a tox.ini testenv with Python 3.13 pre-releases + * Fix dynamic context initialization with lxml a non-root element + (issue #71) + * Fix XP30+ function fn:function-lookup + * Fix XP30+ fn:unparsed-text, fn:unparsed-text-lines and + fn:unparsed-text-available + * Drop support for Python 3.7 + * Add *uri* and *fragment* options to dynamic context + * Make context root node not mandatory (issue #63) + * Add function objects constructor (issue #70) + +------------------------------------------------------------------- +Wed Aug 9 07:43:31 UTC 2023 - Dirk Müller + +- update to 4.1.5: + * Fix typed value of ElementNode() if self.elem.text is None + +------------------------------------------------------------------- +Sat Jul 1 20:32:48 UTC 2023 - Dirk Müller + +- update to 4.1.4: + * Fix select of prefixed names + * Fix zero length *xs:base64Binary* + +------------------------------------------------------------------- +Sun Jun 25 18:47:08 UTC 2023 - Dirk Müller + +- update to 4.1.3: + * Fix XP30+ fn:path + * Fix weak tests + +------------------------------------------------------------------- +Fri May 12 05:56:30 UTC 2023 - Daniel Garcia + +- Remove BuildRequire xmlschema to avoid dependency cycle + +------------------------------------------------------------------- +Wed May 10 09:18:23 UTC 2023 - Daniel Garcia + +- Update to 4.1.2: + * Add support for Python 3.12 + * Fix self shortcut operator (adding is_schema_node() to node classes) +- 4.1.1: + * Simplify type annotations for XSD datatypes + * Full test coverage of sequence type functions with bugfixes +- 4.1.0: + * Refactor XPath function call (context=None only as keyword argument) + * Add external function support (issue #60) + * Some fixes to string representation and source property of tokens + * Extend documentation and tests + * Clean XSD datatypes hierarchy +- 4.0.1: + * Fix packaging: include py.typed in package data + * Revert to comparison between xs:QName instances and strings + * Fix atomization with XSD typed data (list types have to be atomized) +- 4.0.0: + * First XPath 3.1 implementation (without UCA collation support) + +------------------------------------------------------------------- +Fri Apr 21 12:24:39 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Tue Sep 27 19:18:01 UTC 2022 - Yogalakshmi Arunachalam + +- update to v3.0.2 (2022-08-12) + * Extend root concept to subtrees used as root (e.g. XSD 1.1 assertions) + * Begin XPath 3.1 implementation adding XPathMap and XPathArray +- update to v3.0.1 (2022-07-23) + * Fix of descendant path operator (issue #51) + * Add support for Python 3.11 +- update to v3.0.0 (2022-07-16) + * Transition to full XPath node implementation (more memory usage but better control and overall faster) + * Add etree.py module with a safe XML parser (ported from xmlschema) + +------------------------------------------------------------------- +Sat Jun 4 14:00:38 UTC 2022 - Dirk Müller + +- update to 2.5.3: + * Fix unary path step operator (issue #46) + * Fix sphinx warnings *'reference target not found'* (issue #45) + * Include PR #43 with fixes for `XPathContext.iter_siblings()` (issues #42 and #44) + * Fix for failed floats equality tests (issue #41) + * Static typing tested with mypy==0.950 + +------------------------------------------------------------------- +Sat Mar 26 21:23:23 UTC 2022 - Dirk Müller + +- update to 2.5.0: + * Add XPath 3.0 support + * Better use of lxml.etree features + * Full coverage of W3C tests + * Drop support for Python 3.6 + +------------------------------------------------------------------- +Mon Nov 29 11:24:07 UTC 2021 - Dirk Müller + +- update to 2.4.0: + * Fix type annotations and going strict on parsers and other public classes + * Add XPathConstructor token class (subclass of XPathFunction) + * Last release for Python 3.6 + +------------------------------------------------------------------- +Sat Oct 16 21:51:48 UTC 2021 - Dirk Müller + +- update to 2.3.2: + * Make ElementProtocol and LxmlElementProtocol runtime checkable + * Type annotations for all package public APIs + * Add LxmlElementProtocol + * Add pytest env to tox.ini (test issue #39) + * Add inline type annotations check support + * Add structural Protocol based type checks + * Add Python 3.10 in Tox and CI tests + * Apply __slots__ to TDOP and regex classes + +------------------------------------------------------------------- +Tue May 18 21:45:12 UTC 2021 - Dirk Müller + +- update to 2.2.2: + * Fix issue sissaschool/xmlschema#243 (assert with xsi:nil usage) + * First implementation of XPath 3.0 fn:format-integer + * Add function signatures at token registration + * Some fixes to XPath tokens and more XPath 3.0 implementations + * Optimize TDOP parser's tokenizer + * Resolve ambiguities with operators and statements that are also names + * Merge with XPath 3.0/3.1 develop (to be completed) + * Add tests and apply small fixes to TDOP parser + * Fix wildcard selection of attributes (issue #35) + +------------------------------------------------------------------- +Mon Feb 1 22:10:01 UTC 2021 - Dirk Müller + +- update to 2.1.3: + * Extend tests for XPath 2.0 with minor fixes + * Fix fn:round-half-to-even (issue #33) + * Extend tests for XPath 1.0/2.0 with minor fixes + * Fix for +/- prefix operators + * Fix for regex patterns anchors and binary datatypes + * Fix for issue #32 (test failure on missing locale setting) + * Extend tests for XPath 1.0 with minor fixes + * Create custom class hierarchy for XPath nodes that replaces named-tuples + * Bind attribute nodes, text nodes and namespace nodes to parent element (issue #31) + * Increase the speed of path step selection on large trees + * More tests and small fixes to XSD builtin datatypes + +------------------------------------------------------------------- +Mon Nov 9 15:01:31 UTC 2020 - Matej Cepl + +- Update to 2.0.4: + * Lazy tokenizer for parser classes in order to minimize import time + +------------------------------------------------------------------- +Wed Oct 7 04:05:09 UTC 2020 - Steve Kowalik + +- Update to 2.0.3: + * Fix context handling in cycle statements + * Change constructor's label to 'constructor function' + * Add regex translator to package API + * More than 99% of W3C XPath 2.0 tests pass + * Add regex transpiler (for XPath/XQuery and XML Schema regular expressions) + * Hotfix for issue #30 + * Extensive testing with W3C XPath 2.0 tests (~98% passed) + * Split context variables from in-scope variables (types) + * Add other XSD builtin atomic types + +------------------------------------------------------------------- +Wed Jun 24 03:51:04 UTC 2020 - Steve Kowalik + +- Update to 1.4.6: + * Fix XPathContext to let the subclasses replace the XPath nodes iterator function + * Fix tokenizer and parsers for ambiguities between symbols and names + * Improve XPath context and axes processing + * Integrate pull requests and fix bug on predicate selector + +------------------------------------------------------------------- +Mon Apr 6 08:06:45 UTC 2020 - Marketa Calabkova + +- update to 1.4.3 + * Fix PyPy 3 tests on xs:base64Binary and xs:hexBinary + * Separated the tests of schema proxy API and other schemas based tests + * Multiple XSD type associations on a token + * Extend xs:untypedAtomic type usage + * Increase the tests coverage to 95% + +------------------------------------------------------------------- +Thu Feb 6 10:53:28 UTC 2020 - Marketa Calabkova + +- update to 1.4.1 + * Remove Python 2 support + * Add TextNode node type + * fixed: test_datatypes.(Duration|Timezone)TypesTest.test_hashing fails on 32bit arches + +------------------------------------------------------------------- +Wed Oct 30 12:32:22 UTC 2019 - Tomáš Chvátal + +- Update to 1.3.1: + * Improved schema proxy + * Improved XSD type matching using paths + * Cached parent path for XPathContext (only Python 3) + * Improve typed selection with TypedAttribute and TypedElement named-tuples + * Add iter_results to XPathContext + * Remove XMLSchemaProxy from package + * Fix descendant shortcut operator '//' + * Fix text() function + * Fix typed select of '(name)' token + * Fix 24-hour time for DateTime + +------------------------------------------------------------------- +Mon Sep 9 18:33:40 UTC 2019 - Tomáš Chvátal + +- Skip test_hashing to fix 32bit builds + +------------------------------------------------------------------- +Mon Sep 9 14:24:09 UTC 2019 - Tomáš Chvátal + +- Initial commit needed by python-xmlschema diff --git a/python-elementpath.spec b/python-elementpath.spec new file mode 100644 index 0000000..5ae9224 --- /dev/null +++ b/python-elementpath.spec @@ -0,0 +1,70 @@ +# +# spec file for package python-elementpath +# +# Copyright (c) 2025 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-elementpath +Version: 4.7.0 +Release: 0 +Summary: XPath 1.0/20 parsers and selectors for ElementTree and lxml +License: MIT +URL: https://github.com/sissaschool/elementpath +Source: https://github.com/sissaschool/elementpath/archive/v%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module lxml} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +The proposal of this package is to provide XPath 1.0 and 2.0 selectors for Python's ElementTree XML +data structures, both for the standard ElementTree library and for the +`lxml.etree `_ library. + +%prep +%setup -q -n elementpath-%{version} +# avoid cycle between us and xmlschema +rm tests/test_schema_proxy.py + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# test_compare_strings_function depends on LOCALE to produce proper results +donttest="test_compare_strings_function" +# test_hashing is arch specific and overflows on 32bit platforms +donttest+=" or test_hashing" +# tests that depends on xmlschema so ignore it to +# avoid dependency cycle +donttest+=" or test_validate_analyzed_string" +donttest+=" or test_validate_json_to_xml" +%pytest -k "not ($donttest)" + +%files %{python_files} +%doc CHANGELOG.rst README.rst +%license LICENSE +%{python_sitelib}/elementpath +%{python_sitelib}/elementpath-%{version}*-info + +%changelog diff --git a/v4.4.0.tar.gz b/v4.4.0.tar.gz new file mode 100644 index 0000000..ea6d1b6 --- /dev/null +++ b/v4.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb1392e6cc7e16fcecc10d048fdd1d635bac3616c75e4de6fb1a6c637e45dde8 +size 330589 diff --git a/v4.6.0.tar.gz b/v4.6.0.tar.gz new file mode 100644 index 0000000..9acd441 --- /dev/null +++ b/v4.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:949c497f6d39435b2aa7881c0259afa79a8da1e281926135ef3afae38f4cfc2a +size 355664 diff --git a/v4.7.0.tar.gz b/v4.7.0.tar.gz new file mode 100644 index 0000000..b37e768 --- /dev/null +++ b/v4.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca8ff7f783d7af9468ba92d49917d127100ba236277e839e08dff27ae2ba5975 +size 356888