sadpandajoe commented on code in PR #40274:
URL: https://github.com/apache/superset/pull/40274#discussion_r3283065175
##########
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`.
Review Comment:
```suggestion
# `ignore` is equivalent to `-p no:warnings`.
```
##########
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
Review Comment:
```suggestion
```
Dead code so we should just remove it.
##########
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:
Two reviewers in a row (bito x3, Copilot crashed) bounced off the precedence
semantics here. A one-liner heads off the next one:
```suggestion
# Later rules override earlier ones — pytest docs:
# https://docs.pytest.org/en/stable/how-to/capture-warnings.html
filterwarnings =
ignore
always::sqlalchemy.exc.RemovedIn20Warning
```
##########
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.
Review Comment:
this is a bit misleading since the comment says it raises errors, but we
have commented out every error. We should either have one `error:` or remove
the comment until we actually start raising errors.
##########
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
+# error:Passing a string to Connection.execute\(\) is
deprecated:sqlalchemy.exc.RemovedIn20Warning
+# error:"Query" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
+# error:"SavedQuery" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
+# error:"SqlaTable" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
+# error:"SqlMetric" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
+# error:"TableColumn" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
+# error:"TaggedObject" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
+# error:The ``as_declarative\(\)`` function is now
available:sqlalchemy.exc.RemovedIn20Warning
+# error:The autoload parameter is
deprecated:sqlalchemy.exc.RemovedIn20Warning
+# error:The connection.execute\(\) method:sqlalchemy.exc.RemovedIn20Warning
+# error:The current statement is being autocommitted using implicit
autocommit:sqlalchemy.exc.RemovedIn20Warning
+# error:The `database` package is
deprecated:sqlalchemy.exc.RemovedIn20Warning
+# error:The ``declarative_base\(\)`` function is now
available:sqlalchemy.exc.RemovedIn20Warning
+# error:The Engine.execute\(\) method is considered
legacy:sqlalchemy.exc.RemovedIn20Warning
+# error:The legacy calling style of select\(\) is
deprecated:sqlalchemy.exc.RemovedIn20Warning
+# error:The "whens" argument to case:sqlalchemy.exc.RemovedIn20Warning
+# error:"User" object is being merged into a
Session:sqlalchemy.exc.RemovedIn20Warning
Review Comment:
Lots of dead code, either remove it or add them in future prs that actually
use them.
--
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]