Skip to content
Myr

Merge branch '2.0.x'

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 · parents 7860c1d, 3720669 · Browse files · 9 files+94 added−13 removed
This commit

State

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

Diff stats

9 files+94 added−13 removed

  • other:+94 added−13 removed

9 files+94 added−13 removed

modified:.github/workflows/tests.yaml+2 added
modified:docs/quickstart.rst+1 added-1 removed
466 unmodified lines
467 Markup('<strong>Hello &lt;blink&gt;hacker&lt;/blink&gt;!</strong>')468 >>> Markup.escape('<blink>hacker</blink>')469 Markup('&lt;blink&gt;hacker&lt;/blink&gt;')470 >>> Markup('<em>Marked up</em> &raquo; HTML').striptags()471 'Marked up \xbb HTML'471 'Marked up » HTML'472473.. versionchanged:: 0.5474475 Autoescaping is no longer enabled for all templates. The following
463 unmodified lines
added:requirements/tests-pallets-dev.in+5 added
1https://github.com/pallets/werkzeug/archive/refs/heads/main.tar.gz2https://github.com/pallets/jinja/archive/refs/heads/main.tar.gz3https://github.com/pallets/markupsafe/archive/refs/heads/main.tar.gz4https://github.com/pallets/itsdangerous/archive/refs/heads/main.tar.gz5https://github.com/pallets/click/archive/refs/heads/main.tar.gz
added:requirements/tests-pallets-dev.txt+18 added
1#2# This file is autogenerated by pip-compile with python 3.103# To update, run:4#5# pip-compile requirements/tests-pallets-dev.in6#7click @ https://github.com/pallets/click/archive/refs/heads/main.tar.gz8 # via -r requirements/tests-pallets-dev.in9itsdangerous @ https://github.com/pallets/itsdangerous/archive/refs/heads/main.tar.gz10 # via -r requirements/tests-pallets-dev.in11jinja2 @ https://github.com/pallets/jinja/archive/refs/heads/main.tar.gz12 # via -r requirements/tests-pallets-dev.in13markupsafe @ https://github.com/pallets/markupsafe/archive/refs/heads/main.tar.gz14 # via15 # -r requirements/tests-pallets-dev.in16 # jinja217werkzeug @ https://github.com/pallets/werkzeug/archive/refs/heads/main.tar.gz18 # via -r requirements/tests-pallets-dev.in
added:requirements/tests-pallets-min.in+5 added
1Werkzeug==2.0.02Jinja2==3.0.03MarkupSafe==2.0.04itsdangerous==2.0.05click==8.0.0
added:requirements/tests-pallets-min.txt+18 added
1#2# This file is autogenerated by pip-compile with python 3.103# To update, run:4#5# pip-compile requirements/tests-pallets-min.in6#7click==8.0.08 # via -r requirements/tests-pallets-min.in9itsdangerous==2.0.010 # via -r requirements/tests-pallets-min.in11jinja2==3.0.012 # via -r requirements/tests-pallets-min.in13markupsafe==2.0.014 # via15 # -r requirements/tests-pallets-min.in16 # jinja217werkzeug==2.0.018 # via -r requirements/tests-pallets-min.in
modified:src/flask/testing.py+30 added-12 removed
7 unmodified lines
8from werkzeug.test import Client9from werkzeug.urls import url_parse10from werkzeug.wrappers import Request as BaseRequest1112from . import _request_ctx_stack12from .cli import ScriptInfo13from .globals import _request_ctx_stack14from .json import dumps as json_dumps15from .sessions import SessionMixin1617if t.TYPE_CHECKING:18 from werkzeug.test import TestResponse1920 from .app import Flask19 from .wrappers import Response212223class EnvironBuilder(werkzeug.test.EnvironBuilder):24 """An :class:`~werkzeug.test.EnvironBuilder`, that takes defaults from the
146 unmodified lines
171 session_interface.save_session(app, sess, resp)172 headers = resp.get_wsgi_headers(c.request.environ)173 self.cookie_jar.extract_wsgi(c.request.environ, headers)174174 def open( # type: ignore175 def open(176 self,177 *args: t.Any,177 as_tuple: bool = False,178 buffered: bool = False,179 follow_redirects: bool = False,180 **kwargs: t.Any,181 ) -> "Response":181 ) -> "TestResponse":182 as_tuple = kwargs.pop("as_tuple", None)183184 # Same logic as super.open, but apply environ_base and preserve_context.185 request = None186187 def copy_environ(other):
26 unmodified lines
214 request = builder.get_request()215 finally:216 builder.close()217216 return super().open( # type: ignore217 request,218 as_tuple=as_tuple,219 buffered=buffered,220 follow_redirects=follow_redirects,221 )218 if as_tuple is not None:219 import warnings220221 warnings.warn(222 "'as_tuple' is deprecated and will be removed in"223 " Werkzeug 2.1 and Flask 2.1. Use"224 " 'response.request.environ' instead.",225 DeprecationWarning,226 stacklevel=3,227 )228 return super().open(229 request,230 as_tuple=as_tuple,231 buffered=buffered,232 follow_redirects=follow_redirects,233 )234 else:235 return super().open(236 request,237 buffered=buffered,238 follow_redirects=follow_redirects,239 )240241 def __enter__(self) -> "FlaskClient":242 if self.preserve_context:243 raise RuntimeError("Cannot nest client invocations")244 self.preserve_context = True
44 unmodified lines
289290 :return: a :class:`~click.testing.Result` object.291 """292 if cli is None:275 cli = self.app.cli293 cli = self.app.cli # type: ignore294295 if "obj" not in kwargs:296 kwargs["obj"] = ScriptInfo(create_app=lambda: self.app)297
1 unmodified line
modified:CHANGES.rst+11 added
28 unmodified lines
29 - ``add_etags`` is renamed to ``etag``.30 - ``filename`` is renamed to ``path``.313233Version 2.0.334-------------3536Unreleased3738- The test client's ``as_tuple`` parameter is deprecated and will be39 removed in Werkzeug 2.1. It is now also deprecated in Flask, to be40 removed in Flask 2.1, while remaining compatible with both in41 2.0.x. Use ``response.request.environ`` instead. :pr:`4341`424344Version 2.0.245-------------4647Released 2021-10-04
1178 unmodified lines
modified:tox.ini+4 added
1[tox]2envlist =3 py3{11,10,9,8,7},pypy3{8,7}4 py310-min5 py37-dev6 style7 typing8 docs9skip_missing_interpreters = true1011[testenv]12deps =13 -r requirements/tests.txt14 min: -r requirements/tests-pallets-min.txt15 dev: -r requirements/tests-pallets-dev.txt1617 examples/tutorial[test]18 examples/javascript[test]19commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs:tests examples}
13 unmodified lines