-
Notifications
You must be signed in to change notification settings - Fork 171
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
Fix import of pickle module on PYPY 3.8 (#455) #461
Conversation
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.
Assuming CI is green, this LGTM. Please consider the suggestion below and document the change in the changelog for the next release.
@@ -51,7 +51,7 @@ jobs: | |||
- os: macos-latest | |||
# numpy triggers: RuntimeError: Polyfit sanity test emitted a | |||
# warning | |||
python_version: "pypy3" | |||
python_version: "pypy-3.8" |
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.
would it be possible to explicitly set one of those 2 pypy config to use pypy-3.7?
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.
actually I was confused by the way the matrix is defined negatively. We need to add "pypy-3.7"
to the list of Python version and then exclude the all the macos / windows + pypy combos that still fail.
Codecov Report
@@ Coverage Diff @@
## master #461 +/- ##
==========================================
- Coverage 92.60% 84.65% -7.95%
==========================================
Files 4 4
Lines 717 717
Branches 158 158
==========================================
- Hits 664 607 -57
- Misses 32 86 +54
- Partials 21 24 +3
Continue to review full report at Codecov.
|
Ok, so it is actually broken on PYPY3.8. It is not only a matter of changing imports... I started to track down the problem, PYPY pickle implementation expects the "reduce" implementation to be a method (bound or unbound) [1]. Now, I am not sure about the specification to decide who should fix something. Also note that on default branch, their "pickle.py" implementation file is not there any more. [1] https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.8/lib-python/3/pickle.py#L573 |
Any progress on this? I just hitted this error in pypy3.8. |
The "specification" is basically the implementation. If there is something that works in the CPython pure python |
? PyPy's default branch is for python2.7, which is not what you want to be looking at. For the python3.8 implementation, you want the py3.8 branch, and for the py3.9 implementation you want the py3.9 branch. In both cases, pypy copies the CPython stdlib |
The CI logs are gone so I cannot see what test fails. |
@mattip @schettino72 I attempted to resolve the conflicts with the |
Wow, that's a lot of failures. This seems to be the first problem:
In CPython with It would be nice if this could be "reduced" (pun not intended) to a minimal reproducer so it can be filed as a CPython bug, since the c-extension |
I debugged this one and figured the reason for the failure is this line: cloudpickle/cloudpickle/cloudpickle_fast.py Line 654 in f5472e1
It was added in #370. I am not sure I understand exactly what is is supposed to be doing (maybe previous implementations of pickle5 were using For the Python-based pickle Code for Python 3.9: Commenting out the |
Actually it was added in cloudpickle 1.5 for backward-compatibility with cloudpickle 1.4.1 where cloudpickle/cloudpickle/cloudpickle_fast.py Lines 396 to 411 in b8ed4d0
It has been a while now (1.4.1 is April 2020, 1.5 is July 2020), maybe |
Based on feedback given for #454.
Also update GH actions to use PYPY 3.8