Commit graph

876 commits

Author SHA1 Message Date
Markus Unterwaditzer
71c534d2c6 Merge branch '0.12-maintenance' 2016-12-30 22:46:26 +01:00
Paul Brown
0832e77b14 prevent NoAppException when ImportError occurs within imported module 2016-12-30 22:45:53 +01:00
Markus Unterwaditzer
f18fe15e6d Merge branch '0.12-maintenance' 2016-12-26 03:51:12 +01:00
Markus Unterwaditzer
789715adb9 Fix config.from_pyfile on Python 3 (#2123)
* Fix config.from_pyfile on Python 3

Fix #2118

* Support Python 2.6

* Fix tests on Python 2
2016-12-26 03:50:47 +01:00
Markus Unterwaditzer
8cd0b03bee Bump to dev 0.12.1 2016-12-25 16:35:30 +01:00
Markus Unterwaditzer
b2e0886f48 Bump to dev version 2016-12-21 21:22:26 +01:00
Markus Unterwaditzer
1042d9d23f Bump version number to 0.12 2016-12-21 21:22:08 +01:00
Jiri Kuncar
36425d5f91 Ignore cache on request.get_json(cache=False) call (#2089)
* Test cache argument of Request.get_json

* Ignore cache on request.get_json(cache=False) call

Removes usage of `_cached_json` property when `get_json` is called with
disabled cache argument. (closes #2087)
2016-12-21 21:08:38 +01:00
Raphael Deem
0e79aba40d use dict instead of if/else logic (#2093) 2016-12-21 21:07:57 +01:00
Clenimar Filemon
77af942b98 Capitalize occurrences of 'flask' (#2067) 2016-11-01 18:52:32 -07:00
Martijn Pieters
de1652467b Remove busy-work. (#2072)
It is entirely sufficient to walk the MRO of the exception class, no need to check for classes re-appearing later on, no need to add the MRO of any superclass.

* Python refuses point-blank to create a class with a circular MRO.
* All classes in a superclass MRO *already* appear in the MRO of the derived type. Re-adding the contents of a superclass MRO is doing double work.
2016-11-01 07:35:17 -07:00
Clenimar Filemon
cb30a3b562 Update docstring for errorhandler() (#2070) 2016-10-31 17:41:38 +01:00
Michael Recachinas
bd5e297aa9 Default environ (#2047)
* Add init to FlaskClient

This addresses #1467. The init in the subclass
can now take in `environ_base`, which will then get
passed to `make_test_environ_builder` and to
`EnvironBuilder` via keyword args.

This should provide the default environment capability
on `app.test_client()` init.

* Add kwarg `environ_base` to `make_test_environ_builder` call

This change now passes `environ_base` from either
`kwargs` in `FlaskClient.open` or `FlaskClient.environ_base`
if passed into the init.

* Fix assignment reference typo

* Add default `environ_base` to `FlaskClient.__init__`

* Set default kwargs for `environ_base` in `FlaskClient.open`

* Remove specific environ_base kwarg since its in kwargs

* Add docstring to FlaskClient detailing environ_base

* Document app.test_client default environ in CHANGES

* Re-word environ_base changes in FlaskClient docstring

* Add client.environ_base tests

* Mention preset default environ in `app.test_client`

* Add versionchanged directive to docstring in FlaskClient
2016-10-12 08:54:24 +02:00
Michael Recachinas
49ecc88d99 Remove -a/--app from Quickstart documentation (#2046)
* Remove `-a/--app` from Quickstart documentation

As mentioned in #2009, simplifying the CLI saw the removal of the `-a/--app` flag. Therefore, the only way to specify the module to import is by setting `FLASK_APP`.

* Remove misleading `either` from CLI help

The CLI help details how to run the application, but still uses the phrasing "either through the `FLASK_APP`...". This likely is an artifact from when `-a/--app` was still present in the CLI.
2016-10-01 18:45:22 +02:00
Joël Charles
7186a5aaf5 make use of range requests if available in werkzeug (#2031)
* make use of range requests if available in werkzeug

* different logic for testing werkzeug functionality
2016-09-26 12:43:46 +02:00
小明
f3d661de66 Fix unbound error (#2039) 2016-09-25 18:25:54 +02:00
Markus Unterwaditzer
01081dbe6c Avoid always-false statement
See https://github.com/pallets/flask/pull/1849/files#r79371299
2016-09-19 23:30:24 +02:00
Benjamin Dopplinger
dbeed24067 Fix typo in MethodView doc (#2028) 2016-09-18 20:24:46 -07:00
Bruno Thalmann
09fec941f4 Removed unused import. (#2026) 2016-09-18 14:10:00 +02:00
Armin Ronacher
83fd5b26b8 Merge branch 'feature/logger-propagation' 2016-09-12 21:54:41 +03:00
Armin Ronacher
a40489e0ce Merge pull request #2019 from pallets/bugfix/sendfile-error
Do not cause errors for unknown files for sendfile
2016-09-12 21:52:42 +03:00
Pablo Marti
2b47615998 Fix typo in docs
Also added one missing comma for readability
2016-09-12 08:41:09 +01:00
Armin Ronacher
1f0ca894a2 Killed now dead code 2016-09-11 16:57:43 +03:00
Armin Ronacher
9e41eca7f8 Merge pull request #2013 from pallets/bugfix/error-handler-error-handler
Corrected after response for error handlers
2016-09-10 03:36:29 +03:00
Armin Ronacher
a30951ec28 Do not error for unknown files if send_file sends an actual file 2016-09-10 03:33:53 +03:00
Akbar Ibrahim
c687ffb192 Fixed error in errorhandler doc string. (#2014) 2016-09-08 17:34:51 +02:00
Armin Ronacher
9cd32cac32 Corrected after response for error handlers
Before this change after request functions were not correctly
invoked for error handlers.
2016-09-08 11:56:02 +03:00
Markus Unterwaditzer
c4ec6954e5 Don't passthrough_errors unless instructed. (#2006)
Fix #2005

Revert #1679 and #1996
2016-09-06 22:32:34 +02:00
Afonso Queirós
ccd02bfe8c Correcting Custom Test Client class docs (#2004) 2016-09-05 16:57:00 +02:00
Roman
92ce20eeac Fix error in send_file helper (#2003)
* Fix error in send_file (mimetype_filename is not defined)

* fix formatting error message in send_file
2016-09-04 16:28:05 -07:00
Josh Soref
6e6c3a4636 Spelling (#1998)
* spelling: cacheability

* spelling: conceptually

* spelling: javascript

* spelling: reset

* spelling: raised

* comma: instead..., they...
2016-08-30 00:26:20 +02:00
Markus Unterwaditzer
098ea0c8ca Only passthrough_errors if PROPAGATE_EXCEPTIONS
See pallets/werkzeug#954
2016-08-27 14:38:13 +02:00
Markus Unterwaditzer
71e10be286 Properly remove f.name usage in send_file (#1988)
* Properly remove f.name usage in send_file

* Update changelogs

* Fix tests
2016-08-26 03:08:03 +02:00
Armin Ronacher
e00e2c22aa Disable logger propagation by default 2016-08-25 15:41:46 +02:00
Nate Prewitt
0f1cf50f97 adding in try around __import__ to catch invalid files/paths (#1950) 2016-08-12 15:12:00 +02:00
georgschoelly
67e391921c fix docs: name of url_value_preprocessor method (#1932)
This typo got introduced in 5da1fc2215,
the original commit for the url_value_preprocessor decorator.
2016-06-26 13:32:47 -07:00
David Lord
1928f28a68 clean up code formatting in some docs
fix warnings while building docs
2016-06-26 13:03:29 -07:00
David Lord
0e4607000d re-add passthrough_errors to cli runner (#1928)
This got dropped during the cli simplification.  Re: #1679
2016-06-23 13:00:45 -07:00
Archie Roller
b8aca21a39 Fix #1911 (#1913) 2016-06-15 09:27:06 -07:00
Markus Unterwaditzer
5c12721730 Revert "Addressing Issue 1809" 2016-06-14 22:45:24 +02:00
Markus Unterwaditzer
433c561494 Merge branch '0.11-maintenance' 2016-06-13 20:34:30 +02:00
Markus Unterwaditzer
6e46d0cd39 Fix PyPy3 support and add bug references
Fix #1841
2016-06-13 20:33:57 +02:00
Markus Unterwaditzer
b990d80764 Merge branch '0.11-maintenance' 2016-06-07 18:26:06 +02:00
Markus Unterwaditzer
724f04d305 This is 0.11.2-dev 2016-06-07 18:23:09 +02:00
Markus Unterwaditzer
d1d82ca8ce Bump version to 0.11.1 2016-06-07 18:22:43 +02:00
David Lord
7c271401b2 pass value directly to last_modified 2016-06-05 12:42:34 -07:00
Prachi Shirish Khadke
af515cc7ea Add last_modified arg for send_file
Enhancement: Add last_modified arg of type DateTime to send_file.

Fixes pallets/flask#1321
2016-06-05 10:59:17 -07:00
Giampaolo Eusebi
03ea11fe76 Make safe_join able to safely join multiple paths 2016-06-04 11:26:16 +02:00
Josiah Philipsen
41e08f4ccd fixed unmatched elif
Also update relevant test
2016-06-03 18:42:07 +02:00
jphilipsen05
fe5f714026 fixed unmatched elif (#1872) 2016-06-03 18:41:10 +02:00