-
Notifications
You must be signed in to change notification settings - Fork 1.2k
infra: support Python 3.7 #1455
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 2 commits
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 |
---|---|---|
|
@@ -73,10 +73,13 @@ def __init__(self, estimator, logdir=None): | |
@staticmethod | ||
def _cmd_exists(cmd): | ||
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. out of scope, but thought I'd mention it for future reference - it looks like there are better ways to implement this function 😂: https://stackoverflow.com/a/34177358. Maybe we'll look into that Python 3.3+ version when we drop Python 2.7 support. 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. Looks like So we can adopt this change when we drop python 2.7 support. |
||
"""Placeholder docstring""" | ||
return any( | ||
os.access(os.path.join(path, cmd), os.X_OK) | ||
for path in os.environ["PATH"].split(os.pathsep) | ||
) | ||
for path in os.environ["PATH"].split(os.pathsep): | ||
try: | ||
if os.access(os.path.join(path, cmd), os.X_OK): | ||
return True | ||
except StopIteration: | ||
return False | ||
return False | ||
|
||
@staticmethod | ||
def _sync_directories(from_directory, to_directory): | ||
|
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.
should
py36
be removed here to match the change in l. 14?