summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-12-24 23:27:17 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-12-29 21:59:07 +0100
commite00d1b6dc66524bf8d26c608e50e1e442a3bf5d0 (patch)
treef046e1b7e74ae6d25370c0bcfa8ab73543180736
parent5d5e1f5afa4b2c0b0a0ead37741ef7778187a48c (diff)
Removed obsolete compatibility functions for old Pythons.
-rw-r--r--django/utils/copycompat.py18
-rw-r--r--django/utils/hashcompat.py15
-rw-r--r--django/utils/itercompat.py10
3 files changed, 0 insertions, 43 deletions
diff --git a/django/utils/copycompat.py b/django/utils/copycompat.py
deleted file mode 100644
index 6ccf6c3ae5..0000000000
--- a/django/utils/copycompat.py
+++ /dev/null
@@ -1,18 +0,0 @@
-"""
-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 *
diff --git a/django/utils/hashcompat.py b/django/utils/hashcompat.py
deleted file mode 100644
index 62b1dfd12b..0000000000
--- a/django/utils/hashcompat.py
+++ /dev/null
@@ -1,15 +0,0 @@
-"""
-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
diff --git a/django/utils/itercompat.py b/django/utils/itercompat.py
index aa329c152e..fe8f8b9b46 100644
--- a/django/utils/itercompat.py
+++ b/django/utils/itercompat.py
@@ -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)