Move warning definition to deprecated module
This commit is contained in:
parent
953a618102
commit
8609f8d25a
|
@ -71,3 +71,7 @@ PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST = RemovedInPytest4Warning(
|
|||
"because it affects the entire directory tree in a non-explicit way.\n"
|
||||
"Please move it to the top level conftest file instead."
|
||||
)
|
||||
|
||||
PYTEST_NAMESPACE = RemovedInPytest4Warning(
|
||||
"pytest_namespace is deprecated and will be removed soon"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
""" hook specifications for pytest plugins, invoked from main.py and builtin plugins. """
|
||||
|
||||
from pluggy import HookspecMarker
|
||||
from .deprecated import RemovedInPytest4Warning
|
||||
from .deprecated import PYTEST_NAMESPACE
|
||||
|
||||
|
||||
hookspec = HookspecMarker("pytest")
|
||||
|
||||
|
@ -23,12 +24,7 @@ def pytest_addhooks(pluginmanager):
|
|||
"""
|
||||
|
||||
|
||||
@hookspec(
|
||||
historic=True,
|
||||
warn_on_impl=RemovedInPytest4Warning(
|
||||
"pytest_namespace is deprecated and will be removed soon"
|
||||
),
|
||||
)
|
||||
@hookspec(historic=True, warn_on_impl=PYTEST_NAMESPACE)
|
||||
def pytest_namespace():
|
||||
"""
|
||||
return dict of name->object to be made globally available in
|
||||
|
|
Loading…
Reference in New Issue