Conversation
liuyinchu
marked this pull request as ready for review
October 3, 2026 17:17
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the import failure reported in #592.
PyPy 7.3.22 changed
pickle.Picklerto an accelerated implementation without adispatchdictionary. Keep cloudpickle onpickle._Picklerfor PyPy, preservingits previous backend and PyPy-specific function handling. Use the selected base
consistently for inheritance, dispatch copying and backend selection.
Using the accelerated backend instead restores import but introduces additional
failures: its
reducer_overriderecurses on six-item reductions with statesetters, and cloudpickle's PyPy builtin-function fallback is bypassed. A minimal
stdlib-only state-setter reproducer is available with the validation material.
Tests
PyPy 7.3.16, 7.3.22 and 8.0.0: 48 parameterized cases total
with custom metaclasses, instance/class identity, and accelerated function-hook routing
Scope and remaining failures
This restores import and the prior PyPy backend behavior. It does not claim full
modern PyPy support. Function/code serialization still reaches the separate
CodeType mismatch addressed by #566 on PyPy 7.3.22; PyPy 8.0.0 also places the
exceptiontable constructor argument differently from CPython. Those changes are
not included here. A bounded modern-suite run on each interpreter stops at five
CodeType failures (39 passed, 2 skipped before stopping).
Four CPython notebook tests fail to start Jupyter kernels because the validation
sandbox denies ZMQ network operations. They fail identically on baseline.
AI disclosure
This patch, tests and draft were prepared with OpenAI coding assistance and
reviewed independently by another AI reviewer. The recorded tests were run on
real CPython and PyPy interpreters. No human maintainer review or upstream CI
result is claimed.