Accepting request 1133681 from devel:languages:python
- update to 4.0.0: * Remove six dependency - drop python-munch-no-six.patch (upstream) OBS-URL: https://build.opensuse.org/request/show/1133681 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-munch?expand=0&rev=6
This commit is contained in:
commit
4bb1144498
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5284603030c00906d9d64d8108728c004fbeb91fc1c1e4caca342bc48f2a6dfd
|
|
||||||
size 19276
|
|
BIN
munch-4.0.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
munch-4.0.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
Thu Jun 8 14:12:23 UTC 2023 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -18,15 +18,13 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-munch
|
Name: python-munch
|
||||||
Version: 3.0.0
|
Version: 4.0.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A dot-accessible dictionary
|
Summary: A dot-accessible dictionary
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/Infinidat/munch
|
URL: https://github.com/Infinidat/munch
|
||||||
Source: https://files.pythonhosted.org/packages/source/m/munch/munch-%{version}.tar.gz
|
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 pbr}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
Loading…
Reference in New Issue
Block a user