- Add opt_einsum-pr208-configparser.patch * gh#dgasmith/opt_einsum#208 - Build wheel with PEP517 - Clean obsolete flavor skips - Don't catchall sitelib files OBS-URL: https://build.opensuse.org/request/show/1146184 OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/python-opt-einsum?expand=0&rev=9
33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From 0beacf96923bbb2dd1939a9c59398a38ce7a11b1 Mon Sep 17 00:00:00 2001
|
|
From: Hongxu Jia <hongxu.jia@windriver.com>
|
|
Date: Thu, 17 Nov 2022 17:04:54 -0800
|
|
Subject: [PATCH] Use ConfigParser instead of SafeConfigParser
|
|
|
|
The SafeConfigParser class will be renamed to ConfigParser in Python
|
|
3.12 [1]. This alias will be removed in future versions.So we can use
|
|
ConfigParser directly instead.
|
|
|
|
[1] https://github.com/python/cpython/issues/89336
|
|
|
|
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
|
---
|
|
versioneer.py | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/versioneer.py b/versioneer.py
|
|
index d3db643..6d732af 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):
|