-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
An assertion failure in test_pickle #82565
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
Comments
When running test_pickle, I sometimes see an assertion failure. ./python -m test test_pickle Current thread 0x00007f8158632140 (most recent call first): In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called three times in a row without any error handling. |
I do not understand how you got an assertion failure. Did you interrupt tests with Ctrl-C? |
Good catch on this, Zackery! For anyone readying this, Serhiy posted a minimal reproducer in a PR comment, and the PR now adds a test for this. |
Reproduced on 3.11 with Serhiy's reproducer: class F:
@property
def read(self):
1/0
import pickle
pickle.load(F()) |
The PR is almost there but need a few more tests. The OP is no longer responding, so I am marking as easy for someone new to finish it. |
Please check the below code test casesFile without read and readline
File with bad read and without readline
File with bad readline and without read
|
I plan on updating my PR within the next two weeks. @SahillMulani Please find a different issue to work on. |
…honGH-16606) (cherry picked from commit 0584443) Co-authored-by: Zackery Spytz <[email protected]>
…honGH-16606) (cherry picked from commit 0584443) Co-authored-by: Zackery Spytz <[email protected]>
The original issue was fixed in #105667, but good tests are useful. |
…-16606) (GH-112591) (cherry picked from commit 0584443) Co-authored-by: Zackery Spytz <[email protected]>
…-16606) (GH-112592) (cherry picked from commit 0584443) Co-authored-by: Zackery Spytz <[email protected]>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
The text was updated successfully, but these errors were encountered: