summaryrefslogtreecommitdiff
path: root/django/db/utils.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-08-12 09:10:39 -0400
committerTim Graham <timograham@gmail.com>2015-09-23 19:31:09 -0400
commit4fd264b6f1737b0317fdd95b3d7ff3bba15ae6c3 (patch)
tree4665b5df24be5737cab6e0ff4575846805b9f671 /django/db/utils.py
parentc4e2e9de1f9451bf0575e414fe2860392d80ffb1 (diff)
Refs #24351 -- Removed support for the old allow_migrate() signature per deprecation timeline.
Diffstat (limited to 'django/db/utils.py')
-rw-r--r--django/db/utils.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/django/db/utils.py b/django/db/utils.py
index 380a4b9554..aaa992c040 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -1,7 +1,5 @@
-import inspect
import os
import pkgutil
-import warnings
from importlib import import_module
from threading import local
@@ -9,7 +7,6 @@ from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from django.utils._os import npath, upath
-from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
@@ -298,26 +295,7 @@ class ConnectionRouter(object):
# If the router doesn't have a method, skip to the next one.
continue
- if six.PY3:
- sig = inspect.signature(router.allow_migrate)
- has_deprecated_signature = not any(
- p.kind == inspect.Parameter.VAR_KEYWORD for p in sig.parameters.values()
- )
- else:
- argspec = inspect.getargspec(router.allow_migrate)
- has_deprecated_signature = len(argspec.args) == 3 and not argspec.keywords
-
- if has_deprecated_signature:
- warnings.warn(
- "The signature of allow_migrate has changed from "
- "allow_migrate(self, db, model) to "
- "allow_migrate(self, db, app_label, model_name=None, **hints). "
- "Support for the old signature will be removed in Django 1.10.",
- RemovedInDjango110Warning)
- model = hints.get('model')
- allow = None if model is None else method(db, model)
- else:
- allow = method(db, app_label, **hints)
+ allow = method(db, app_label, **hints)
if allow is not None:
return allow