summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-02-04 12:47:34 -0500
committerJason R. Coombs <jaraco@jaraco.com>2018-02-04 12:51:18 -0500
commit513d4bfef99e7e599bc60c7da745d18439567797 (patch)
tree7a3936409b177d997b9f73f8585ee4087a22c2f3
parent15ba399c6907a63b9da458e5431750320606f3bf (diff)
downloadcherrypy-git-513d4bfef99e7e599bc60c7da745d18439567797.tar.gz
Remove DeprecatedTool and tidy and nsgmls 'tools'. Ref #1689.
-rw-r--r--CHANGES.rst6
-rw-r--r--cherrypy/_cptools.py32
2 files changed, 5 insertions, 33 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 02b734e0..327de468 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,4 +1,4 @@
-v13.2.0
+v14.0.0
-------
* #1688: Officially deprecated ``basic_auth`` and ``digest_auth``
@@ -7,6 +7,10 @@ v13.2.0
more recent ``auth_basic`` and ``auth_digest`` tools.
This deprecated functionality will be removed in a subsequent
release soon.
+* Removed ``DeprecatedTool`` and the long-deprecated and disabled
+ ``tidy`` and ``nsgmls`` tools. See `the rationale
+ <https://github.com/cherrypy/cherrypy/pull/1689#issuecomment-362924962>`_
+ for this change.
v13.1.0
-------
diff --git a/cherrypy/_cptools.py b/cherrypy/_cptools.py
index 5f937af6..8e438efc 100644
--- a/cherrypy/_cptools.py
+++ b/cherrypy/_cptools.py
@@ -23,7 +23,6 @@ are generally either modules or instances of the tools.Tool class.
"""
import sys
-import warnings
import cherrypy
from cherrypy._helper import expose
@@ -473,27 +472,6 @@ class Toolbox(object):
return decorator
-class DeprecatedTool(Tool):
-
- _name = None
- warnmsg = 'This Tool is deprecated.'
-
- def __init__(self, point, warnmsg=None):
- self.point = point
- if warnmsg is not None:
- self.warnmsg = warnmsg
-
- def __call__(self, *args, **kwargs):
- warnings.warn(self.warnmsg)
-
- def tool_decorator(f):
- return f
- return tool_decorator
-
- def _setup(self):
- warnings.warn(self.warnmsg)
-
-
default_toolbox = _d = Toolbox('tools')
_d.session_auth = SessionAuthTool(cptools.session_auth)
_d.allow = Tool('on_start_resource', cptools.allow)
@@ -514,16 +492,6 @@ _d.sessions = SessionTool()
_d.xmlrpc = ErrorTool(_xmlrpc.on_error)
_d.caching = CachingTool('before_handler', _caching.get, 'caching')
_d.expires = Tool('before_finalize', _caching.expires)
-_d.tidy = DeprecatedTool(
- 'before_finalize',
- 'The tidy tool has been removed from the standard distribution of '
- 'CherryPy. The most recent version can be found at '
- 'http://tools.cherrypy.org/browser.')
-_d.nsgmls = DeprecatedTool(
- 'before_finalize',
- 'The nsgmls tool has been removed from the standard distribution of '
- 'CherryPy. The most recent version can be found at '
- 'http://tools.cherrypy.org/browser.')
_d.ignore_headers = Tool('before_request_body', cptools.ignore_headers)
_d.referer = Tool('before_request_body', cptools.referer)
_d.basic_auth = Tool('on_start_resource', auth.basic_auth)