Skip to content

Commit 3ebabce

Browse files
committed
fix bug in python>=3.12
1 parent 00c123b commit 3ebabce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

versioneer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ def get_config_from_root(root):
343343
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
344344
# the top of versioneer.py for instructions on writing your setup.cfg .
345345
setup_cfg = os.path.join(root, "setup.cfg")
346-
parser = configparser.SafeConfigParser()
346+
parser = configparser.ConfigParser()
347347
with open(setup_cfg, "r") as f:
348-
parser.readfp(f)
348+
parser.read_file(f)
349349
VCS = parser.get("versioneer", "VCS") # mandatory
350350

351351
def get(parser, name):

0 commit comments

Comments
 (0)