From 3bfd9fca9fd9e0a917eef0c5f78ff7911b9e43d4 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 4 Nov 2015 12:20:07 +0000 Subject: [PATCH 1/3] Created 1.3 changelog and release notes --- CHANGELOG.txt | 4 ++++ docs/releases/1.3.rst | 23 +++++++++++++++++++++++ docs/releases/index.rst | 1 + 3 files changed, 28 insertions(+) create mode 100644 docs/releases/1.3.rst diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 09efd3cfa..8ea7cc73d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,10 @@ Changelog ========= +1.3 (xx.xx.xxxx) +~~~~~~~~~~~~~~~~ + + 1.2 (xx.xx.xxxx) ~~~~~~~~~~~~~~~~ diff --git a/docs/releases/1.3.rst b/docs/releases/1.3.rst new file mode 100644 index 000000000..f70cc0746 --- /dev/null +++ b/docs/releases/1.3.rst @@ -0,0 +1,23 @@ +========================================== +Wagtail 1.3 release notes - IN DEVELOPMENT +========================================== + +.. contents:: + :local: + :depth: 1 + + +What's new +========== + + +Minor features +~~~~~~~~~~~~~~ + + +Bug fixes +~~~~~~~~~ + + +Upgrade considerations +====================== diff --git a/docs/releases/index.rst b/docs/releases/index.rst index c7a728059..d6a666755 100644 --- a/docs/releases/index.rst +++ b/docs/releases/index.rst @@ -4,6 +4,7 @@ Release notes .. toctree:: :maxdepth: 1 + 1.3 1.2 1.1 1.0 From 66a8f65f78c4dc64a6ca5b29dc013d00bfe2cc42 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 4 Nov 2015 12:21:42 +0000 Subject: [PATCH 2/3] Removed backwards compatibility for is_abstract --- wagtail/wagtailcore/models.py | 10 ++-------- wagtail/wagtailcore/tests/test_page_model.py | 21 -------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index 46879fc30..4ce53b987 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -42,7 +42,7 @@ from wagtail.wagtailcore.signals import page_published, page_unpublished from wagtail.wagtailsearch import index from wagtail.wagtailsearch.backends import get_search_backend -from wagtail.utils.deprecation import RemovedInWagtail13Warning, RemovedInWagtail14Warning +from wagtail.utils.deprecation import RemovedInWagtail14Warning logger = logging.getLogger('wagtail.core') @@ -204,13 +204,7 @@ class PageBase(models.base.ModelBase): # All pages should be creatable unless explicitly set otherwise. # This attribute is not inheritable. if 'is_creatable' not in dct: - if 'is_abstract' in dct: - warnings.warn( - "The is_abstract flag is deprecated - use is_creatable instead.", - RemovedInWagtail13Warning) - cls.is_creatable = not dct['is_abstract'] - else: - cls.is_creatable = not cls._meta.abstract + cls.is_creatable = not cls._meta.abstract if cls.is_creatable: # register this type in the list of page content types diff --git a/wagtail/wagtailcore/tests/test_page_model.py b/wagtail/wagtailcore/tests/test_page_model.py index 70ba1c46d..b46447729 100644 --- a/wagtail/wagtailcore/tests/test_page_model.py +++ b/wagtail/wagtailcore/tests/test_page_model.py @@ -1,6 +1,5 @@ import datetime import json -import warnings import pytz @@ -10,7 +9,6 @@ from django.http import HttpRequest, Http404 from django.contrib.contenttypes.models import ContentType from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser -from django.utils.six import text_type from wagtail.wagtailcore.models import Page, Site, PAGE_MODEL_CLASSES from wagtail.tests.testapp.models import ( @@ -841,22 +839,3 @@ class TestIsCreatable(TestCase): """ self.assertFalse(AbstractPage.is_creatable) self.assertNotIn(AbstractPage, PAGE_MODEL_CLASSES) - - def test_is_abstract(self): - """ - is_abstract has been deprecated. Check that it still works, but issues - a deprecation warning - """ - with warnings.catch_warnings(record=True) as ws: - class IsAbstractPage(Page): - is_abstract = True - - class Meta: - abstract = True - - self.assertEqual(len(ws), 1) - warning = ws[0] - self.assertIn("is_creatable", text_type(warning.message)) - - self.assertFalse(AbstractPage.is_creatable) - self.assertNotIn(AbstractPage, PAGE_MODEL_CLASSES) From 0293226a06e99188f2c198e01555369bd8fefa97 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 4 Nov 2015 12:22:18 +0000 Subject: [PATCH 3/3] Updated deprecaction warning classes --- wagtail/utils/deprecation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wagtail/utils/deprecation.py b/wagtail/utils/deprecation.py index 1d21a7a7e..7183ca023 100644 --- a/wagtail/utils/deprecation.py +++ b/wagtail/utils/deprecation.py @@ -1,9 +1,9 @@ -class RemovedInWagtail13Warning(DeprecationWarning): +class RemovedInWagtail14Warning(DeprecationWarning): pass -removed_in_next_version_warning = RemovedInWagtail13Warning +removed_in_next_version_warning = RemovedInWagtail14Warning -class RemovedInWagtail14Warning(PendingDeprecationWarning): +class RemovedInWagtail15Warning(PendingDeprecationWarning): pass