Skip to content

Commit

Permalink
fix default value of app.env
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Aug 4, 2022
1 parent 4984753 commit a6a7a57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------
Expand Down
2 changes: 1 addition & 1 deletion src/flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a6a7a57

Please sign in to comment.