summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-strenum
diff options
context:
space:
mode:
authoralperak <alperyasinak1@gmail.com>2024-02-08 15:00:45 +0300
committerKhem Raj <raj.khem@gmail.com>2024-02-09 09:52:15 -0800
commit5a45aa504a37a45fa28daeb26b56c046f0419ade (patch)
treee153920f42146f67b86f723deb54ba3d367b8bef /meta-python/recipes-devtools/python/python3-strenum
parentae8d97707663ffaa70dd398c26c3ec74705fa49e (diff)
downloadmeta-openembedded-5a45aa504a37a45fa28daeb26b56c046f0419ade.tar.gz
python3-strenum: add recipe
StrEnum is a Python enum.Enum that inherits from str to complement enum.IntEnum in the standard library Signed-off-by: alperak <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-strenum')
-rw-r--r--meta-python/recipes-devtools/python/python3-strenum/0001-patch-versioneer-for-python-3.12-compatibility.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-strenum/0001-patch-versioneer-for-python-3.12-compatibility.patch b/meta-python/recipes-devtools/python/python3-strenum/0001-patch-versioneer-for-python-3.12-compatibility.patch
new file mode 100644
index 0000000000..cdf3f1acb7
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-strenum/0001-patch-versioneer-for-python-3.12-compatibility.patch
@@ -0,0 +1,37 @@
1From 3a71c9bc3747201e5bebe0e80b98ac6219209875 Mon Sep 17 00:00:00 2001
2From: alperak <alperyasinak1@gmail.com>
3Date: Thu, 8 Feb 2024 14:09:32 +0300
4Subject: [PATCH] Patch versioneer for Python 3.12 compatibility
5
6AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?
7AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?
8
9readfp and SafeConfigParser has been deprecated since Python 3.2 and removed in Python 3.12 (due October 2023). Use read_file and ConfigParser instead.
10
11https://docs.python.org/3/whatsnew/3.12.html#configparser
12
13Upstream-Status: Submitted [https://github.com/irgeek/StrEnum/pull/34]
14Signed-off-by: alperak <alperyasinak1@gmail.com>
15---
16 versioneer.py | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/versioneer.py b/versioneer.py
20index 64fea1c..3aa5da3 100644
21--- a/versioneer.py
22+++ b/versioneer.py
23@@ -339,9 +339,9 @@ def get_config_from_root(root):
24 # configparser.NoOptionError (if it lacks "VCS="). See the docstring at
25 # the top of versioneer.py for instructions on writing your setup.cfg .
26 setup_cfg = os.path.join(root, "setup.cfg")
27- parser = configparser.SafeConfigParser()
28+ parser = configparser.ConfigParser()
29 with open(setup_cfg, "r") as f:
30- parser.readfp(f)
31+ parser.read_file(f)
32 VCS = parser.get("versioneer", "VCS") # mandatory
33
34 def get(parser, name):
35--
362.25.1
37