Skip to content

Commit

Permalink
feat!: remove old XBlockMixin import locations
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Feb 22, 2024
1 parent a2f5936 commit b977536
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
27 changes: 1 addition & 26 deletions xblock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,4 @@
XBlock Courseware Components
"""

# For backwards compatibility, provide the XBlockMixin in xblock.fields
# without causing a circular import
import codecs
import os
import warnings

import xblock.core
import xblock.fields


class XBlockMixin(xblock.core.XBlockMixin):
"""
A wrapper around xblock.core.XBlockMixin that provides backwards compatibility for the old location.
Deprecated.
"""
def __init__(self, *args, **kwargs):
warnings.warn("Please use xblock.core.XBlockMixin", DeprecationWarning, stacklevel=2)
super().__init__(*args, **kwargs)


# For backwards compatibility, provide the XBlockMixin in xblock.fields
# without causing a circular import
xblock.fields.XBlockMixin = XBlockMixin

__version__ = '1.10.0'
__version__ = '2.0.0'
1 change: 0 additions & 1 deletion xblock/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
'BlockScope', 'UserScope', 'Scope', 'ScopeIds',
'Field',
'Boolean', 'Dict', 'Float', 'Integer', 'List', 'Set', 'String', 'XMLString',
'XBlockMixin',
]


Expand Down

0 comments on commit b977536

Please sign in to comment.