Skip to content

Commit

Permalink
deprecation: deprecate the use of remove_route
Browse files Browse the repository at this point in the history
  • Loading branch information
yunstanford committed May 10, 2019
1 parent 669cfa3 commit d4ef151
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sanic/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,20 @@ def remove_route(self, uri, clean_cache=True, host=None):
This method provides the app user a mechanism by which an already
existing route can be removed from the :class:`Sanic` object
.. warning::
remove_route is deprecated in v19.06 and will be removed from future versions.
:param uri: URL Path to be removed from the app
:param clean_cache: Instruct sanic if it needs to clean up the LRU
route cache
:param host: IP address or FQDN specific to the host
:return: None
"""
warnings.warn(
"remove_route is deprecated and will be removed from future versions.",
DeprecationWarning,
stacklevel=2,
)
self.router.remove(uri, clean_cache, host)

# Decorator
Expand Down

0 comments on commit d4ef151

Please sign in to comment.