Skip to content

Commit

Permalink
Remove broken/unused PytestPluginManager.addhooks
Browse files Browse the repository at this point in the history
The function has been deprecated for ages and
the PLUGIN_MANAGER_ADDHOOKS constant doesn't even exist since 3.0.

Because the function is clearly broken, this change doesn't even
require a CHANGELOG.
  • Loading branch information
nicoddemus committed Jun 13, 2019
1 parent e3dcf1f commit 7513d87
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/_pytest/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from .exceptions import UsageError
from .findpaths import determine_setup
from .findpaths import exists
from _pytest import deprecated
from _pytest._code import ExceptionInfo
from _pytest._code import filter_traceback
from _pytest.outcomes import fail
Expand Down Expand Up @@ -242,16 +241,6 @@ def __init__(self):
# Used to know when we are importing conftests after the pytest_configure stage
self._configured = False

def addhooks(self, module_or_class):
"""
.. deprecated:: 2.8
Use :py:meth:`pluggy.PluginManager.add_hookspecs <PluginManager.add_hookspecs>`
instead.
"""
warnings.warn(deprecated.PLUGIN_MANAGER_ADDHOOKS, stacklevel=2)
return self.add_hookspecs(module_or_class)

def parse_hookimpl_opts(self, plugin, name):
# pytest hooks are always prefixed with pytest_
# so we avoid accessing possibly non-readable attributes
Expand Down

0 comments on commit 7513d87

Please sign in to comment.