Skip to content

[WIP][TESTS] Upgrade pypy to 3.11 #51966

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

zhengruifeng
Copy link
Contributor

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

@zhengruifeng
Copy link
Contributor Author

The daily job keeps getting stuck in streaming tests, and after upgrading to pypy 3.11, they no longer hang, but started to fail.

given that:
1, 10 out of 18 pyspark testing modules are already skipped with excluded_python_implementations in modules.py;
2, there are extra skips with "pypy" in platform.python_implementation().lower() in tests like udtf, dstream, etc.

The test coverage for pypy is low

I am wondering shall we just drop the support of pypy? @HyukjinKwon @dongjoon-hyun @LuciferYang

@dongjoon-hyun
Copy link
Member

That's too bad, @zhengruifeng .

  • I'm wondering PySpark on CPython performance is enough to cover the loss of PyPy.
  • In addition, did we file the JIRA issues about the failures to give more visibility to the community? Without JIRA issue ID, we cannot discuss. Before dropping, it would be great to inform the issues properly in the community.

@zhengruifeng
Copy link
Contributor Author

@dongjoon-hyun Ok, I will just focus on fixing the workflow for now.
And will raise the discussion on dropping pypy later in the mail list.

@zhengruifeng zhengruifeng changed the title [WIP][TESTS] Fix pypy daily job [WIP][TESTS] Upgrade pypy to 3.11 Aug 12, 2025
@dongjoon-hyun
Copy link
Member

Thank you!

@zhengruifeng
Copy link
Contributor Author

@dongjoon-hyun @HyukjinKwon it seems almost all remaining tests are broken

one failure seems related to pickle that the protocol between JVM and Python is broken

Caused by: org.apache.spark.api.python.PythonException: Traceback (most recent call last):
  File "/__w/spark/spark/python/lib/pyspark.zip/pyspark/worker.py", line 2868, in main
    func, profiler, deserializer, serializer = read_command(pickleSer, infile)
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/__w/spark/spark/python/lib/pyspark.zip/pyspark/worker_util.py", line 64, in read_command
    command = serializer._read_with_length(file)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/__w/spark/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 173, in _read_with_length
    return self.loads(obj)
           ^^^^^^^^^^^^^^^
  File "/__w/spark/spark/python/lib/pyspark.zip/pyspark/serializers.py", line 473, in loads
    return cloudpickle.loads(obj, encoding=encoding)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/pypy/pypy3.11/lib/pypy3.11/pickle.py", line 1785, in _loads
    return _Unpickler(file, fix_imports=fix_imports, buffers=buffers,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/pypy/pypy3.11/lib/pypy3.11/pickle.py", line 1226, in load
    dispatch[key[0]](self)
  File "/usr/local/pypy/pypy3.11/lib/pypy3.11/pickle.py", line 1603, in load_reduce
    stack[-1] = func(*args)
                ^^^^^^^^^^^
TypeError: expected str, got int object

@zhengruifeng
Copy link
Contributor Author

I checked the last successful run at Jun 25 and the first failure at Jun 27, the package versions are the same.

And the commits between Jun 25 and Jun 27, haven't find a suspicious one.

@dongjoon-hyun
Copy link
Member

I merged the following to help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants