Ver Fonte

Renumber Wagtail 2.17 to 3.0

As per discussion on https://github.com/wagtail/wagtail/discussions/7732, the changes in the upcoming release (sidebar redesign, removal of hallo.js, module reorganisation) warrant a version bump to 3.0 if we're following semantic versioning.
Matt Westcott há 3 anos atrás
pai
commit
97e781e31c

+ 2 - 2
CHANGELOG.txt

@@ -1,8 +1,8 @@
 Changelog
 Changelog
 =========
 =========
 
 
-2.17 (xx.xx.xxxx) - IN DEVELOPMENT
-~~~~~~~~~~~~~~~~~
+3.0 (xx.xx.xxxx) - IN DEVELOPMENT
+~~~~~~~~~~~~~~~~
 
 
  * Phase out special-purpose panel types (`StreamFieldPanel`, `RichTextFieldPanel`, `ImageChooserPanel`, `DocumentChooserPanel`, `PageChooserPanel`, `SnippetChooserPanel`) in favour of `FieldPanel` (Matt Westcott)
  * Phase out special-purpose panel types (`StreamFieldPanel`, `RichTextFieldPanel`, `ImageChooserPanel`, `DocumentChooserPanel`, `PageChooserPanel`, `SnippetChooserPanel`) in favour of `FieldPanel` (Matt Westcott)
  * Upgrade ESLint and Stylelint configurations to latest shared Wagtail configs (Thibaud Colas, Paarth Agarwal)
  * Upgrade ESLint and Stylelint configurations to latest shared Wagtail configs (Thibaud Colas, Paarth Agarwal)

+ 1 - 1
client/scss/components/_logo.scss

@@ -28,7 +28,7 @@
 }
 }
 
 
 // Backwards-compatibility for branding_logo customisations in legacy sidebar.
 // Backwards-compatibility for branding_logo customisations in legacy sidebar.
-//RemovedInWagtail218Warning Remove when removing the legacy sidebar.
+//RemovedInWagtail40Warning Remove when removing the legacy sidebar.
 .wagtail-logo-container__mobile {
 .wagtail-logo-container__mobile {
   margin-inline-end: 10px;
   margin-inline-end: 10px;
   background-color: #555;
   background-color: #555;

+ 2 - 2
docs/reference/pages/model_reference.rst

@@ -528,7 +528,7 @@ Database fields
 
 
         This field contains the JSON content for the page at the time the revision was created
         This field contains the JSON content for the page at the time the revision was created
 
 
-        .. versionchanged:: 2.17
+        .. versionchanged:: 3.0
 
 
           The field has been renamed from ``content_json`` to ``content`` and it now uses :class:`~django.db.models.JSONField` instead of
           The field has been renamed from ``content_json`` to ``content`` and it now uses :class:`~django.db.models.JSONField` instead of
           :class:`~django.db.models.TextField`.
           :class:`~django.db.models.TextField`.
@@ -992,7 +992,7 @@ Database fields
         The JSON representation of any additional details for each action.
         The JSON representation of any additional details for each action.
         e.g. source page id and title when copying from a page. Or workflow id/name and next step id/name on a workflow transition
         e.g. source page id and title when copying from a page. Or workflow id/name and next step id/name on a workflow transition
 
 
-        .. versionchanged:: 2.17
+        .. versionchanged:: 3.0
 
 
           The field has been renamed from ``data_json`` to ``data`` and it now uses :class:`~django.db.models.JSONField` instead of
           The field has been renamed from ``data_json`` to ``data`` and it now uses :class:`~django.db.models.JSONField` instead of
           :class:`~django.db.models.TextField`.
           :class:`~django.db.models.TextField`.

+ 5 - 5
docs/reference/pages/panels.rst

@@ -55,7 +55,7 @@ StreamFieldPanel
 
 
     Deprecated; use ``FieldPanel`` instead.
     Deprecated; use ``FieldPanel`` instead.
 
 
-    .. versionchanged:: 2.17
+    .. versionchanged:: 3.0
 
 
        ``StreamFieldPanel`` is no longer required for ``StreamField``.
        ``StreamFieldPanel`` is no longer required for ``StreamField``.
 
 
@@ -166,7 +166,7 @@ PageChooserPanel
 
 
     Passing ``can_choose_root=True`` will allow the editor to choose the tree root as a page. Normally this would be undesirable, since the tree root is never a usable page, but in some specialised cases it may be appropriate; for example, a page with an automatic "related articles" feed could use a PageChooserPanel to select which subsection articles will be taken from, with the root corresponding to 'everywhere'.
     Passing ``can_choose_root=True`` will allow the editor to choose the tree root as a page. Normally this would be undesirable, since the tree root is never a usable page, but in some specialised cases it may be appropriate; for example, a page with an automatic "related articles" feed could use a PageChooserPanel to select which subsection articles will be taken from, with the root corresponding to 'everywhere'.
 
 
-    .. versionchanged:: 2.17
+    .. versionchanged:: 3.0
 
 
        ``FieldPanel`` now also provides a page chooser interface for foreign keys to page models. ``PageChooserPanel`` is only required when specifying the ``page_type`` or ``can_choose_root`` parameters.
        ``FieldPanel`` now also provides a page chooser interface for foreign keys to page models. ``PageChooserPanel`` is only required when specifying the ``page_type`` or ``can_choose_root`` parameters.
 
 
@@ -180,7 +180,7 @@ ImageChooserPanel
 
 
     Deprecated; use ``FieldPanel`` instead.
     Deprecated; use ``FieldPanel`` instead.
 
 
-    .. versionchanged:: 2.17
+    .. versionchanged:: 3.0
 
 
        ``ImageChooserPanel`` is no longer required to obtain an image chooser interface.
        ``ImageChooserPanel`` is no longer required to obtain an image chooser interface.
 
 
@@ -214,7 +214,7 @@ DocumentChooserPanel
 
 
     Deprecated; use ``FieldPanel`` instead.
     Deprecated; use ``FieldPanel`` instead.
 
 
-    .. versionchanged:: 2.17
+    .. versionchanged:: 3.0
 
 
        ``DocumentChooserPanel`` is no longer required to obtain a document chooser interface.
        ``DocumentChooserPanel`` is no longer required to obtain a document chooser interface.
 
 
@@ -228,7 +228,7 @@ SnippetChooserPanel
 
 
     Deprecated; use ``FieldPanel`` instead.
     Deprecated; use ``FieldPanel`` instead.
 
 
-    .. versionchanged:: 2.17
+    .. versionchanged:: 3.0
 
 
        ``SnippetChooserPanel`` is no longer required to obtain a document chooser interface.
        ``SnippetChooserPanel`` is no longer required to obtain a document chooser interface.
 
 

+ 1 - 1
docs/reference/streamfield/blocks.rst

@@ -18,7 +18,7 @@ This document details the block types provided by Wagtail for use in :ref:`Strea
    :param block_counts: Specifies the minimum and maximum number of each block type, as a dictionary mapping block names to dicts with (optional) ``min_num`` and ``max_num`` fields.
    :param block_counts: Specifies the minimum and maximum number of each block type, as a dictionary mapping block names to dicts with (optional) ``min_num`` and ``max_num`` fields.
    :param collapsed: When true, all blocks are initially collapsed.
    :param collapsed: When true, all blocks are initially collapsed.
 
 
-   .. versionchanged:: 2.17
+   .. versionchanged:: 3.0
      The required ``use_json_field`` argument is added.
      The required ``use_json_field`` argument is added.
 
 
    .. code-block:: python
    .. code-block:: python

+ 2 - 2
docs/releases/2.17.md → docs/releases/3.0.md

@@ -1,4 +1,4 @@
-# Wagtail 2.17 release notes - IN DEVELOPMENT
+# Wagtail 3.0 release notes - IN DEVELOPMENT
 
 
 ```{contents}
 ```{contents}
 ---
 ---
@@ -153,6 +153,6 @@ When overriding the `get_form_class` method of a ModelAdmin `CreateView` or `Edi
 
 
 ### `StreamField`s must explicitly set `use_json_field` argument to `True`/`False`
 ### `StreamField`s must explicitly set `use_json_field` argument to `True`/`False`
 
 
-`StreamField` now requires a `use_json_field` keyword argument that can be set to `True`/`False`. If set to `True`, the field will use `JSONField` as its internal type instead of `TextField`, which will change the data type used on the database and allow you to use `JSONField` lookups and transforms on the `StreamField`. If set to `False`, the field will keep its previous behaviour and no database changes will be made. If set to `None` (the default), the field will keep its previous behaviour and a warning (`RemovedInWagtail219Warning`) will appear.
+`StreamField` now requires a `use_json_field` keyword argument that can be set to `True`/`False`. If set to `True`, the field will use `JSONField` as its internal type instead of `TextField`, which will change the data type used on the database and allow you to use `JSONField` lookups and transforms on the `StreamField`. If set to `False`, the field will keep its previous behaviour and no database changes will be made. If set to `None` (the default), the field will keep its previous behaviour and a warning (`RemovedInWagtail50Warning`) will appear.
 
 
 After setting the keyword argument, make sure to generate and run the migrations for the models.
 After setting the keyword argument, make sure to generate and run the migrations for the models.

+ 1 - 1
docs/releases/index.rst

@@ -5,7 +5,7 @@ Release notes
    :maxdepth: 1
    :maxdepth: 1
 
 
    upgrading
    upgrading
-   2.17
+   3.0
    2.16.2
    2.16.2
    2.16.1
    2.16.1
    2.16
    2.16

+ 1 - 1
docs/releases/upgrading.rst

@@ -149,5 +149,5 @@ The compatible versions of Django and Python for each Wagtail release are:
 +-------------------+------------------------------+-----------------------------+
 +-------------------+------------------------------+-----------------------------+
 | 2.16              | 3.2, 4.0                     | 3.7, 3.8, 3.9, 3.10         |
 | 2.16              | 3.2, 4.0                     | 3.7, 3.8, 3.9, 3.10         |
 +-------------------+------------------------------+-----------------------------+
 +-------------------+------------------------------+-----------------------------+
-| 2.17              | 3.2, 4.0                     | 3.7, 3.8, 3.9, 3.10         |
+| 3.0               | 3.2, 4.0                     | 3.7, 3.8, 3.9, 3.10         |
 +-------------------+------------------------------+-----------------------------+
 +-------------------+------------------------------+-----------------------------+

+ 1 - 1
docs/topics/pages.md

@@ -132,7 +132,7 @@ These allow editing of model fields. The `FieldPanel` class will choose the corr
 - {class}`~wagtail.admin.panels.FieldPanel`
 - {class}`~wagtail.admin.panels.FieldPanel`
 - {class}`~wagtail.admin.panels.PageChooserPanel`
 - {class}`~wagtail.admin.panels.PageChooserPanel`
 
 
-```{versionchanged} 2.17
+```{versionchanged} 3.0
 Previously, certain field types required special-purpose panels: `StreamFieldPanel`, `ImageChooserPanel`, `DocumentChooserPanel` and `SnippetChooserPanel`. These are now all handled by `FieldPanel`.
 Previously, certain field types required special-purpose panels: `StreamFieldPanel`, `ImageChooserPanel`, `DocumentChooserPanel` and `SnippetChooserPanel`. These are now all handled by `FieldPanel`.
 ```
 ```
 
 

+ 1 - 1
wagtail/__init__.py

@@ -6,7 +6,7 @@ from wagtail.utils.version import get_semver_version, get_version
 
 
 # major.minor.patch.release.number
 # major.minor.patch.release.number
 # release must be one of alpha, beta, rc, or final
 # release must be one of alpha, beta, rc, or final
-VERSION = (2, 17, 0, "alpha", 0)
+VERSION = (3, 0, 0, "alpha", 0)
 
 
 __version__ = get_version(VERSION)
 __version__ = get_version(VERSION)
 
 

+ 12 - 12
wagtail/admin/panels.py

@@ -25,7 +25,7 @@ from wagtail.blocks import BlockField
 from wagtail.coreutils import camelcase_to_underscore
 from wagtail.coreutils import camelcase_to_underscore
 from wagtail.models import COMMENTS_RELATION_NAME, Page
 from wagtail.models import COMMENTS_RELATION_NAME, Page
 from wagtail.utils.decorators import cached_classmethod
 from wagtail.utils.decorators import cached_classmethod
-from wagtail.utils.deprecation import RemovedInWagtail219Warning
+from wagtail.utils.deprecation import RemovedInWagtail50Warning
 
 
 # DIRECT_FORM_FIELD_OVERRIDES, FORM_FIELD_OVERRIDES are imported for backwards
 # DIRECT_FORM_FIELD_OVERRIDES, FORM_FIELD_OVERRIDES are imported for backwards
 # compatibility, as people are likely importing them from here and then
 # compatibility, as people are likely importing them from here and then
@@ -143,7 +143,7 @@ class Panel:
                 "The `widget_overrides` method (on %r) is deprecated; "
                 "The `widget_overrides` method (on %r) is deprecated; "
                 "these should be returned from `get_form_options` as a "
                 "these should be returned from `get_form_options` as a "
                 "`widgets` item instead." % type(self),
                 "`widgets` item instead." % type(self),
-                category=RemovedInWagtail219Warning,
+                category=RemovedInWagtail50Warning,
             )
             )
             options["widgets"] = self.widget_overrides()
             options["widgets"] = self.widget_overrides()
 
 
@@ -152,7 +152,7 @@ class Panel:
                 "The `required_fields` method (on %r) is deprecated; "
                 "The `required_fields` method (on %r) is deprecated; "
                 "these should be returned from `get_form_options` as a "
                 "these should be returned from `get_form_options` as a "
                 "`fields` item instead." % type(self),
                 "`fields` item instead." % type(self),
-                category=RemovedInWagtail219Warning,
+                category=RemovedInWagtail50Warning,
             )
             )
             options["fields"] = self.required_fields()
             options["fields"] = self.required_fields()
 
 
@@ -161,25 +161,25 @@ class Panel:
                 "The `required_formsets` method (on %r) is deprecated; "
                 "The `required_formsets` method (on %r) is deprecated; "
                 "these should be returned from `get_form_options` as a "
                 "these should be returned from `get_form_options` as a "
                 "`formsets` item instead." % type(self),
                 "`formsets` item instead." % type(self),
-                category=RemovedInWagtail219Warning,
+                category=RemovedInWagtail50Warning,
             )
             )
             options["formsets"] = self.required_formsets()
             options["formsets"] = self.required_formsets()
 
 
         return options
         return options
 
 
-    # RemovedInWagtail219Warning - edit handlers should override get_form_options instead
+    # RemovedInWagtail50Warning - edit handlers should override get_form_options instead
     def widget_overrides(self):
     def widget_overrides(self):
         return {}
         return {}
 
 
     widget_overrides.is_original_method = True
     widget_overrides.is_original_method = True
 
 
-    # RemovedInWagtail219Warning - edit handlers should override get_form_options instead
+    # RemovedInWagtail50Warning - edit handlers should override get_form_options instead
     def required_fields(self):
     def required_fields(self):
         return []
         return []
 
 
     required_fields.is_original_method = True
     required_fields.is_original_method = True
 
 
-    # RemovedInWagtail219Warning - edit handlers should override get_form_options instead
+    # RemovedInWagtail50Warning - edit handlers should override get_form_options instead
     def required_formsets(self):
     def required_formsets(self):
         return {}
         return {}
 
 
@@ -311,7 +311,7 @@ class EditHandler(Panel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.admin.edit_handlers.EditHandler has been renamed to wagtail.admin.panels.Panel",
             "wagtail.admin.edit_handlers.EditHandler has been renamed to wagtail.admin.panels.Panel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)
@@ -430,7 +430,7 @@ class BaseCompositeEditHandler(PanelGroup):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.admin.edit_handlers.BaseCompositeEditHandler has been renamed to wagtail.admin.panels.PanelGroup",
             "wagtail.admin.edit_handlers.BaseCompositeEditHandler has been renamed to wagtail.admin.panels.PanelGroup",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)
@@ -731,7 +731,7 @@ class RichTextFieldPanel(FieldPanel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.admin.edit_handlers.RichTextFieldPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
             "wagtail.admin.edit_handlers.RichTextFieldPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)
@@ -741,7 +741,7 @@ class BaseChooserPanel(FieldPanel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.admin.edit_handlers.BaseChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
             "wagtail.admin.edit_handlers.BaseChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)
@@ -1137,7 +1137,7 @@ class StreamFieldPanel(FieldPanel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.admin.edit_handlers.StreamFieldPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
             "wagtail.admin.edit_handlers.StreamFieldPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)

+ 1 - 1
wagtail/admin/templates/wagtailadmin/base.html

@@ -27,7 +27,7 @@
             <div class="explorer__wrapper" data-explorer-menu></div>
             <div class="explorer__wrapper" data-explorer-menu></div>
         </aside>
         </aside>
         {# Backwards-compatibility for branding_logo customisations in legacy sidebar. #}
         {# Backwards-compatibility for branding_logo customisations in legacy sidebar. #}
-        {# RemovedInWagtail218Warning Remove when removing the legacy sidebar. #}
+        {# RemovedInWagtail40Warning Remove when removing the legacy sidebar. #}
         <script>
         <script>
             const branding_logo = document.querySelector('[data-wagtail-sidebar-branding-logo]');
             const branding_logo = document.querySelector('[data-wagtail-sidebar-branding-logo]');
             const legacySidebar = document.querySelector('[data-nav-primary]');
             const legacySidebar = document.querySelector('[data-nav-primary]');

+ 2 - 2
wagtail/documents/edit_handlers.py

@@ -1,14 +1,14 @@
 from warnings import warn
 from warnings import warn
 
 
 from wagtail.admin.panels import FieldPanel
 from wagtail.admin.panels import FieldPanel
-from wagtail.utils.deprecation import RemovedInWagtail219Warning
+from wagtail.utils.deprecation import RemovedInWagtail50Warning
 
 
 
 
 class DocumentChooserPanel(FieldPanel):
 class DocumentChooserPanel(FieldPanel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.documents.edit_handlers.DocumentChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
             "wagtail.documents.edit_handlers.DocumentChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)

+ 2 - 2
wagtail/fields.py

@@ -8,7 +8,7 @@ from django.utils.encoding import force_str
 
 
 from wagtail.blocks import Block, BlockField, StreamBlock, StreamValue
 from wagtail.blocks import Block, BlockField, StreamBlock, StreamValue
 from wagtail.rich_text import get_text_for_indexing
 from wagtail.rich_text import get_text_for_indexing
-from wagtail.utils.deprecation import RemovedInWagtail219Warning
+from wagtail.utils.deprecation import RemovedInWagtail50Warning
 
 
 
 
 class RichTextField(models.TextField):
 class RichTextField(models.TextField):
@@ -103,7 +103,7 @@ class StreamField(models.Field):
         if type(self.use_json_field) is not bool:
         if type(self.use_json_field) is not bool:
             warnings.warn(
             warnings.warn(
                 f"StreamField must explicitly set use_json_field argument to True/False instead of {self.use_json_field}.",
                 f"StreamField must explicitly set use_json_field argument to True/False instead of {self.use_json_field}.",
-                RemovedInWagtail219Warning,
+                RemovedInWagtail50Warning,
                 stacklevel=3,
                 stacklevel=3,
             )
             )
 
 

+ 2 - 2
wagtail/images/edit_handlers.py

@@ -4,14 +4,14 @@ from django.template.loader import render_to_string
 
 
 from wagtail.admin.compare import ForeignObjectComparison
 from wagtail.admin.compare import ForeignObjectComparison
 from wagtail.admin.panels import FieldPanel
 from wagtail.admin.panels import FieldPanel
-from wagtail.utils.deprecation import RemovedInWagtail219Warning
+from wagtail.utils.deprecation import RemovedInWagtail50Warning
 
 
 
 
 class ImageChooserPanel(FieldPanel):
 class ImageChooserPanel(FieldPanel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.images.edit_handlers.ImageChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
             "wagtail.images.edit_handlers.ImageChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)

+ 1 - 1
wagtail/project_template/requirements.txt

@@ -1,2 +1,2 @@
 Django>=4.0,<4.1
 Django>=4.0,<4.1
-wagtail==2.17a0
+wagtail==3.0a0

+ 2 - 2
wagtail/snippets/edit_handlers.py

@@ -1,14 +1,14 @@
 from warnings import warn
 from warnings import warn
 
 
 from wagtail.admin.panels import FieldPanel
 from wagtail.admin.panels import FieldPanel
-from wagtail.utils.deprecation import RemovedInWagtail219Warning
+from wagtail.utils.deprecation import RemovedInWagtail50Warning
 
 
 
 
 class SnippetChooserPanel(FieldPanel):
 class SnippetChooserPanel(FieldPanel):
     def __init__(self, *args, **kwargs):
     def __init__(self, *args, **kwargs):
         warn(
         warn(
             "wagtail.snippets.edit_handlers.SnippetChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
             "wagtail.snippets.edit_handlers.SnippetChooserPanel is obsolete and should be replaced by wagtail.admin.panels.FieldPanel",
-            category=RemovedInWagtail219Warning,
+            category=RemovedInWagtail50Warning,
             stacklevel=2,
             stacklevel=2,
         )
         )
         super().__init__(*args, **kwargs)
         super().__init__(*args, **kwargs)

+ 2 - 2
wagtail/tests/test_streamfield.py

@@ -22,7 +22,7 @@ from wagtail.test.testapp.models import (
     MinMaxCountStreamModel,
     MinMaxCountStreamModel,
     StreamModel,
     StreamModel,
 )
 )
-from wagtail.utils.deprecation import RemovedInWagtail219Warning
+from wagtail.utils.deprecation import RemovedInWagtail50Warning
 
 
 
 
 class TestLazyStreamField(TestCase):
 class TestLazyStreamField(TestCase):
@@ -644,7 +644,7 @@ class TestJSONStreamField(TestCase):
 
 
     def test_use_json_field_warning(self):
     def test_use_json_field_warning(self):
         message = "StreamField must explicitly set use_json_field argument to True/False instead of None."
         message = "StreamField must explicitly set use_json_field argument to True/False instead of None."
-        with self.assertWarnsMessage(RemovedInWagtail219Warning, message):
+        with self.assertWarnsMessage(RemovedInWagtail50Warning, message):
             StreamField([("paragraph", blocks.CharBlock())])
             StreamField([("paragraph", blocks.CharBlock())])
 
 
     def test_internal_type(self):
     def test_internal_type(self):

+ 3 - 3
wagtail/utils/deprecation.py

@@ -2,14 +2,14 @@ import warnings
 from importlib import import_module
 from importlib import import_module
 
 
 
 
-class RemovedInWagtail218Warning(DeprecationWarning):
+class RemovedInWagtail40Warning(DeprecationWarning):
     pass
     pass
 
 
 
 
-removed_in_next_version_warning = RemovedInWagtail218Warning
+removed_in_next_version_warning = RemovedInWagtail40Warning
 
 
 
 
-class RemovedInWagtail219Warning(PendingDeprecationWarning):
+class RemovedInWagtail50Warning(PendingDeprecationWarning):
     pass
     pass