From c6139b3fa3f44559f0e7e8890b0f29af2b5c9abb5fad1e55648c3b6c16f76ab1 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 17 Dec 2023 01:57:37 +0000 Subject: [PATCH] - update to 4.0.0: * Remove six dependency - drop python-munch-no-six.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-munch?expand=0&rev=13 --- munch-3.0.0.tar.gz | 3 -- munch-4.0.0.tar.gz | 3 ++ python-munch-no-six.patch | 104 -------------------------------------- python-munch.changes | 7 +++ python-munch.spec | 4 +- 5 files changed, 11 insertions(+), 110 deletions(-) delete mode 100644 munch-3.0.0.tar.gz create mode 100644 munch-4.0.0.tar.gz delete mode 100644 python-munch-no-six.patch diff --git a/munch-3.0.0.tar.gz b/munch-3.0.0.tar.gz deleted file mode 100644 index a612701..0000000 --- a/munch-3.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5284603030c00906d9d64d8108728c004fbeb91fc1c1e4caca342bc48f2a6dfd -size 19276 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-no-six.patch b/python-munch-no-six.patch deleted file mode 100644 index 645369c..0000000 --- a/python-munch-no-six.patch +++ /dev/null @@ -1,104 +0,0 @@ -Index: munch-3.0.0/munch/__init__.py -=================================================================== ---- munch-3.0.0.orig/munch/__init__.py -+++ munch-3.0.0/munch/__init__.py -@@ -21,8 +21,6 @@ - converted via Munch.to/fromDict(). - """ - --from .python3_compat import iterkeys, iteritems, Mapping, u -- - try: - # For python 3.8 and later - import importlib.metadata as importlib_metadata -@@ -35,6 +33,7 @@ except importlib_metadata.PackageNotFoun - # package is not installed - __version__ = "0.0.0" - -+from collections.abc import Mapping - - try: - VERSION = tuple(map(int, __version__.split('+')[0].split('.')[:3])) -@@ -205,7 +204,7 @@ class Munch(dict): - return f'{self.__class__.__name__}({dict.__repr__(self)})' - - def __dir__(self): -- return list(iterkeys(self)) -+ return list(self.keys()) - - def __getstate__(self): - """ Implement a serializable interface used for pickling. -@@ -244,7 +243,7 @@ class Munch(dict): - Override built-in method to call custom __setitem__ method that may - be defined in subclasses. - """ -- for k, v in iteritems(dict(*args, **kwargs)): -+ for k, v in dict(*args, **kwargs).items(): - self[k] = v - - def get(self, k, d=None): -@@ -475,7 +474,7 @@ def munchify(x, factory=Munch): - # Here we finish munchifying the parts of obj that were deferred by pre_munchify because they - # might be involved in a cycle - if isinstance(obj, Mapping): -- partial.update((k, munchify_cycles(obj[k])) for k in iterkeys(obj)) -+ partial.update((k, munchify_cycles(obj[k])) for k in obj.keys()) - elif isinstance(obj, list): - partial.extend(munchify_cycles(item) for item in obj) - elif isinstance(obj, tuple): -@@ -537,7 +536,7 @@ def unmunchify(x): - # Here we finish unmunchifying the parts of obj that were deferred by pre_unmunchify because they - # might be involved in a cycle - if isinstance(obj, Mapping): -- partial.update((k, unmunchify_cycles(obj[k])) for k in iterkeys(obj)) -+ partial.update((k, unmunchify_cycles(obj[k])) for k in obj.keys()) - elif isinstance(obj, list): - partial.extend(unmunchify_cycles(v) for v in obj) - elif isinstance(obj, tuple): -@@ -626,15 +625,15 @@ try: - >>> yaml.dump(b, default_flow_style=True) - '!munch.Munch {foo: [bar, !munch.Munch {lol: true}], hello: 42}\\n' - """ -- return dumper.represent_mapping(u('!munch.Munch'), data) -+ return dumper.represent_mapping('!munch.Munch', data) - - for loader_name in ("BaseLoader", "FullLoader", "SafeLoader", "Loader", "UnsafeLoader", "DangerLoader"): - LoaderCls = getattr(yaml, loader_name, None) - if LoaderCls is None: - # This code supports both PyYAML 4.x and 5.x versions - continue -- yaml.add_constructor(u('!munch'), from_yaml, Loader=LoaderCls) -- yaml.add_constructor(u('!munch.Munch'), from_yaml, Loader=LoaderCls) -+ yaml.add_constructor('!munch', from_yaml, Loader=LoaderCls) -+ yaml.add_constructor('!munch.Munch', from_yaml, Loader=LoaderCls) - - SafeRepresenter.add_representer(Munch, to_yaml_safe) - SafeRepresenter.add_multi_representer(Munch, to_yaml_safe) -Index: munch-3.0.0/munch/python3_compat.py -=================================================================== ---- munch-3.0.0.orig/munch/python3_compat.py -+++ /dev/null -@@ -1,6 +0,0 @@ --from six import u, iteritems, iterkeys # pylint: disable=unused-import --try: -- from collections.abc import Mapping # pylint: disable=unused-import --except ImportError: -- # Legacy Python -- from collections.abc import Mapping # pylint: disable=unused-import -Index: munch-3.0.0/munch.egg-info/requires.txt -=================================================================== ---- munch-3.0.0.orig/munch.egg-info/requires.txt -+++ munch-3.0.0/munch.egg-info/requires.txt -@@ -1,5 +1,3 @@ --six -- - [:(python_version<'3.8')] - importlib_metadata>=1.7.0 - -Index: munch-3.0.0/requirements.txt -=================================================================== ---- munch-3.0.0.orig/requirements.txt -+++ munch-3.0.0/requirements.txt -@@ -1,2 +1 @@ --six - importlib_metadata>=1.7.0;python_version<'3.8' # Apache-2.0 diff --git a/python-munch.changes b/python-munch.changes index ae0bec1..0a53251 100644 --- a/python-munch.changes +++ b/python-munch.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +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 diff --git a/python-munch.spec b/python-munch.spec index f7cd5ae..5fdce60 100644 --- a/python-munch.spec +++ b/python-munch.spec @@ -18,15 +18,13 @@ %{?sle15_python_module_pythons} Name: python-munch -Version: 3.0.0 +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 -# https://github.com/Infinidat/munch/issues/96 -Patch0: python-munch-no-six.patch BuildRequires: %{python_module pbr} BuildRequires: %{python_module setuptools} BuildRequires: fdupes