Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/5173#discussion_r27258902
--- Diff: ec2/spark_ec2.py ---
@@ -37,12 +37,17 @@
import tempfile
import textwrap
import time
-import urllib2
import warnings
from datetime import datetime
from optparse import OptionParser
from sys import stderr
+try:
--- End diff --
Instead of using try/except to handle cross-version compatibility, how
about explicitly checking `sys.version` here, like we do in a few other files?
This isn't a huge deal, but I think it's clearer to explicitly check versions
when imports differ due to cross-version compatibility reasons (it's fine to
use try/except for things like `cStringIO`, where we're trying to fall back if
native modules aren't available).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]