fix default value of app.env

This commit is contained in:
David Lord 2022-08-04 07:24:20 -07:00
parent 4984753dbf
commit a6a7a57380
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
2 changed files with 4 additions and 1 deletions

View file

@ -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
-------------

View file

@ -827,7 +827,7 @@ class Flask(Scaffold):
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)