]> git.pld-linux.org Git - packages/python-slip.git/blame - python-slip-collections_abc.patch
rebuild with tests and docs
[packages/python-slip.git] / python-slip-collections_abc.patch
CommitLineData
a734686f
JB
1--- python-slip-0.6.5/slip/dbus/polkit.py.orig 2017-05-16 12:14:36.000000000 +0200
2+++ python-slip-0.6.5/slip/dbus/polkit.py 2021-07-03 19:34:39.676622157 +0200
3@@ -26,7 +26,7 @@
4
5 from __future__ import absolute_import
6
7-import collections
8+from six.moves import collections_abc
9 import dbus
10 from decorator import decorator
11 from functools import reduce
12@@ -103,14 +103,14 @@
13 def some_method(self, ...):
14 ..."""
15
16- assert(func is None or isinstance(func, collections.Callable))
17+ assert(func is None or isinstance(func, collections_abc.Callable))
18
19 assert(
20 authfail_result in (None, AUTHFAIL_DONTCATCH) or
21 authfail_exception is None)
22 assert(
23 authfail_callback is None or
24- isinstance(authfail_callback, collections.Callable))
25+ isinstance(authfail_callback, collections_abc.Callable))
26 assert(
27 authfail_exception is None or
28 issubclass(authfail_exception, Exception))
29--- python-slip-0.6.5/slip/util/hookable.py.orig 2017-05-16 12:14:36.000000000 +0200
30+++ python-slip-0.6.5/slip/util/hookable.py 2021-07-03 19:35:20.166402805 +0200
31@@ -23,7 +23,7 @@
32 """This module contains variants of certain base types which call registered
33 hooks on changes."""
34
35-import collections
36+from six.moves import collections_abc
37 from six import with_metaclass
38
39 __all__ = ["Hookable", "HookableSet"]
40@@ -67,7 +67,7 @@
41
42 def __init__(self, hook, args, kwargs, hookable=None):
43
44- assert(isinstance(hook, collections.Callable))
45+ assert(isinstance(hook, collections_abc.Callable))
46 assert(isinstance(hookable, Hookable))
47
48 for n, x in enumerate(args):
49@@ -174,7 +174,7 @@
50 self.__add_hook(hook, self, *args, **kwargs)
51
52 def __add_hook(self, hook, _hookable, *args, **kwargs):
53- assert isinstance(hook, collections.Callable)
54+ assert isinstance(hook, collections_abc.Callable)
55 assert isinstance(_hookable, Hookable)
56 hookentry = _HookEntry(hook, args, kwargs, hookable=_hookable)
57 self.__hooks__.add(hookentry)
This page took 0.091463 seconds and 4 git commands to generate.