Update dependency pluggy to v1 #11
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
andylockran/dtmfapy!11
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/pluggy-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
==0.6.0→==1.7.0Release Notes
pytest-dev/pluggy (pluggy)
v1.7.0Compare Source
=========================
Deprecations and Removals
#​632 <https://github.com/pytest-dev/pluggy/issues/632>_: Hookspec methods defined withoutselfas the first parameter now emit a :class:DeprecationWarning. Addselfas the first parameter or use@staticmethod.Features
#​170 <https://github.com/pytest-dev/pluggy/issues/170>_: Hookspecs can now declare default values for arguments, using the usualdef myhook(myarg="default")syntax.This is mainly a backward compatibility feature, to allow a hookspec to add new parameters to an existing hook without breaking existing callers.
See :ref:
hookspec_arg_defaultfor details.#​729 <https://github.com/pytest-dev/pluggy/issues/729>_: Tracing now adds detail wherestr()is ambiguous: empty strings and strings containingwhitespace are quoted, and enums and paths show their
repr().A value spanning several lines is now displayed as a block instead of running into the
surrounding trace.
Bug Fixes
#​629 <https://github.com/pytest-dev/pluggy/issues/629>_: Fix hooks failing to register on Python 3.14+ when type annotations use forward references.#​315 <https://github.com/pytest-dev/pluggy/issues/315>_: Source archives created bygit archive(including GitHub's "Source code" downloads) now carry version information, so building pluggy from them no longer fails with a missing version.#​442 <https://github.com/pytest-dev/pluggy/issues/442>_: With the addition of default values for hookspec arguments, we also changed the precedence of default values for hookimpl arguments.Previously, if a hookimpl function declared a default for an argument, it was always used, even if the hook call passed an explicit value.
Now the precedence is changed to: hook call passed value > hookspec default value > hookimpl default value.
See :ref:
hookimpl_arg_defaults.#​701 <https://github.com/pytest-dev/pluggy/issues/701>_: Hookimpls and hookspecs are now discovered via :func:inspect.getattr_static, soproperties,
cached_propertyand other descriptors are no longer executed whilescanning a plugin. Hooks declared through such a descriptor are not supported.
As a side effect,
@hookimpl/@hookspecapplied above@classmethodor@staticmethodis now picked up; previously the marker sat on the wrapper wheregetattr()never saw it. Callables stored directly on a plugin instance -- in its__dict__or in a__slots__slot -- keep being called exactly asgetattr()returned them, i.e. without an implicit
self.#​431 <https://github.com/pytest-dev/pluggy/issues/431>_: FixHookCaller._remove_plugin()to remove all hook implementations for a plugin in a single call, instead of only the first one. Also fixPluginManager.get_hookcallers()to not return duplicateHookCallerentries when a plugin has multiple implementations on the same hook (e.g. viaspecname).#​695 <https://github.com/pytest-dev/pluggy/issues/695>_: Fixed :func:~pluggy.PluginManager.subset_hook_caller()not excluding removed plugins which use :func:@hookiml(specname="...") <pluggy.HookimplMarker>.#​424 <https://github.com/pytest-dev/pluggy/issues/424>_: Tracing no longer breaks hook execution when a traced object has a broken__repr__or
__str__. Such a value is now rendered as<[RuntimeError(...) raised in str()] Broken object at 0x...>, in the same stylepytest uses for unpresentable objects, instead of propagating the exception out of the
hook call.
#​681 <https://github.com/pytest-dev/pluggy/issues/681>_: Tracing no longer crashes withUnicodeEncodeErrorwhen a hook argument or returnvalue contains lone surrogates; they are escaped with
backslashreplacebefore themessage reaches the writer. Trace output is otherwise unchanged.
#​727 <https://github.com/pytest-dev/pluggy/issues/727>_: Fix the warning for hookspec arguments missing from a hook call being attributed to pluggy's own frame instead of to the code making the call. This affectedHookCaller.__call__,call_historicandcall_extra.#​731 <https://github.com/pytest-dev/pluggy/issues/731>_: :func:PluginManager.register(None) <pluggy.PluginManager.register>is now ignored instead of having some weird behaviors.#​733 <https://github.com/pytest-dev/pluggy/issues/733>_: :meth:PluginManager.register() <pluggy.PluginManager.register>now validates all hook implementations of a plugin before registering any of them, so a plugin that fails validation no longer stays partially registered.#​755 <https://github.com/pytest-dev/pluggy/issues/755>_: Skip already registered entry-point plugins without evaluating the plugin object's truthiness.#​757 <https://github.com/pytest-dev/pluggy/issues/757>_: Restore the project URLs in the package metadata, which were lost in pluggy 1.6.0 when the packaging configuration moved topyproject.toml.Links to the documentation, changelog, issue tracker and funding page were added as well.
#​759 <https://github.com/pytest-dev/pluggy/issues/759>_: :meth:PluginManager.unregister() <pluggy.PluginManager.unregister>now raises :exc:ValueErrorwhen bothpluginandnameare given but refer to different plugins, instead of removing one plugin's hook implementations and another plugin's registry entry.It also fully unregisters plugin objects that are falsy (e.g. define
__len__returning0); previously their name stayed in the registry.#​186 <https://github.com/pytest-dev/pluggy/issues/186>_: Fixed broken external documentation references in the list of projects using pluggy.Trivial/Internal Changes
#​417 <https://github.com/pytest-dev/pluggy/issues/417>_: Fix thetox -e docsbuild, which failed undersphinx-build -Wbecause nitpicky mode reported unresolved references to the private names.#​590 <https://github.com/pytest-dev/pluggy/issues/590>_: Thepluggy.__version__variable is now dynamically provided via a module-level__getattr__implementation, usingimportlibto obtain the installed version.#​691 <https://github.com/pytest-dev/pluggy/issues/691>_: Fix outdated links inREADME.rst.#​703 <https://github.com/pytest-dev/pluggy/issues/703>_: The internalpluggy._hooksmodule was split into role-specific modules(
_caller,_config,_decorators,_executionand_impl).pluggy._hooksremains as a re-export shim, and the public API isunchanged.
#​776 <https://github.com/pytest-dev/pluggy/issues/776>_: Buildingpluggywithout git metadata now yields the placeholder version1.6.0+fallbackinstead of failing, so Dependabot relocks no longer resolvepluggyas0.0.0and silently downgrade pytest and tox inuv.lock.toxwas dropped from thedevdependency group; run it as a tool withuvx tox.v1.6.0Compare Source
=========================
Deprecations and Removals
#​632 <https://github.com/pytest-dev/pluggy/issues/632>_: Hookspec methods defined withoutselfas the first parameter now emit a :class:DeprecationWarning. Addselfas the first parameter or use@staticmethod.Features
#​170 <https://github.com/pytest-dev/pluggy/issues/170>_: Hookspecs can now declare default values for arguments, using the usualdef myhook(myarg="default")syntax.This is mainly a backward compatibility feature, to allow a hookspec to add new parameters to an existing hook without breaking existing callers.
See :ref:
hookspec_arg_defaultfor details.#​729 <https://github.com/pytest-dev/pluggy/issues/729>_: Tracing now adds detail wherestr()is ambiguous: empty strings and strings containingwhitespace are quoted, and enums and paths show their
repr().A value spanning several lines is now displayed as a block instead of running into the
surrounding trace.
Bug Fixes
#​629 <https://github.com/pytest-dev/pluggy/issues/629>_: Fix hooks failing to register on Python 3.14+ when type annotations use forward references.#​315 <https://github.com/pytest-dev/pluggy/issues/315>_: Source archives created bygit archive(including GitHub's "Source code" downloads) now carry version information, so building pluggy from them no longer fails with a missing version.#​442 <https://github.com/pytest-dev/pluggy/issues/442>_: With the addition of default values for hookspec arguments, we also changed the precedence of default values for hookimpl arguments.Previously, if a hookimpl function declared a default for an argument, it was always used, even if the hook call passed an explicit value.
Now the precedence is changed to: hook call passed value > hookspec default value > hookimpl default value.
See :ref:
hookimpl_arg_defaults.#​701 <https://github.com/pytest-dev/pluggy/issues/701>_: Hookimpls and hookspecs are now discovered via :func:inspect.getattr_static, soproperties,
cached_propertyand other descriptors are no longer executed whilescanning a plugin. Hooks declared through such a descriptor are not supported.
As a side effect,
@hookimpl/@hookspecapplied above@classmethodor@staticmethodis now picked up; previously the marker sat on the wrapper wheregetattr()never saw it. Callables stored directly on a plugin instance -- in its__dict__or in a__slots__slot -- keep being called exactly asgetattr()returned them, i.e. without an implicit
self.#​431 <https://github.com/pytest-dev/pluggy/issues/431>_: FixHookCaller._remove_plugin()to remove all hook implementations for a plugin in a single call, instead of only the first one. Also fixPluginManager.get_hookcallers()to not return duplicateHookCallerentries when a plugin has multiple implementations on the same hook (e.g. viaspecname).#​695 <https://github.com/pytest-dev/pluggy/issues/695>_: Fixed :func:~pluggy.PluginManager.subset_hook_caller()not excluding removed plugins which use :func:@hookiml(specname="...") <pluggy.HookimplMarker>.#​424 <https://github.com/pytest-dev/pluggy/issues/424>_: Tracing no longer breaks hook execution when a traced object has a broken__repr__or
__str__. Such a value is now rendered as<[RuntimeError(...) raised in str()] Broken object at 0x...>, in the same stylepytest uses for unpresentable objects, instead of propagating the exception out of the
hook call.
#​681 <https://github.com/pytest-dev/pluggy/issues/681>_: Tracing no longer crashes withUnicodeEncodeErrorwhen a hook argument or returnvalue contains lone surrogates; they are escaped with
backslashreplacebefore themessage reaches the writer. Trace output is otherwise unchanged.
#​727 <https://github.com/pytest-dev/pluggy/issues/727>_: Fix the warning for hookspec arguments missing from a hook call being attributed to pluggy's own frame instead of to the code making the call. This affectedHookCaller.__call__,call_historicandcall_extra.#​731 <https://github.com/pytest-dev/pluggy/issues/731>_: :func:PluginManager.register(None) <pluggy.PluginManager.register>is now ignored instead of having some weird behaviors.#​733 <https://github.com/pytest-dev/pluggy/issues/733>_: :meth:PluginManager.register() <pluggy.PluginManager.register>now validates all hook implementations of a plugin before registering any of them, so a plugin that fails validation no longer stays partially registered.#​755 <https://github.com/pytest-dev/pluggy/issues/755>_: Skip already registered entry-point plugins without evaluating the plugin object's truthiness.#​757 <https://github.com/pytest-dev/pluggy/issues/757>_: Restore the project URLs in the package metadata, which were lost in pluggy 1.6.0 when the packaging configuration moved topyproject.toml.Links to the documentation, changelog, issue tracker and funding page were added as well.
#​759 <https://github.com/pytest-dev/pluggy/issues/759>_: :meth:PluginManager.unregister() <pluggy.PluginManager.unregister>now raises :exc:ValueErrorwhen bothpluginandnameare given but refer to different plugins, instead of removing one plugin's hook implementations and another plugin's registry entry.It also fully unregisters plugin objects that are falsy (e.g. define
__len__returning0); previously their name stayed in the registry.#​186 <https://github.com/pytest-dev/pluggy/issues/186>_: Fixed broken external documentation references in the list of projects using pluggy.Trivial/Internal Changes
#​417 <https://github.com/pytest-dev/pluggy/issues/417>_: Fix thetox -e docsbuild, which failed undersphinx-build -Wbecause nitpicky mode reported unresolved references to the private names.#​590 <https://github.com/pytest-dev/pluggy/issues/590>_: Thepluggy.__version__variable is now dynamically provided via a module-level__getattr__implementation, usingimportlibto obtain the installed version.#​691 <https://github.com/pytest-dev/pluggy/issues/691>_: Fix outdated links inREADME.rst.#​703 <https://github.com/pytest-dev/pluggy/issues/703>_: The internalpluggy._hooksmodule was split into role-specific modules(
_caller,_config,_decorators,_executionand_impl).pluggy._hooksremains as a re-export shim, and the public API isunchanged.
#​776 <https://github.com/pytest-dev/pluggy/issues/776>_: Buildingpluggywithout git metadata now yields the placeholder version1.6.0+fallbackinstead of failing, so Dependabot relocks no longer resolvepluggyas0.0.0and silently downgrade pytest and tox inuv.lock.toxwas dropped from thedevdependency group; run it as a tool withuvx tox.v1.5.0Compare Source
=========================
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_implfor details.Bug Fixes
#​481 <https://github.com/pytest-dev/pluggy/issues/481>_:PluginManager.get_plugins()no longer returnsNonefor blocked plugins.v1.4.0Compare Source
=========================
Features
#​463 <https://github.com/pytest-dev/pluggy/issues/463>_: A warning :class:~pluggy.PluggyTeardownRaisedWarningis 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.v1.3.0Compare Source
=========================
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:
_ResulttoResult, and exported as :class:pluggy.Result._HookRelaytoHookRelay, and exported as :class:pluggy.HookRelay._HookCallertoHookCaller, and exported as :class:pluggy.HookCaller.HookImplas :class:pluggy.HookImpl._HookImplOptstoHookimplOpts, and exported as :class:pluggy.HookimplOpts._HookSpecOptstoHookspecOpts, and exported as :class:pluggy.HookspecOpts.Finaland@final.api-referenceis 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.
v1.2.0Compare Source
=========================
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 explicitwrapper=Truedesignation in the@hookimpl()decorator.v1.1.0Compare Source
=========================
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.Resultcauses the exception's traceback to get longer and longer.#​544 <https://github.com/pytest-dev/pluggy/issues/544>_: Correctly pass :class:StopIterationthrough hook wrappers.Raising a :class:
StopIterationin a generator triggers a :class:RuntimeError.If the :class:
RuntimeErrorof a generator has the passed in :class:StopIterationas causeresume with that :class:
StopIterationas 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.v1.0.0Compare Source
=========================
Deprecations and Removals
#​116 <https://github.com/pytest-dev/pluggy/issues/116>_: Remove deprecatedimplprefixsupport.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 deprecatedprocargument tocall_historic.Use
result_callbackinstead, 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.resultproperty. 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 internalpluggy.callers,pluggy.managerandpluggy.hooksare now explicitly marked private by a_prefix (e.g.pluggy._callers).Only API exported by the top-level
pluggymodule 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 ashookwrapper=Truebut whosefunction is not a generator function, a :class:
~pluggy.PluginValidationErrorexception isnow 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
change it to use
yield frominstead:.. code-block:: python
#​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>_: Addspecnameoption to@hookimpl. Ifspecnameis provided, it will be usedinstead 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).v0.13.1Compare Source
==========================
Trivial/Internal Changes
#​236 <https://github.com/pytest-dev/pluggy/pull/236>_: Improved documentation, especially with regard to references.v0.13.0Compare Source
==========================
Trivial/Internal Changes
#​222 <https://github.com/pytest-dev/pluggy/issues/222>_: Replaceimportlib_metadatabackport withimportlib.metadatafrom thestandard library on Python 3.8+.
v0.12.0Compare Source
==========================
Features
#​215 <https://github.com/pytest-dev/pluggy/issues/215>_: Switch frompkg_resourcestoimportlib-metadatafor entrypoint detection for improved performance and import time. This time with.eggsupport.v0.11.0Compare Source
==========================
Bug Fixes
#​205 <https://github.com/pytest-dev/pluggy/issues/205>_: Revert changes made in 0.10.0 release breaking.egginstalls.v0.10.0Compare Source
==========================
Bug Fixes
#​205 <https://github.com/pytest-dev/pluggy/issues/205>_: Revert changes made in 0.10.0 release breaking.egginstalls.v0.9.0Compare Source
=========================
Features
#​189 <https://github.com/pytest-dev/pluggy/issues/189>_:PluginManager.load_setuptools_entrypointsnow accepts anameparameter that when given willload only entry points with that name.
PluginManager.load_setuptools_entrypointsalso now returns the number of plugins loaded by thecall, 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 internalvarnamesfunction for PyPy3.v0.8.1Compare Source
=========================
Trivial/Internal Changes
#​166 <https://github.com/pytest-dev/pluggy/issues/166>_: Addstacklevel=2to implprefix warning so that the reported location of warning is the caller of PluginManager.v0.8.0Compare Source
=========================
Features
#​177 <https://github.com/pytest-dev/pluggy/issues/177>_: Addget_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.v0.7.1Compare Source
=========================
Deprecations and Removals
#​116 <https://github.com/pytest-dev/pluggy/issues/116>_: Deprecate theimplprefixkwarg toPluginManagerand insteadexpect users to start using explicit
HookimplMarkereverywhere.Features
#​122 <https://github.com/pytest-dev/pluggy/issues/122>_: Add.pluginmember toPluginValidationErrorto access failing plugin during post-mortem.#​138 <https://github.com/pytest-dev/pluggy/issues/138>_: Add per implementation warnings support for hookspecs allowing for bothdeprecation and future warnings of legacy and (future) experimental hooks
respectively.
Bug Fixes
#​110 <https://github.com/pytest-dev/pluggy/issues/110>_: Fix a bug where_HookCaller.call_historic()would call theprocarg even when the default is
Noneresulting in aTypeError.#​160 <https://github.com/pytest-dev/pluggy/issues/160>_: Fix problem when handlingVersionConflicterrors when loading setuptools plugins.Improved Documentation
#​123 <https://github.com/pytest-dev/pluggy/issues/123>_: Document how exceptions are handled and how the hook call loopterminates immediately on the first error which is then delivered
to any surrounding wrappers.
#​136 <https://github.com/pytest-dev/pluggy/issues/136>_: Docs rework including a much better introduction and comprehensive exampleset for new users. A big thanks goes out to @obestwalter for the great work!
Trivial/Internal Changes
#​117 <https://github.com/pytest-dev/pluggy/issues/117>_: Break up the main monolithic package modules into separate modules by concern#​131 <https://github.com/pytest-dev/pluggy/issues/131>_: Automatesetuptoolswheels building and PyPi upload using TravisCI.#​153 <https://github.com/pytest-dev/pluggy/issues/153>_: Reorganize tests more appropriately by modules relating to eachinternal component/feature. This is in an effort to avoid (future)
duplication and better separation of concerns in the test set.
#​156 <https://github.com/pytest-dev/pluggy/issues/156>_: AddHookImpl.__repr__()for better debugging.#​66 <https://github.com/pytest-dev/pluggy/issues/66>_: Start usingtowncrierand a customtoxenvironment to prepare releases!Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate CLI.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.