pluggy

Frameworks & LibrariesMIT

pluggy release notes.

Latest 1.6.0 · by pluggyWebsitePyPI · pluggyRSS

Changelog

What changed from 0 to 1

1.6.0

Latest
Fixed 3
  • 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
Removed 1
  • Python 3.8 is no longer supported

From pluggy

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
How 1.6.0 went

1.5.0

Added 1
  • Add support for deprecating specific hook parameters, or more generally, for issuing a warning whenever a hook implementation requests certain parameters
Fixed 1
  • PluginManager.get_plugins() no longer returns None for blocked plugins

From pluggy

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
How 1.5.0 went

1.4.0

Added 2
  • Issue a PluggyTeardownRaisedWarning when an old-style hookwrapper raises an exception during teardown
  • Add PluginManager.unblock method to unblock a plugin by plugin name
Fixed 2
  • 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

From pluggy

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
How 1.4.0 went

1.3.0

Added 2
  • Pluggy now exposes its typings to static type checkers
  • Exported HookImpl as pluggy.HookImpl
Changed 6
  • 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
Removed 1
  • Python 3.7 is no longer supported

From pluggy

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
How 1.3.0 went

1.2.0

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

From pluggy

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
How 1.2.0 went

1.0.0

Added 3
  • 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
Removed 8
  • 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

From pluggy

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
How 1.0.0 went

1.0.0.dev0

Pre-release
Added 3
  • 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 implementation to hook specification using a different name than the function name
Removed 8
  • Remove deprecated implprefix support; use HookimplMarker decorator 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

From pluggy

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
How 1.0.0.dev0 went

0.13.1

Changed 1
  • Improved documentation with regard to references

From pluggy

Trivial/Internal Changes
  • #236 <https://github.com/pytest-dev/pluggy/pull/236>_: Improved documentation, especially with regard to references.
View originalPermalink
How 0.13.1 went

0.13.0

Changed 1
  • Replace importlib_metadata backport with importlib.metadata from the standard library on Python 3.8+

From pluggy

Trivial/Internal Changes
  • #222 <https://github.com/pytest-dev/pluggy/issues/222>_: Replace importlib_metadata backport with importlib.metadata from the standard library on Python 3.8+.
View originalPermalink
How 0.13.0 went

0.12.0

Changed 1
  • Switch from pkg_resources to importlib-metadata for entrypoint detection for improved performance and import time, with .egg support

From pluggy

Features
  • #215 <https://github.com/pytest-dev/pluggy/issues/215>_: Switch from pkg_resources to importlib-metadata for entrypoint detection for improved performance and import time. This time with .egg support.
View originalPermalink
How 0.12.0 went

0.11.0

Fixed 1
  • Revert changes made in 0.10.0 release breaking .egg installs

From pluggy

Bug Fixes
  • #205 <https://github.com/pytest-dev/pluggy/issues/205>_: Revert changes made in 0.10.0 release breaking .egg installs.
View originalPermalink
How 0.11.0 went

0.10.0

Changed 1
  • Switch from pkg_resources to importlib-metadata for entrypoint detection for improved performance and import time

From pluggy

Features
  • #199 <https://github.com/pytest-dev/pluggy/issues/199>_: Switch from pkg_resources to importlib-metadata for entrypoint detection for improved performance and import time.
View originalPermalink
How 0.10.0 went

0.9.0

Added 1
  • PluginManager.load_setuptools_entrypoints now accepts a name parameter to load only entry points with that name
Changed 1
  • PluginManager.load_setuptools_entrypoints now returns the number of plugins loaded by the call instead of the number of all plugins loaded by all calls to this method
Fixed 1
  • Fix internal varnames function for PyPy3

From pluggy

Features
  • #189 <https://github.com/pytest-dev/pluggy/issues/189>_: PluginManager.load_setuptools_entrypoints now accepts a name parameter that when given will load only entry points with that name.

    PluginManager.load_setuptools_entrypoints also now returns the number of plugins loaded by the call, as opposed to the number of all plugins loaded by all calls to this method.

Bug Fixes
  • #187 <https://github.com/pytest-dev/pluggy/issues/187>_: Fix internal varnames function for PyPy3.
View originalPermalink
How 0.9.0 went

0.8.1

Changed 1
  • Add stacklevel=2 to implprefix warning so that the reported location of warning is the caller of PluginManager

From pluggy

Trivial/Internal Changes
  • #166 <https://github.com/pytest-dev/pluggy/issues/166>_: Add stacklevel=2 to implprefix warning so that the reported location of warning is the caller of PluginManager.
View originalPermalink
How 0.8.1 went

0.8.0

Added 1
  • Add get_hookimpls() method to hook callers
Changed 1
  • Encapsulate hook specifications in a type for easier introspection

From pluggy

Features
  • #177 <https://github.com/pytest-dev/pluggy/issues/177>_: Add get_hookimpls() method to hook callers.
Trivial/Internal Changes
  • #165 <https://github.com/pytest-dev/pluggy/issues/165>_: Add changelog in long package description and documentation.

  • #172 <https://github.com/pytest-dev/pluggy/issues/172>_: Add a test exemplifying the opt-in nature of spec defined args.

  • #57 <https://github.com/pytest-dev/pluggy/issues/57>_: Encapsulate hook specifications in a type for easier introspection.

View originalPermalink
How 0.8.0 went
View all

Discussion