Skip to content
Myr

replace werkzeug.urls with urllib.parse

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 e7f8ae0 · Browse files · 3 files+13 added−4 removed
This commit

State

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

Diff stats

3 files+13 added−4 removed

  • other:+13 added−4 removed

3 files+13 added−4 removed

modified:src/flask/app.py+3 added-2 removed
9 unmodified lines
10from datetime import timedelta11from itertools import chain12from threading import Lock13from types import TracebackType14from urllib.parse import quote as _url_quote1516import click17from werkzeug.datastructures import Headers18from werkzeug.datastructures import ImmutableDict
8 unmodified lines
27from werkzeug.routing import RequestRedirect28from werkzeug.routing import RoutingException29from werkzeug.routing import Rule30from werkzeug.serving import is_running_from_reloader30from werkzeug.urls import url_quote31from werkzeug.utils import redirect as _wz_redirect32from werkzeug.wrappers import Response as BaseResponse3334from . import cli
1998 unmodified lines
2033 )2034 return self.handle_url_build_error(error, endpoint, values)20352036 if _anchor is not None:2037 rv = f"{rv}#{url_quote(_anchor)}"2037 _anchor = _url_quote(_anchor, safe="%!#$&'()*+,/:;=?@")2038 rv = f"{rv}#{_anchor}"20392040 return rv20412042 def redirect(self, location: str, code: int = 302) -> BaseResponse:
510 unmodified lines
modified:src/flask/testing.py+2 added-2 removed
1 unmodified line
2from contextlib import contextmanager3from contextlib import ExitStack4from copy import copy5from types import TracebackType6from urllib.parse import urlsplit78import werkzeug.test9from click.testing import CliRunner10from werkzeug.test import Client10from werkzeug.urls import url_parse11from werkzeug.wrappers import Request as BaseRequest1213from .cli import ScriptInfo14from .globals import _cv_request
52 unmodified lines
6768 if url_scheme is None:69 url_scheme = app.config["PREFERRED_URL_SCHEME"]7071 url = url_parse(path)71 url = urlsplit(path)72 base_url = (73 f"{url.scheme or url_scheme}://{url.netloc or http_host}"74 f"/{app_root.lstrip('/')}"75 )
211 unmodified lines
modified:CHANGES.rst+8 added
1Version 2.2.42-------------34Unreleased56- Update for compatibility with Werkzeug 2.3.789Version 2.2.310-------------1112Released 2023-02-15
1413 unmodified lines