Blame SOURCES/iterable-import-from-collections.abc.patch

rdobuilder 488013
Description: Iterable import from collections.abc
rdobuilder 488013
 Iterable has moved to collections.abc a long time ago.
rdobuilder 488013
Author: Thomas Goirand <zigo@debian.org>
rdobuilder 488013
Bug-Debian: https://bugs.debian.org/1009460
rdobuilder 488013
Forwarded: no
rdobuilder 488013
Last-Update: 2022-05-01
rdobuilder 488013
rdobuilder 488013
--- python-marathon-0.13.0.orig/marathon/util.py
rdobuilder 488013
+++ python-marathon-0.13.0/marathon/util.py
rdobuilder 488013
@@ -24,7 +24,7 @@ class MarathonJsonEncoder(json.JSONEncod
rdobuilder 488013
         if isinstance(obj, datetime.datetime):
rdobuilder 488013
             return obj.strftime('%Y-%m-%dT%H:%M:%S.%fZ')
rdobuilder 488013
 
rdobuilder 488013
-        if isinstance(obj, collections.Iterable) and not isinstance(obj, str):
rdobuilder 488013
+        if isinstance(obj, collections.abc.Iterable) and not isinstance(obj, str):
rdobuilder 488013
             try:
rdobuilder 488013
                 return {k: self.default(v) for k, v in obj.items()}
rdobuilder 488013
             except AttributeError:
rdobuilder 488013
@@ -44,7 +44,7 @@ class MarathonMinimalJsonEncoder(json.JS
rdobuilder 488013
         if isinstance(obj, datetime.datetime):
rdobuilder 488013
             return obj.strftime('%Y-%m-%dT%H:%M:%S.%fZ')
rdobuilder 488013
 
rdobuilder 488013
-        if isinstance(obj, collections.Iterable) and not isinstance(obj, str):
rdobuilder 488013
+        if isinstance(obj, collections.abc.Iterable) and not isinstance(obj, str):
rdobuilder 488013
             try:
rdobuilder 488013
                 return {k: self.default(v) for k, v in obj.items() if (v or v in (False, 0))}
rdobuilder 488013
             except AttributeError: