-
Notifications
You must be signed in to change notification settings - Fork 29k
SPARK-2101: import unittest2 when using Python 2.6 #1042
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
The PySpark tests depend on `unittest.skipIf`, which was only added in Python 2.7. This should remedy the build failures on Python 2.6. The only remaining piece is that it may be necessary to install `unittest2` with Python 2.6, if it's not provided automatically.
|
This may require modifying the Jenkins config to make sure |
|
Can one of the admins verify this patch? |
|
Jenkins, add to whitelist and test this please. |
|
QA tests have started for PR 1042. This patch merges cleanly. |
|
QA results for PR 1042: |
|
It looks like In with zipfile.ZipFile(path, 'w') as zip:
zip.writestr(name, content)
return pathWe should probably replace this with a try-finally block. There's a neat tool called pyqver that aims to identify the minimum required Python version for a particular script. Unfortunately, it doesn't detect this ZipFile issue; I'll look into opening a pull request to add a check for it. |
|
Actually, scratch that: |
- Modify python/run-tests to test with Python 2.6, if available. - Use unittest2 when running on Python 2.6. - Fix issue with namedtuple. - Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed. Closes apache#1868. Closes apache#1042.
…2.6 Fixes - Modify python/run-tests to test with Python 2.6 - Use unittest2 when running on Python 2.6. - Fix issue with namedtuple. - Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed. - Fix MLlib _deserialize_double on Python 2.6. Closes #1868. Closes #1042. Author: Josh Rosen <[email protected]> Closes #1874 from JoshRosen/python2.6 and squashes the following commits: 983d259 [Josh Rosen] [SPARK-2954] Fix MLlib _deserialize_double on Python 2.6. 5d18fd7 [Josh Rosen] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 fixes (cherry picked from commit db06a81) Signed-off-by: Josh Rosen <[email protected]>
…2.6 Fixes - Modify python/run-tests to test with Python 2.6 - Use unittest2 when running on Python 2.6. - Fix issue with namedtuple. - Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed. - Fix MLlib _deserialize_double on Python 2.6. Closes apache#1868. Closes apache#1042. Author: Josh Rosen <[email protected]> Closes apache#1874 from JoshRosen/python2.6 and squashes the following commits: 983d259 [Josh Rosen] [SPARK-2954] Fix MLlib _deserialize_double on Python 2.6. 5d18fd7 [Josh Rosen] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 fixes
…2.6 Fixes - Modify python/run-tests to test with Python 2.6 - Use unittest2 when running on Python 2.6. - Fix issue with namedtuple. - Skip TestOutputFormat.test_newhadoop on Python 2.6 until SPARK-2951 is fixed. - Fix MLlib _deserialize_double on Python 2.6. Closes apache#1868. Closes apache#1042. Author: Josh Rosen <[email protected]> Closes apache#1874 from JoshRosen/python2.6 and squashes the following commits: 983d259 [Josh Rosen] [SPARK-2954] Fix MLlib _deserialize_double on Python 2.6. 5d18fd7 [Josh Rosen] [SPARK-2948] [SPARK-2910] [SPARK-2101] Python 2.6 fixes Conflicts: python/pyspark/mllib/_common.py python/pyspark/serializers.py python/pyspark/tests.py
* [CARMEL-6113] Support BHJ fallback to SMJ in AQE * fix code style * Add log if FallbackBroadcastStage takes effect
The PySpark tests depend on
unittest.skipIf, which was only added in Python 2.7. This should remedy the build failures on Python 2.6. The only remaining piece is that it may be necessary to installunittest2with Python 2.6, if it's not provided automatically.