wagtail-nest / wagtail-bakery

A set of helpers for baking your Django Wagtail site out as flat files.
MIT License
179 stars 40 forks source link

Deprecation Warnings with Django 3.0, Wagtail 2.8 & Wagtail 2.9 #53

Closed loicteixeira closed 3 years ago

loicteixeira commented 4 years ago

Using Wagtail Bakery with Django 3.0, Wagtail 2.8 or Wagtail 2.9 produces some Deprecation Warnings. Some seem to be upstream so we might not be able to do much, but listing them here anyway.

.../bakery/management/commands/build.py:133: RemovedInDjango40Warning: smart_text() is deprecated in favor of smart_str().
    self.build_dir = smart_text(self.build_dir)
.../wagtailbakery/api_views.py:8: RemovedInWagtail210Warning: PagesAPIEndpoint has been moved from wagtail.api.v2.endpoints to wagtail.api.v2.views and renamed to PagesAPIViewSet
    from wagtail.api.v2.endpoints import PagesAPIEndpoin
.../wagtail/core/middleware.py:8: RemovedInWagtail211Warning: wagtail.core.middleware.SiteMiddleware and the use of request.site is deprecated. Please update your code to use Site.find_for_request(request) in place of request.site, and remove wagtail.core.middleware.SiteMiddleware from MIDDLEWARES
    warnings.warn(
.../wagtail/admin/rich_text/converters/html_ruleset.py:2: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working
    from collections import Mapping
loicteixeira commented 4 years ago

The Django 3.0 warning comes from Django-Bakery and it doesn't seem to be a fix there. However, it's a deprecation warning for Django 4.0, so there is no rush.

The Python 3.9 warning comes form Wagtail itself. I submitted a PR, see wagtail/wagtail#6241.

Working through the ones thrown by Wagtail-Bakery itself on #54.

loicteixeira commented 3 years ago

Wagtail 2.9 warning (for Wagtail 2.11 compatibility) have been taken care of in #58