Skip to content

Commit cc6c84d

Browse files
committed
Switch from SafeConfigParser to ConfigParser class
SafeConfigParser has been deprecated since Python 3.2 and was removed in Python 3.12 entirely. Per the release notes [1] it is recommended to use the ConfigParser class now. [1] - https://docs.python.org/3.12/whatsnew/3.12.html#configparser
1 parent 692bbbf commit cc6c84d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

versioneer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ def get_config_from_root(root):
339339
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
340340
# the top of versioneer.py for instructions on writing your setup.cfg .
341341
setup_cfg = os.path.join(root, "setup.cfg")
342-
parser = configparser.SafeConfigParser()
342+
parser = configparser.ConfigParser()
343343
with open(setup_cfg, "r") as f:
344344
parser.readfp(f)
345345
VCS = parser.get("versioneer", "VCS") # mandatory

0 commit comments

Comments
 (0)