diff --git a/wagtail/wagtailsnippets/edit_handlers.py b/wagtail/wagtailsnippets/edit_handlers.py index 9136287131..7e788d6df4 100644 --- a/wagtail/wagtailsnippets/edit_handlers.py +++ b/wagtail/wagtailsnippets/edit_handlers.py @@ -6,7 +6,7 @@ from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.core.exceptions import ImproperlyConfigured -from wagtail.utils.deprecation import RemovedInWagtail15Warning +from wagtail.utils.deprecation import RemovedInWagtail16Warning from wagtail.wagtailadmin.edit_handlers import BaseChooserPanel from wagtail.wagtailcore.utils import resolve_model_string from .widgets import AdminSnippetChooser @@ -25,7 +25,7 @@ class BaseSnippetChooserPanel(BaseChooserPanel): def target_model(cls): if cls._target_model is None: if cls.snippet_type: - # RemovedInWagtail15Warning: The target_model is automatically + # RemovedInWagtail16Warning: The target_model is automatically # detected from the relation, so snippet_type is deprecated. try: cls._target_model = resolve_model_string(cls.snippet_type) @@ -59,7 +59,7 @@ class SnippetChooserPanel(object): warnings.warn( 'The snippet_type argument to SnippetChooserPanel is deprecated. ' 'The related model is now automatically detected.', - RemovedInWagtail15Warning) + RemovedInWagtail16Warning) self.snippet_type = snippet_type def bind_to_model(self, model): diff --git a/wagtail/wagtailsnippets/tests.py b/wagtail/wagtailsnippets/tests.py index a5da33d70d..e52d533bab 100644 --- a/wagtail/wagtailsnippets/tests.py +++ b/wagtail/wagtailsnippets/tests.py @@ -297,7 +297,7 @@ class TestSnippetChooserPanel(TestCase, WagtailTestUtils): self.snippet_chooser_panel.render_as_field()) def test_target_model_from_string(self): - # RemovedInWagtail15Warning: snippet_type argument + # RemovedInWagtail16Warning: snippet_type argument with self.ignore_deprecation_warnings(): result = SnippetChooserPanel( 'advert', @@ -306,7 +306,7 @@ class TestSnippetChooserPanel(TestCase, WagtailTestUtils): self.assertIs(result, Advert) def test_target_model_from_model(self): - # RemovedInWagtail15Warning: snippet_type argument + # RemovedInWagtail16Warning: snippet_type argument with self.ignore_deprecation_warnings(): result = SnippetChooserPanel( 'advert', @@ -321,7 +321,7 @@ class TestSnippetChooserPanel(TestCase, WagtailTestUtils): self.assertEqual(result, Advert) def test_target_model_malformed_type(self): - # RemovedInWagtail15Warning: snippet_type argument + # RemovedInWagtail16Warning: snippet_type argument with self.ignore_deprecation_warnings(): result = SnippetChooserPanel( 'advert', @@ -331,7 +331,7 @@ class TestSnippetChooserPanel(TestCase, WagtailTestUtils): result.target_model) def test_target_model_nonexistent_type(self): - # RemovedInWagtail15Warning: snippet_type argument + # RemovedInWagtail16Warning: snippet_type argument with self.ignore_deprecation_warnings(): result = SnippetChooserPanel( 'advert',