#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:"9b37bd5fe73b0d614ad8e503071d6f7bf2bdf6b2" 9b37bd5f]:
 {{{#!CommitTicketReference repository=""
 revision="9b37bd5fe73b0d614ad8e503071d6f7bf2bdf6b2"
 [5.2.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:16>
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/0107019a09b24459-aea3bb32-089e-4a22-8ec8-8159f3008b55-000000%40eu-central-1.amazonses.com.

Reply via email to