pytest: pytest.Instance not raising deprecation warning like intended?

Personally I think it’s would be better to just remove this, since trying with sqlalchemy returned no warning whatsoever, just no collection. If it was removed we would have at least an attribute error to go by.

See also https://github.com/pytest-dev/pytest/issues/9343#issuecomment-980462563

To reproduce:

git clone https://github.com/sqlalchemy/sqlalchemy.git --depth 100
pip install git+https://github.com/pytest-dev/pytest.git
pytest -Werror

will run and print no tests ran in 13.57s, so the warning seems to not trigger

_Originally posted by @CaselIT in https://github.com/pytest-dev/pytest/pull/9277#discussion_r757763440_

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

No worries! I’ll take a false alarm before a release rather than a real alarm a few minutes after the release any day 😉

Thanks to everyone helping to debug this! I suppose we can close this one then?

(BTW, @CaselIT, you should apply the following patch if you’re able – pytest 7 warns about it (it has always been a mistake).

diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py
index d79931b91..7bc88a14b 100644
--- a/lib/sqlalchemy/testing/plugin/plugin_base.py
+++ b/lib/sqlalchemy/testing/plugin/plugin_base.py
@@ -86,7 +86,7 @@ def setup_options(make_option):
     make_option(
         "--dbdriver",
         action="append",
-        type="string",
+        type=str,
         dest="dbdriver",
         help="Additional database drivers to include in tests.  "
         "These are linked to the existing database URLs by the "

)