Commit graph

421 commits

Author SHA1 Message Date
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
50227f0954 Add option to not overwrite debug flag in cli
This is mainly intended for custom CLIs that may load a config file
which already sets the debug flag and does not make use of the `FLASK_*`
env vars at all.
2018-06-14 13:25:05 +02:00
David Lord
b51ab3ff2c
encode filenames as ascii instead of latin-1
latin-1 is allowed by pep3333, but that breaks gunicorn
2018-05-28 06:36:47 -07:00
Briehan Lombaard
a913b4dafd
SSLContext was added in Python 2.7.9 2018-05-17 06:18:42 -07:00
David Lord
b21b4d1608
add more merge cases 2018-05-01 13:29:48 -07:00
Hsiaoming Yang
f7a3bdc6db
Fix blueprint route for "" 2018-05-01 14:35:55 +09:00
David Lord
5965cb7e1c
rename to FLASK_SKIP_DOTENV, add docs, test 2018-04-29 14:20:17 -07:00
David Lord
4c8ec8f555
Merge pull request #2739 from pallets/2735-abort-debug
Only trap key errors by default in debug, not all BadRequest errors
2018-04-28 07:01:42 -07:00
David Lord
b573a86977
trap key errors in debug, not all 400 errors 2018-04-28 06:51:08 -07:00
David Lord
4d0cdf95e6
merge slashes between blueprint prefix and rule 2018-04-27 12:40:06 -07:00
ThiefMaster
6663bf1f7d Fix registering partials as view functions 2018-04-27 13:44:07 +02:00
Nick Pope
fc6a1d9354 Fix default index for TaggedJSONSerializer.register()
Change the default value of ``index`` to ``None`` in ``register()`` so
that it is possible to insert a new tag as the penultimate item in the
order list.
2018-04-19 14:16:11 +01:00
David Lord
1ed756a523
add Response.max_cookie_size config 2018-04-10 11:17:18 -07:00
David Lord
ab4142215d
detect UTF encodings when loading json 2018-04-10 09:34:59 -07:00
fphonor
171eb28c95
get_json separate cache depending on silent arg 2018-04-09 02:52:40 -07:00
David Lord
5f42989ce3
don't use Flask(__name__) in conftest 2018-02-28 06:50:49 -08:00
David Lord
401423df06
only strip one slash when registering blueprint
add test and changelog
2018-02-23 15:47:06 -08:00
David Lord
82f0d120de
use subdomain arg in url_map.bind_to_environ
rename new subdomain test, parametrize
test allowing subdomains as well as ips
add subdomain_matching param to docs
add some references to docs
add version changed to create_url_adapter
2018-02-23 08:39:31 -08:00
Armin Ronacher
8cec2010c0
Do not enable subdomain matching by default
Updated tests for new subdomain matching
Added a test to validate matching behavior
2018-02-23 07:53:27 -08:00
David Lord
cf5525f98a
add test_cli_runner for testing app.cli commands 2018-02-19 15:34:46 -08:00
David Lord
310fbfcf64
revert copyright year to project start
add copyright header to files
2018-02-08 12:43:30 -08:00
David Lord
03a2996bb8
Merge pull request #2530 from pallets/feature/factory-detection
Improved bad factory error handling
2018-01-28 11:27:07 -08:00
David Lord
e21abd9da5
Merge pull request #2607 from FadhelC/SameSite-cookie-feature
Added support for cookie SameSite attribute
2018-01-23 15:20:16 -08:00
David Lord
382b13581e
clean up samesite docs 2018-01-23 15:11:50 -08:00
David Lord
2beedabaaf
add HTTPS support for flask run command 2018-01-23 10:03:53 -08:00
Fadhel_Chaabane
a1d9ebe4ab New Feature: Added Support for cookie's SameSite attribute. 2018-01-23 13:57:50 +00:00
David Lord
8bdf820e9b
reset standard os env after each test 2018-01-10 13:53:45 -08:00
Armin Ronacher
2433522d29
Add Support for FLASK_ENV (#2570)
This introduces environments to Flask
2018-01-06 17:07:56 +01:00
David Lord
0a33954555
improve documentation for session attributes
add test for session attributes
2018-01-04 12:56:18 -08:00
David Lord
604cc758fb
use config fixture, get plugin via unregister 2017-12-14 12:20:03 -08:00
Camilo
33fa580947 restore the logging plugin only if it was active to begin with 2017-12-14 09:40:34 -05:00
Camilo
e30c39fe78 fix non-passing tests for logging on pytest > 3.3.0 2017-12-14 01:55:22 -05:00
Adrian Moennich
777cc17de3 Fix broken test 2017-11-25 00:53:43 +01:00
Adrian Moennich
eb1c2faf9f Merge remote-tracking branch 'upstream/0.12-maintenance' 2017-11-25 00:44:07 +01:00
ThiefMaster
c52e1b7388 Fix ValueError for some invalid Range requests
fixes #2526
2017-11-25 00:37:49 +01:00
Armin Ronacher
c23a63a185 Improved bad factory error handling 2017-11-25 00:05:57 +01:00
David Lord
5436dddf64
rewrite cli errors
consistent order for arguments to load functions
refactor find_app_by_string to flow better
more cli loader tests
2017-10-10 07:04:53 -07:00
Caratpine
2f57a0b917
Blueprint view function name should not contain dots 2017-10-09 08:12:34 -07:00
Chuan Ma
5888d76342 pytest.yield_fixture deprecated in pytest 3.0+.
It's suggested to use pytest.fixture directly,
and flask already requires 'pytest>=3'.
2017-08-14 10:25:24 -04:00
David Lord
66b1b752da
simplify logging configuration
single default handler and formatter
don't remove handlers
configure level once using setLevel
document logging
reorganize logging tests
2017-07-31 12:49:03 -07:00
David Lord
a89bdb3395
prefer the url's scheme over the kwarg
tabs -> spaces
add test
add changelog
2017-07-29 13:03:08 -07:00
David Lord
491d331e6e
load env vars using python-dotenv 2017-07-16 13:37:51 -07:00
David Lord
fb845b9032
allow local packages in FLASK_APP
don't require .py extension in FLASK_APP
add tests for nested package loading
parametrize cli loading tests
2017-07-14 19:49:05 -07:00
David Lord
59f7966e31 support passing environ to test client (#2412)
closes #2411
2017-07-13 08:42:53 -07:00
David Lord
9560f22bb6
clean up 2017-07-10 07:10:47 -07:00
Bijan Vakili
a417e41d27 Update documentation and regression tests to clarify that Flask.teardown_appcontext() only receives unhandled exceptions 2017-07-07 17:34:44 -07:00
William Horton
5909e26fba Remove unused import from test_basic (#2403) 2017-06-30 17:28:48 +02:00
David Lord
465922e5f1
clean up secret key docs
consistent key across docs and examples
consistent key across tests, set in conftest
2017-06-28 07:58:06 -07:00
David Lord
5bc0d15359
un-deprecate request.json 2017-06-26 09:34:26 -07:00
David Lord
715a9a3e7b
remove deprecated flask.ext 2017-06-26 08:47:28 -07:00