Package: python-taskflow / 4.5.0-3

remove-bad-enum.py-calls.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Description: Remove bad enum.py calls
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Bug-Debian: https://bugs.debian.org/910447
Last-Update: 2018-10-07

--- python-taskflow-3.2.0.orig/taskflow/utils/misc.py
+++ python-taskflow-3.2.0/taskflow/utils/misc.py
@@ -50,13 +50,6 @@ _SCHEME_REGEX = re.compile(r"^([A-Za-z][
 class StrEnum(str, enum.Enum):
     """An enumeration that is also a string and can be compared to strings."""
 
-    def __new__(cls, *args, **kwargs):
-        for a in args:
-            if not isinstance(a, str):
-                raise TypeError("Enumeration '%s' (%s) is not"
-                                " a string" % (a, type(a).__name__))
-        return super(StrEnum, cls).__new__(cls, *args, **kwargs)
-
 
 class StringIO(six.StringIO):
     """String buffer with some small additions."""