Skip to content

Commit 2d7f3e5

Browse files
committed
Update configparser SafeConfigParser and readfp, new in python 3.12
1 parent d5c5416 commit 2d7f3e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

versioneer.py

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

349349
def get(parser, name):

0 commit comments

Comments
 (0)