From d571209e38ee4f7ac7fee6c0a36be6b6b1bcf6c0 Mon Sep 17 00:00:00 2001 From: Dave Shawley Date: Mon, 29 Feb 2016 14:35:07 -0500 Subject: [PATCH] Remove _mark_deprecated wrapper. --- docs/history.rst | 5 +++++ sprockets/mixins/mediatype/__init__.py | 23 +++-------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/docs/history.rst b/docs/history.rst index cf2c563..aaf132c 100644 --- a/docs/history.rst +++ b/docs/history.rst @@ -1,6 +1,11 @@ Version History =============== +`2.0.1`_ (29 Feb 2016) +---------------------- +- Removed deprecation wrapper since it seems to cause really interesting + problems including the much feared meta-class error. + `2.0.0`_ (24 Feb 2016) ---------------------- - Repackage from a module into a package. Distributing raw modules inside diff --git a/sprockets/mixins/mediatype/__init__.py b/sprockets/mixins/mediatype/__init__.py index f154a45..309506f 100644 --- a/sprockets/mixins/mediatype/__init__.py +++ b/sprockets/mixins/mediatype/__init__.py @@ -21,25 +21,8 @@ except ImportError as error: # pragma no cover set_default_content_type = _error_closure -def _mark_deprecated(func): - msg = '{0}.{1} is deprecated, use {0}.content.{1} instead'.format( - 'sprockets.mixins.mediatype', func.__name__) - - @functools.wraps(func) - def wrapper(*args, **kwargs): - warnings.warn(msg, category=DeprecationWarning) - return func(*args, **kwargs) - - return wrapper - -add_binary_content_type = _mark_deprecated(add_binary_content_type) -add_text_content_type = _mark_deprecated(add_text_content_type) -set_default_content_type = _mark_deprecated(set_default_content_type) -ContentMixin = _mark_deprecated(ContentMixin) -ContentSettings = _mark_deprecated(ContentSettings) - -version_info = (2, 0, 0) +version_info = (2, 0, 1) __version__ = '.'.join(str(v) for v in version_info) -__all__ = ('ContentMixin', 'ContentSettings', 'add_binary_content_type', +__all__ = ['ContentMixin', 'ContentSettings', 'add_binary_content_type', 'add_text_content_type', 'set_default_content_type', - 'version_info', '__version__') + 'version_info', '__version__']