-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Closed
Milestone
Description
Previously, if FLASK_ENV was not set, it would default to "production", now it defaults to "development".
Reproduction:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
print(f"{app.config.get('ENV')=}")
return "<p>Hello, World!</p>"Run using gunicorn, gunicorn flask_demo.app:app with FLASK_ENV unset,
Flask 2.2.1, this handler prints:
app.config.get('ENV')='development'
downgrade to 2.1.0:
app.config.get('ENV')='production'
I assume this due to #4720, src/flask/app.py:693
Environment:
- Python version: 3.10.4
- Flask version: 2.2.1
angela-tran
Metadata
Metadata
Assignees
Labels
No labels