update werkzeug
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 37badc3 · 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
Provenance
- Commit
e1aedec- Tree
3f1ee45- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
37badc3
3 files changed+10 added−20 removed
modified:src/flask/testing.py+7 added-17 removed
136 unmodified lines137 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_jar143-144- 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 )145 146 app = self.application147 ctx = app.test_request_context(*args, **kwargs)148+ self._add_cookies_to_wsgi(ctx.request.environ)149 152- 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]156-150 with ctx:151 sess = app.session_interface.open_session(app, ctx.request)152 153 if sess is None:7 unmodified lines161 162 with ctx:163 app.session_interface.save_session(app, sess, resp)164 172- 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+ )170 171 def _copy_environ(self, other):172 out = {**self.environ_base, **other}173 109 unmodified linesmodified:CHANGES.rst+2 added-2 removed
1 unmodified line2 -------------3 4 Unreleased5 6-- 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.8 9 10 Version 2.3.111 -------------1485 unmodified linesmodified:pyproject.toml+1 added-1 removed
18 unmodified lines1920212223232425262770 unmodified lines18 unmodified lines "Topic :: Software Development :: Libraries :: Application Frameworks",]requires-python = ">=3.8"dependencies = [ "Werkzeug>=2.3.0", "Werkzeug>=2.3.3", "Jinja2>=3.1.2", "itsdangerous>=2.1.2", "click>=8.1.3", "blinker>=1.6.2",70 unmodified lines