commit a0b7635925a35e351ab7a7cc88a37a78d4abb0cdc981761239ea335623ad62b5 Author: Dirk Mueller Date: Tue Oct 29 17:03:36 2024 +0000 - Update to version 0.14.2 * Revert "Ensure significant whitespace is not trimmed" This changed was backwards incompatible and caused downstream issues. - Update to version 0.14.1 * Drop support for Python older than 3.6 * Additional ruff/Pyflakes/codespell fixes. - Update to version 0.14.0 * Drop old Python 2 support leftover code and apply several RUFF code health fixes. * Add Python 3.11, 3.12 and 3.13 support and tests. * Remove defusedexpat import. * Replace deprecated BadZipfile with BadZipFile. * Support indent using integer format, enable python -m unittest tests/*.py. * Ensure significant whitespace is not trimmed * added conda installation command * fix attributes not appearing in streaming mode OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmltodict?expand=0&rev=24 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-xmltodict.changes b/python-xmltodict.changes new file mode 100644 index 0000000..f5b2b2b --- /dev/null +++ b/python-xmltodict.changes @@ -0,0 +1,142 @@ +------------------------------------------------------------------- +Tue Oct 29 16:11:13 UTC 2024 - Martin Hauke + +- Update to version 0.14.2 + * Revert "Ensure significant whitespace is not trimmed" + This changed was backwards incompatible and caused downstream + issues. +- Update to version 0.14.1 + * Drop support for Python older than 3.6 + * Additional ruff/Pyflakes/codespell fixes. +- Update to version 0.14.0 + * Drop old Python 2 support leftover code and apply several RUFF + code health fixes. + * Add Python 3.11, 3.12 and 3.13 support and tests. + * Remove defusedexpat import. + * Replace deprecated BadZipfile with BadZipFile. + * Support indent using integer format, + enable python -m unittest tests/*.py. + * Ensure significant whitespace is not trimmed + * added conda installation command + * fix attributes not appearing in streaming mode + +------------------------------------------------------------------- +Mon Feb 12 15:02:30 UTC 2024 - Matej Cepl + +- Clean up the SPEC file. + +------------------------------------------------------------------- +Tue May 9 13:41:52 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Sun Jun 19 17:47:26 UTC 2022 - Dirk Müller + +- update to 0.13.0: + * Add install info to readme for openSUSE. (#205) + * Support defaultdict for namespace mapping (#211) + * parse(generator) is now possible (#212) + * Processing comments on parsing from xml to dict (connected to #109) (#221) + * Add expand_iter kw to unparse to expand iterables (#213) + * Fixed some typos + * Add support for python3.8 + * Drop Jython/Python 2 and add Python 3.9/3.10. + * Drop OrderedDict in Python >= 3.7 + * Do not use len() to determine if a sequence is empty + * Add more namespace attribute tests + * Fix encoding issue in setup.py + +------------------------------------------------------------------- +Tue Feb 22 10:27:36 UTC 2022 - Steve Kowalik + +- Add patch skip-tests-expat-245.patch: + * Do not run tests that make no sense with a current Expat. + +------------------------------------------------------------------- +Fri May 29 10:34:50 UTC 2020 - Marketa Calabkova + +- Replace nose with pytest + +------------------------------------------------------------------- +Sat Apr 6 00:00:15 UTC 2019 - John Vandenberg + +- Add export LANG=en_US.UTF-8 to fix Leap builds + +------------------------------------------------------------------- +Tue Mar 26 12:20:55 UTC 2019 - Jan Engelhardt + +- Use noun phrase in summary. + +------------------------------------------------------------------- +Tue Mar 26 11:02:52 UTC 2019 - pgajdos@suse.com + +- version update to 0.12.0 + * Allow force_commits=True for getting all keys as lists (#204) + * README.md: fix useless uses of cat (#200) + * Add FreeBSD install instructions (#199) + * Fix and simplify travis config (#192) + * Add support for Python 3.7 (#189) + * Drop support for EOL Python (#191) + * Use Markdown long_description on PyPI (#190) + * correct spelling mistake (#165) + * correctly unparse booleans (#180) + * Updates README.md with svg badge + +------------------------------------------------------------------- +Tue Dec 4 12:56:17 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Thu May 18 15:01:55 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version +- Fix source URL. +- Update to version 0.11.0 + * Determine fileness by checking for read attr + * Add support for Python 3.6. + * Release as a universal wheel. + * Updated docs examples to use print function. + * unparse: pass short_empty_elements to XMLGenerator + * Added namespace support when unparsing. + +------------------------------------------------------------------- +Tue Sep 6 07:25:55 UTC 2016 - mardnh@gmx.de + +- update to version 0.10.2 + + Fixed defusedexpat expat import. +- v0.10.1 + + Use defusedexpat if available. + + Allow non-string attributes in unparse. + + Add postprocessor support for attributes. + + Make command line interface Python 3-compatible. +- v0.10.0 + + Add force_list feature. + + Add support for Python 3.4 and 3.5. + + Performance optimization: use list instead of string for CDATA. + + Include Arch Linux package instructions in README. + + Improved documentation. + + Allow any iterable in unparse, not just lists. + + Bugfix: Process namespaces in attributes too. + + Better testing under Python 2.6. +- v0.9.2 + + Fix multiroot check for list values +- v0.9.1 + + Only check single root when full_document=True + +------------------------------------------------------------------- +Thu Nov 27 14:46:28 UTC 2014 - boris@steki.net + +- add python-xml to all *suse distributions as SLE 12 requires it too + +------------------------------------------------------------------- +Mon Nov 3 13:45:57 UTC 2014 - boris@steki.net + +- add python-xml to requires to enable SLE build + +------------------------------------------------------------------- +Wed Sep 10 12:48:51 UTC 2014 - boris@steki.net + +- initial packaging of 0.9.0 version + diff --git a/python-xmltodict.spec b/python-xmltodict.spec new file mode 100644 index 0000000..f4e4d1c --- /dev/null +++ b/python-xmltodict.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-xmltodict +# +# Copyright (c) 2024 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-xmltodict +Version: 0.14.2 +Release: 0 +Summary: Module to make XML working resemble JSON +License: MIT +URL: https://github.com/martinblech/xmltodict +Source: https://files.pythonhosted.org/packages/source/x/xmltodict/xmltodict-%{version}.tar.gz +Patch0: skip-tests-expat-245.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: %{python_module xml} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-xml +BuildArch: noarch +%python_subpackages + +%description +xmltodict is a Python module that makes working with XML feel like you are +working with json, as in this: +http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html + +%prep +%autosetup -p1 -n xmltodict-%{version} +sed -i '1{\@^#!%{_bindir}/env python@d}' xmltodict.py + +%build +export LANG=en_US.UTF-8 +%pyproject_wheel + +%install +export LANG=en_US.UTF-8 +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export LANG=en_US.UTF-8 +%pytest + +%files %{python_files} +%license LICENSE +%doc README.md +%{python_sitelib}/xmltodict.py* +%pycache_only %{python_sitelib}/__pycache__/xmltodict.*.py* +%{python_sitelib}/xmltodict-%{version}*-info + +%changelog diff --git a/skip-tests-expat-245.patch b/skip-tests-expat-245.patch new file mode 100644 index 0000000..30170bf --- /dev/null +++ b/skip-tests-expat-245.patch @@ -0,0 +1,28 @@ +Index: xmltodict-0.12.0/tests/test_xmltodict.py +=================================================================== +--- xmltodict-0.12.0.orig/tests/test_xmltodict.py ++++ xmltodict-0.12.0/tests/test_xmltodict.py +@@ -8,6 +8,7 @@ except ImportError: + + from xml.parsers.expat import ParserCreate + from xml.parsers import expat ++import pyexpat + + + def _encode(s): +@@ -167,6 +168,7 @@ class XMLToDictTestCase(unittest.TestCas + self.assertEqual(parse(xml), + parse(xml.encode('utf-8'))) + ++ @unittest.skipIf(pyexpat.version_info >= (2, 4, 5), reason="Makes no sense with current Expat") + def test_namespace_support(self): + xml = """ + = (2, 4, 5), reason="Makes no sense with current Expat") + def test_namespace_collapse(self): + xml = """ +