Skip to content

Commit

Permalink
Merge pull request #4742 from pallets/env-default
Browse files Browse the repository at this point in the history
fix default value of app.env
  • Loading branch information
davidism authored Aug 4, 2022
2 parents 4984753 + a6a7a57 commit 45b2c99
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 45b2c99

Please sign in to comment.