summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-10-11 12:20:07 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-10-11 12:20:07 +0000
commit1070c57b83efdfd4fbed09280fcdaafc6d9c1a81 (patch)
tree93b5721fe4e0664b993dd0d0b1dee544df304b22 /django/db
parent5e5be2c44caaae3192a9f8ae1ce0adc0da3d8c4d (diff)
Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db')
-rw-r--r--django/db/__init__.py6
-rw-r--r--django/db/backends/creation.py8
-rw-r--r--django/db/backends/postgresql/base.py2
-rw-r--r--django/db/models/fields/subclassing.py8
-rw-r--r--django/db/utils.py2
5 files changed, 13 insertions, 13 deletions
diff --git a/django/db/__init__.py b/django/db/__init__.py
index 7136b2f258..025025c8eb 100644
--- a/django/db/__init__.py
+++ b/django/db/__init__.py
@@ -15,7 +15,7 @@ if not settings.DATABASES:
import warnings
warnings.warn(
"settings.DATABASE_* is deprecated; use settings.DATABASES instead.",
- PendingDeprecationWarning
+ DeprecationWarning
)
settings.DATABASES[DEFAULT_DB_ALIAS] = {
@@ -44,7 +44,7 @@ for alias, database in settings.DATABASES.items():
"django.contrib.gis is now implemented as a full database backend. "
"Modify ENGINE in the %s database configuration to select "
"a backend from 'django.contrib.gis.db.backends'" % alias,
- PendingDeprecationWarning
+ DeprecationWarning
)
if database['ENGINE'] == 'postgresql_psycopg2':
full_engine = 'django.contrib.gis.db.backends.postgis'
@@ -56,7 +56,7 @@ for alias, database in settings.DATABASES.items():
warnings.warn(
"Short names for ENGINE in database configurations are deprecated. "
"Prepend %s.ENGINE with 'django.db.backends.'" % alias,
- PendingDeprecationWarning
+ DeprecationWarning
)
full_engine = "django.db.backends.%s" % database['ENGINE']
database['ENGINE'] = full_engine
diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py
index 6cdf415f7a..407bf5cbbb 100644
--- a/django/db/backends/creation.py
+++ b/django/db/backends/creation.py
@@ -140,7 +140,7 @@ class BaseDatabaseCreation(object):
import warnings
warnings.warn(
'Database creation API for m2m tables has been deprecated. M2M models are now automatically generated',
- PendingDeprecationWarning
+ DeprecationWarning
)
output = []
@@ -154,7 +154,7 @@ class BaseDatabaseCreation(object):
import warnings
warnings.warn(
'Database creation API for m2m tables has been deprecated. M2M models are now automatically generated',
- PendingDeprecationWarning
+ DeprecationWarning
)
from django.db import models
@@ -217,7 +217,7 @@ class BaseDatabaseCreation(object):
import warnings
warnings.warn(
'Database creation API for m2m tables has been deprecated. M2M models are now automatically generated',
- PendingDeprecationWarning
+ DeprecationWarning
)
from django.db import models
@@ -322,7 +322,7 @@ class BaseDatabaseCreation(object):
import warnings
warnings.warn(
'Database creation API for m2m tables has been deprecated. M2M models are now automatically generated',
- PendingDeprecationWarning
+ DeprecationWarning
)
qn = self.connection.ops.quote_name
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index f84ad1da61..84b4c7f5f3 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -105,7 +105,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):
import warnings
warnings.warn(
'The "postgresql" backend has been deprecated. Use "postgresql_psycopg2" instead.',
- PendingDeprecationWarning
+ DeprecationWarning
)
self.features = DatabaseFeatures()
diff --git a/django/db/models/fields/subclassing.py b/django/db/models/fields/subclassing.py
index bd11675ad3..3d04511dc2 100644
--- a/django/db/models/fields/subclassing.py
+++ b/django/db/models/fields/subclassing.py
@@ -15,14 +15,14 @@ def call_with_connection(func):
if not updated:
warn("A Field class whose %s method hasn't been updated to take a "
"`connection` argument." % func.__name__,
- PendingDeprecationWarning, stacklevel=2)
+ DeprecationWarning, stacklevel=2)
def inner(*args, **kwargs):
if 'connection' not in kwargs:
from django.db import connection
kwargs['connection'] = connection
warn("%s has been called without providing a connection argument. " %
- func.__name__, PendingDeprecationWarning,
+ func.__name__, DeprecationWarning,
stacklevel=1)
if updated:
return func(*args, **kwargs)
@@ -40,14 +40,14 @@ def call_with_connection_and_prepared(func):
if not updated:
warn("A Field class whose %s method hasn't been updated to take "
"`connection` and `prepared` arguments." % func.__name__,
- PendingDeprecationWarning, stacklevel=2)
+ DeprecationWarning, stacklevel=2)
def inner(*args, **kwargs):
if 'connection' not in kwargs:
from django.db import connection
kwargs['connection'] = connection
warn("%s has been called without providing a connection argument. " %
- func.__name__, PendingDeprecationWarning,
+ func.__name__, DeprecationWarning,
stacklevel=1)
if updated:
return func(*args, **kwargs)
diff --git a/django/db/utils.py b/django/db/utils.py
index 7c3e413726..c5b0bb8be6 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -23,7 +23,7 @@ def load_backend(backend_name):
import warnings
warnings.warn(
"Short names for DATABASE_ENGINE are deprecated; prepend with 'django.db.backends.'",
- PendingDeprecationWarning
+ DeprecationWarning
)
return module
except ImportError, e: