Loading django/utils/copycompat.pydeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line """ Fixes Python 2.4's failure to deepcopy unbound functions. """ import copy import types import warnings warnings.warn("django.utils.copycompat is deprecated; use the native copy module instead", DeprecationWarning) # Monkeypatch copy's deepcopy registry to handle functions correctly. if (hasattr(copy, '_deepcopy_dispatch') and types.FunctionType not in copy._deepcopy_dispatch): copy._deepcopy_dispatch[types.FunctionType] = copy._deepcopy_atomic # Pose as the copy module now. del copy, types from copy import * django/utils/hashcompat.pydeleted 100644 → 0 +0 −15 Original line number Diff line number Diff line """ The md5 and sha modules are deprecated since Python 2.5, replaced by the hashlib module containing both hash algorithms. Here, we provide a common interface to the md5 and sha constructors, depending on system version. """ import warnings warnings.warn("django.utils.hashcompat is deprecated; use hashlib instead", DeprecationWarning) import hashlib md5_constructor = hashlib.md5 md5_hmac = md5_constructor sha_constructor = hashlib.sha1 sha_hmac = sha_constructor django/utils/itercompat.py +0 −10 Original line number Diff line number Diff line Loading @@ -21,13 +21,3 @@ def product(*args, **kwds): warnings.warn("django.utils.itercompat.product is deprecated; use the native version instead", PendingDeprecationWarning) return itertools.product(*args, **kwds) def all(iterable): warnings.warn("django.utils.itercompat.all is deprecated; use the native version instead", DeprecationWarning) return builtins.all(iterable) def any(iterable): warnings.warn("django.utils.itercompat.any is deprecated; use the native version instead", DeprecationWarning) return builtins.any(iterable) Loading
django/utils/copycompat.pydeleted 100644 → 0 +0 −18 Original line number Diff line number Diff line """ Fixes Python 2.4's failure to deepcopy unbound functions. """ import copy import types import warnings warnings.warn("django.utils.copycompat is deprecated; use the native copy module instead", DeprecationWarning) # Monkeypatch copy's deepcopy registry to handle functions correctly. if (hasattr(copy, '_deepcopy_dispatch') and types.FunctionType not in copy._deepcopy_dispatch): copy._deepcopy_dispatch[types.FunctionType] = copy._deepcopy_atomic # Pose as the copy module now. del copy, types from copy import *
django/utils/hashcompat.pydeleted 100644 → 0 +0 −15 Original line number Diff line number Diff line """ The md5 and sha modules are deprecated since Python 2.5, replaced by the hashlib module containing both hash algorithms. Here, we provide a common interface to the md5 and sha constructors, depending on system version. """ import warnings warnings.warn("django.utils.hashcompat is deprecated; use hashlib instead", DeprecationWarning) import hashlib md5_constructor = hashlib.md5 md5_hmac = md5_constructor sha_constructor = hashlib.sha1 sha_hmac = sha_constructor
django/utils/itercompat.py +0 −10 Original line number Diff line number Diff line Loading @@ -21,13 +21,3 @@ def product(*args, **kwds): warnings.warn("django.utils.itercompat.product is deprecated; use the native version instead", PendingDeprecationWarning) return itertools.product(*args, **kwds) def all(iterable): warnings.warn("django.utils.itercompat.all is deprecated; use the native version instead", DeprecationWarning) return builtins.all(iterable) def any(iterable): warnings.warn("django.utils.itercompat.any is deprecated; use the native version instead", DeprecationWarning) return builtins.any(iterable)