Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6144bf

Browse filesBrowse 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 0c227a4 commit e6144bf
Copy full SHA for e6144bf

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎versioneer.py

Copy file name to clipboardExpand all lines: versioneer.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,8 @@ 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()
343-
with open(setup_cfg, "r") as f:
344-
parser.readfp(f)
342+
parser = configparser.ConfigParser()
343+
parser.read(setup_cfg)
345344
VCS = parser.get("versioneer", "VCS") # mandatory
346345

347346
def get(parser, name):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.