#27301: Better handling of errors that are not pickleable when testing in
parallel
-------------------------------------+-------------------------------------
Reporter: Adam Wróbel | Owner: Tim
Type: | Graham <timograham@…>
Cleanup/optimization | Status: closed
Component: Testing framework | Version: 1.10
Severity: Normal | Resolution: fixed
Keywords: testrunner parallel | Triage Stage: Ready for
pickle | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia <124304+nessita@…>):
In [changeset:"c361494cbb134540f2f35a6364ea9259f0084a58" c361494]:
{{{#!CommitTicketReference repository=""
revision="c361494cbb134540f2f35a6364ea9259f0084a58"
[5.1.x] Made RemoteTestResultTest.test_pickle_errors_detection()
compatible with tblib 3.2+.
tblib 3.2+ makes exception subclasses with __init__() and the default
__reduce__() picklable. This broke the test for
RemoteTestResult._confirm_picklable(), which expects a specific
exception to fail unpickling.
https://github.com/ionelmc/python-
tblib/blob/master/CHANGELOG.rst#320-2025-10-21
This fix defines ExceptionThatFailsUnpickling.__reduce__() in a way
that pickle.dumps(obj) succeeds, but pickle.loads(pickle.dumps(obj))
raises TypeError.
Refs #27301. This preserves the intent of the regression test from
52188a5ca6bafea0a66f17baacb315d61c7b99cd without skipping it.
Backport of 548209e620b3ca34396a360453f07c8dbb8aa6c7 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27301#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019a0d28346c-8ff660f8-7694-4a79-ab13-2432905ebb1b-000000%40eu-central-1.amazonses.com.