mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-22 20:38:28 +00:00
python3-slip-dbus: drop the six dependency
Patch slip to use the metaclass keyword argument in the class statement instead of six.with_metaclass, and drop the runtime dependency. Built for intel-corei7-64. AI-Generated: Uses Claude Code (Claude Opus 5) Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
1 parent
31050083a1
commit
8c1500fb22
2 files changed
+82
-3
No files matched your search
+81
@@ -0,0 +1,81 @@
|
|||||||
|
From 42fb66d5ed4a713ce82356cbd00f1f0a40676e1c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Markus Volk <f_l_k@t-online.de>
|
||||||
|
Date: Mon, 21 Sep 2026 13:23:21 +0200
|
||||||
|
Subject: [PATCH] drop the six dependency
|
||||||
|
|
||||||
|
six is a Python 2 compatibility shim and slip does not need it on
|
||||||
|
Python 3: six.with_metaclass is the metaclass keyword argument in the
|
||||||
|
class statement.
|
||||||
|
|
||||||
|
Upstream-Status: Pending
|
||||||
|
|
||||||
|
AI-Generated: Uses Claude Code (Claude Opus 5)
|
||||||
|
---
|
||||||
|
slip/dbus/introspection.py | 3 +--
|
||||||
|
slip/dbus/service.py | 3 +--
|
||||||
|
slip/util/hookable.py | 3 +--
|
||||||
|
3 files changed, 3 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/slip/dbus/introspection.py b/slip/dbus/introspection.py
|
||||||
|
index 07eb8a7..83dc7e0 100644
|
||||||
|
--- a/slip/dbus/introspection.py
|
||||||
|
+++ b/slip/dbus/introspection.py
|
||||||
|
@@ -26,7 +26,6 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
|
from xml.etree.ElementTree import ElementTree
|
||||||
|
from io import StringIO
|
||||||
|
-from six import with_metaclass
|
||||||
|
|
||||||
|
|
||||||
|
class IElemMeta(type):
|
||||||
|
@@ -73,7 +72,7 @@ class IElemMeta(type):
|
||||||
|
return kls
|
||||||
|
|
||||||
|
|
||||||
|
-class IElem(with_metaclass(IElemMeta, object)):
|
||||||
|
+class IElem(object, metaclass=IElemMeta):
|
||||||
|
"""Base class for introspection elements."""
|
||||||
|
|
||||||
|
def __new__(cls, elem, parent=None):
|
||||||
|
diff --git a/slip/dbus/service.py b/slip/dbus/service.py
|
||||||
|
index 5d276f8..6a795d6 100644
|
||||||
|
--- a/slip/dbus/service.py
|
||||||
|
+++ b/slip/dbus/service.py
|
||||||
|
@@ -27,7 +27,6 @@ from __future__ import absolute_import
|
||||||
|
|
||||||
|
import dbus
|
||||||
|
import dbus.service
|
||||||
|
-from six import with_metaclass
|
||||||
|
|
||||||
|
from .._wrappers import _glib as GLib
|
||||||
|
|
||||||
|
@@ -182,7 +181,7 @@ class InterfaceType(dbus.service.InterfaceType):
|
||||||
|
return super(InterfaceType, cls).__new__(cls, name, bases, dct)
|
||||||
|
|
||||||
|
|
||||||
|
-class Object(with_metaclass(InterfaceType, dbus.service.Object)):
|
||||||
|
+class Object(dbus.service.Object, metaclass=InterfaceType):
|
||||||
|
|
||||||
|
# timeout & persistence
|
||||||
|
|
||||||
|
diff --git a/slip/util/hookable.py b/slip/util/hookable.py
|
||||||
|
index 89c7392..41d1688 100644
|
||||||
|
--- a/slip/util/hookable.py
|
||||||
|
+++ b/slip/util/hookable.py
|
||||||
|
@@ -24,7 +24,6 @@
|
||||||
|
hooks on changes."""
|
||||||
|
|
||||||
|
import collections.abc
|
||||||
|
-from six import with_metaclass
|
||||||
|
|
||||||
|
__all__ = ["Hookable", "HookableSet"]
|
||||||
|
|
||||||
|
@@ -121,7 +120,7 @@ class _HookEntry(object):
|
||||||
|
self.__hook(*self.__args, **self.__kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
-class Hookable(with_metaclass(HookableType, object)):
|
||||||
|
+class Hookable(object, metaclass=HookableType):
|
||||||
|
|
||||||
|
"""An object which calls registered hooks on changes."""
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ SRCNAME = "python-slip"
|
|||||||
SRC_URI = "https://github.com/nphilipp/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \
|
SRC_URI = "https://github.com/nphilipp/${SRCNAME}/releases/download/${SRCNAME}-${PV}/${SRCNAME}-${PV}.tar.bz2 \
|
||||||
file://9b939c0b534c1b7958fa0a3c7aedf30bca910431.patch \
|
file://9b939c0b534c1b7958fa0a3c7aedf30bca910431.patch \
|
||||||
file://0001-setup.py-Use-setuptools-instead-of-distutils.patch \
|
file://0001-setup.py-Use-setuptools-instead-of-distutils.patch \
|
||||||
|
file://0002-drop-the-six-dependency.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "c726c086f0dd93a0ac7a0176f383a12af91b6657b78a301e3f5b25d9f8d4d10b"
|
SRC_URI[sha256sum] = "c726c086f0dd93a0ac7a0176f383a12af91b6657b78a301e3f5b25d9f8d4d10b"
|
||||||
|
|
||||||
@@ -26,9 +27,6 @@ do_compile:prepend() {
|
|||||||
sed -e 's/@VERSION@/${PV}/g' ${S}/setup.py.in > ${S}/setup.py
|
sed -e 's/@VERSION@/${PV}/g' ${S}/setup.py.in > ${S}/setup.py
|
||||||
}
|
}
|
||||||
|
|
||||||
RDEPENDS:${PN} += "\
|
|
||||||
python3-six \
|
|
||||||
"
|
|
||||||
# http://errors.yoctoproject.org/Errors/Details/184713/
|
# http://errors.yoctoproject.org/Errors/Details/184713/
|
||||||
# python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory
|
# python-native/python: can't open file 'setup.py': [Errno 2] No such file or directory
|
||||||
CLEANBROKEN = "1"
|
CLEANBROKEN = "1"
|
||||||
|
|||||||
Reference in new issue
Block a user