Commit graph

3442 commits

Author SHA1 Message Date
Matt Robenolt
0b88fbd5eb Add support for PathLike objects in static file helpers
See: https://www.python.org/dev/peps/pep-0519/

This is mostly encountered with pathlib in python 3, but this API
suggests any PathLike object can be treated like a filepath with
`__fspath__` function.
2019-01-05 15:23:47 -08:00
David Lord
ca27661d8a Merge branch '1.0-maintenance' 2019-01-05 15:12:17 -08:00
David Lord
215bbf21b5 Merge pull request #3063 from pallets/key-error
clear KeyError in production for Werkzeug 0.15
2019-01-05 15:07:06 -08:00
David Lord
6b11d22427 Merge pull request #3064 from pallets/docs-fix
fix docs build
2019-01-05 15:06:41 -08:00
David Lord
a97c5c75c7 fix docs build 2019-01-05 14:59:25 -08:00
David Lord
77335fb105 clear KeyError in production for Werkzeug 0.15 2019-01-05 12:49:59 -08:00
David Lord
0310405768 Merge pull request #3062 from EJEP/master
Add comment about using factory function in __init__.py
2019-01-04 14:35:14 -08:00
Emlyn Price
7c429a182b Add comment about using factory function in __init__.py 2019-01-04 22:12:53 +00:00
David Lord
01bc0ea514 Merge pull request #3041 from obestwalter/patch-1
Fix typo in class name
2018-12-21 06:47:39 -08:00
Oliver Bestwalter
76e848be6d Fix typo in class name 2018-12-21 15:36:58 +01:00
David Lord
529921d0c8 Merge pull request #3021 from CasterWxBlog/master
add classifiers
2018-12-08 11:20:27 -08:00
CasterWx
05544feeb7 add classifiers 2018-12-08 12:45:20 +08:00
Hsiaoming Yang
b2285991e9 Merge pull request #2917 from garenchan/docs1
Docs: fix some errors in errorhandling.rst
2018-11-28 22:25:21 +09:00
David Lord
d5bfd939cb Merge pull request #2993 from data-get/update-cache-documentation
Update documentation for users to use flask-caching instead of Werkzeug cache
2018-11-13 14:09:31 -05:00
David Lord
391b4f1907 Merge pull request #2976 from cykerway/master
Fix inconsistency in testing doc.
2018-11-13 14:06:12 -05:00
Andrew Crouse
b2bcf461c4 Update documentation for users to use flask-caching instead of the deprecated Werkzeug cache 2018-11-13 14:03:27 -05:00
David Lord
2596fecb07 Merge pull request #2994 from jarek/werkzeug-640-exceptions-during-bind
Handle errors during create_url_adapter
2018-11-13 13:55:35 -05:00
Jarek Piórkowski
862077e0aa Add changelog entry 2018-11-13 13:40:50 -05:00
Jarek Piórkowski
e65e7faf56 Correct tests
We've discovered that passing Unicode in Host actually works, except for
test client limitations on Python 2 - and the only things that don't
work are non-printable characters.
2018-11-13 13:09:16 -05:00
Jarek Piórkowski
dc1730e457 Handle errors during create_url_adapter
If create_url_adapter raises (which it can if werkzeug cannot bind
environment, for example on non-ASCII Host header), we handle it as
other routing exceptions rather than raising through.

ref https://github.com/pallets/werkzeug/issues/640
2018-11-12 16:59:09 -05:00
Markus Unterwaditzer
21704f22cb Fixes for sentry docs (#2991) 2018-11-07 21:04:10 +01:00
Adam Walsh
513bbc06d0 Update sentry error handling documentation (#2990)
- Change examples to use the Sentry Python SDK: `sentry-sdk`
- Removed the app factory pattern example
- Added a custom exception handling example
2018-11-07 20:25:52 +01:00
Dave Chevell
be5998ce21 Fix #2935: Copy current session object in copy_current_request_context (#2936)
Add session to RequestContext.copy()
2018-11-03 20:32:24 -07:00
Cyker Way
7a09ae3648 Fix inconsistency in testing doc. 2018-10-29 20:53:39 -04:00
David Lord
cecfe08023 Merge pull request #2969 from codeaditya/update-links
Use https for external links wherever possible
2018-10-27 13:56:09 -07:00
Aditya
fa50bdd372 Use https for external links wherever possible 2018-10-27 17:58:45 +05:30
David Lord
8dd7391dcb Merge pull request #2966 from jangjunha/fix-doc-deferredcallbacks
Docs: Fix deferredcallbacks.rst
2018-10-25 08:54:52 -07:00
jangjunha
f112dc0aed Fix deferred callback doc 2018-10-26 00:33:12 +09:00
David Lord
af0d15271b Merge pull request #2963 from garenchan/bugfix-#2961
Fix #2961:ignore colon followed by slash when split app_import_path
2018-10-24 09:06:39 -07:00
garenchan
9da281c04c 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
David Lord
725435a2b2 Merge pull request #2962 from garenchan/dev
Cache return values to avoid repeated function calls.
2018-10-23 08:27:46 -07:00
garenchan
7a334062ef Cache return values to avoid repeated function calls. 2018-10-23 22:10:20 +08:00
moyosore
b4376bab18 Fixed typo in app.py 2018-10-13 20:57:41 +02:00
Grey Li
691411f951 Fix typo in issue template 2018-09-30 08:21:17 +08:00
David Lord
7e1d133d7f Merge pull request #2914 from garenchan/docs
Reduce unnecessary function calls.
2018-09-23 11:14:13 -07:00
garenchan
f5e80dfeda Reduce unnecessary function calls.
When propagate exceptions, the function call of "_find_error_handler"
makes no sense.
2018-09-23 16:40:35 +08:00
David Lord
05644138fc split code and output 2018-09-21 06:05:52 -07:00
Grey Li
9556883d2b Merge pull request #2916 from tombusby/patch-1
Make script output into comments to not break syntax highlighting
2018-09-21 18:33:56 +08:00
garenchan
d1b0d6c770 Fix docs errors
1.Grammar error: 'return' should be 'returns'; 'would is' should be
'would be'.
2.Reloader is used to reload and fork process if modules were changed
rather than when an exception occurred.
3.The sample code is not concise enough.
2018-09-21 13:05:06 +08:00
Tom Busby
d75c3c253e Make script output into comments to not break syntax highlighting
http://flask.pocoo.org/docs/1.0/quickstart/#url-building

In the URL Building section of the quickstart, the script output is shown right after the code.

This breaks syntax highlighting for the whole code-block. To fix this, I have made the output into comments.
2018-09-19 23:42:35 +02:00
Jarek Lipski
1a31fc71f6 fix @click.command example by adding parens
Otherwise the example fails with the following error: 
"name = name or cmd.name AttributeError: 'function' object has no attribute 'name'". 

More details: https://stackoverflow.com/a/51923415/4619705
2018-09-19 10:02:51 -07:00
David Lord
3dc9b7f7c8 Merge pull request #2915 from loomchild/master
fix @click.command example by adding parens
2018-09-19 10:01:34 -07:00
Jarek Lipski
df4ca56eac fix @click.command example by adding parens
Otherwise the example fails with the following error: 
"name = name or cmd.name AttributeError: 'function' object has no attribute 'name'". 

More details: https://stackoverflow.com/a/51923415/4619705
2018-09-19 18:55:12 +02:00
David Lord
fbd8618b13 Merge pull request #2912 from pallets/docs-theme
Update Sphinx conf for recent theme changes
2018-09-17 08:56:25 -07:00
David Lord
eed911fa79 reformat sphinx config 2018-09-17 08:35:53 -07:00
David Lord
58a8c456ab update sphinx config 2018-09-17 08:35:28 -07:00
David Lord
b32b093fe0 Merge pull request #2910 from garenchan/docs
fix issue: no theme named 'flask' found
2018-09-17 06:39:45 -07:00
chengkang
c9b6982843 remove DocVersion related 2018-09-17 21:05:53 +08:00
chengkang
51981d1b4a fix issue: no theme named 'flask' found 2018-09-17 16:18:52 +08:00
Grey Li
95008cf43d Add prefix for all commands in documentation (#2877)
* Add prefix for commands in docs

* Add prefix for commands in example's README
2018-09-09 17:41:56 +09:00