forked from orbit-oss/flask
Merge branch '2.2.x'
This commit is contained in:
commit
cfa863c357
10 changed files with 39 additions and 20 deletions
|
|
@ -66,9 +66,9 @@ be used to step through code during a request before an error is raised,
|
||||||
or if no error is raised. Some even have a remote mode so you can debug
|
or if no error is raised. Some even have a remote mode so you can debug
|
||||||
code running on another machine.
|
code running on another machine.
|
||||||
|
|
||||||
When using an external debugger, the app should still be in debug mode,
|
When using an external debugger, the app should still be in debug mode, otherwise Flask
|
||||||
but it can be useful to disable the built-in debugger and reloader,
|
turns unhandled errors into generic 500 error pages. However, the built-in debugger and
|
||||||
which can interfere.
|
reloader should be disabled so they don't interfere with the external debugger.
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
|
|
@ -80,8 +80,20 @@ When running from Python:
|
||||||
|
|
||||||
app.run(debug=True, use_debugger=False, use_reloader=False)
|
app.run(debug=True, use_debugger=False, use_reloader=False)
|
||||||
|
|
||||||
Disabling these isn't required, an external debugger will continue to
|
Disabling these isn't required, an external debugger will continue to work with the
|
||||||
work with the following caveats. If the built-in debugger is not
|
following caveats.
|
||||||
disabled, it will catch unhandled exceptions before the external
|
|
||||||
debugger can. If the reloader is not disabled, it could cause an
|
- If the built-in debugger is not disabled, it will catch unhandled exceptions before
|
||||||
unexpected reload if code changes during debugging.
|
the external debugger can.
|
||||||
|
- If the reloader is not disabled, it could cause an unexpected reload if code changes
|
||||||
|
during a breakpoint.
|
||||||
|
- The development server will still catch unhandled exceptions if the built-in
|
||||||
|
debugger is disabled, otherwise it would crash on any error. If you want that (and
|
||||||
|
usually you don't) pass ``passthrough_errors=True`` to ``app.run``.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
app.run(
|
||||||
|
debug=True, passthrough_errors=True,
|
||||||
|
use_debugger=False, use_reloader=False
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ its ``wsgi.server``, as well as your app or app factory.
|
||||||
from hello import create_app
|
from hello import create_app
|
||||||
|
|
||||||
app = create_app()
|
app = create_app()
|
||||||
wsgi.server(eventlet.listen(("127.0.0.1", 8000), app)
|
wsgi.server(eventlet.listen(("127.0.0.1", 8000)), app)
|
||||||
|
|
||||||
.. code-block:: text
|
.. code-block:: text
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
build==0.10.0
|
build==0.10.0
|
||||||
# via -r requirements/build.in
|
# via -r requirements/build.in
|
||||||
packaging==23.0
|
packaging==23.1
|
||||||
# via build
|
# via build
|
||||||
pyproject-hooks==1.0.0
|
pyproject-hooks==1.0.0
|
||||||
# via build
|
# via build
|
||||||
|
|
|
||||||
|
|
@ -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.4.11
|
tox==4.4.12
|
||||||
# via -r requirements/dev.in
|
# via -r requirements/dev.in
|
||||||
virtualenv==20.21.0
|
virtualenv==20.21.0
|
||||||
# via
|
# via
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ jinja2==3.1.2
|
||||||
# via sphinx
|
# via sphinx
|
||||||
markupsafe==2.1.2
|
markupsafe==2.1.2
|
||||||
# via jinja2
|
# via jinja2
|
||||||
packaging==23.0
|
packaging==23.1
|
||||||
# via
|
# via
|
||||||
# pallets-sphinx-themes
|
# pallets-sphinx-themes
|
||||||
# sphinx
|
# sphinx
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
Werkzeug==2.0.0
|
Werkzeug==2.2.2
|
||||||
Jinja2==3.0.0
|
Jinja2==3.0.0
|
||||||
MarkupSafe==2.0.0
|
MarkupSafe==2.1.1
|
||||||
itsdangerous==2.0.0
|
itsdangerous==2.0.0
|
||||||
click==8.0.0
|
click==8.0.0
|
||||||
blinker==1.6.2
|
blinker==1.6.2
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# SHA1:575f86f45391b662630a6080f0a12676215eb0cf
|
# SHA1:3f343e92214ba64bc3fc9e3667c8a7d5a2d8ccd6
|
||||||
#
|
#
|
||||||
# This file is autogenerated by pip-compile-multi
|
# This file is autogenerated by pip-compile-multi
|
||||||
# To update, run:
|
# To update, run:
|
||||||
|
|
@ -13,9 +13,10 @@ itsdangerous==2.0.0
|
||||||
# via -r requirements/tests-pallets-min.in
|
# via -r requirements/tests-pallets-min.in
|
||||||
jinja2==3.0.0
|
jinja2==3.0.0
|
||||||
# via -r requirements/tests-pallets-min.in
|
# via -r requirements/tests-pallets-min.in
|
||||||
markupsafe==2.0.0
|
markupsafe==2.1.1
|
||||||
# via
|
# via
|
||||||
# -r requirements/tests-pallets-min.in
|
# -r requirements/tests-pallets-min.in
|
||||||
# jinja2
|
# jinja2
|
||||||
werkzeug==2.0.0
|
# werkzeug
|
||||||
|
werkzeug==2.2.2
|
||||||
# via -r requirements/tests-pallets-min.in
|
# via -r requirements/tests-pallets-min.in
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ asgiref==3.6.0
|
||||||
# via -r requirements/tests.in
|
# via -r requirements/tests.in
|
||||||
iniconfig==2.0.0
|
iniconfig==2.0.0
|
||||||
# via pytest
|
# via pytest
|
||||||
packaging==23.0
|
packaging==23.1
|
||||||
# via pytest
|
# via pytest
|
||||||
pluggy==1.0.0
|
pluggy==1.0.0
|
||||||
# via pytest
|
# via pytest
|
||||||
pytest==7.3.0
|
pytest==7.3.1
|
||||||
# via -r requirements/tests.in
|
# via -r requirements/tests.in
|
||||||
python-dotenv==1.0.0 ; python_version >= "3.8"
|
python-dotenv==1.0.0 ; python_version >= "3.8"
|
||||||
# via -r requirements/tests.in
|
# via -r requirements/tests.in
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
cffi==1.15.1
|
cffi==1.15.1
|
||||||
# via cryptography
|
# via cryptography
|
||||||
cryptography==40.0.1
|
cryptography==40.0.2
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
mypy==1.2.0
|
mypy==1.2.0
|
||||||
# via -r requirements/typing.in
|
# via -r requirements/typing.in
|
||||||
|
|
|
||||||
6
tox.ini
6
tox.ini
|
|
@ -13,6 +13,8 @@ skip_missing_interpreters = true
|
||||||
package = wheel
|
package = wheel
|
||||||
wheel_build_env = .pkg
|
wheel_build_env = .pkg
|
||||||
envtmpdir = {toxworkdir}/tmp/{envname}
|
envtmpdir = {toxworkdir}/tmp/{envname}
|
||||||
|
constrain_package_deps = true
|
||||||
|
use_frozen_constraints = true
|
||||||
deps =
|
deps =
|
||||||
-r requirements/tests.txt
|
-r requirements/tests.txt
|
||||||
min: -r requirements/tests-pallets-min.txt
|
min: -r requirements/tests-pallets-min.txt
|
||||||
|
|
@ -34,11 +36,15 @@ commands = pre-commit run --all-files
|
||||||
[testenv:typing]
|
[testenv:typing]
|
||||||
package = wheel
|
package = wheel
|
||||||
wheel_build_env = .pkg
|
wheel_build_env = .pkg
|
||||||
|
constrain_package_deps = true
|
||||||
|
use_frozen_constraints = true
|
||||||
deps = -r requirements/typing.txt
|
deps = -r requirements/typing.txt
|
||||||
commands = mypy
|
commands = mypy
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
package = wheel
|
package = wheel
|
||||||
wheel_build_env = .pkg
|
wheel_build_env = .pkg
|
||||||
|
constrain_package_deps = true
|
||||||
|
use_frozen_constraints = true
|
||||||
deps = -r requirements/docs.txt
|
deps = -r requirements/docs.txt
|
||||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue