Merge branch '2.2.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 066a35d, 631b6dd · Browse files · 16 files·+41 added−35 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
16 files+41 added−35 removed
- other:+41 added−35 removed
Provenance
- Commit
7464e17- Tree
fe174db- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
066a35d- Parent 2
631b6dd
16 files changed+41 added−35 removed
modified:docs/patterns/appdispatch.rst+2 added-2 removed
91 unmodified lines92 exist yet, it is dynamically created and remembered::93 94 from threading import Lock95 96- class SubdomainDispatcher(object):96+ class SubdomainDispatcher:97 98 def __init__(self, domain, create_app):99 self.domain = domain100 self.create_app = create_app46 unmodified lines147 148 from threading import Lock149 from werkzeug.wsgi import pop_path_info, peek_path_info150 151- class PathDispatcher(object):151+ class PathDispatcher:152 153 def __init__(self, default_app, create_app):154 self.default_app = default_app155 self.create_app = create_app31 unmodified linesmodified:docs/api.rst+1 added-1 removed
246 unmodified lines247 248 .. sourcecode:: html+jinja249 250 <script>251- const names = {{ names|tosjon }};251+ const names = {{ names|tojson }};252 renderChart(names, {{ axis_data|tojson }});253 </script>254 255 .. autofunction:: jsonify495 unmodified linesmodified:docs/config.rst+1 added-1 removed
45 unmodified lines46 ----------47 48 The :data:`DEBUG` config value is special because it may behave inconsistently if49 changed after the app has begun setting up. In order to set debug mode reliably, use the50-``--debug`` option on the ``flask`` command.``flask run`` will use the interactive50+``--debug`` option on the ``flask`` command. ``flask run`` will use the interactive51 debugger and reloader by default in debug mode.52 53 .. code-block:: text54 726 unmodified linesmodified:docs/extensiondev.rst+1 added-1 removed
210 unmodified lines211 class PostAPI(MethodView):212 def __init__(self, model):213 self.model = model214 215- def get(id):215+ def get(self, id):216 post = self.model.query.get(id)217 return jsonify(post.to_json())218 219 class BlogExtension:85 unmodified linesmodified:docs/views.rst+1 added-1 removed
254 unmodified lines255 def _get_item(self, id):256 return self.model.query.get_or_404(id)257 258 def get(self, id):259- user = self._get_item(id)259+ item = self._get_item(id)260 return jsonify(item.to_json())261 262 def patch(self, id):263 item = self._get_item(id)61 unmodified linesmodified:requirements/dev.txt+16 added-10 removed
8 unmodified lines9 -r tests.txt10 -r typing.txt11 build==0.9.012 # via pip-tools13+cachetools==5.2.014+ # via tox15 cfgv==3.3.116 # via pre-commit17+chardet==5.1.018+ # via tox19 click==8.1.320 # via21 # pip-compile-multi22 # pip-tools23+colorama==0.4.624+ # via tox25 distlib==0.3.626 # via virtualenv21-filelock==3.8.027+filelock==3.8.228 # via29 # tox30 # virtualenv25-identify==2.5.931+identify==2.5.1132 # via pre-commit33 nodeenv==1.7.034 # via pre-commit35 pep517==0.13.036 # via build37 pip-compile-multi==2.6.138 # via -r requirements/dev.in33-pip-tools==6.10.039+pip-tools==6.12.140 # via pip-compile-multi35-platformdirs==2.5.436- # via virtualenv41+platformdirs==2.6.042+ # via43+ # tox44+ # virtualenv45 pre-commit==2.20.046 # via -r requirements/dev.in39-py==1.11.047+pyproject-api==1.2.148 # via tox49 pyyaml==6.050 # via pre-commit43-six==1.16.044- # via tox51 toml==0.10.252 # via pre-commit53 toposort==1.754 # via pip-compile-multi49-tox==3.27.155+tox==4.0.1656 # via -r requirements/dev.in51-virtualenv==20.16.757+virtualenv==20.17.158 # via59 # pre-commit60 # tox61 wheel==0.38.45 unmodified linesmodified:requirements/docs.txt+4 added-6 removed
7 unmodified lines8 alabaster==0.7.129 # via sphinx10 babel==2.11.011 # via sphinx12-certifi==2022.9.2412+certifi==2022.12.713 # via requests14 charset-normalizer==2.1.115 # via requests16 docutils==0.17.17 unmodified lines24 jinja2==3.1.225 # via sphinx26 markupsafe==2.1.127 # via jinja228-packaging==21.328+packaging==22.029 # via30 # pallets-sphinx-themes31 # sphinx32-pallets-sphinx-themes==2.0.232+pallets-sphinx-themes==2.0.333 # via -r requirements/docs.in34 pygments==2.13.035 # via36 # sphinx37 # sphinx-tabs38-pyparsing==3.0.939- # via packaging40-pytz==2022.638+pytz==2022.739 # via babel40 requests==2.28.141 # via sphinx42 snowballstemmer==2.2.028 unmodified linesmodified:requirements/tests.txt+3 added-5 removed
3 unmodified lines4 # To update, run:5 #6 # pip-compile-multi7 #8-asgiref==3.5.28+asgiref==3.6.09 # via -r requirements/tests.in10-attrs==22.1.010+attrs==22.2.011 # via pytest12 blinker==1.513 # via -r requirements/tests.in14 iniconfig==1.1.115 # via pytest16-packaging==21.316+packaging==22.017 # via pytest18 pluggy==1.0.019 # via pytest20-pyparsing==3.0.921- # via packaging20 pytest==7.2.021 # via -r requirements/tests.in22 python-dotenv==0.21.023 # via -r requirements/tests.inmodified:requirements/typing.txt+2 added-2 removed
5 unmodified lines6 # pip-compile-multi7 #8 cffi==1.15.19 # via cryptography10-cryptography==38.0.310+cryptography==38.0.411 # via -r requirements/typing.in12 mypy==0.99113 # via -r requirements/typing.in14 mypy-extensions==0.4.33 unmodified lines18 types-contextvars==2.4.719 # via -r requirements/typing.in20 types-dataclasses==0.6.621 # via -r requirements/typing.in22-types-setuptools==65.6.0.122+types-setuptools==65.6.0.223 # via -r requirements/typing.in24 typing-extensions==4.4.025 # via mypymodified:src/flask/app.py+1 added-1 removed
556 unmodified lines557 static_folder: t.Optional[t.Union[str, os.PathLike]] = "static",558 static_host: t.Optional[str] = None,559 host_matching: bool = False,560 subdomain_matching: bool = False,561- template_folder: t.Optional[str] = "templates",561+ template_folder: t.Optional[t.Union[str, os.PathLike]] = "templates",562 instance_path: t.Optional[str] = None,563 instance_relative_config: bool = False,564 root_path: t.Optional[str] = None,565 ):1986 unmodified linesmodified:src/flask/blueprints.py+1 added-1 removed
248 unmodified lines249 name: str,250 import_name: str,251 static_folder: t.Optional[t.Union[str, os.PathLike]] = None,252 static_url_path: t.Optional[str] = None,253- template_folder: t.Optional[str] = None,253+ template_folder: t.Optional[t.Union[str, os.PathLike]] = None,254 url_prefix: t.Optional[str] = None,255 subdomain: t.Optional[str] = None,256 url_defaults: t.Optional[dict] = None,257 root_path: t.Optional[str] = None,449 unmodified linesmodified:src/flask/scaffold.py+1 added-1 removed
91 unmodified lines92 self,93 import_name: str,94 static_folder: t.Optional[t.Union[str, os.PathLike]] = None,95 static_url_path: t.Optional[str] = None,96- template_folder: t.Optional[str] = None,96+ template_folder: t.Optional[t.Union[str, os.PathLike]] = None,97 root_path: t.Optional[str] = None,98 ):99 #: The name of the package or module that this object belongs100 #: to. Do not change this once it is set by the constructor.798 unmodified linesmodified:.pre-commit-config.yaml+2 added-2 removed
1 unmodified line2 autoupdate_branch: "2.2.x"3 autoupdate_schedule: monthly4 repos:5 - repo: https://github.com/asottile/pyupgrade6- rev: v3.2.26+ rev: v3.3.17 hooks:8 - id: pyupgrade9 args: ["--py37-plus"]10 - repo: https://github.com/asottile/reorder_python_imports3 unmodified lines14 name: Reorder Python imports (src, tests)15 files: "^(?!examples/)"16 args: ["--application-directories", "src"]17 - repo: https://github.com/psf/black18- rev: 22.10.018+ rev: 22.12.019 hooks:20 - id: black21 - repo: https://github.com/PyCQA/flake822 rev: 6.0.015 unmodified linesmodified:CHANGES.rst+2 added
10 unmodified lines11 12 - Autoescaping is now enabled by default for ``.svg`` files. Inside13 templates this behavior can be changed with the ``autoescape`` tag.14 :issue:`4831`15+- Fix the type of ``template_folder`` to accept ``pathlib.Path``. :issue:`4892`16 17+18 Version 2.2.219 -------------20 21 Released 2022-08-081403 unmodified linesmodified:CONTRIBUTING.rst+1 added-1 removed
169 unmodified lines170 .. code-block:: text171 172 $ git push --set-upstream fork your-branch-name173 174-.. _committing as you go: https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes174+.. _committing as you go: https://afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes175 .. _create a pull request: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request176 177 178 Running the tests49 unmodified linesmodified:setup.cfg+2 added
78 unmodified lines79 # bare except, handled by bugbear B00180 E72281 # bin op line break, invalid82 W50383+ # requires Python 3.1084+ B90585 # up to 88 allowed by bugbear B95086 max-line-length = 8087 per-file-ignores =88 # __init__ exports names35 unmodified lines