Merge branch '2.3.x'
This commit is contained in:
commit
31fd9c8791
9 changed files with 26 additions and 25 deletions
|
|
@ -3,7 +3,7 @@ ci:
|
||||||
autoupdate_schedule: monthly
|
autoupdate_schedule: monthly
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v3.3.2
|
rev: v3.4.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ["--py38-plus"]
|
args: ["--py38-plus"]
|
||||||
|
|
@ -26,7 +26,7 @@ repos:
|
||||||
- flake8-bugbear
|
- flake8-bugbear
|
||||||
- flake8-implicit-str-concat
|
- flake8-implicit-str-concat
|
||||||
- repo: https://github.com/peterdemin/pip-compile-multi
|
- repo: https://github.com/peterdemin/pip-compile-multi
|
||||||
rev: v2.6.2
|
rev: v2.6.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: pip-compile-multi-verify
|
- id: pip-compile-multi-verify
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
|
|
||||||
|
|
@ -410,8 +410,8 @@ from a TOML file:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
import toml
|
import tomllib
|
||||||
app.config.from_file("config.toml", load=toml.load)
|
app.config.from_file("config.toml", load=tomllib.load, text=False)
|
||||||
|
|
||||||
Or from a JSON file:
|
Or from a JSON file:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,8 @@ in a Flask view.
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
data.append("name": "Flask Room")
|
data.append("name", "Flask Room")
|
||||||
data.append("description": "Talk about Flask here.")
|
data.append("description", "Talk about Flask here.")
|
||||||
fetch(room_url, {
|
fetch(room_url, {
|
||||||
"method": "POST",
|
"method": "POST",
|
||||||
"body": data,
|
"body": data,
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ description = "A simple framework for building complex web applications."
|
||||||
readme = "README.rst"
|
readme = "README.rst"
|
||||||
license = {text = "BSD-3-Clause"}
|
license = {text = "BSD-3-Clause"}
|
||||||
maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]
|
maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]
|
||||||
authors = [{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"}]
|
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
"Environment :: Web Environment",
|
"Environment :: Web Environment",
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
-r typing.txt
|
-r typing.txt
|
||||||
build==0.10.0
|
build==0.10.0
|
||||||
# via pip-tools
|
# via pip-tools
|
||||||
cachetools==5.3.0
|
cachetools==5.3.1
|
||||||
# via tox
|
# via tox
|
||||||
cfgv==3.3.1
|
cfgv==3.3.1
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
|
|
@ -28,19 +28,19 @@ filelock==3.12.0
|
||||||
# via
|
# via
|
||||||
# tox
|
# tox
|
||||||
# virtualenv
|
# virtualenv
|
||||||
identify==2.5.23
|
identify==2.5.24
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
nodeenv==1.7.0
|
nodeenv==1.8.0
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
pip-compile-multi==2.6.2
|
pip-compile-multi==2.6.3
|
||||||
# via -r requirements/dev.in
|
# via -r requirements/dev.in
|
||||||
pip-tools==6.13.0
|
pip-tools==6.13.0
|
||||||
# via pip-compile-multi
|
# via pip-compile-multi
|
||||||
platformdirs==3.5.0
|
platformdirs==3.5.1
|
||||||
# via
|
# via
|
||||||
# tox
|
# tox
|
||||||
# virtualenv
|
# virtualenv
|
||||||
pre-commit==3.3.1
|
pre-commit==3.3.2
|
||||||
# via -r requirements/dev.in
|
# via -r requirements/dev.in
|
||||||
pyproject-api==1.5.1
|
pyproject-api==1.5.1
|
||||||
# via tox
|
# via tox
|
||||||
|
|
@ -50,7 +50,7 @@ pyyaml==6.0
|
||||||
# via pre-commit
|
# via pre-commit
|
||||||
toposort==1.10
|
toposort==1.10
|
||||||
# via pip-compile-multi
|
# via pip-compile-multi
|
||||||
tox==4.5.1
|
tox==4.5.2
|
||||||
# via -r requirements/dev.in
|
# via -r requirements/dev.in
|
||||||
virtualenv==20.23.0
|
virtualenv==20.23.0
|
||||||
# via
|
# via
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ alabaster==0.7.13
|
||||||
# via sphinx
|
# via sphinx
|
||||||
babel==2.12.1
|
babel==2.12.1
|
||||||
# via sphinx
|
# via sphinx
|
||||||
certifi==2022.12.7
|
certifi==2023.5.7
|
||||||
# via requests
|
# via requests
|
||||||
charset-normalizer==3.1.0
|
charset-normalizer==3.1.0
|
||||||
# via requests
|
# via requests
|
||||||
|
|
@ -35,7 +35,7 @@ pygments==2.15.1
|
||||||
# via
|
# via
|
||||||
# sphinx
|
# sphinx
|
||||||
# sphinx-tabs
|
# sphinx-tabs
|
||||||
requests==2.29.0
|
requests==2.31.0
|
||||||
# via sphinx
|
# via sphinx
|
||||||
snowballstemmer==2.2.0
|
snowballstemmer==2.2.0
|
||||||
# via sphinx
|
# via sphinx
|
||||||
|
|
@ -64,5 +64,5 @@ sphinxcontrib-qthelp==1.0.3
|
||||||
# via sphinx
|
# via sphinx
|
||||||
sphinxcontrib-serializinghtml==1.1.5
|
sphinxcontrib-serializinghtml==1.1.5
|
||||||
# via sphinx
|
# via sphinx
|
||||||
urllib3==1.26.15
|
urllib3==2.0.2
|
||||||
# via requests
|
# via requests
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
# pip-compile-multi
|
# pip-compile-multi
|
||||||
#
|
#
|
||||||
asgiref==3.6.0
|
asgiref==3.7.2
|
||||||
# via -r requirements/tests.in
|
# via -r requirements/tests.in
|
||||||
iniconfig==2.0.0
|
iniconfig==2.0.0
|
||||||
# via pytest
|
# via pytest
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@
|
||||||
#
|
#
|
||||||
cffi==1.15.1
|
cffi==1.15.1
|
||||||
# via cryptography
|
# via cryptography
|
||||||
cryptography==40.0.2
|
cryptography==41.0.0
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
mypy==1.2.0
|
mypy==1.3.0
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
mypy-extensions==1.0.0
|
mypy-extensions==1.0.0
|
||||||
# via mypy
|
# via mypy
|
||||||
|
|
@ -19,7 +19,7 @@ types-contextvars==2.4.7.2
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
types-dataclasses==0.6.6
|
types-dataclasses==0.6.6
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
types-setuptools==67.7.0.1
|
types-setuptools==67.8.0.0
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
typing-extensions==4.5.0
|
typing-extensions==4.6.2
|
||||||
# via mypy
|
# via mypy
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,9 @@ class Config(dict):
|
||||||
:param defaults: an optional dictionary of default values
|
:param defaults: an optional dictionary of default values
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, root_path: str, defaults: dict | None = None) -> None:
|
def __init__(
|
||||||
|
self, root_path: str | os.PathLike, defaults: dict | None = None
|
||||||
|
) -> None:
|
||||||
super().__init__(defaults or {})
|
super().__init__(defaults or {})
|
||||||
self.root_path = root_path
|
self.root_path = root_path
|
||||||
|
|
||||||
|
|
@ -164,7 +166,7 @@ class Config(dict):
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def from_pyfile(self, filename: str, silent: bool = False) -> bool:
|
def from_pyfile(self, filename: str | os.PathLike, silent: bool = False) -> bool:
|
||||||
"""Updates the values in the config from a Python file. This function
|
"""Updates the values in the config from a Python file. This function
|
||||||
behaves as if the file was imported as module with the
|
behaves as if the file was imported as module with the
|
||||||
:meth:`from_object` function.
|
:meth:`from_object` function.
|
||||||
|
|
@ -233,7 +235,7 @@ class Config(dict):
|
||||||
|
|
||||||
def from_file(
|
def from_file(
|
||||||
self,
|
self,
|
||||||
filename: str,
|
filename: str | os.PathLike,
|
||||||
load: t.Callable[[t.IO[t.Any]], t.Mapping],
|
load: t.Callable[[t.IO[t.Any]], t.Mapping],
|
||||||
silent: bool = False,
|
silent: bool = False,
|
||||||
text: bool = True,
|
text: bool = True,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue