Skip to content
Myr

Switch to explicit Werkzeug imports

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 6ca321c · Browse files · 7 files+17 added−10 removed
This commit

State

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

Diff stats

7 files+17 added−10 removed

  • other:+17 added−10 removed

7 files+17 added−10 removed

modified:flask/__init__.py+2 added-1 removed
12 unmodified lines
13__version__ = '0.8-dev'1415# utilities we import from Werkzeug and Jinja2 that are unused16# in the module but are exported as public interface.17from werkzeug import abort, redirect17from werkzeug.exceptions import abort18from werkzeug.utils import redirect19from jinja2 import Markup, escape2021from .app import Flask, Request, Response22from .config import Config
19 unmodified lines
modified:flask/app.py+3 added-3 removed
14 unmodified lines
15from threading import Lock16from datetime import timedelta17from itertools import chain1819from werkzeug import ImmutableDict19from werkzeug.datastructures import ImmutableDict20from werkzeug.routing import Map, Rule21from werkzeug.exceptions import HTTPException, InternalServerError, \22 MethodNotAllowed23
526 unmodified lines
550 :param options: the options to be forwarded to the underlying551 Werkzeug server. See :func:`werkzeug.run_simple`552 for more information.553 """554 from werkzeug import run_simple554 from werkzeug.serving import run_simple555 if 'debug' in options:556 self.debug = options.pop('debug')557 options.setdefault('use_reloader', self.debug)558 options.setdefault('use_debugger', self.debug)
707 unmodified lines
1266 """Creates a WSGI environment from the given values (see1267 :func:`werkzeug.create_environ` for more information, this1268 function accepts the same arguments).1269 """1270 from werkzeug import create_environ1270 from werkzeug.test import create_environ1271 environ_overrides = kwargs.setdefault('environ_overrides', {})1272 if self.config.get('SERVER_NAME'):1273 server_name = self.config.get('SERVER_NAME')1274 if ':' not in server_name:
51 unmodified lines
modified:flask/config.py+1 added-1 removed
13 unmodified lines
14import imp15import os16import errno1718from werkzeug import import_string18from werkzeug.utils import import_string192021class ConfigAttribute(object):22 """Makes an attribute forward to the config"""
143 unmodified lines
modified:flask/globals.py+1 added-1 removed
9 unmodified lines
10 :license: BSD, see LICENSE for more details.11"""1213from functools import partial14from werkzeug import LocalStack, LocalProxy14from werkzeug.local import LocalStack, LocalProxy1516def _lookup_object(name):17 top = _request_ctx_stack.top18 if top is None:
9 unmodified lines
modified:flask/helpers.py+7 added-1 removed
34 unmodified lines
35 except ImportError:36 json_available = False373839from werkzeug import Headers, wrap_file39from werkzeug.datastructures import Headers40from werkzeug.exceptions import NotFound4142# this was moved in 0.743try:44 from werkzeug.wsgi import wrap_file45except ImportError:46 from werkzeug.utils import wrap_file4748from jinja2 import FileSystemLoader4950from .globals import session, _request_ctx_stack, current_app, request51
539 unmodified lines
modified:flask/testing.py+1 added-1 removed
8 unmodified lines
9 :copyright: (c) 2010 by Armin Ronacher.10 :license: BSD, see LICENSE for more details.11"""1213from werkzeug import Client, EnvironBuilder13from werkzeug.test import Client, EnvironBuilder14from flask import _request_ctx_stack151617class FlaskClient(Client):
50 unmodified lines
modified:flask/wrappers.py+2 added-2 removed
7 unmodified lines
8 :copyright: (c) 2010 by Armin Ronacher.9 :license: BSD, see LICENSE for more details.10"""1112from werkzeug import Request as RequestBase, Response as ResponseBase, \13 cached_property12from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase13from werkzeug.utils import cached_property1415from .helpers import json, _assert_have_json16from .globals import _request_ctx_stack17
94 unmodified lines