From c7221b92b060da438c82e533a112df1f4bea0e6a81925b29f70ceba2de610ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 23:34:23 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-xmltodict revision 949bfa6909b8f01ee9d7e4ec7a2e85fb --- .gitattributes | 23 ++++++++ python-xmltodict.changes | 115 +++++++++++++++++++++++++++++++++++++ python-xmltodict.spec | 66 +++++++++++++++++++++ skip-tests-expat-245.patch | 28 +++++++++ xmltodict-0.13.0.tar.gz | 3 + 5 files changed, 235 insertions(+) create mode 100644 .gitattributes create mode 100644 python-xmltodict.changes create mode 100644 python-xmltodict.spec create mode 100644 skip-tests-expat-245.patch create mode 100644 xmltodict-0.13.0.tar.gz 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/python-xmltodict.changes b/python-xmltodict.changes new file mode 100644 index 0000000..cf10968 --- /dev/null +++ b/python-xmltodict.changes @@ -0,0 +1,115 @@ +------------------------------------------------------------------- +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..69d9a8e --- /dev/null +++ b/python-xmltodict.spec @@ -0,0 +1,66 @@ +# +# spec file for package python-xmltodict +# +# 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-xmltodict +Version: 0.13.0 +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 setuptools} +BuildRequires: %{python_module xml} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-xml +BuildArch: noarch +BuildRequires: %{python_module pytest} +%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 +%python_build + +%install +export LANG=en_US.UTF-8 +%python_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}-py*.egg-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 = """ +