1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

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
This commit is contained in:
Aymeric Augustin 2012-03-17 09:11:24 +00:00
parent e57bedee78
commit 8d71734f15
3 changed files with 3 additions and 3 deletions

View File

@ -7,6 +7,7 @@ Requires MySQLdb: http://sourceforge.net/projects/mysql-python
import datetime
import re
import sys
import warnings
try:
import MySQLdb as Database
@ -39,8 +40,7 @@ from django.utils import timezone
# 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

View File

@ -8,6 +8,7 @@ Requires cx_Oracle: http://cx-oracle.sourceforge.net/
import datetime
import decimal
import sys
import warnings
def _setup_environment(environ):

View File

@ -110,7 +110,6 @@ else:
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