-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26105][PYTHON] Clean unittest2 imports up that were added for Python 2.6 before #23077
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
Conversation
|
cc @BryanCutler. BTW, Bryan, do you have some time to work on the spark/python/pyspark/testing/sqlutils.py Lines 30 to 55 in a7a331d
I'll try to work on this towards the end of the next week if you're busy. |
|
Test build #98973 has finished for PR 23077 at commit
|
BryanCutler
left a comment
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.
LGTM, thanks @HyukjinKwon !
|
Oops, actually I think there is one more here https://github.com/apache/spark/blob/master/python/pyspark/testing/mllibutils.py#L20 Other than that, looks good |
Yup, I can do that |
|
Oh, I think the PR title should be SPARK-26105 too |
|
Test build #98985 has finished for PR 23077 at commit
|
|
Merged to master. Thanks for reviewing this, @BryanCutler and @srowen. |
…Python 2.6 before
## What changes were proposed in this pull request?
Currently, some of PySpark tests sill assume the tests could be ran in Python 2.6 by importing `unittest2`. For instance:
```python
if sys.version_info[:2] <= (2, 6):
try:
import unittest2 as unittest
except ImportError:
sys.stderr.write('Please install unittest2 to test with Python 2.6 or earlier')
sys.exit(1)
else:
import unittest
```
While I am here, I removed some of unused imports and reordered imports per PEP 8.
We officially dropped Python 2.6 support a while ago and started to discuss about Python 2 drop. It's better to remove them out.
## How was this patch tested?
Manually tests, and existing tests via Jenkins.
Closes apache#23077 from HyukjinKwon/SPARK-26105.
Lead-authored-by: hyukjinkwon <[email protected]>
Co-authored-by: Bryan Cutler <[email protected]>
Signed-off-by: hyukjinkwon <[email protected]>
What changes were proposed in this pull request?
Currently, some of PySpark tests sill assume the tests could be ran in Python 2.6 by importing
unittest2. For instance:While I am here, I removed some of unused imports and reordered imports per PEP 8.
We officially dropped Python 2.6 support a while ago and started to discuss about Python 2 drop. It's better to remove them out.
How was this patch tested?
Manually tests, and existing tests via Jenkins.