Merge pull request #4742 from pallets/env-default

fix default value of app.env
This commit is contained in:
David Lord 2022-08-04 07:27:50 -07:00 committed by GitHub
commit 45b2c99c1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)