1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Refs #32114 -- Fixed test crash on non-picklable objects in subtests when PickleError is raised.

Related to the https://github.com/python/cpython/issues/73373.

Follow up to c09e8f5fd8.
This commit is contained in:
David Wobrock
2024-02-26 17:18:48 +01:00
committed by GitHub
parent 18d79033b9
commit ef2434f850
2 changed files with 16 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ def is_pickable(obj):
"""
try:
pickle.loads(pickle.dumps(obj))
except (AttributeError, TypeError):
except (AttributeError, TypeError, pickle.PickleError):
return False
return True