summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-slip-dbus
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-slip-dbus')
-rw-r--r--meta-python/recipes-devtools/python/python3-slip-dbus/0001-setup.py-Use-setuptools-instead-of-distutils.patch38
-rw-r--r--meta-python/recipes-devtools/python/python3-slip-dbus/9b939c0b534c1b7958fa0a3c7aedf30bca910431.patch76
2 files changed, 114 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-slip-dbus/0001-setup.py-Use-setuptools-instead-of-distutils.patch b/meta-python/recipes-devtools/python/python3-slip-dbus/0001-setup.py-Use-setuptools-instead-of-distutils.patch
new file mode 100644
index 0000000000..1208769b2f
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-slip-dbus/0001-setup.py-Use-setuptools-instead-of-distutils.patch
@@ -0,0 +1,38 @@
1From 4309ce76351b1685d08b3ba55d4f62b3e53ef76b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 1 Mar 2022 19:06:35 -0800
4Subject: [PATCH] setup.py: Use setuptools instead of distutils
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 setup.py.in | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12--- a/setup.py.in
13+++ b/setup.py.in
14@@ -2,20 +2,17 @@
15 # -*- coding: utf-8 -*-
16
17 import sys
18-from distutils.core import setup
19+from setuptools import setup, find_packages
20
21 setup(name="slip", version="@VERSION@",
22 py_modules=["slip.__init__", "slip.util.__init__",
23 "slip.util.hookable", "slip.util.files",
24- "slip._wrappers.__init__", "slip._wrappers._glib"],
25- requires=["selinux"])
26-
27-setup(name="slip.dbus", version="@VERSION@",
28- py_modules=["slip.dbus.__init__", "slip.dbus.bus",
29+ "slip._wrappers.__init__", "slip._wrappers._glib",
30+ "slip.dbus.__init__", "slip.dbus.bus",
31 "slip.dbus.constants", "slip.dbus.introspection",
32 "slip.dbus.mainloop", "slip.dbus.polkit", "slip.dbus.proxies",
33 "slip.dbus.service"],
34- requires=["dbus", "decorator", "StringIO", "xml.etree.ElementTree"])
35+ requires=["dbus", "decorator", "selinux", "StringIO", "xml.etree.ElementTree"])
36
37 if sys.version_info.major == 2:
38 setup(name="slip.gtk", version="@VERSION@",
diff --git a/meta-python/recipes-devtools/python/python3-slip-dbus/9b939c0b534c1b7958fa0a3c7aedf30bca910431.patch b/meta-python/recipes-devtools/python/python3-slip-dbus/9b939c0b534c1b7958fa0a3c7aedf30bca910431.patch
new file mode 100644
index 0000000000..b0e9d2215f
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-slip-dbus/9b939c0b534c1b7958fa0a3c7aedf30bca910431.patch
@@ -0,0 +1,76 @@
1From 9b939c0b534c1b7958fa0a3c7aedf30bca910431 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
3Date: Mon, 7 Jun 2021 23:23:47 +0200
4Subject: [PATCH] Python 3.10+ fix: Use collections.abc.Callable instead of
5 collections.Callable
6
7The deprecated aliases to Collections Abstract Base Classes were removed from
8the collections module in Python 3.10.
9https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-0-alpha-5
10https://bugs.python.org/issue37324
11---
12 slip/dbus/polkit.py | 6 +++---
13 slip/util/hookable.py | 6 +++---
14 2 files changed, 6 insertions(+), 6 deletions(-)
15
16diff --git a/slip/dbus/polkit.py b/slip/dbus/polkit.py
17index 128e8ce..320676d 100644
18--- a/slip/dbus/polkit.py
19+++ b/slip/dbus/polkit.py
20@@ -26,7 +26,7 @@
21
22 from __future__ import absolute_import
23
24-import collections
25+import collections.abc
26 import dbus
27 from decorator import decorator
28 from functools import reduce
29@@ -103,14 +103,14 @@ class MyProxy(object):
30 def some_method(self, ...):
31 ..."""
32
33- assert(func is None or isinstance(func, collections.Callable))
34+ assert(func is None or isinstance(func, collections.abc.Callable))
35
36 assert(
37 authfail_result in (None, AUTHFAIL_DONTCATCH) or
38 authfail_exception is None)
39 assert(
40 authfail_callback is None or
41- isinstance(authfail_callback, collections.Callable))
42+ isinstance(authfail_callback, collections.abc.Callable))
43 assert(
44 authfail_exception is None or
45 issubclass(authfail_exception, Exception))
46diff --git a/slip/util/hookable.py b/slip/util/hookable.py
47index 89c7392..0cd9967 100644
48--- a/slip/util/hookable.py
49+++ b/slip/util/hookable.py
50@@ -23,7 +23,7 @@
51 """This module contains variants of certain base types which call registered
52 hooks on changes."""
53
54-import collections
55+import collections.abc
56 from six import with_metaclass
57
58 __all__ = ["Hookable", "HookableSet"]
59@@ -67,7 +67,7 @@ class _HookEntry(object):
60
61 def __init__(self, hook, args, kwargs, hookable=None):
62
63- assert(isinstance(hook, collections.Callable))
64+ assert(isinstance(hook, collections.abc.Callable))
65 assert(isinstance(hookable, Hookable))
66
67 for n, x in enumerate(args):
68@@ -174,7 +174,7 @@ def add_hook_hookable(self, hook, *args, **kwargs):
69 self.__add_hook(hook, self, *args, **kwargs)
70
71 def __add_hook(self, hook, _hookable, *args, **kwargs):
72- assert isinstance(hook, collections.Callable)
73+ assert isinstance(hook, collections.abc.Callable)
74 assert isinstance(_hookable, Hookable)
75 hookentry = _HookEntry(hook, args, kwargs, hookable=_hookable)
76 self.__hooks__.add(hookentry)