You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-46076][PYTHON][TESTS] Remove unittest deprecated alias usage for Python 3.12
### What changes were proposed in this pull request?
This PR aims to remove `unittest` alias usage for Python 3.12.
Currently, it fails like the following.
- https://github.com/apache/spark/actions/runs/6971394284/job/18971420822
```
======================================================================
ERROR [0.554s]: test_find_spark_home (pyspark.tests.test_util.UtilTests.test_find_spark_home)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/__w/spark/spark/python/pyspark/tests/test_util.py", line 83, in test_find_spark_home
self.assertEquals(origin, _find_spark_home())
^^^^^^^^^^^^^^^^^
AttributeError: 'UtilTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?
```
### Why are the changes needed?
Python 3.12 removes the following deprecated aliases.
- https://docs.python.org/3/whatsnew/3.12.html#id3
<img width="802" alt="Screenshot 2023-11-23 at 12 52 33 PM" src="https://github.com/apache/spark/assets/9700541/0158c1a4-fcfc-4a02-85c5-7fcbd6c6a034">
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs with Python 3.9.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#43986 from dongjoon-hyun/SPARK-46076.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
0 commit comments