What changed in pluggy from 0 to 1

6 releases numbered after 0.13.1 up to and including 1.6.0, stable releases only. 0.13.1 and 1.6.0 are the newest stable releases of 0 and 1 we track; this page follows them as new ones ship.

31 changes across 6 releases

Added 8

1.5.0

  • Add support for deprecating specific hook parameters, or more generally, for issuing a warning whenever a hook implementation requests certain parameters

1.4.0

  • Issue a PluggyTeardownRaisedWarning when an old-style hookwrapper raises an exception during teardown
  • Add PluginManager.unblock method to unblock a plugin by plugin name

1.3.0

  • Pluggy now exposes its typings to static type checkers
  • Exported HookImpl as pluggy.HookImpl

1.0.0

  • Raise PluginValidationError when registering a hookimpl declared as hookwrapper=True whose function is not a generator function
  • Add official support for Python 3.9
  • Add specname option to @hookimpl to match hook implementations to specifications using a different name
Changed 7

1.3.0

  • Renamed _Result to Result and exported as pluggy.Result
  • Renamed _HookRelay to HookRelay and exported as pluggy.HookRelay
  • Renamed _HookCaller to HookCaller and exported as pluggy.HookCaller
  • Renamed _HookImplOpts to HookimplOpts and exported as pluggy.HookimplOpts
  • Renamed _HookSpecOpts to HookspecOpts and exported as pluggy.HookspecOpts
  • Some fields and classes are marked Final and @final

1.2.0

  • New-style hook wrappers now require an explicit wrapper=True designation in the @hookimpl() decorator
Fixed 6

1.6.0

  • Fix a regression in pluggy 1.1.0 where using result.get_result() on the same failed Result causes the exception's traceback to get longer and longer
  • Correctly pass StopIteration through hook wrappers by resuming with the StopIteration as a normal exception instead of failing with the RuntimeError
  • Fix python 3.14 SyntaxError by rearranging code

1.5.0

  • PluginManager.get_plugins() no longer returns None for blocked plugins

1.4.0

  • Fix HookCaller.call_extra() extra methods getting ordered before everything else in some circumstances
  • Fix plugins registering other plugins in a hook when the other plugins implement the same hook itself
Removed 10

1.6.0

  • Python 3.8 is no longer supported

1.3.0

  • Python 3.7 is no longer supported

1.0.0

  • Remove deprecated implprefix support; use HookimplMarker instead
  • Remove the deprecated proc argument to call_historic; use result_callback instead
  • Remove the _Result.result property; use _Result.get_result() instead
  • Remove official support for Python 3.4
  • Drop support for Python 2
  • Remove official support for Python 3.5
  • Mark internal pluggy.callers, pluggy.manager, and pluggy.hooks as private with _ prefix
  • Remove legacy __multicall__ recursive hook calling system

Original release notes, newest first

The list above is our reading of these notes; the originals from pluggy are here, one fold per release.

1.6.0
Deprecations and Removals
  • #556 <https://github.com/pytest-dev/pluggy/issues/556>_: Python 3.8 is no longer supported.
Bug Fixes
  • #504 <https://github.com/pytest-dev/pluggy/issues/504>_: Fix a regression in pluggy 1.1.0 where using :func:result.get_result() <pluggy.Result.get_result> on the same failed :class:~pluggy.Result causes the exception's traceback to get longer and longer.

  • #544 <https://github.com/pytest-dev/pluggy/issues/544>_: Correctly pass :class:StopIteration through hook wrappers.

    Raising a :class:StopIteration in a generator triggers a :class:RuntimeError.

    If the :class:RuntimeError of a generator has the passed in :class:StopIteration as cause resume with that :class:StopIteration as normal exception instead of failing with the :class:RuntimeError.

  • #573 <https://github.com/pytest-dev/pluggy/issues/573>_: Fix python 3.14 SyntaxError by rearranging code.

View originalPermalink

1.5.0
Features
  • #178 <https://github.com/pytest-dev/pluggy/issues/178>_: Add support for deprecating specific hook parameters, or more generally, for issuing a warning whenever a hook implementation requests certain parameters.

    See :ref:warn_on_impl for details.

Bug Fixes
  • #481 <https://github.com/pytest-dev/pluggy/issues/481>_: PluginManager.get_plugins() no longer returns None for blocked plugins.

View originalPermalink

1.4.0
Features
  • #463 <https://github.com/pytest-dev/pluggy/issues/463>_: A warning :class:~pluggy.PluggyTeardownRaisedWarning is now issued when an old-style hookwrapper raises an exception during teardown. See the warning documentation for more details.

  • #471 <https://github.com/pytest-dev/pluggy/issues/471>_: Add :func:PluginManager.unblock <pluggy.PluginManager.unblock> method to unblock a plugin by plugin name.

Bug Fixes
  • #441 <https://github.com/pytest-dev/pluggy/issues/441>_: Fix :func:~pluggy.HookCaller.call_extra() extra methods getting ordered before everything else in some circumstances. Regressed in pluggy 1.1.0.

  • #438 <https://github.com/pytest-dev/pluggy/issues/438>_: Fix plugins registering other plugins in a hook when the other plugins implement the same hook itself. Regressed in pluggy 1.1.0.

View originalPermalink

1.3.0
Deprecations and Removals
  • #426 <https://github.com/pytest-dev/pluggy/issues/426>_: Python 3.7 is no longer supported.
Features
  • #428 <https://github.com/pytest-dev/pluggy/issues/428>_: Pluggy now exposes its typings to static type checkers.

    As part of this, the following changes are made:

    • Renamed _Result to Result, and exported as :class:pluggy.Result.
    • Renamed _HookRelay to HookRelay, and exported as :class:pluggy.HookRelay.
    • Renamed _HookCaller to HookCaller, and exported as :class:pluggy.HookCaller.
    • Exported HookImpl as :class:pluggy.HookImpl.
    • Renamed _HookImplOpts to HookimplOpts, and exported as :class:pluggy.HookimplOpts.
    • Renamed _HookSpecOpts to HookspecOpts, and exported as :class:pluggy.HookspecOpts.
    • Some fields and classes are marked Final and @final.
    • The :ref:api-reference is updated to clearly delineate pluggy's public API.

    Compatibility aliases are put in place for the renamed types. We do not plan to remove the aliases, but we strongly recommend to only import from pluggy.* to ensure future compatibility.

    Please note that pluggy is currently unable to provide strong typing for hook calls, e.g. pm.hook.my_hook(...), nor to statically check that a hook implementation matches the hook specification's type.

View originalPermalink

1.2.0
Features
  • #405 <https://github.com/pytest-dev/pluggy/issues/405>_: The new-style hook wrappers, added in the yanked 1.1.0 release, now require an explicit wrapper=True designation in the @hookimpl() decorator.

View originalPermalink

1.0.0
Deprecations and Removals
  • #116 <https://github.com/pytest-dev/pluggy/issues/116>_: Remove deprecated implprefix support. Decorate hook implementations using an instance of HookimplMarker instead. The deprecation was announced in release 0.7.0.

  • #120 <https://github.com/pytest-dev/pluggy/issues/120>_: Remove the deprecated proc argument to call_historic. Use result_callback instead, which has the same behavior. The deprecation was announced in release 0.7.0.

  • #265 <https://github.com/pytest-dev/pluggy/issues/265>_: Remove the _Result.result property. Use _Result.get_result() instead. Note that unlike result, get_result() raises the exception if the hook raised. The deprecation was announced in release 0.6.0.

  • #267 <https://github.com/pytest-dev/pluggy/issues/267>_: Remove official support for Python 3.4.

  • #272 <https://github.com/pytest-dev/pluggy/issues/272>_: Dropped support for Python 2. Continue to use pluggy 0.13.x for Python 2 support.

  • #308 <https://github.com/pytest-dev/pluggy/issues/308>_: Remove official support for Python 3.5.

  • #313 <https://github.com/pytest-dev/pluggy/issues/313>_: The internal pluggy.callers, pluggy.manager and pluggy.hooks are now explicitly marked private by a _ prefix (e.g. pluggy._callers). Only API exported by the top-level pluggy module is considered public.

  • #59 <https://github.com/pytest-dev/pluggy/issues/59>_: Remove legacy __multicall__ recursive hook calling system. The deprecation was announced in release 0.5.0.

Features
  • #282 <https://github.com/pytest-dev/pluggy/issues/282>_: When registering a hookimpl which is declared as hookwrapper=True but whose function is not a generator function, a :class:~pluggy.PluginValidationError exception is now raised.

    Previously this problem would cause an error only later, when calling the hook.

    In the unlikely case that you have a hookwrapper that returns a generator instead of yielding directly, for example:

    .. code-block:: python

    def my_hook_implementation(arg):
        print("before")
        yield
        print("after")
    
    
    @hookimpl(hookwrapper=True)
    def my_hook(arg):
        return my_hook_implementation(arg)
    

    change it to use yield from instead:

    .. code-block:: python

    @hookimpl(hookwrapper=True)
    def my_hook(arg):
        yield from my_hook_implementation(arg)
    
  • #309 <https://github.com/pytest-dev/pluggy/issues/309>_: Add official support for Python 3.9.

  • #251 <https://github.com/pytest-dev/pluggy/issues/251>_: Add specname option to @hookimpl. If specname is provided, it will be used instead of the function name when matching this hook implementation to a hook specification during registration (allowing a plugin to register a hook implementation that was not named the same thing as the corresponding @hookspec).

View originalPermalink