Description of bug:
FLASK_DEBUG=1 was working previously to set flask's debug mode either in a .env/.flaskenv and using python-dotenv OR by manually setting with export FLASK_DEBUG=1. As of today, setting it by env variable no longer works. Flask will still use debug mode using the --debug flag. Downgrading click to 8.3.3 resolves the issue.
Replicate bug:
python3 -m venv venv
. venv/bin/activate
pip install flask
cat << EOF > app.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return 'hello world'
EOF
export FLASK_DEBUG=1
flask run
This produces:
Debug mode: off
pip install click==8.3.3
flask run
Then produces:
Debug mode: on
Environment:
- Python version: 3.12.3
- Flask version: 3.1.3
Description of bug:
FLASK_DEBUG=1 was working previously to set flask's debug mode either in a .env/.flaskenv and using python-dotenv OR by manually setting with export FLASK_DEBUG=1. As of today, setting it by env variable no longer works. Flask will still use debug mode using the --debug flag. Downgrading click to 8.3.3 resolves the issue.
Replicate bug:
This produces:
Debug mode: off
Then produces:
Debug mode: on
Environment: