Opened 4 years ago

Closed 4 years ago

#16999 closed Cleanup/optimization (invalid)

deprecated method of template loading needs to be removed

Reported by: ptone Owned by: nobody
Component: Template system Version: master
Severity: Release blocker Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

https://docs.djangoproject.com/en/dev/releases/1.2/#class-based-template-loaders

https://docs.djangoproject.com/en/dev/internals/deprecation/#id2

template/loader.py
45:        source, display_name = self.load_template_source(template_name, template_dirs)
46:        origin = make_origin(display_name, self.load_template_source, template_name, template_dirs)
57:    def load_template_source(self, template_name, template_dirs=None):
103:        if hasattr(TemplateLoader, 'load_template_source'):

template/loaders/app_directories.py
52:    def load_template_source(self, template_name, template_dirs=None):

template/loaders/eggs.py
15:    def load_template_source(self, template_name, template_dirs=None):

template/loaders/filesystem.py
33:    def load_template_source(self, template_name, template_dirs=None):
49:    load_template_source.is_usable = True

Change History (3)

comment:1 Changed 4 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

These are class methods. I think the deprecated functions have been removed on changeset:15985

comment:2 Changed 4 years ago by ptone

This was based on the deprecation timeline item:

    * The ability to specify a callable template loader rather than a
      ``Loader`` class will be removed, as will the ``load_template_source``
      functions that are included with the built in template loaders for
      backwards compatibility.

It needs some more investigating to see what exactly needs to change, but this deprecation item seems to point to these class methods specifically

comment:3 Changed 4 years ago by aaugustin

  • Resolution set to invalid
  • Status changed from new to closed

Indeed, the deprecated functions were removed at r15985. The functions mentioned by the OP are used by the class-based template loaders.

Note: See TracTickets for help on using tickets.
Back to Top