-
Notifications
You must be signed in to change notification settings - Fork 266
MNT: Fix configparser + python 2 deprecations #917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -276,11 +276,7 @@ | |
|
||
""" | ||
|
||
from __future__ import print_function | ||
try: | ||
import configparser | ||
except ImportError: | ||
import ConfigParser as configparser | ||
import configparser | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While these are valid updates, I'm disinclined to change versioneer except for functional fixes, to keep any diffs focused. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, what about the changes after the imports? They are deprecated in py3.6 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough. Let's go ahead with these changes, then. |
||
import errno | ||
import json | ||
import os | ||
|
@@ -340,9 +336,9 @@ def get_config_from_root(root): | |
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at | ||
# the top of versioneer.py for instructions on writing your setup.cfg . | ||
setup_cfg = os.path.join(root, "setup.cfg") | ||
parser = configparser.SafeConfigParser() | ||
parser = configparser.ConfigParser() | ||
with open(setup_cfg, "r") as f: | ||
parser.readfp(f) | ||
parser.read_file(f) | ||
VCS = parser.get("versioneer", "VCS") # mandatory | ||
|
||
def get(parser, name): | ||
|
Uh oh!
There was an error while loading. Please reload this page.