Merge branch '1.0-maintenance'
This commit is contained in:
commit
3b45b82ec2
13 changed files with 68 additions and 57 deletions
|
|
@ -28,6 +28,7 @@ if not PY2:
|
|||
|
||||
from inspect import getfullargspec as getargspec
|
||||
from io import StringIO
|
||||
import collections.abc as collections_abc
|
||||
|
||||
def reraise(tp, value, tb=None):
|
||||
if value.__traceback__ is not tb:
|
||||
|
|
@ -47,6 +48,7 @@ else:
|
|||
|
||||
from inspect import getargspec
|
||||
from cStringIO import StringIO
|
||||
import collections as collections_abc
|
||||
|
||||
exec('def reraise(tp, value, tb=None):\n raise tp, value, tb')
|
||||
|
||||
|
|
|
|||
17
flask/app.py
17
flask/app.py
|
|
@ -1678,16 +1678,17 @@ class Flask(_PackageBoundObject):
|
|||
return False
|
||||
|
||||
def handle_user_exception(self, e):
|
||||
"""This method is called whenever an exception occurs that should be
|
||||
handled. A special case are
|
||||
:class:`~werkzeug.exception.HTTPException`\s which are forwarded by
|
||||
this function to the :meth:`handle_http_exception` method. This
|
||||
function will either return a response value or reraise the
|
||||
exception with the same traceback.
|
||||
"""This method is called whenever an exception occurs that
|
||||
should be handled. A special case is :class:`~werkzeug
|
||||
.exceptions.HTTPException` which is forwarded to the
|
||||
:meth:`handle_http_exception` method. This function will either
|
||||
return a response value or reraise the exception with the same
|
||||
traceback.
|
||||
|
||||
.. versionchanged:: 1.0
|
||||
Key errors raised from request data like ``form`` show the bad
|
||||
key in debug mode rather than a generic bad request message.
|
||||
Key errors raised from request data like ``form`` show the
|
||||
bad key in debug mode rather than a generic bad request
|
||||
message.
|
||||
|
||||
.. versionadded:: 0.7
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ class DispatchingApp(object):
|
|||
|
||||
|
||||
class ScriptInfo(object):
|
||||
"""Help object to deal with Flask applications. This is usually not
|
||||
"""Helper object to deal with Flask applications. This is usually not
|
||||
necessary to interface with as it's used internally in the dispatching
|
||||
to click. In future versions of Flask this object will most likely play
|
||||
a bigger role. Typically it's created automatically by the
|
||||
|
|
@ -725,7 +725,7 @@ def _validate_key(ctx, param, value):
|
|||
return value
|
||||
|
||||
|
||||
@click.command('run', short_help='Runs a development server.')
|
||||
@click.command('run', short_help='Run a development server.')
|
||||
@click.option('--host', '-h', default='127.0.0.1',
|
||||
help='The interface to bind to.')
|
||||
@click.option('--port', '-p', default=5000,
|
||||
|
|
@ -777,10 +777,10 @@ def run_command(info, host, port, reload, debugger, eager_loading,
|
|||
threaded=with_threads, ssl_context=cert)
|
||||
|
||||
|
||||
@click.command('shell', short_help='Runs a shell in the app context.')
|
||||
@click.command('shell', short_help='Run a shell in the app context.')
|
||||
@with_appcontext
|
||||
def shell_command():
|
||||
"""Runs an interactive Python shell in the context of a given
|
||||
"""Run an interactive Python shell in the context of a given
|
||||
Flask application. The application will populate the default
|
||||
namespace of this shell according to it's configuration.
|
||||
|
||||
|
|
|
|||
|
|
@ -11,17 +11,17 @@
|
|||
|
||||
import hashlib
|
||||
import warnings
|
||||
from collections import MutableMapping
|
||||
from datetime import datetime
|
||||
|
||||
from itsdangerous import BadSignature, URLSafeTimedSerializer
|
||||
from werkzeug.datastructures import CallbackDict
|
||||
|
||||
from flask._compat import collections_abc
|
||||
from flask.helpers import is_ip, total_seconds
|
||||
from flask.json.tag import TaggedJSONSerializer
|
||||
|
||||
|
||||
class SessionMixin(MutableMapping):
|
||||
class SessionMixin(collections_abc.MutableMapping):
|
||||
"""Expands a basic dictionary with session attributes."""
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue