Skip to content

Conversation

@KingNonso
Copy link

PR Title:

Fix: Update deprecated wagtail.telepath import path

PR Description:

Description

This PR updates the import path for the register function from wagtail.telepath to wagtail.admin.telepath to address a deprecation warning. This change ensures compatibility with future Wagtail 8.0 releases.

Changes Made

  • Updated import statement in wagtailcodeblock/blocks.py from wagtail.telepath to wagtail.admin.telepath

Reason for Change

The current import path is triggering the following deprecation warning:

RemovedInWagtail80Warning: wagtail.telepath has been moved to wagtail.admin.telepath

This change proactively addresses the warning to ensure the codebase remains compatible with future Wagtail versions.

Testing

  • Verified that the code continues to function as expected after the import path change

Related Issues

#49

@FlipperPA
Copy link
Collaborator

@KingNonso Thank you! I'm thinking whether we should also put in a try / except shim for previous versions, or mention that this will only work for Wagtail 7+, and previous Wagtail version should use an old version. Let me think on that. :)

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.

2 participants