sdbusplus: srcrev bump ddc0eba2be..5de31846e2

This srcrev switches from python2 to python3, which requires
some adjustments in recipes and updates to the dual-support patch.
Now, the python3 recipes have no patches and the python2 one has a
revert patch.

Patrick Williams (1):
      sdbus++: switch to python3

Waqar Hameed (1):
      Update README.md for Python 3

(From meta-phosphor rev: 07ce0de9aab794479036b94e9275d2fd97bb95b5)

Change-Id: I10381d22d35deaf1726b597a0d690af098f21cc0
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch b/meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch
new file mode 100644
index 0000000..09c2c43
--- /dev/null
+++ b/meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch
@@ -0,0 +1,73 @@
+From 8729226fb79d49129c8349645e0f8ec381f14be8 Mon Sep 17 00:00:00 2001
+From: Patrick Williams <patrick@stwcx.xyz>
+Date: Wed, 1 Apr 2020 08:48:05 -0500
+Subject: [PATCH] Revert "sdbus++: switch to python3"
+
+This reverts commit 18ce803d1e2a6a1779d38f7bf5279901b02583e0.
+---
+ configure.ac                    | 2 +-
+ tools/sdbus++                   | 8 ++++++--
+ tools/sdbusplus/namedelement.py | 4 ++--
+ 3 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ec65562..11c189b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,7 +29,7 @@ AC_PROG_INSTALL
+ AC_PROG_MAKE_SET
+ 
+ # setup sdbus++
+-AM_PATH_PYTHON([3.0], [AC_SUBST([PYTHON], [echo "$PYTHON"])])
++AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])])
+ AC_SUBST([PYTHONDIR], ${pythondir})
+ AS_IF([test "$PYTHON" != :], [have_python=yes], [have_python=no])
+ 
+diff --git a/tools/sdbus++ b/tools/sdbus++
+index fa12677..6cfcb9e 100755
+--- a/tools/sdbus++
++++ b/tools/sdbus++
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python3
++#!/usr/bin/env python
+ import sdbusplus
+ import mako.lookup
+ import argparse
+@@ -35,7 +35,11 @@ def main():
+ 
+     args = parser.parse_args()
+ 
+-    lookup = mako.lookup.TemplateLookup(directories=[args.templatedir])
++    if sys.version_info < (3, 0):
++        lookup = mako.lookup.TemplateLookup(directories=[args.templatedir],
++                                            disable_unicode=True)
++    else:
++        lookup = mako.lookup.TemplateLookup(directories=[args.templatedir])
+ 
+     instance = valid_types[args.typeName].load(args.item, args.rootdir)
+     function = getattr(instance, valid_processes[args.process])
+diff --git a/tools/sdbusplus/namedelement.py b/tools/sdbusplus/namedelement.py
+index 1548ef0..5048654 100644
+--- a/tools/sdbusplus/namedelement.py
++++ b/tools/sdbusplus/namedelement.py
+@@ -7,7 +7,7 @@ class NamedElement(object):
+         self.name = kwargs.pop('name', "unnamed")
+         self.description = kwargs.pop('description', "")
+ 
+-    def __getattribute__(self, name):
++    def __getattr__(self, name):
+         l = {'CamelCase': lambda: inflection.camelize(self.name),
+              'camelCase': lambda: inflection.camelize(self.name, False),
+              'snake_case': lambda: inflection.underscore(self.name)}\
+@@ -16,7 +16,7 @@ class NamedElement(object):
+         if l:
+             return NamedElement.__fixup_name(l())
+         try:
+-            return super(NamedElement, self).__getattribute__(name)
++            return super(NamedElement, self).__getattr__(name)
+         except:
+             raise AttributeError("Attribute '%s' not found in %s.NamedElement"
+                                  % (name, self.__module__))
+-- 
+2.24.1
+
diff --git a/meta-phosphor/recipes-extended/sdbusplus/files/0001-sdbus-switch-to-python3.patch b/meta-phosphor/recipes-extended/sdbusplus/files/0001-sdbus-switch-to-python3.patch
deleted file mode 100644
index ab1ea6c..0000000
--- a/meta-phosphor/recipes-extended/sdbusplus/files/0001-sdbus-switch-to-python3.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 04852662bc68139e58bb51803cb32aa2d300c605 Mon Sep 17 00:00:00 2001
-From: Patrick Williams <patrick@stwcx.xyz>
-Date: Fri, 31 Jan 2020 18:47:38 -0800
-Subject: [PATCH] sdbus++: switch to python3
-
-Python2 is DEAD!  Long live Python3!
-
-Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-Change-Id: Ifd46a4aeb41fb0e6db2f4310a603b727a5a2c2ff
----
- configure.ac                    | 2 +-
- tools/sdbus++                   | 8 ++------
- tools/sdbusplus/namedelement.py | 4 ++--
- 3 files changed, 5 insertions(+), 9 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 11c189b..ec65562 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -29,7 +29,7 @@ AC_PROG_INSTALL
- AC_PROG_MAKE_SET
- 
- # setup sdbus++
--AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])])
-+AM_PATH_PYTHON([3.0], [AC_SUBST([PYTHON], [echo "$PYTHON"])])
- AC_SUBST([PYTHONDIR], ${pythondir})
- AS_IF([test "$PYTHON" != :], [have_python=yes], [have_python=no])
- 
-diff --git a/tools/sdbus++ b/tools/sdbus++
-index 26969f3..d709c19 100755
---- a/tools/sdbus++
-+++ b/tools/sdbus++
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- import sdbusplus
- import mako.lookup
- import argparse
-@@ -34,11 +34,7 @@ def main():
- 
-     args = parser.parse_args()
- 
--    if sys.version_info < (3, 0):
--        lookup = mako.lookup.TemplateLookup(directories=[args.templatedir],
--                                            disable_unicode=True)
--    else:
--        lookup = mako.lookup.TemplateLookup(directories=[args.templatedir])
-+    lookup = mako.lookup.TemplateLookup(directories=[args.templatedir])
- 
-     instance = valid_types[args.typeName].load(args.item, args.rootdir)
-     function = getattr(instance, valid_processes[args.process])
-diff --git a/tools/sdbusplus/namedelement.py b/tools/sdbusplus/namedelement.py
-index 5048654..1548ef0 100644
---- a/tools/sdbusplus/namedelement.py
-+++ b/tools/sdbusplus/namedelement.py
-@@ -7,7 +7,7 @@ class NamedElement(object):
-         self.name = kwargs.pop('name', "unnamed")
-         self.description = kwargs.pop('description', "")
- 
--    def __getattr__(self, name):
-+    def __getattribute__(self, name):
-         l = {'CamelCase': lambda: inflection.camelize(self.name),
-              'camelCase': lambda: inflection.camelize(self.name, False),
-              'snake_case': lambda: inflection.underscore(self.name)}\
-@@ -16,7 +16,7 @@ class NamedElement(object):
-         if l:
-             return NamedElement.__fixup_name(l())
-         try:
--            return super(NamedElement, self).__getattr__(name)
-+            return super(NamedElement, self).__getattribute__(name)
-         except:
-             raise AttributeError("Attribute '%s' not found in %s.NamedElement"
-                                  % (name, self.__module__))
--- 
-2.13.5
-
diff --git a/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb
index 5d1c231..7bb0198 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb
+++ b/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb
@@ -1,6 +1,8 @@
 inherit obmc-phosphor-python-autotools
 include sdbus++.inc
 
+SRC_URI += "file://0001-Revert-sdbus-switch-to-python3.patch"
+
 # Provide these aliases temporarily until everyone can move over to the
 # new package name.
 PROVIDES_class-native += "sdbusplus-native sdbus++-native"
diff --git a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb
index c5aa212..829d496 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb
+++ b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb
@@ -1,4 +1,2 @@
 inherit obmc-phosphor-python3-autotools
 include sdbus++.inc
-
-SRC_URI += "file://0001-sdbus-switch-to-python3.patch"
diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
index c6e4cf7..19c01ab 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
+++ b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus-rev.inc
@@ -7,4 +7,4 @@
 S = "${WORKDIR}/git"
 
 SRC_URI += "git://github.com/openbmc/sdbusplus"
-SRCREV = "ddc0eba2bea1f55dff275726903deecd88ac6f3d"
+SRCREV = "5de31846e2b03591504fcdd48efba3487a570197"
diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb
index 2fa4379..9cc4cdc 100644
--- a/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb
+++ b/meta-phosphor/recipes-extended/sdbusplus/sdbusplus_git.bb
@@ -13,8 +13,6 @@
         ${PYTHON_PN}-pyyaml-native \
         "
 
-SRC_URI += "file://0001-sdbus-switch-to-python3.patch"
-
 PACKAGECONFIG ??= "libsdbusplus transaction"
 PACKAGECONFIG[libsdbusplus] = "--enable-libsdbusplus,--disable-libsdbusplus,systemd,libsystemd"
 PACKAGECONFIG[transaction] = "--enable-transaction,--disable-transaction"