Signed-off-by: Alexander Kanavin <a...@linutronix.de>
---
 ...oneer.py-do-not-use-SafeConfigParser.patch | 29 +++++++++++++++++++
 .../python/python3-custom-inherit_2.4.1.bb    |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 
meta-python/recipes-devtools/python/files/0001-versioneer.py-do-not-use-SafeConfigParser.patch

diff --git 
a/meta-python/recipes-devtools/python/files/0001-versioneer.py-do-not-use-SafeConfigParser.patch
 
b/meta-python/recipes-devtools/python/files/0001-versioneer.py-do-not-use-SafeConfigParser.patch
new file mode 100644
index 000000000..34caaca98
--- /dev/null
+++ 
b/meta-python/recipes-devtools/python/files/0001-versioneer.py-do-not-use-SafeConfigParser.patch
@@ -0,0 +1,29 @@
+From 0920bd21ceab75bc4b655c571a37835526dd2468 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <a...@linutronix.de>
+Date: Wed, 27 Dec 2023 15:12:19 +0100
+Subject: [PATCH] versioneer.py: do not use SafeConfigParser
+
+This has been deprecated for a long time, and finally removed in python 3.12
+
+Upstream-Status: Submitted [https://github.com/rsokl/custom_inherit/pull/49]
+Signed-off-by: Alexander Kanavin <a...@linutronix.de>
+---
+ versioneer.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/versioneer.py b/versioneer.py
+index 64fea1c..3aa5da3 100644
+--- a/versioneer.py
++++ b/versioneer.py
+@@ -339,9 +339,9 @@ def get_config_from_root(root):
+     # configparser.NoOptionError (if it lacks "VCS="). See the docstring at
+     # the top of versioneer.py for instructions on writing your setup.cfg .
+     setup_cfg = os.path.join(root, "setup.cfg")
+-    parser = configparser.SafeConfigParser()
++    parser = configparser.ConfigParser()
+     with open(setup_cfg, "r") as f:
+-        parser.readfp(f)
++        parser.read_file(f)
+     VCS = parser.get("versioneer", "VCS")  # mandatory
+ 
+     def get(parser, name):
diff --git 
a/meta-python/recipes-devtools/python/python3-custom-inherit_2.4.1.bb 
b/meta-python/recipes-devtools/python/python3-custom-inherit_2.4.1.bb
index 478abbf1f..e7409f77e 100644
--- a/meta-python/recipes-devtools/python/python3-custom-inherit_2.4.1.bb
+++ b/meta-python/recipes-devtools/python/python3-custom-inherit_2.4.1.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.md;md5=f910a85a4c3da51edf780f17a7608434"
 
 PYPI_PACKAGE = "custom_inherit"
 
+SRC_URI += "file://0001-versioneer.py-do-not-use-SafeConfigParser.patch"
 SRC_URI[sha256sum] = 
"7052eb337bcce83551815264391cc4efc2bf70b295a3c52aba64f1ab57c3a8a2"
 
 inherit pypi setuptools3
-- 
2.39.2

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#107961): 
https://lists.openembedded.org/g/openembedded-devel/message/107961
Mute This Topic: https://lists.openembedded.org/mt/103445568/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to