hy144328 commented on code in PR #40274:
URL: https://github.com/apache/superset/pull/40274#discussion_r3284546069


##########
pytest.ini:
##########
@@ -18,5 +18,30 @@
 testpaths =
     tests
 python_files = *_test.py test_*.py *_tests.py *viz/utils.py
-addopts = -p no:warnings
+# `-p no:warnings` temporarily disabled in favor of more finely tuned 
`filterwarnings`.
+#addopts = -p no:warnings
 asyncio_mode = auto
+
+# `ignore` virtually reproduces to `-p no:warnings`.
+# Always print RemovedIn20Warning when SQLALCHEMY_WARN_20=1.
+# Additionally, raise errors for refactored RemovedIn20Warning cases to 
prevent regression.
+filterwarnings =
+    ignore
+    always::sqlalchemy.exc.RemovedIn20Warning

Review Comment:
   Sorry, my bad.
   I misread, and thought you sided with the AI to place `ignore` last.
   Happy to add the comments if it helps the AI to make the right call.
   It think it is confused by the Python `warnings` module.
   I maintains a list, and `append` actually means lower priority in that 
context. https://docs.python.org/3/library/warnings.html#warnings.filterwarnings
   But `filterwarnings` in `pytest.ini` works the other way around..



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to