Skip to content
Myr

Merge pull request #5101 from pallets/update-werkzeug

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

update werkzeug to >=2.3.3

authored by David Lord · committed by GitHub · parents 37badc3, e1aedec · Browse files · 3 files+10 added−20 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+10 added−20 removed

  • other:+10 added−20 removed

3 files+10 added−20 removed

modified:src/flask/testing.py+7 added-17 removed
136 unmodified lines
137 request variables this function accepts the same arguments as138 :meth:`~flask.Flask.test_request_context` which are directly139 passed through.140 """141 # new cookie interface for Werkzeug >= 2.3142 cookie_storage = self._cookies if hasattr(self, "_cookies") else self.cookie_jar143144 if cookie_storage is None:141 if self._cookies is None:142 raise TypeError(143 "Cookies are disabled. Create a client with 'use_cookies=True'."144 )145146 app = self.application147 ctx = app.test_request_context(*args, **kwargs)148 self._add_cookies_to_wsgi(ctx.request.environ)149152 if hasattr(self, "_add_cookies_to_wsgi"):153 self._add_cookies_to_wsgi(ctx.request.environ)154 else:155 self.cookie_jar.inject_wsgi(ctx.request.environ) # type: ignore[union-attr]156150 with ctx:151 sess = app.session_interface.open_session(app, ctx.request)152153 if sess is None:
7 unmodified lines
161162 with ctx:163 app.session_interface.save_session(app, sess, resp)164172 if hasattr(self, "_update_cookies_from_response"):173 self._update_cookies_from_response(174 ctx.request.host.partition(":")[0], resp.headers.getlist("Set-Cookie")175 )176 else:177 self.cookie_jar.extract_wsgi( # type: ignore[union-attr]178 ctx.request.environ, resp.headers179 )165 self._update_cookies_from_response(166 ctx.request.host.partition(":")[0],167 ctx.request.path,168 resp.headers.getlist("Set-Cookie"),169 )170171 def _copy_environ(self, other):172 out = {**self.environ_base, **other}173
109 unmodified lines
modified:CHANGES.rst+2 added-2 removed
1 unmodified line
2-------------34Unreleased56- Session cookie sets ``Vary: Cookie`` header when it is accessed, modified, cleared,7 or refreshed.6- Set ``Vary: Cookie`` header when the session is accessed, modified, or refreshed.7- Update Werkzeug requirement to >=2.3.3 to apply recent bug fixes.8910Version 2.3.111-------------
1485 unmodified lines
modified:pyproject.toml+1 added-1 removed