uranusjr commented on a change in pull request #22333:
URL: https://github.com/apache/airflow/pull/22333#discussion_r828800148



##########
File path: airflow/settings.py
##########
@@ -228,6 +229,19 @@ def configure_vars():
     global PLUGINS_FOLDER
     global DONOT_MODIFY_HANDLERS
     SQL_ALCHEMY_CONN = conf.get('core', 'SQL_ALCHEMY_CONN')
+
+    # as of sqlalchemy 1.4, scheme `postgres+psycopg2` must be replaced with 
`postgresql`
+    parsed = urlparse(SQL_ALCHEMY_CONN)
+    bad_scheme = 'postgres+psycopg2'
+    if parsed.scheme == bad_scheme:
+        warnings.warn(
+            f"Scheme for metadata sql alchemy connection is `{bad_scheme}`."
+            "As of sqlalchemy 1.4 this is no longer supported.  You must 
change "
+            "to `postgresql`",
+            PendingDeprecationWarning,

Review comment:
       Should this be `DeprecationWarning`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to