Browse Source

cleanup werkzeug import (#2582)

pull/2584/head
Hsiaoming Yang 7 years ago committed by Armin Ronacher
parent
commit
22e072379b
  1. 13
      flask/helpers.py
  2. 6
      flask/testing.py

13
flask/helpers.py

@ -22,21 +22,12 @@ import unicodedata
from werkzeug.routing import BuildError
from functools import update_wrapper
try:
from werkzeug.urls import url_quote
except ImportError:
from urlparse import quote as url_quote
from werkzeug.urls import url_quote
from werkzeug.datastructures import Headers, Range
from werkzeug.exceptions import BadRequest, NotFound, \
RequestedRangeNotSatisfiable
# this was moved in 0.7
try:
from werkzeug.wsgi import wrap_file
except ImportError:
from werkzeug.utils import wrap_file
from werkzeug.wsgi import wrap_file
from jinja2 import FileSystemLoader
from .signals import message_flashed

6
flask/testing.py

@ -15,11 +15,7 @@ from contextlib import contextmanager
from werkzeug.test import Client, EnvironBuilder
from flask import _request_ctx_stack
from flask.json import dumps as json_dumps
try:
from werkzeug.urls import url_parse
except ImportError:
from urlparse import urlsplit as url_parse
from werkzeug.urls import url_parse
def make_test_environ_builder(

Loading…
Cancel
Save