David Lord
52df9eed45
drop end of life python versions
2025-05-13 08:31:54 -07:00
David Lord
2c31603042
update env file precedence
2024-11-07 11:54:29 -08:00
Tony Huang
1af8f95785
fix super call in list comprehension
2024-02-03 12:36:06 -08:00
David Lord
5bb30270d2
bump werkzeug 2.3.7
...
use importlib.metadata.version
2023-08-21 09:39:10 -07:00
David Lord
84c007d34f
show subdomain or host in routes output
2023-04-14 09:43:00 -07:00
David Lord
5d8e35653f
refactor lazy loading
...
Remove the `--eager-loading/--lazy-loading` options and the
`DispatchingApp` middleware. The `run` command handles loading
exceptions directly. The reloader always prints out tracebacks
immediately and always defers raising the error.
2022-08-01 10:34:13 -07:00
David Lord
1626aff602
Merge branch '2.1.x'
2022-07-02 21:03:09 -07:00
David Lord
ab6a8b0330
relax routes cli match order
2022-07-02 21:02:00 -07:00
David Lord
5544d09477
re-add flag to skip unguarded app.run from CLI
2022-06-29 21:19:28 -07:00
David Lord
c9e000b9ce
with_appcontext lasts for the lifetime of the click context
2022-06-17 11:52:01 -07:00
David Lord
aa801c431a
FlaskGroup can be nested
2022-06-15 14:09:56 -07:00
David Lord
1232d69860
inline conditional imports for cli behaviors
2022-05-23 09:46:20 -07:00
David Lord
ef6c2b9e4a
clean up pytest.raises tests
2022-04-28 09:32:31 -07:00
James Warne
5050a18a00
evaluate --cert before --key
2022-04-24 10:01:40 -07:00
David Lord
411dbb37e2
remove old test
2022-04-11 06:11:37 -07:00
David Lord
e21e003f62
remove deprecated script_info factory arg
2021-11-12 09:52:16 -08:00
David Lord
b2b60450f7
allow lazy loading test to fail on pypy
2021-10-05 09:11:00 -07:00
David Lord
6d65595a3c
try to address flakiness of lazy loading test
2021-10-05 08:03:30 -07:00
na2shell
9f0da9b770
cli loader handles kwargs in app factory
2021-08-05 19:32:43 -07:00
David Lord
2305b056c3
add test for lazy loading error
2021-08-05 19:15:31 -07:00
Rohan salwan
aa6dd09c2c
correctly handle raising deferred errors in cli lazy loading
2021-08-05 19:14:51 -07:00
Danny Sepler
1b5f21e015
Add pathlib in cli tests
2021-05-17 08:46:36 -07:00
Adrian Moennich
26a6cc0f94
Allow using Click 7 with a DeprecationWarning
...
As long as popular libraries (e.g. Celery) require click 7, depending
on Click 8 in Flask makes it hard to test the latest version (and its
other dependencies) in existing applications.
2021-04-27 16:45:06 +02:00
Grey Li
33145c3699
Set default encoding to UTF-8 for load_dotenv
2021-03-10 21:40:29 +08:00
David Lord
253570784c
cleaner message when CLI can't load app
...
When loading the app fails for the --help command, only the error
message is shown, then the help text. The full traceback is shown for
other exceptions. Also show the message when loading fails while
getting a command, instead of only "command not found". The error
message goes to stderr to match other error behavior, and is in red
with an extra newline to make it more obvious next to the help text.
Also fixes an issue with the test_apps fixture that caused an imported
app to still be importable after the test was over and the path was
reset. Now the module cache is reset as well.
2020-07-30 18:36:55 -07:00
David Lord
37551e6798
Merge pull request #3699 from MartinThoma/style
...
remove unnecessary docstrings from tests
2020-07-28 19:44:23 -07:00
Martin Thoma
75a9b74650
DOC: Remove unnecessary docstrings
2020-07-26 15:47:12 +02:00
Grey Li
84cbfc0698
Stop change CWD to .env/.flaskenv location
2020-07-05 09:37:03 +08:00
David Lord
ff2f71379b
use ast to parse FLASK_APP
...
enables keyword arguments to factory functions
2020-04-07 17:54:51 -07:00
David Lord
fcac7f11cf
deprecate passing script_info to factory
2020-04-07 15:54:36 -07:00
David Lord
f2f027d1fb
remove unused module docstrings
2020-04-04 12:28:08 -07:00
David Lord
2ae740dd49
f-strings everywhere
2020-04-04 12:10:00 -07:00
David Lord
524fd0bc8c
apply pyupgrade
2020-04-04 12:10:00 -07:00
David Lord
57d628ca74
remove more compat code
2020-04-04 12:10:00 -07:00
David Lord
bcde664f9a
cli checks for cryptography library
2020-02-10 17:34:19 -08:00
David Lord
1351d0a565
Merge branch '1.0.x'
2019-06-23 16:57:52 -07:00
David Lord
e666f7a69c
standardize license and copyright
2019-06-22 13:09:09 -07:00
David Lord
43483683b2
apply reorder-python-imports pre-commit config
2019-06-01 09:07:20 -07:00
Jon S. Stumpf
b46f5942a5
address flake8 issues
2019-06-01 06:31:35 -07:00
cslecrone
1718f1934c
don't require ssl module for flask cli
2019-05-31 17:27:52 -04:00
Daniel Pope
f25b5000fd
Do not register empty CLI groups from Blueprint
...
(Fixes #3224 )
2019-05-31 16:49:01 +01:00
Daniel Pope
a5ff3cd01b
Fix style issues on master using Black
2019-05-31 11:57:28 +01:00
Anthony Plunkett
ec1ccd7530
Add Blueprint level cli command registration
...
Implements #1357 .
Adds ability to register click cli commands onto blueprint.
2019-05-24 14:43:29 -07:00
Adarsh Sharma
db8cb31f2b
Fix #2937 : Ensure the consistency in load_dotenv's return type
2019-05-19 11:58:39 -07:00
David Baumgold
025589ee76
Reformat with black
...
https://github.com/python/black
2019-05-06 16:28:58 -04:00
David Lord
4f3dbb3f3b
Merge branch '1.0-maintenance'
2019-01-06 16:33:17 -08:00
David Lord
a0ccc47780
clean up flask --version code
2019-01-06 16:24:05 -08:00
David Lord
f7d50d4b67
Merge branch '1.0-maintenance'
2019-01-05 15:12:17 -08:00
garenchan
c38499bbf2
ignore colon with slash when split app_import_path
...
Flask currently supports importing app through a combination of module
path and app variable name, such as '/usr/app.py:my_app'. When the
module path contains a colon, it will conflict with this import way and
a `flask.cli.NoAppException` will be raised.
A file path on a Windows system may contain a colon followed by a slash.
So we solved this problem on Windows by ignoring the colon followed by a
slash when we split app_import_path.
Fix issue #2961 .
2018-10-24 23:47:41 +08:00
ThiefMaster
161c43649d
Merge branch '1.0-maintenance'
2018-06-14 13:31:40 +02:00