Merge branch '2.2.x'

This commit is contained in:
David Lord 2023-03-11 08:23:08 -08:00
commit 7ee9ceb71e
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
11 changed files with 31 additions and 29 deletions

View file

@ -37,6 +37,14 @@ Unreleased
binary file instead. :issue:`4989` binary file instead. :issue:`4989`
Version 2.2.4
-------------
Unreleased
- Update for compatibility with Werkzeug 2.3.
Version 2.2.3 Version 2.2.3
------------- -------------

View file

@ -69,7 +69,6 @@ See also:
- Sentry also supports catching errors from a worker queue - Sentry also supports catching errors from a worker queue
(RQ, Celery, etc.) in a similar fashion. See the `Python SDK docs (RQ, Celery, etc.) in a similar fashion. See the `Python SDK docs
<https://docs.sentry.io/platforms/python/>`__ for more information. <https://docs.sentry.io/platforms/python/>`__ for more information.
- `Getting started with Sentry <https://docs.sentry.io/quickstart/?platform=python>`__
- `Flask-specific documentation <https://docs.sentry.io/platforms/python/guides/flask/>`__ - `Flask-specific documentation <https://docs.sentry.io/platforms/python/guides/flask/>`__

View file

@ -44,7 +44,7 @@ use them if you install them.
* `Watchdog`_ provides a faster, more efficient reloader for the development * `Watchdog`_ provides a faster, more efficient reloader for the development
server. server.
.. _Blinker: https://pythonhosted.org/blinker/ .. _Blinker: https://blinker.readthedocs.io/en/stable/
.. _python-dotenv: https://github.com/theskumar/python-dotenv#readme .. _python-dotenv: https://github.com/theskumar/python-dotenv#readme
.. _watchdog: https://pythonhosted.org/watchdog/ .. _watchdog: https://pythonhosted.org/watchdog/

View file

@ -12,6 +12,4 @@ packaging==23.0
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
tomli==2.0.1 tomli==2.0.1
# via # via build
# build
# pyproject-hooks

View file

@ -28,19 +28,19 @@ filelock==3.9.0
# via # via
# tox # tox
# virtualenv # virtualenv
identify==2.5.18 identify==2.5.19
# via pre-commit # via pre-commit
nodeenv==1.7.0 nodeenv==1.7.0
# via pre-commit # via pre-commit
pip-compile-multi==2.6.2 pip-compile-multi==2.6.2
# via -r requirements/dev.in # via -r requirements/dev.in
pip-tools==6.12.2 pip-tools==6.12.3
# via pip-compile-multi # via pip-compile-multi
platformdirs==3.0.0 platformdirs==3.1.1
# via # via
# tox # tox
# virtualenv # virtualenv
pre-commit==3.1.0 pre-commit==3.1.1
# via -r requirements/dev.in # via -r requirements/dev.in
pyproject-api==1.5.0 pyproject-api==1.5.0
# via tox # via tox
@ -48,11 +48,11 @@ pyproject-hooks==1.0.0
# via build # via build
pyyaml==6.0 pyyaml==6.0
# via pre-commit # via pre-commit
toposort==1.9 toposort==1.10
# via pip-compile-multi # via pip-compile-multi
tox==4.4.6 tox==4.4.6
# via -r requirements/dev.in # via -r requirements/dev.in
virtualenv==20.19.0 virtualenv==20.20.0
# via # via
# pre-commit # pre-commit
# tox # tox

View file

@ -7,11 +7,11 @@
# #
alabaster==0.7.13 alabaster==0.7.13
# via sphinx # via sphinx
babel==2.11.0 babel==2.12.1
# via sphinx # via sphinx
certifi==2022.12.7 certifi==2022.12.7
# via requests # via requests
charset-normalizer==3.0.1 charset-normalizer==3.1.0
# via requests # via requests
docutils==0.17.1 docutils==0.17.1
# via # via
@ -35,8 +35,6 @@ pygments==2.14.0
# via # via
# sphinx # sphinx
# sphinx-tabs # sphinx-tabs
pytz==2022.7.1
# via babel
requests==2.28.2 requests==2.28.2
# via sphinx # via sphinx
snowballstemmer==2.2.0 snowballstemmer==2.2.0
@ -66,5 +64,5 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx # via sphinx
sphinxcontrib-serializinghtml==1.1.5 sphinxcontrib-serializinghtml==1.1.5
# via sphinx # via sphinx
urllib3==1.26.14 urllib3==1.26.15
# via requests # via requests

View file

@ -2,4 +2,4 @@ pytest
asgiref asgiref
blinker blinker
greenlet ; python_version < "3.11" greenlet ; python_version < "3.11"
python-dotenv python-dotenv>=1; python_version >= "3.8"

View file

@ -1,4 +1,4 @@
# SHA1:69cf1e101a60350e9933c6f1f3b129bd9ed1ea7c # SHA1:30698f5f4f9cba5088318306829a15b0dc123b38
# #
# This file is autogenerated by pip-compile-multi # This file is autogenerated by pip-compile-multi
# To update, run: # To update, run:
@ -21,9 +21,9 @@ packaging==23.0
# via pytest # via pytest
pluggy==1.0.0 pluggy==1.0.0
# via pytest # via pytest
pytest==7.2.1 pytest==7.2.2
# via -r requirements/tests.in # via -r requirements/tests.in
python-dotenv==0.21.1 python-dotenv==1.0.0 ; python_version >= "3.8"
# via -r requirements/tests.in # via -r requirements/tests.in
tomli==2.0.1 tomli==2.0.1
# via pytest # via pytest

View file

@ -7,9 +7,9 @@
# #
cffi==1.15.1 cffi==1.15.1
# via cryptography # via cryptography
cryptography==39.0.1 cryptography==39.0.2
# via -r requirements/typing.in # via -r requirements/typing.in
mypy==1.0.1 mypy==1.1.1
# via -r requirements/typing.in # via -r requirements/typing.in
mypy-extensions==1.0.0 mypy-extensions==1.0.0
# via mypy # via mypy
@ -21,9 +21,7 @@ types-contextvars==2.4.7.1
# via -r requirements/typing.in # via -r requirements/typing.in
types-dataclasses==0.6.6 types-dataclasses==0.6.6
# via -r requirements/typing.in # via -r requirements/typing.in
types-docutils==0.19.1.6 types-setuptools==67.6.0.0
# via types-setuptools
types-setuptools==67.4.0.1
# via -r requirements/typing.in # via -r requirements/typing.in
typing-extensions==4.5.0 typing-extensions==4.5.0
# via mypy # via mypy

View file

@ -9,6 +9,7 @@ from collections.abc import Iterator as _abc_Iterator
from datetime import timedelta from datetime import timedelta
from itertools import chain from itertools import chain
from types import TracebackType from types import TracebackType
from urllib.parse import quote as _url_quote
import click import click
from werkzeug.datastructures import Headers from werkzeug.datastructures import Headers
@ -25,7 +26,6 @@ from werkzeug.routing import RequestRedirect
from werkzeug.routing import RoutingException from werkzeug.routing import RoutingException
from werkzeug.routing import Rule from werkzeug.routing import Rule
from werkzeug.serving import is_running_from_reloader from werkzeug.serving import is_running_from_reloader
from werkzeug.urls import url_quote
from werkzeug.utils import cached_property from werkzeug.utils import cached_property
from werkzeug.utils import redirect as _wz_redirect from werkzeug.utils import redirect as _wz_redirect
from werkzeug.wrappers import Response as BaseResponse from werkzeug.wrappers import Response as BaseResponse
@ -1710,7 +1710,8 @@ class Flask(Scaffold):
return self.handle_url_build_error(error, endpoint, values) return self.handle_url_build_error(error, endpoint, values)
if _anchor is not None: if _anchor is not None:
rv = f"{rv}#{url_quote(_anchor)}" _anchor = _url_quote(_anchor, safe="%!#$&'()*+,/:;=?@")
rv = f"{rv}#{_anchor}"
return rv return rv

View file

@ -3,11 +3,11 @@ from contextlib import contextmanager
from contextlib import ExitStack from contextlib import ExitStack
from copy import copy from copy import copy
from types import TracebackType from types import TracebackType
from urllib.parse import urlsplit
import werkzeug.test import werkzeug.test
from click.testing import CliRunner from click.testing import CliRunner
from werkzeug.test import Client from werkzeug.test import Client
from werkzeug.urls import url_parse
from werkzeug.wrappers import Request as BaseRequest from werkzeug.wrappers import Request as BaseRequest
from .cli import ScriptInfo from .cli import ScriptInfo
@ -68,7 +68,7 @@ class EnvironBuilder(werkzeug.test.EnvironBuilder):
if url_scheme is None: if url_scheme is None:
url_scheme = app.config["PREFERRED_URL_SCHEME"] url_scheme = app.config["PREFERRED_URL_SCHEME"]
url = url_parse(path) url = urlsplit(path)
base_url = ( base_url = (
f"{url.scheme or url_scheme}://{url.netloc or http_host}" f"{url.scheme or url_scheme}://{url.netloc or http_host}"
f"/{app_root.lstrip('/')}" f"/{app_root.lstrip('/')}"