From e00eaa18b91b40258b2b51c67d8fa76b2cff799e9aaebf1740954630b50e5774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 30 Jul 2024 20:05:50 +0000 Subject: [PATCH] Accepting request 1190456 from home:glaubitz:branches:devel:languages:python - Cherry-pick upstream patch to adjust tests for Python 3.13 * adjust-tests-for-python3.13.patch OBS-URL: https://build.opensuse.org/request/show/1190456 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-munch?expand=0&rev=15 --- .gitattributes | 23 +++++++++ .gitignore | 1 + adjust-tests-for-python3.13.patch | 29 +++++++++++ munch-4.0.0.tar.gz | 3 ++ python-munch.changes | 80 +++++++++++++++++++++++++++++++ python-munch.spec | 62 ++++++++++++++++++++++++ 6 files changed, 198 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 adjust-tests-for-python3.13.patch create mode 100644 munch-4.0.0.tar.gz create mode 100644 python-munch.changes create mode 100644 python-munch.spec 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/adjust-tests-for-python3.13.patch b/adjust-tests-for-python3.13.patch new file mode 100644 index 0000000..8685b29 --- /dev/null +++ b/adjust-tests-for-python3.13.patch @@ -0,0 +1,29 @@ +From 84651ee872f9ea6dbaed986fd3818202933a8b50 Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Wed, 5 Jun 2024 09:49:49 +0200 +Subject: [PATCH] Adjust tests for Python 3.13 + +--- + tests/test_munch.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/tests/test_munch.py b/tests/test_munch.py +index c80b757..5886fdd 100644 +--- a/tests/test_munch.py ++++ b/tests/test_munch.py +@@ -225,6 +225,15 @@ def test_reserved_attributes(attrname): + assert attr == 'munch' + elif attrname == '__dict__': + assert attr == {} ++ elif attrname == '__static_attributes__': ++ # Python 3.13: added __static_attributes__ attribute, populated by the ++ # compiler, containing a tuple of names of attributes of this class ++ # which are accessed through self.X from any function in its body. ++ assert isinstance(attr, tuple) ++ elif attrname == '__firstlineno__': ++ # Python 3.13: added __firstlineno__ attribute, populated by the ++ # compiler, containing the line number of the first line of the class definition ++ assert isinstance(attr, int) + else: + assert callable(attr) + diff --git a/munch-4.0.0.tar.gz b/munch-4.0.0.tar.gz new file mode 100644 index 0000000..e1a3e2e --- /dev/null +++ b/munch-4.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:542cb151461263216a4e37c3fd9afc425feeaf38aaa3025cd2a981fadb422235 +size 19089 diff --git a/python-munch.changes b/python-munch.changes new file mode 100644 index 0000000..8fbae1c --- /dev/null +++ b/python-munch.changes @@ -0,0 +1,80 @@ +------------------------------------------------------------------- +Tue Jul 30 11:14:38 UTC 2024 - John Paul Adrian Glaubitz + +- Cherry-pick upstream patch to adjust tests for Python 3.13 + * adjust-tests-for-python3.13.patch + +------------------------------------------------------------------- +Sun Dec 17 01:56:59 UTC 2023 - Dirk Müller + +- update to 4.0.0: + * Remove six dependency +- drop python-munch-no-six.patch (upstream) + +------------------------------------------------------------------- +Thu Jun 8 14:12:23 UTC 2023 - pgajdos@suse.com + +- version update to 3.0.0 + * Fix munchify for tuples of lists + * Require Python >=3.6 and upgrade syntax - thanks @EwoutH + * Update __init__.py to work with non standard version - thanks @mboisson + * Allow importing even when VERSION read fails - thanks @mdornseif and @dangillet + * Add imports to README + * replace pkg_resources with importlib.metadata - thanks @dhellmann + * Added RecursiveMunch object - thanks @GuillaumeRochette +- added patches + fix https://github.com/Infinidat/munch/issues/96 + + python-munch-no-six.patch +- test package + +------------------------------------------------------------------- +Fri Apr 21 12:28:20 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:42:39 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Dec 20 19:20:53 UTC 2019 - Dirk Mueller + +- update to 2.5.0: + * Support fromJSON classmethod for all Munch subclasses + * Fix DefaultMunch/DefaultFactoryMunch return value for get method (fixes #53) + * Support fromYAML classmethod for all Munch subclasses (fixes #34) + +------------------------------------------------------------------- +Thu Dec 6 05:40:17 UTC 2018 - Thomas Bechtold + +update to version 2.3.2: + * Add __dict__ property that calls toDict() + * Limit travis deployment conditions + * Implement the pickling interface + * Use flat dicts in __getstate__ (closes #30) + * Ignore pytest cache + * __setattr__ will now munchify() any provided dict + * AutoMunch for automatically converting dicts to Munches + * Drop support for 2.6, 3.3, 3.4 + * Build python wheels + * Avoid running yaml tests when in no-deps environment + * Drop support for Python 2.6, 3.3, 3.4 + * Fix lint in init + * Ignore flycheck files + * Drop the dot in pytest invocation + * Clear and update dict + * Make DefaultFactoryMunch which lets users provide a factory to + generate missing values + * Bump version + * Remove default from constructor and fromDict. Also add a test for repr + +------------------------------------------------------------------- +Tue Dec 4 12:50:36 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Mon Feb 12 08:37:50 UTC 2018 - tbechtold@suse.com + +- Initial packaging (version 2.2.0) diff --git a/python-munch.spec b/python-munch.spec new file mode 100644 index 0000000..69a3792 --- /dev/null +++ b/python-munch.spec @@ -0,0 +1,62 @@ +# +# spec file for package python-munch +# +# 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-munch +Version: 4.0.0 +Release: 0 +Summary: A dot-accessible dictionary +License: MIT +Group: Development/Languages/Python +URL: https://github.com/Infinidat/munch +Source: https://files.pythonhosted.org/packages/source/m/munch/munch-%{version}.tar.gz +# PATCH-FIX-UPSTREAM - gh/Infinidat/munch#104 - Adjust tests for Python 3.13 +Patch: https://patch-diff.githubusercontent.com/raw/Infinidat/munch/pull/104.patch#/adjust-tests-for-python3.13.patch +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +A dot-accessible dictionary (a la JavaScript objects). + +%prep +%autosetup -p1 -n munch-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%files %{python_files} +%license LICENSE.txt +%doc README.md +%{python_sitelib}/munch +%{python_sitelib}/munch-*.egg-info + +%changelog