Enable deprecation warnings in dev environment (including SQLAlchemy 2.0 warnings)
This commit is contained in:
parent
04d434b4a3
commit
4b9d973f40
2 changed files with 9 additions and 0 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import os
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from flask import Flask
|
||||
|
||||
|
|
@ -6,6 +8,10 @@ from tofu_api.api import TofuApiBlueprint
|
|||
from tofu_api.common.config import Config
|
||||
from tofu_api.dependencies import Dependencies
|
||||
|
||||
# Enable deprecation warnings in dev environment
|
||||
if not sys.warnoptions and os.getenv('FLASK_ENV') == 'development':
|
||||
warnings.filterwarnings('default', module='tofu_api.*')
|
||||
|
||||
|
||||
class App(Flask):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue