Ask Solem преди 13 години
родител
ревизия
94a706708a
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      celery/__compat__.py

+ 2 - 2
celery/__compat__.py

@@ -11,7 +11,7 @@ MODULE_DEPRECATED = """
 The module %s is deprecated and will be removed in a future version.
 """
 
-DEFAULT_ATTRS = frozenset(("__file__", "__path__", "__doc__", "__all__"))
+DEFAULT_ATTRS = set(["__file__", "__path__", "__doc__", "__all__"])
 
 # im_func is no longer available in Py3.
 # instead the unbound method itself can be used.
@@ -121,7 +121,7 @@ class MagicModule(ModuleType):
         return ModuleType.__getattribute__(self, name)
 
     def __dir__(self):
-        return list(set(self.__all__) + DEFAULT_ATTRS)
+        return list(set(self.__all__) | DEFAULT_ATTRS)
 
 
 def create_module(name, attrs, cls_attrs=None, pkg=None,