Skip to content

Commit 122512a

Browse files
authored
Merge pull request #19 from tacaswell/fix_py312
Fix versioneer compat with py312
2 parents c7bd6a9 + 28a4183 commit 122512a

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

versioneer.py

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

352351
def get(parser, name):

0 commit comments

Comments
 (0)