Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #17923 -- Added missing import in the MySQL and Oracle backends…

…. Thanks aldaran for the report. Also removed two duplicate imports.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8d71734f1573fb9ea657ac16c2b31fdb43d78ac6 1 parent e57bede
Aymeric Augustin authored March 17, 2012
4  django/db/backends/mysql/base.py
@@ -7,6 +7,7 @@
7 7
 import datetime
8 8
 import re
9 9
 import sys
  10
+import warnings
10 11
 
11 12
 try:
12 13
     import MySQLdb as Database
@@ -39,8 +40,7 @@
39 40
 # Raise exceptions for database warnings if DEBUG is on
40 41
 from django.conf import settings
41 42
 if settings.DEBUG:
42  
-    from warnings import filterwarnings
43  
-    filterwarnings("error", category=Database.Warning)
  43
+    warnings.filterwarnings("error", category=Database.Warning)
44 44
 
45 45
 DatabaseError = Database.DatabaseError
46 46
 IntegrityError = Database.IntegrityError
1  django/db/backends/oracle/base.py
@@ -8,6 +8,7 @@
8 8
 import datetime
9 9
 import decimal
10 10
 import sys
  11
+import warnings
11 12
 
12 13
 
13 14
 def _setup_environment(environ):
1  django/http/__init__.py
@@ -110,7 +110,6 @@ def _BaseCookie__set(self, key, real_value, coded_value):
110 110
 class CompatCookie(SimpleCookie):
111 111
     def __init__(self, *args, **kwargs):
112 112
         super(CompatCookie, self).__init__(*args, **kwargs)
113  
-        import warnings
114 113
         warnings.warn("CompatCookie is deprecated. Use django.http.SimpleCookie instead.", DeprecationWarning)
115 114
 
116 115
 from django.conf import settings

0 notes on commit 8d71734

Please sign in to comment.
Something went wrong with that request. Please try again.