2 Fixes Python 2.4's failure to deepcopy unbound functions.
9 warnings
.warn("django.utils.copycompat is deprecated; use the native copy module instead",
10 PendingDeprecationWarning
)
12 # Monkeypatch copy's deepcopy registry to handle functions correctly.
13 if (hasattr(copy
, '_deepcopy_dispatch') and types
.FunctionType
not in copy
._deepcopy
_dispatch
):
14 copy
._deepcopy
_dispatch
[types
.FunctionType
] = copy
._deepcopy
_atomic
16 # Pose as the copy module now.