Skip to content
Myr

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

16 files+41 added−35 removed

modified:docs/patterns/appdispatch.rst+2 added-2 removed
91 unmodified lines
92exist yet, it is dynamically created and remembered::9394 from threading import Lock9596 class SubdomainDispatcher(object):96 class SubdomainDispatcher:9798 def __init__(self, domain, create_app):99 self.domain = domain100 self.create_app = create_app
46 unmodified lines
147148 from threading import Lock149 from werkzeug.wsgi import pop_path_info, peek_path_info150151 class PathDispatcher(object):151 class PathDispatcher:152153 def __init__(self, default_app, create_app):154 self.default_app = default_app155 self.create_app = create_app
31 unmodified lines
modified:docs/api.rst+1 added-1 removed
246 unmodified lines
247248.. sourcecode:: html+jinja249250 <script>251 const names = {{ names|tosjon }};251 const names = {{ names|tojson }};252 renderChart(names, {{ axis_data|tojson }});253 </script>254255.. autofunction:: jsonify
495 unmodified lines
modified:docs/config.rst+1 added-1 removed
45 unmodified lines
46----------4748The :data:`DEBUG` config value is special because it may behave inconsistently if49changed 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 interactive51debugger and reloader by default in debug mode.5253.. code-block:: text54
726 unmodified lines
modified:docs/extensiondev.rst+1 added-1 removed
210 unmodified lines
211 class PostAPI(MethodView):212 def __init__(self, model):213 self.model = model214215 def get(id):215 def get(self, id):216 post = self.model.query.get(id)217 return jsonify(post.to_json())218219 class BlogExtension:
85 unmodified lines
modified:docs/views.rst+1 added-1 removed
254 unmodified lines
255 def _get_item(self, id):256 return self.model.query.get_or_404(id)257258 def get(self, id):259 user = self._get_item(id)259 item = self._get_item(id)260 return jsonify(item.to_json())261262 def patch(self, id):263 item = self._get_item(id)
61 unmodified lines
modified:requirements/dev.txt+16 added-10 removed
8 unmodified lines
9-r tests.txt10-r typing.txt11build==0.9.012 # via pip-tools13cachetools==5.2.014 # via tox15cfgv==3.3.116 # via pre-commit17chardet==5.1.018 # via tox19click==8.1.320 # via21 # pip-compile-multi22 # pip-tools23colorama==0.4.624 # via tox25distlib==0.3.626 # via virtualenv21filelock==3.8.027filelock==3.8.228 # via29 # tox30 # virtualenv25identify==2.5.931identify==2.5.1132 # via pre-commit33nodeenv==1.7.034 # via pre-commit35pep517==0.13.036 # via build37pip-compile-multi==2.6.138 # via -r requirements/dev.in33pip-tools==6.10.039pip-tools==6.12.140 # via pip-compile-multi35platformdirs==2.5.436 # via virtualenv41platformdirs==2.6.042 # via43 # tox44 # virtualenv45pre-commit==2.20.046 # via -r requirements/dev.in39py==1.11.047pyproject-api==1.2.148 # via tox49pyyaml==6.050 # via pre-commit43six==1.16.044 # via tox51toml==0.10.252 # via pre-commit53toposort==1.754 # via pip-compile-multi49tox==3.27.155tox==4.0.1656 # via -r requirements/dev.in51virtualenv==20.16.757virtualenv==20.17.158 # via59 # pre-commit60 # tox61wheel==0.38.4
5 unmodified lines
modified:requirements/docs.txt+4 added-6 removed
7 unmodified lines
8alabaster==0.7.129 # via sphinx10babel==2.11.011 # via sphinx12certifi==2022.9.2412certifi==2022.12.713 # via requests14charset-normalizer==2.1.115 # via requests16docutils==0.17.1
7 unmodified lines
24jinja2==3.1.225 # via sphinx26markupsafe==2.1.127 # via jinja228packaging==21.328packaging==22.029 # via30 # pallets-sphinx-themes31 # sphinx32pallets-sphinx-themes==2.0.232pallets-sphinx-themes==2.0.333 # via -r requirements/docs.in34pygments==2.13.035 # via36 # sphinx37 # sphinx-tabs38pyparsing==3.0.939 # via packaging40pytz==2022.638pytz==2022.739 # via babel40requests==2.28.141 # via sphinx42snowballstemmer==2.2.0
28 unmodified lines
modified:requirements/tests.txt+3 added-5 removed
3 unmodified lines
4# To update, run:5#6# pip-compile-multi7#8asgiref==3.5.28asgiref==3.6.09 # via -r requirements/tests.in10attrs==22.1.010attrs==22.2.011 # via pytest12blinker==1.513 # via -r requirements/tests.in14iniconfig==1.1.115 # via pytest16packaging==21.316packaging==22.017 # via pytest18pluggy==1.0.019 # via pytest20pyparsing==3.0.921 # via packaging20pytest==7.2.021 # via -r requirements/tests.in22python-dotenv==0.21.023 # via -r requirements/tests.in
modified:requirements/typing.txt+2 added-2 removed
5 unmodified lines
6# pip-compile-multi7#8cffi==1.15.19 # via cryptography10cryptography==38.0.310cryptography==38.0.411 # via -r requirements/typing.in12mypy==0.99113 # via -r requirements/typing.in14mypy-extensions==0.4.3
3 unmodified lines
18types-contextvars==2.4.719 # via -r requirements/typing.in20types-dataclasses==0.6.621 # via -r requirements/typing.in22types-setuptools==65.6.0.122types-setuptools==65.6.0.223 # via -r requirements/typing.in24typing-extensions==4.4.025 # via mypy
modified:src/flask/app.py+1 added-1 removed
556 unmodified lines
557 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 lines
modified:src/flask/blueprints.py+1 added-1 removed
248 unmodified lines
249 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 lines
modified:src/flask/scaffold.py+1 added-1 removed
91 unmodified lines
92 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 lines
modified:.pre-commit-config.yaml+2 added-2 removed
1 unmodified line
2 autoupdate_branch: "2.2.x"3 autoupdate_schedule: monthly4repos: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_imports
3 unmodified lines
14 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.0
15 unmodified lines
modified:CHANGES.rst+2 added
10 unmodified lines
1112- 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`161718Version 2.2.219-------------2021Released 2022-08-08
1403 unmodified lines
modified:CONTRIBUTING.rst+1 added-1 removed
169 unmodified lines
170 .. code-block:: text171172 $ git push --set-upstream fork your-branch-name173174.. _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-request176177178Running the tests
49 unmodified lines
modified:setup.cfg+2 added
78 unmodified lines
79 # bare except, handled by bugbear B00180 E72281 # bin op line break, invalid82 W50383 # requires Python 3.1084 B90585# up to 88 allowed by bugbear B95086max-line-length = 8087per-file-ignores =88 # __init__ exports names
35 unmodified lines