These APIs were new and documented as of Django 1.7:
https://docs.djangoproject.com/en/1.7/ref/templates/api/#template-origin
Even in the 1.8 branch, there is no DeprecationWarning for this class:
https://github.com/django/django/blob/stable/1.8.x/django/template/loader.py#L14
--
Ticket URL: <https://code.djangoproject.com/ticket/25466>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: apollo13 (added)
* needs_better_patch: => 0
* severity: Normal => Release blocker
* needs_tests: => 0
* needs_docs: => 0
Comment:
If possible we should restore the old aliases, after all this is a
regression.
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:2>
Old description:
> https://code.djangoproject.com/ticket/15053 caused the removal of
> django.template.loader.LoadOrigin (and django.template.StringOrigin), in
> favor of django.template.base.Origin, for Django 1.9.
>
> These APIs were new and documented as of Django 1.7:
> https://docs.djangoproject.com/en/1.7/ref/templates/api/#template-origin
>
> Even in the 1.8 branch, there is no DeprecationWarning for this class:
> https://github.com/django/django/blob/stable/1.8.x/django/template/loader.py#L14
New description:
#15053 caused the removal of `django.template.loader.LoadOrigin` (and
`django.template.StringOrigin`), in favor of
`django.template.base.Origin`, for Django 1.9.
These APIs were new and documented as of Django 1.7:
https://docs.djangoproject.com/en/1.7/ref/templates/api/#template-origin
Even in the 1.8 branch, there is no DeprecationWarning for this class:
https://github.com/django/django/blob/stable/1.8.x/django/template/loader.py#L14
--
Comment (by timgraham):
May I ask about the use case so we can be sure to solve the issue
appropriately? Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:3>
Comment (by tarkatronic):
The case where I found it was in
https://github.com/opbeat/opbeat_python/blob/131ecaa4829fa3155020e3f2c39c382fd1f8a08e/opbeat/contrib/django/client.py#L148.
According to piquadrat, in #django:
< piquadrat> TheJoey: yep, that's probably the way it'll go. BTW,
generally speaking, the change that introduced this is actually great for
Opbeat because we now have the template name and can show you the template
in the stack trace
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:4>
* Attachment "25466-aliases.diff" added.
Comment (by timgraham):
Would the attached patch solve your issue? A formal deprecation doesn't
seem possible since you don't instantiate the class.
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:5>
Comment (by piquadrat):
In the case of opbeat_python, it would solve the problem, but we anyway
intend to use the `Origin` class when available.
I searched github for `LoaderOrigin`, there are a few occurrences, most
prominently raven-python (Sentry), which is already updated to work with
1.9a1.
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:6>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/5366 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:7>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"8d1a001ef6dcbbe8053da05cdb3ec99965b0953f" 8d1a001]:
{{{
#!CommitTicketReference repository=""
revision="8d1a001ef6dcbbe8053da05cdb3ec99965b0953f"
Fixed #25466 -- Added backwards compatibility aliases for LoaderOrigin and
StringOrigin.
Thanks Simon Charette for the DeprecationInstanceCheck class.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:8>
Comment (by Tim Graham <timograham@…>):
In [changeset:"59027a4cae8c5abbd0e9308d95dd6608be9199cd" 59027a4c]:
{{{
#!CommitTicketReference repository=""
revision="59027a4cae8c5abbd0e9308d95dd6608be9199cd"
[1.9.x] Fixed #25466 -- Added backwards compatibility aliases for
LoaderOrigin and StringOrigin.
Thanks Simon Charette for the DeprecationInstanceCheck class.
Backport of 8d1a001ef6dcbbe8053da05cdb3ec99965b0953f from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:9>
Comment (by Tim Graham <timograham@…>):
In [changeset:"ff419de263138e905dff44c5cb806310c70f32aa" ff419de2]:
{{{
#!CommitTicketReference repository=""
revision="ff419de263138e905dff44c5cb806310c70f32aa"
Refs #25466 -- Removed aliases for LoaderOrigin and StringOrigin.
Per deprecation timeline.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25466#comment:10>