Sync from SUSE:SLFO:Main python-munch revision 1efd945ed96da7bdc597deb41607b074

This commit is contained in:
Adrian Schröter 2024-12-13 11:47:19 +01:00
parent cc6bde86b6
commit 0d2be08e5c
5 changed files with 73 additions and 11 deletions

View File

@ -0,0 +1,29 @@
From 84651ee872f9ea6dbaed986fd3818202933a8b50 Mon Sep 17 00:00:00 2001
From: Karolina Surma <ksurma@redhat.com>
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)

BIN
munch-2.5.0.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
munch-4.0.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Tue Jul 30 11:14:38 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- 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 <dmueller@suse.com>
- 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 <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-munch
#
# Copyright (c) 2023 SUSE LLC
# 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
@ -16,24 +16,24 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-munch
Version: 2.5.0
Version: 4.0.0
Release: 0
Summary: A dot-accessible dictionary
License: MIT
Group: Development/Languages/Python
URL: http://github.com/Infinidat/munch
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
Requires: python-six
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module six}
BuildRequires: %{python_module pytest}
# /SECTION
%python_subpackages
@ -41,7 +41,7 @@ BuildRequires: %{python_module six}
A dot-accessible dictionary (a la JavaScript objects).
%prep
%setup -q -n munch-%{version}
%autosetup -p1 -n munch-%{version}
%build
%python_build
@ -50,9 +50,13 @@ A dot-accessible dictionary (a la JavaScript objects).
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%license LICENSE.txt
%doc README.md
%{python_sitelib}/*
%{python_sitelib}/munch
%{python_sitelib}/munch-*.egg-info
%changelog