diff --git a/django/template/engine.py b/django/template/engine.py index ec89b8d7ef..dc049dd246 100644 --- a/django/template/engine.py +++ b/django/template/engine.py @@ -1,8 +1,5 @@ -import warnings - from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache, six -from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import cached_property from django.utils.module_loading import import_string @@ -122,16 +119,7 @@ class Engine(object): if isinstance(loader, six.string_types): loader_class = import_string(loader) - - if getattr(loader_class, '_accepts_engine_in_init', False): - args.insert(0, self) - else: - warnings.warn( - "%s inherits from django.template.loader.BaseLoader " - "instead of django.template.loaders.base.Loader. " % - loader, RemovedInDjango110Warning, stacklevel=2) - - return loader_class(*args) + return loader_class(self, *args) else: raise ImproperlyConfigured( "Invalid value in template loaders configuration: %r" % loader) diff --git a/django/template/loader.py b/django/template/loader.py index 83ac24d6c8..38dfabc9f5 100644 --- a/django/template/loader.py +++ b/django/template/loader.py @@ -1,10 +1,5 @@ -import warnings - -from django.utils.deprecation import RemovedInDjango110Warning - from . import engines from .exceptions import TemplateDoesNotExist -from .loaders import base def get_template(template_name, using=None): @@ -62,14 +57,3 @@ def render_to_string(template_name, context=None, request=None, using=None): def _engine_list(using=None): return engines.all() if using is None else [engines[using]] - - -class BaseLoader(base.Loader): - _accepts_engine_in_init = False - - def __init__(self, *args, **kwargs): - warnings.warn( - "django.template.loader.BaseLoader was superseded by " - "django.template.loaders.base.Loader.", - RemovedInDjango110Warning, stacklevel=2) - super(BaseLoader, self).__init__(*args, **kwargs) diff --git a/django/template/loaders/base.py b/django/template/loaders/base.py index a4edbe59b5..5d49f9bfba 100644 --- a/django/template/loaders/base.py +++ b/django/template/loaders/base.py @@ -6,8 +6,6 @@ from django.utils.inspect import func_supports_parameter class Loader(object): - # Only used to raise a deprecation warning. Remove in Django 1.10. - _accepts_engine_in_init = True def __init__(self, engine): self.engine = engine diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index ba649aa60f..d8433ad955 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -968,11 +968,6 @@ loaders. Custom ``Loader`` classes should inherit from ``django.template.loaders.base.Loader`` and define the ``get_contents()`` and ``get_template_sources()`` methods. -.. versionchanged:: 1.8 - - ``django.template.loaders.base.Loader`` used to be defined at - ``django.template.loader.BaseLoader``. - .. versionchanged:: 1.9 In previous versions of Django, custom loaders defined a single method: