Commit graph

27 commits

Author SHA1 Message Date
David Lord
8ab4967703
consistent versions and deprecation messages 2021-04-15 15:58:24 -07:00
David Lord
32272da9ac
shell calls sys.__interativehook__
This will set up readline tab and history completion by default.
2021-04-14 10:01:32 -07:00
Grey Li
33145c3699 Set default encoding to UTF-8 for load_dotenv 2021-03-10 21:40:29 +08:00
David Lord
055cdc2625
click detects program name when run as module 2021-01-29 11:29:36 -08:00
David Lord
967b235035
Merge pull request #3728 from nphilipp/master--discover-app-factory-deterministically
Discover app factory deterministically
2020-10-15 14:01:14 -07:00
ongopongo
5bfe236fb5
fix typo in flask shell help (#3744) 2020-08-26 09:20:21 -07:00
Nils Philippsen
cf3089a8f8 Discover app factory deterministically
Commit 2ae740dd49 probably inadvertently
changed to iterate over a set of "create_app", "make_app" to discover
application factory functions. As sets don't guarantee order,
differences in the implementation of the type can make it
non-deterministic which factory function is used if a project implements
both. Revert to using a tuple.

Signed-off-by: Nils Philippsen <nils@redhat.com>
2020-08-13 10:44:43 +02: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
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
171aabc87d
remove unused ref directives
replace page refs with doc directives
2020-04-04 12:57:14 -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
662c245795
remove _compat module 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
a671e47921
rewrite the development server docs 2019-11-18 18:02:12 -08:00
David Lord
240a11052b
lazy load app on reload only 2019-11-18 17:54:46 -08:00
David Lord
c478e5d52f
pass sys.argv to flask cli 2019-07-10 11:45:20 -07:00
David Lord
2844fdb82e
Merge branch '1.0.x' 2019-07-03 12:23:16 -07:00
David Lord
465da9f610
Merge branch '1.0.x' 2019-07-01 11:57:00 -07:00
David Lord
1351d0a565
Merge branch '1.0.x' 2019-06-23 16:57:52 -07:00
David Lord
53c893b646
fix string concats left over by black 2019-06-01 09:22:20 -07:00
David Lord
43483683b2
apply reorder-python-imports pre-commit config 2019-06-01 09:07:20 -07:00
David Lord
ca278a8694
move to src directory 2019-06-01 08:06:16 -07:00
Renamed from flask/cli.py (Browse further)