From ed975755d2afa24f11fe01137f49055f14d2fcd9 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 9 Oct 2010 17:32:20 +0000 Subject: [PATCH] Fixed a PendingDeprecationWarning coming from django.core.cache in Python 2.6. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14090 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/cache/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py index e49590b328..41cbc76bc8 100644 --- a/django/core/cache/__init__.py +++ b/django/core/cache/__init__.py @@ -15,7 +15,11 @@ cache class. See docs/cache.txt for information on the public API. """ -from cgi import parse_qsl +try: + from urlparse import parse_qsl +except ImportError: + from cgi import parse_qsl + from django.conf import settings from django.core import signals from django.core.cache.backends.base import InvalidCacheBackendError, CacheKeyWarning