{"action":"created","issue":{"url":"https://api.github.com/repos/django/django/issues/5366","labels_url":"https://api.github.com/repos/django/django/issues/5366/labels{/name}","comments_url":"https://api.github.com/repos/django/django/issues/5366/comments","events_url":"https://api.github.com/repos/django/django/issues/5366/events","html_url":"https://github.com/django/django/pull/5366","id":108484702,"number":5366,"title":"Fixed #25466 -- Added backwards compatibility aliases for LoaderOrigin and StringOrigin.","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars.githubusercontent.com/u/411869?v=3","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-26T18:10:14Z","updated_at":"2015-09-28T01:26:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/5366","html_url":"https://github.com/django/django/pull/5366","diff_url":"https://github.com/django/django/pull/5366.diff","patch_url":"https://github.com/django/django/pull/5366.patch"},"body":"https://code.djangoproject.com/ticket/25466"},"comment":{"url":"https://api.github.com/repos/django/django/issues/comments/143613590","html_url":"https://github.com/django/django/pull/5366#issuecomment-143613590","issue_url":"https://api.github.com/repos/django/django/issues/5366","id":143613590,"user":{"login":"charettes","id":9293,"avatar_url":"https://avatars.githubusercontent.com/u/9293?v=3","gravatar_id":"","url":"https://api.github.com/users/charettes","html_url":"https://github.com/charettes","followers_url":"https://api.github.com/users/charettes/followers","following_url":"https://api.github.com/users/charettes/following{/other_user}","gists_url":"https://api.github.com/users/charettes/gists{/gist_id}","starred_url":"https://api.github.com/users/charettes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charettes/subscriptions","organizations_url":"https://api.github.com/users/charettes/orgs","repos_url":"https://api.github.com/users/charettes/repos","events_url":"https://api.github.com/users/charettes/events{/privacy}","received_events_url":"https://api.github.com/users/charettes/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T01:26:44Z","updated_at":"2015-09-28T01:26:44Z","body":"What about hooking into `__instancecheck__` to raise the warning?\r\n\r\nWe did something similar with [`EmptyQuerySet`](https://github.com/django/django/blob/134ca4d438bd7cbe8f0f287a00d545f96fa04a01/django/db/models/query.py#L1171-L1183).\r\n\r\nSince the `type` would be used in two modules we could add another helper to `django.utils.deprecation`. e.g.\r\n\r\n```python\r\nclass DeprecationInstanceCheck(type):\r\n    def __instancecheck__(self, instance):\r\n        warnings.warn(\r\n            \"%s is deprecated, use %s instead.\" % (self.__name__, self.alternative),\r\n            self.deprecation_warning, 2\r\n        )\r\n        return super(DeprecationInstanceCheck, self).__instancecheck__(instance)\r\n\r\nclass StringOrigin(six.with_metaclass(DeprecationInstanceCheck, Origin))\r\n    alternative = 'django.template.Origin'\r\n    deprecation_warning = RemovedInDjango20Warning\r\n```"}}