Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 aaugustin authored
4 django/db/backends/mysql/base.py
View
@@ -7,6 +7,7 @@
import datetime
import re
import sys
+import warnings
try:
import MySQLdb as Database
@@ -39,8 +40,7 @@
# Raise exceptions for database warnings if DEBUG is on
from django.conf import settings
if settings.DEBUG:
- from warnings import filterwarnings
- filterwarnings("error", category=Database.Warning)
+ warnings.filterwarnings("error", category=Database.Warning)
DatabaseError = Database.DatabaseError
IntegrityError = Database.IntegrityError
1  django/db/backends/oracle/base.py
View
@@ -8,6 +8,7 @@
import datetime
import decimal
import sys
+import warnings
def _setup_environment(environ):
1  django/http/__init__.py
View
@@ -110,7 +110,6 @@ def _BaseCookie__set(self, key, real_value, coded_value):
class CompatCookie(SimpleCookie):
def __init__(self, *args, **kwargs):
super(CompatCookie, self).__init__(*args, **kwargs)
- import warnings
warnings.warn("CompatCookie is deprecated. Use django.http.SimpleCookie instead.", DeprecationWarning)
from django.conf import settings
Please sign in to comment.
Something went wrong with that request. Please try again.