From 61cdfddce571bc0aeccd9f1b45032dec3e09c24b Mon Sep 17 00:00:00 2001 From: Israel Martinez Date: Thu, 6 Jun 2024 15:00:28 -0400 Subject: [PATCH] Update configparser SafeConfigParser and readfp, new in python 3.12 --- versioneer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versioneer.py b/versioneer.py index 2fc1a0762..be0dc74f8 100644 --- a/versioneer.py +++ b/versioneer.py @@ -341,9 +341,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):