Merge branch '2.3.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 d0bf462, 38f02e0 · Browse files · 9 files·+26 added−25 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+26 added−25 removed
- other:+26 added−25 removed
Provenance
- Commit
31fd9c8- Tree
1a0827a- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent 1
d0bf462- Parent 2
38f02e0
9 files changed+26 added−25 removed
modified:docs/patterns/javascript.rst+2 added-2 removed
123 unmodified lines124 125 .. code-block:: javascript126 127 let data = new FormData()128- data.append("name": "Flask Room")129- data.append("description": "Talk about Flask here.")128+ data.append("name", "Flask Room")129+ data.append("description", "Talk about Flask here.")130 fetch(room_url, {131 "method": "POST",132 "body": data,133 }).then(...)126 unmodified linesmodified:docs/config.rst+2 added-2 removed
408 unmodified lines409 from a TOML file:410 411 .. code-block:: python412 413- import toml414- app.config.from_file("config.toml", load=toml.load)413+ import tomllib414+ app.config.from_file("config.toml", load=tomllib.load, text=False)415 416 Or from a JSON file:417 418 .. code-block:: python303 unmodified linesmodified:requirements/dev.txt+7 added-7 removed
8 unmodified lines9 -r tests.txt10 -r typing.txt11 build==0.10.012 # via pip-tools13-cachetools==5.3.013+cachetools==5.3.114 # via tox15 cfgv==3.3.116 # via pre-commit17 chardet==5.1.09 unmodified lines27 filelock==3.12.028 # via29 # tox30 # virtualenv31-identify==2.5.2331+identify==2.5.2432 # via pre-commit33-nodeenv==1.7.033+nodeenv==1.8.034 # via pre-commit35-pip-compile-multi==2.6.235+pip-compile-multi==2.6.336 # via -r requirements/dev.in37 pip-tools==6.13.038 # via pip-compile-multi39-platformdirs==3.5.039+platformdirs==3.5.140 # via41 # tox42 # virtualenv43-pre-commit==3.3.143+pre-commit==3.3.244 # via -r requirements/dev.in45 pyproject-api==1.5.146 # via tox47 pyproject-hooks==1.0.01 unmodified line49 pyyaml==6.050 # via pre-commit51 toposort==1.1052 # via pip-compile-multi53-tox==4.5.153+tox==4.5.254 # via -r requirements/dev.in55 virtualenv==20.23.056 # via57 # pre-commit7 unmodified linesmodified:requirements/docs.txt+3 added-3 removed
7 unmodified lines8 alabaster==0.7.139 # via sphinx10 babel==2.12.111 # via sphinx12-certifi==2022.12.712+certifi==2023.5.713 # via requests14 charset-normalizer==3.1.015 # via requests16 docutils==0.17.117 unmodified lines34 pygments==2.15.135 # via36 # sphinx37 # sphinx-tabs38-requests==2.29.038+requests==2.31.039 # via sphinx40 snowballstemmer==2.2.041 # via sphinx42 sphinx==4.5.020 unmodified lines63 sphinxcontrib-qthelp==1.0.364 # via sphinx65 sphinxcontrib-serializinghtml==1.1.566 # via sphinx67-urllib3==1.26.1567+urllib3==2.0.268 # via requestsmodified:requirements/tests.txt+1 added-1 removed
3 unmodified lines4 # To update, run:5 #6 # pip-compile-multi7 #8-asgiref==3.6.08+asgiref==3.7.29 # via -r requirements/tests.in10 iniconfig==2.0.011 # via pytest12 packaging==23.17 unmodified linesmodified:requirements/typing.txt+4 added-4 removed
5 unmodified lines6 # pip-compile-multi7 #8 cffi==1.15.19 # via cryptography10-cryptography==40.0.210+cryptography==41.0.011 # via -r requirements/typing.in12-mypy==1.2.012+mypy==1.3.013 # via -r requirements/typing.in14 mypy-extensions==1.0.015 # via mypy16 pycparser==2.211 unmodified line18 types-contextvars==2.4.7.219 # via -r requirements/typing.in20 types-dataclasses==0.6.621 # via -r requirements/typing.in22-types-setuptools==67.7.0.122+types-setuptools==67.8.0.023 # via -r requirements/typing.in24-typing-extensions==4.5.024+typing-extensions==4.6.225 # via mypymodified:src/flask/config.py+5 added-3 removed
70 unmodified lines71 the application's :attr:`~flask.Flask.root_path`.72 :param defaults: an optional dictionary of default values73 """74 75- def __init__(self, root_path: str, defaults: dict | None = None) -> None:75+ def __init__(76+ self, root_path: str | os.PathLike, defaults: dict | None = None77+ ) -> None:78 super().__init__(defaults or {})79 self.root_path = root_path80 81 def from_envvar(self, variable_name: str, silent: bool = False) -> bool:83 unmodified lines165 current[tail] = value166 167 return True168 167- def from_pyfile(self, filename: str, silent: bool = False) -> bool:169+ def from_pyfile(self, filename: str | os.PathLike, silent: bool = False) -> bool:170 """Updates the values in the config from a Python file. This function171 behaves as if the file was imported as module with the172 :meth:`from_object` function.173 60 unmodified lines234 self[key] = getattr(obj, key)235 236 def from_file(237 self,236- filename: str,238+ filename: str | os.PathLike,239 load: t.Callable[[t.IO[t.Any]], t.Mapping],240 silent: bool = False,241 text: bool = True,242 ) -> bool:105 unmodified linesmodified:.pre-commit-config.yaml+2 added-2 removed
12345667891014 unmodified lines252627282929303132334 unmodified linesci: autoupdate_branch: "2.2.x" autoupdate_schedule: monthlyrepos: - repo: https://github.com/asottile/pyupgrade rev: v3.3.2 rev: v3.4.0 hooks: - id: pyupgrade args: ["--py38-plus"] - repo: https://github.com/asottile/reorder_python_imports14 unmodified lines additional_dependencies: - flake8-bugbear - flake8-implicit-str-concat - repo: https://github.com/peterdemin/pip-compile-multi rev: v2.6.2 rev: v2.6.3 hooks: - id: pip-compile-multi-verify - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.04 unmodified linesmodified:pyproject.toml-1 removed
2 unmodified lines3 description = "A simple framework for building complex web applications."4 readme = "README.rst"5 license = {text = "BSD-3-Clause"}6 maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]7-authors = [{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"}]7 classifiers = [8 "Development Status :: 5 - Production/Stable",9 "Environment :: Web Environment",10 "Framework :: Flask",86 unmodified lines