Skip to content

Commit 30aa693

Browse files
committed
MNT: change from using SafeConfigParser to ConfigParser
SafeConfigParser has been deprecated since Python 3.2 and will be removed in py312. python/cpython#28292 https://bugs.python.org/issue45173 python/cpython#89336
1 parent 96c13a5 commit 30aa693

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

versioneer.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,8 @@ def get_config_from_root(root):
333333
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
334334
# the top of versioneer.py for instructions on writing your setup.cfg .
335335
setup_cfg = os.path.join(root, "setup.cfg")
336-
parser = configparser.SafeConfigParser()
337-
with open(setup_cfg) as f:
338-
parser.readfp(f)
336+
parser = configparser.ConfigParser()
337+
parser.readfp(setup_cfg)
339338
VCS = parser.get("versioneer", "VCS") # mandatory
340339

341340
def get(parser, name):

0 commit comments

Comments
 (0)