Skip to content

Commit 584af4f

Browse files
authored
fix ParallelSSH#82 - Python 3.12 support
1 parent a62aaf2 commit 584af4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: versioneer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@
278278

279279
from __future__ import print_function
280280
try:
281-
import configparser
281+
from configparser import ConfigParser
282282
except ImportError:
283-
import ConfigParser as configparser
283+
from ConfigParser import SafeConfigParser as ConfigParser
284284
import errno
285285
import json
286286
import os
@@ -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()
343343
with open(setup_cfg, "r") as f:
344344
parser.readfp(f)
345345
VCS = parser.get("versioneer", "VCS") # mandatory

0 commit comments

Comments
 (0)