-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate pytest_plugins in non-toplevel conftests #3084
Comments
GitMate.io thinks the contributor most likely able to help you is @RonnyPfannschmidt. |
I'll take this. Just so I understand the full picture, why do we want to deprecate this? Are there implementation considerations, behavioral considerations, or just for good practice for staying organized? |
@brianmaissy |
ah i see, makes sense |
@nicoddemus @RonnyPfannschmidt While trying to test this deprecation I ran into a problem. Since Am I supposed to use the |
@brianmaissy the starting point is declaring a RemovedInPytest4 wanring instance in _pytest.deprecated |
That I understand, but if I raise it in config.py while importing conftests, it will just get ignored by the python warnings filter |
I guess they could change the warnings filter in the top-level conftest. Still, it seems like deprecation warnings should be more visible |
The reason for this is not clear, and rather "hard to comprehend" bugs should be fixed/targeted. Quote: > pytest_plugins always has global effects, so plug-ins added somewhere > in a directory tree leak to the complete project, which is undesirable > and source of hard to comprehend bugs pytest-dev#3084 (comment)
We must deprecate this somehow before being able to remove it.
After this issue is merged, we should create a task for removal associated with a proper milestone.
The text was updated successfully, but these errors were encountered: