Upgrading Flask 0.8 to 0.9
Breaking0.8.1 → 0.9Breaking1New14Changed5Fixed1
BreakingUpgrade verdict
1 breaking change.
In plain terms
- Tuple return values from view functions are no longer arguments to the response object and now have a defined meaning.
Must act 1 item needs code or config changes
What you must change
Breaking1
Tuple return values from view functions are no longer arguments to the response object and now have a defined meaning.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- added:
export after_this_request - added:
export has_app_context - added:
export stream_with_context
- added:
method Blueprint.add_app_template_filter(f, name=…) - added:
method Blueprint.app_template_filter(name=…)
- changed:
method RequestContext.pop() → method RequestContext.pop(exc=…) - added:
class AppContext(object) - added:
constructor AppContext(app) - added:
function after_this_request(f) - added:
function has_app_context() - added:
method AppContext.pop(exc=…) - added:
method AppContext.push()
- added:
class JSONBadRequest(JSONHTTPException, BadRequest) - added:
class JSONHTTPException(HTTPException) - added:
field JSONBadRequest.description - added:
method JSONHTTPException.get_body(environ) - added:
method JSONHTTPException.get_headers(environ)
- changed:
function get_flashed_messages(with_categories=…) → function get_flashed_messages(with_categories=…, category_filter=…) - added:
function stream_with_context(generator_or_function)
- added:
variable appcontext_tearing_down
- changed:
function render_template(template_name, **context) → function render_template(template_name_or_list, **context)
- added:
class AppContextTestCase(FlaskTestCase) - added:
function suite() - added:
method AppContextTestCase.test_app_context_provides_current_app() - added:
method AppContextTestCase.test_app_tearing_down() - added:
method AppContextTestCase.test_basic_url_generation() - added:
method AppContextTestCase.test_context_refcounts() - added:
method AppContextTestCase.test_custom_request_globals_class() - added:
method AppContextTestCase.test_request_context_means_app_context() - added:
method AppContextTestCase.test_url_generation_requires_server_name() - added:
method AppContextTestCase.test_url_generation_without_context_fails()
- added:
method BasicFunctionalityTestCase.test_after_request_processing() - added:
method BasicFunctionalityTestCase.test_build_error_handler() - added:
method BasicFunctionalityTestCase.test_inject_blueprint_url_defaults() - added:
method BasicFunctionalityTestCase.test_make_response_with_response_instance() - added:
method BasicFunctionalityTestCase.test_session_stored_last()
- added:
method BlueprintTestCase.test_add_template_filter() - added:
method BlueprintTestCase.test_add_template_filter_with_name() - added:
method BlueprintTestCase.test_add_template_filter_with_name_and_template() - added:
method BlueprintTestCase.test_add_template_filter_with_template() - added:
method BlueprintTestCase.test_default_static_cache_timeout() - added:
method BlueprintTestCase.test_template_filter() - added:
method BlueprintTestCase.test_template_filter_after_route_with_template() - added:
method BlueprintTestCase.test_template_filter_with_name() - added:
method BlueprintTestCase.test_template_filter_with_name_and_template() - added:
method BlueprintTestCase.test_template_filter_with_template()
- removed:
class ConfigTestCase(FlaskTestCase) - removed:
class InstanceTestCase(FlaskTestCase) - removed:
function suite() - removed:
method ConfigTestCase.common_object_test(app) - removed:
method ConfigTestCase.test_config_from_class() - removed:
method ConfigTestCase.test_config_from_envvar() - removed:
method ConfigTestCase.test_config_from_file() - removed:
method ConfigTestCase.test_config_from_object() - removed:
method ConfigTestCase.test_config_missing() - removed:
method ConfigTestCase.test_session_lifetime() - removed:
method InstanceTestCase.test_egg_installed_paths() - removed:
method InstanceTestCase.test_explicit_instance_paths() - removed:
method InstanceTestCase.test_installed_module_paths() - removed:
method InstanceTestCase.test_installed_package_paths() - removed:
method InstanceTestCase.test_prefix_installed_paths() - removed:
method InstanceTestCase.test_uninstalled_module_paths() - removed:
method InstanceTestCase.test_uninstalled_package_paths() - removed:
variable SECRET_KEY - removed:
variable TEST_KEY
- added:
class NoImportsTestCase(FlaskTestCase) - added:
class StreamingTestCase(FlaskTestCase) - added:
method JSONTestCase.test_json_bad_requests_content_type() - added:
method LoggingTestCase.test_debug_log_override() - added:
method LoggingTestCase.test_url_for_with_anchor() - added:
method LoggingTestCase.test_url_with_method() - added:
method NoImportsTestCase.test_name_with_import_error() - added:
method SendfileTestCase.test_static_file() - added:
method StreamingTestCase.test_streaming_with_context() - added:
method StreamingTestCase.test_streaming_with_context_and_custom_close() - added:
method StreamingTestCase.test_streaming_with_context_as_decorator()
- added:
class MemoryTestCase(FlaskTestCase) - added:
function suite() - added:
method MemoryTestCase.assert_no_leak() - added:
method MemoryTestCase.test_memory_consumption()
- added:
method TemplatingTestCase.test_add_template_filter() - added:
method TemplatingTestCase.test_add_template_filter_with_name() - added:
method TemplatingTestCase.test_add_template_filter_with_name_and_template() - added:
method TemplatingTestCase.test_add_template_filter_with_template() - added:
method TemplatingTestCase.test_iterable_loader()
- added:
variable app
- added:
function show(page) - added:
variable simple_page
- added:
variable app