-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Drop old Python checks #7316
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
Drop old Python checks #7316
Conversation
The requirement is 2.7 or 3.4+.
from urllib.request import urlretrieve | ||
else: | ||
from urllib import urlretrieve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not six.moves.urllib.request.urlretrieve
?
@@ -90,7 +89,7 @@ def _get_xdg_cache_dir(): | |||
|
|||
setup_cfg = os.environ.get('MPLSETUPCFG', 'setup.cfg') | |||
if os.path.exists(setup_cfg): | |||
if PY32min: | |||
if PY3min: | |||
config = configparser.ConfigParser() | |||
else: | |||
config = configparser.SafeConfigParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not six.moves.configparser.SafeConfigParser
?
I don't think we can rely on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah.
#5373 raised minimum Python to 2.7 or 3.4+. A lot of
try
/except
stuff was removed, but explicit checks ofsys.version_info
were not.