diff --git a/CHANGES.rst b/CHANGES.rst index 547c121f5d..efc373b835 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,6 +3,9 @@ Version 2.2.2 Unreleased +- Fix the default value for ``app.env`` to be ``"production"``. This + attribute remains deprecated. :issue:`4740` + Version 2.2.1 ------------- diff --git a/src/flask/app.py b/src/flask/app.py index 965865f2aa..db442c9edf 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -827,7 +827,7 @@ def make_config(self, instance_relative: bool = False) -> Config: if instance_relative: root_path = self.instance_path defaults = dict(self.default_config) - defaults["ENV"] = os.environ.get("FLASK_ENV") or "development" + defaults["ENV"] = os.environ.get("FLASK_ENV") or "production" defaults["DEBUG"] = get_debug_flag() return self.config_class(root_path, defaults)