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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user