Commits

Anonymous committed f611e6a

remove previously-deprecated markitup_head tag

Comments (0)

Files changed (3)

 tip (unreleased)
 ----------------
 
+- remove previously-deprecated markitup_head template tag
+
 - wrap jQuery usage in anonymous function, to be more robust against other
   JS framework code on the page (including other jQuerys).  Thanks Mikhael
   Korneev.

markitup/templatetags/markitup_tags.py

     include_jquery = not bool(no_jquery)
     return dict(register._markitup_context, include_jquery=include_jquery)
 
-# old deprecated version
-@register.inclusion_tag('markitup/include_all.html')
-def markitup_head(no_jquery=False):
-    warnings.warn(DeprecationWarning('markitup_head template tag is deprecated, use markitup_media instead'))
-    return markitup_media(no_jquery)
-
 @register.inclusion_tag('markitup/include_js.html')
 def markitup_js(no_jquery=False):
     include_jquery = not bool(no_jquery)
-from __future__ import with_statement
 import re
-import warnings
 
 from django.template import Template, Context, get_library
 from django.test import TestCase, Client
         return t.render(c).strip()
 
 
-class TemplatetagTests(MIUTestCase):
-    def test_markitup_head_deprecation_warning(self):
-        tpl_string = "{% load markitup_tags %}{% markitup_head %}"
-        if hasattr(warnings, 'catch_warnings'):
-            with warnings.catch_warnings(record=True) as w:
-                out = self.render(tpl_string)
-                # make sure it still works
-                self.assertIn('jquery.markitup.js', out)
-                self.assertEquals(len(w), 1)
-                self.failUnless(issubclass(w[-1].category, DeprecationWarning))
-        else:
-            # Python < 2.6, we can't catch warnings, just test it works
-            warnings.simplefilter('ignore', DeprecationWarning)
-            out = self.render(tpl_string)
-            warnings.resetwarnings()
-            self.assertIn('jquery.markitup.js', out)
-
-
 class TemplatefilterTests(MIUTestCase):
     def test_render_markup(self):
         tpl_string = "{% load markitup_tags %}{{ content|render_markup }}"