Skip to content

Upgrading Flask 0.6 to 0.7

Review needed0.6.1 → 0.7.2Deprecated2New11Changed5Fixed6

Review neededUpgrade verdict

2 deprecations.

  • Passing file objects to send_file for automatic type and etag detection is unreliable and now discouraged.
  • The old way to add Jinja globals is deprecated in favor of overriding the environment creation method.
2 items need code or config changes

Nothing in this upgrade needs a code or configuration change.

Deprecated2
Deprecates mimetype guessing and etag support based on file objects for send_file.
send_file
Deprecates init_jinja_globals; override Flask.create_jinja_environment instead.
init_jinja_globalsFlask.create_jinja_environment

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: variable app
  • added: function index()
  • added: function index2()
  • added: variable admin
  • added: function index()
  • added: variable frontend
  • added: export Blueprint
  • added: export has_request_context
  • added: export request_tearing_down
  • added: export safe_join
  • removed: class Flask(_PackageBoundObject)
  • removed: constructor Flask(import_name, static_path=…)
  • removed: field Flask.debug
  • removed: field Flask.debug_log_format
  • removed: field Flask.default_config
  • removed: field Flask.jinja_options
  • removed: field Flask.logger_name
  • removed: field Flask.permanent_session_lifetime
  • removed: field Flask.request_class
  • removed: field Flask.response_class
  • removed: field Flask.secret_key
  • removed: field Flask.session_cookie_name
  • removed: field Flask.static_path
  • removed: field Flask.testing
  • removed: field Flask.use_x_sendfile
  • removed: method Flask.add_url_rule(rule, endpoint=…, view_func=…, **options)
  • removed: method Flask.after_request(f)
  • removed: method Flask.before_request(f)
  • removed: method Flask.context_processor(f)
  • removed: method Flask.create_jinja_environment()
  • removed: method Flask.create_url_adapter(request)
  • removed: method Flask.dispatch_request()
  • removed: method Flask.errorhandler(code)
  • removed: method Flask.handle_exception(e)
  • removed: method Flask.handle_http_exception(e)
  • removed: method Flask.init_jinja_globals()
  • removed: method Flask.make_response(rv)
  • removed: method Flask.open_session(request)
  • removed: method Flask.preprocess_request()
  • removed: method Flask.process_response(response)
  • removed: method Flask.register_module(module, **options)
  • removed: method Flask.request_context(environ)
  • removed: method Flask.route(rule, **options)
  • removed: method Flask.run(host=…, port=…, **options)
  • removed: method Flask.save_session(session, response)
  • removed: method Flask.select_jinja_autoescape(filename)
  • removed: method Flask.template_filter(name=…)
  • removed: method Flask.test_client()
  • removed: method Flask.test_request_context(*args, **kwargs)
  • removed: method Flask.update_template_context(context)
  • removed: method Flask.wsgi_app(environ, start_response)
  • removed: property Flask.logger
  • added: class Blueprint(_PackageBoundObject)
  • added: class BlueprintSetupState(object)
  • added: constructor Blueprint(name, import_name, static_folder=…, static_url_path=…, template_folder=…, url_prefix=…, subdomain=…, url_defaults=…)
  • added: constructor BlueprintSetupState(blueprint, app, options, first_registration)
  • added: field Blueprint.warn_on_modifications
  • added: method Blueprint.add_url_rule(rule, endpoint=…, view_func=…, **options)
  • added: method Blueprint.after_app_request(f)
  • added: method Blueprint.after_request(f)
  • added: method Blueprint.app_context_processor(f)
  • added: method Blueprint.app_errorhandler(code)
  • added: method Blueprint.app_url_defaults(f)
  • added: method Blueprint.app_url_value_preprocessor(f)
  • added: method Blueprint.before_app_request(f)
  • added: method Blueprint.before_request(f)
  • added: method Blueprint.context_processor(f)
  • added: method Blueprint.endpoint(endpoint)
  • added: method Blueprint.errorhandler(code_or_exception)
  • added: method Blueprint.make_setup_state(app, options, first_registration=…)
  • added: method Blueprint.record(func)
  • added: method Blueprint.record_once(func)
  • added: method Blueprint.register(app, options, first_registration=…)
  • added: method Blueprint.route(rule, **options)
  • added: method Blueprint.teardown_app_request(f)
  • added: method Blueprint.teardown_request(f)
  • added: method Blueprint.url_defaults(f)
  • added: method Blueprint.url_value_preprocessor(f)
  • added: method BlueprintSetupState.add_url_rule(rule, endpoint=…, view_func=…, **options)
  • changed: method Config.from_pyfile(filename) → method Config.from_pyfile(filename, silent=…)
  • added: class RequestContext(object)
  • added: constructor RequestContext(app, environ)
  • added: function has_request_context()
  • added: method RequestContext.match_request()
  • added: method RequestContext.pop()
  • added: method RequestContext.push()
  • added: class locked_cached_property(object)
  • added: constructor locked_cached_property(func, name=…, doc=…)
  • added: function safe_join(directory, filename)
  • removed: method Module.add_url_rule(rule, endpoint=…, view_func=…, **options)
  • removed: method Module.after_app_request(f)
  • removed: method Module.after_request(f)
  • removed: method Module.app_context_processor(f)
  • removed: method Module.app_errorhandler(code)
  • removed: method Module.before_app_request(f)
  • removed: method Module.before_request(f)
  • removed: method Module.context_processor(f)
  • removed: method Module.route(rule, **options)
  • changed: class Module(_PackageBoundObject) → class Module(Blueprint)
  • added: function blueprint_is_module(bp)
  • added: variable request_tearing_down
  • added: class DispatchingJinjaLoader(BaseLoader)
  • added: class Environment(BaseEnvironment)
  • added: constructor DispatchingJinjaLoader(app)
  • added: constructor Environment(app, **options)
  • added: method DispatchingJinjaLoader.get_source(environment, template)
  • added: method DispatchingJinjaLoader.list_templates()
  • added: class MethodView(View)
  • added: class MethodViewType(type)
  • added: class View(object)
  • added: field View.methods
  • added: method MethodView.dispatch_request(*args, **kwargs)
  • added: method View.dispatch_request()
  • added: static method View.as_view(name, *class_args, **class_kwargs)
  • added: variable http_method_funcs
  • added: property Request.blueprint
  • added: function create_app(config_overrides=…)
  • added: variable db