Patrick Williams | 705982a | 2024-01-12 09:51:57 -0600 | [diff] [blame] | 1 | From 0920bd21ceab75bc4b655c571a37835526dd2468 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex@linutronix.de> |
| 3 | Date: Wed, 27 Dec 2023 15:12:19 +0100 |
| 4 | Subject: [PATCH] versioneer.py: do not use SafeConfigParser |
| 5 | |
| 6 | This has been deprecated for a long time, and finally removed in python 3.12 |
| 7 | |
| 8 | Upstream-Status: Submitted [https://github.com/rsokl/custom_inherit/pull/49] |
| 9 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
| 10 | --- |
| 11 | versioneer.py | 4 ++-- |
| 12 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/versioneer.py b/versioneer.py |
| 15 | index 64fea1c..3aa5da3 100644 |
| 16 | --- a/versioneer.py |
| 17 | +++ b/versioneer.py |
| 18 | @@ -339,9 +339,9 @@ def get_config_from_root(root): |
| 19 | # configparser.NoOptionError (if it lacks "VCS="). See the docstring at |
| 20 | # the top of versioneer.py for instructions on writing your setup.cfg . |
| 21 | setup_cfg = os.path.join(root, "setup.cfg") |
| 22 | - parser = configparser.SafeConfigParser() |
| 23 | + parser = configparser.ConfigParser() |
| 24 | with open(setup_cfg, "r") as f: |
| 25 | - parser.readfp(f) |
| 26 | + parser.read_file(f) |
| 27 | VCS = parser.get("versioneer", "VCS") # mandatory |
| 28 | |
| 29 | def get(parser, name): |