Skip to content

fix: Update deprecation warning to current version numbers #8269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 28, 2025

Conversation

fsbraun
Copy link
Member

@fsbraun fsbraun commented Jun 28, 2025

Description

Match deprecation warning versions with current versioning number scheme (4.2 -> 5.0, 5.0 -> 6.0)

Related resources

  • #...
  • #...

Checklist

  • I have opened this pull request against main
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined the channel #pr-reviews on our Discord Server to find a “pr review buddy” who is going to review my pull request.

Summary by Sourcery

Align deprecation warning classes and their usages with the current versioning scheme by bumping all warnings to target removal in django CMS 5.0 (and 6.0 where applicable), updating the compat.warnings definitions, modifying calls across modules, and adjusting tests to use the new warning classes.

Enhancements:

  • Standardize deprecation warnings to target removal in CMS 5.0 and 6.0 across all affected modules
  • Refactor compat warnings definitions to replace older RemovedInDjangoCMS42/43/50Warning classes with RemovedInDjangoCMS50Warning and RemovedInDjangoCMS60Warning

Documentation:

  • Add empty include files under docs/autogenerate for compatibility, deprecated plugins, LTS and related sections

Tests:

  • Update existing tests to expect the new deprecation warning classes

Copy link
Contributor

sourcery-ai bot commented Jun 28, 2025

Reviewer's Guide

This PR standardizes deprecation warnings by bumping all RemovedInDjangoCMS warnings to the current version scheme (5.0 → 6.0), updates imports and messages across modules, and adds empty documentation stubs for future auto-generated content.

Class diagram for updated deprecation warning classes

classDiagram
    class RemovedInDjangoCMS50Warning {
        <<DeprecationWarning>>
    }
    class RemovedInDjangoCMS60Warning {
        <<DeprecationWarning>>
    }
Loading

File-Level Changes

Change Details Files
Updated deprecation warning class definitions to the new version scheme
  • Removed outdated RemovedInDjangoCMS42Warning and RemovedInDjangoCMS43Warning classes
  • Introduced RemovedInDjangoCMS50Warning and RemovedInDjangoCMS60Warning definitions
cms/utils/compat/warnings.py
Refactored warning imports and messages across code modules
  • Replaced all imports of older RemovedInDjangoCMS warnings with the new classes
  • Adjusted warning calls and messages to reference removal in 5.0 or 6.0
  • Ensured stacklevel remains consistent for accurate tracebacks
cms/utils/permissions.py
cms/forms/fields.py
cms/cms_toolbars.py
cms/models/permissionmodels.py
cms/templatetags/cms_alias_tags.py
cms/test_utils/testcases.py
cms/admin/placeholderadmin.py
cms/api.py
cms/cms_plugins.py
cms/extensions/toolbar.py
cms/forms/wizards.py
cms/models/pagemodel.py
cms/tests/test_extensions.py
cms/utils/page_permissions.py
cms/wizards/wizard_pool.py
Added empty stubs for auto-generated documentation
  • Created new include files for compatibility, deprecated plugins, LTS, past LTS, plugins, and third-party sections
docs/autogenerate/compatibility.include
docs/autogenerate/deprecated_plugins.include
docs/autogenerate/lts.include
docs/autogenerate/past_lts.include
docs/autogenerate/plugins.include
docs/autogenerate/third-party.include

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

👋 Hi there!

Please remember to MERGE COMMIT pull requests from develop or develop-4!

Do not SQUASH commits to preserve history for the changelog.

Copy link

👋 Hi there!

Please remember to MERGE COMMIT pull requests from develop or develop-4!

Do not SQUASH commits to preserve history for the changelog.

Copy link

👋 Hi there!

Please remember to MERGE COMMIT pull requests from develop or develop-4!

Do not SQUASH commits to preserve history for the changelog.

@fsbraun fsbraun merged commit ce2dba0 into release/4.1.x Jun 28, 2025
91 of 92 checks passed
@fsbraun fsbraun deleted the fix/depr-versions branch June 28, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant