Skip to content
Myr

remove deprecated Flask.error_handlers

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent c5d3f80 · Browse files · 1 file+1 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−16 removed

  • other:+1 added−16 removed

1 file+1 added−16 removed

modified:flask/app.py+1 added-16 removed
391 unmodified lines
392 #: the values are the function objects themselves.393 #: To register a view function, use the :meth:`route` decorator.394 self.view_functions = {}395396 # support for the now deprecated `error_handlers` attribute. The397 # :attr:`error_handler_spec` shall be used now.398 self._error_handlers = {}399396 #: A dictionary of all registered error handlers. The key is ``None``397 #: for error handlers active on the application, otherwise the key is398 #: the name of the blueprint. Each key points to another dictionary399 #: where the key is the status code of the http exception. The
2 unmodified lines
402 #: function.403 #:404 #: To register an error handler, use the :meth:`errorhandler`405 #: decorator.410 self.error_handler_spec = {None: self._error_handlers}406 self.error_handler_spec = {}407408 #: A list of functions that are called when :meth:`url_for` raises a409 #: :exc:`~werkzeug.routing.BuildError`. Each function registered here410 #: is called with `error`, `endpoint` and `values`. If a function
147 unmodified lines
558 #:559 #: This is an instance of a :class:`click.Group` object.560 self.cli = cli.AppGroup(self.name)561566 def _get_error_handlers(self):567 from warnings import warn568 warn(DeprecationWarning('error_handlers is deprecated, use the '569 'new error_handler_spec attribute instead.'), stacklevel=1)570 return self._error_handlers571 def _set_error_handlers(self, value):572 self._error_handlers = value573 self.error_handler_spec[None] = value574 error_handlers = property(_get_error_handlers, _set_error_handlers)575 del _get_error_handlers, _set_error_handlers576562 @locked_cached_property563 def name(self):564 """The name of the application. This is usually the import name565 with the difference that it's guessed from the run file if the
1606 unmodified lines