Commit graph

252 commits

Author SHA1 Message Date
David Lord
a406c297aa
apply setupmethod consistently 2022-05-23 09:09:12 -07:00
Chris Hallacy
eb36135cfe
always warn on blueprint setupmethod after registration 2022-05-23 09:09:12 -07:00
David Lord
69e2300608
use app.url_for as template global
avoid extra call from helpers.url_for
update changelog for method moves
2022-05-15 08:48:30 -07:00
David Lord
39f9363296
finish moving url_for to app
move entire implementation to app
make special build args actual keyword-only args
handle no app context in method
mention other config in server_name error
implicit external with scheme
use adapter.build url_scheme argument
rewrite documentation
2022-05-14 12:46:01 -07:00
Ivan Sushkov
92acd05d9b
add url_for method to app 2022-05-14 12:45:18 -07:00
David Lord
fac630379d
update app.redirect docs 2022-05-12 16:33:40 -07:00
dzcode
eb5dd9f5ef
add aborter object to app 2022-05-12 13:29:54 -07:00
David Lord
a25d234cdd
Merge remote-tracking branch 'origin/2.1.x' 2022-05-11 09:39:26 -07:00
Tim Hoagland
fdab801fbb
add redirect method to app 2022-05-10 11:02:24 -07:00
Stanislav Bushuev
a74e266474
skip coverage for TYPE_CHECKING 2022-05-03 12:11:55 -06:00
Qingpeng Li
1e5dd43022
refactor error checks in register_error_handler
Co-authored-by: David Lord <davidism@gmail.com>
2022-05-03 11:52:11 -06:00
DailyDreaming
8ddbad9ccd Fix linting error.
Suppress mypy.

Suppress mypy error.

Suppress mypy error.
2022-05-02 09:11:07 -07:00
David Lord
7b28a9057d
release version 2.1.2 2022-04-28 10:44:02 -07:00
David Lord
cb4f742543
Merge branch '2.1.x' 2022-04-24 10:14:53 -07:00
James Warne
5050a18a00
evaluate --cert before --key 2022-04-24 10:01:40 -07:00
Rafael Zimmer
eede1a3685
fix annotation for json.loads 2022-04-24 09:53:10 -07:00
David Lord
69f71b4d94
start version 2.1.2 2022-04-24 09:50:55 -07:00
David Lord
c6f297719e
release version 2.1.1 2022-03-30 14:35:07 -07:00
David Lord
5589915b38
start version 2.1.1 2022-03-30 14:01:10 -07:00
David Lord
b109b092a9
start version 2.2.0 2022-03-28 12:17:25 -07:00
David Lord
7d264d7dc5
release version 2.1.0 2022-03-28 12:09:35 -07:00
David Lord
cd4ab005a9
fix typing 2022-03-28 12:09:35 -07:00
David Lord
41aaaf7fa0
clean up unused function from prefixed_env pr 2022-03-25 12:24:31 -07:00
David Lord
4eb5e9455b
more from_prefixed_env features
* support nested dict access with "__" separator
* don't specify separator in prefix
* catch exceptions for any loads function
2022-03-25 11:54:45 -07:00
pgjones
08a283af5e
Allow loading of environment variables into the config
This new method will pick out any environment variables with a certain
prefix and place them into the config named without the prefix. This
makes it easy to use environment variables to configure the app as is
now more popular than when Flask started.

The prefix should ensure that the environment isn't polluted and the
config isn't polluted by environment variables.

I've followed the dynaconf convention of trying to parse the
environment variable and then falling back to the raw value if parsing
fails.
2022-03-25 11:54:03 -07:00
David Lord
81c7ff7f8d
update tests for relative redirects 2022-03-25 11:48:26 -07:00
David Lord
ce7b884b73
Merge pull request #4492 from pallets/debug-messages
update some debug message behavior
2022-03-23 09:18:20 -07:00
David Lord
6578b493c8
better override for json BadRequest error 2022-03-23 09:13:45 -07:00
David Lord
0a300d007d
better replacement of original form KeyError 2022-03-23 08:26:22 -07:00
David Lord
c9a1f7ad65
don't intercept 307/308 routing redirects
These don't change the request body, so the debug error is no longer relevant.
2022-03-23 08:25:22 -07:00
David Lord
faaa5594b2
accurate type for __exit__ 2022-03-15 08:44:09 -07:00
David Lord
190dd4df86
don't use AnyStr for ResponseValue type 2022-03-15 08:32:15 -07:00
David Lord
8886328822
relax errorhandler function arg type 2022-03-15 08:32:15 -07:00
uedvt359
b707bf443a
Preserve HttpOnly flag when deleting session cookie
fixes #4485
2022-03-15 06:35:29 -07:00
Tushar Sadhwani
af34b8c9e7 Add better types for app decorators 2022-03-08 20:13:30 +05:30
David Lord
aa13521d42
lazy loading preserves click context 2022-02-22 19:04:03 -08:00
Colin Adams
6f79cb8a23
Fix typing on app.session_interface 2022-02-16 21:12:01 -08:00
Mickaël Guérin
beae1249f7
add exclude-patterns option to flask run 2022-02-09 12:44:03 -08:00
David Lord
1be65b1b69
overriding FlaskClient.open works with redirects 2022-02-09 11:13:03 -08:00
David Lord
bc094dbe6a
Merge pull request #4432 from sfermigier/main
Match typing declaration with implementation.
2022-02-08 10:27:11 -08:00
Stefane Fermigier
9a134da31b Match typing declaration with implementation. 2022-01-27 11:43:42 +01:00
K900
751d85f3de cli: use importlib.metadata instead of pkg_resources 2022-01-17 19:36:57 +03:00
David Lord
aab064fee1
remove deprecated as_tuple parameter from test_client 2022-01-14 09:34:07 -08:00
David Lord
0fb5c2f034
Merge branch '2.0.x' 2021-12-22 20:02:52 -07:00
David Lord
b1a00ebc4c
update error message for after_this_request and copy_current_request_context 2021-12-22 18:44:37 -07:00
Yourun-Proger
633449a36c
fix error message 2021-12-22 18:35:17 -07:00
olliemath
a841cfabb5
Only use a custom JSONDecoder if needed
The default JSONDecoder adds no extra functionality to `json.loads`, but using a custom class in the function call you off of an optimized fast path in pypy (it adds some overhead in cpython, but I think it's minimal). This change sticks with the default loading behaviour unless the user has specifically opted in to customising it.

Co-authored-by: David Lord <davidism@gmail.com>
2021-12-22 18:07:04 -07:00
David Lord
edac7e3a56
Merge branch '2.0.x' 2021-12-22 15:21:31 -08:00
David Lord
9d36623db1
update requirements 2021-12-22 15:16:48 -08:00
David Lord
c8ddb948f6
deprecate RequestContext.g 2021-11-16 07:35:02 -08:00