Debian Codegraph @

testing/web-platform/tests/tools/third_party/pluggy/CHANGELOG.rst

raw
1 =========
2 Changelog
3 =========
4
5 Versions follow `Semantic Versioning <https://semver.org/>`_ (``<major>.<minor>.<patch>``).
6
7 ..
8 You should *NOT* be adding new change log entries to this file, this
9 file is managed by towncrier. You *may* edit previous change logs to
10 fix problems like typo corrections or such.
11 To add a new change log entry, please see
12 https://pip.pypa.io/en/latest/development/contributing/#news-entries
13 we named the news folder changelog
14
15 .. only:: changelog_towncrier_draft
16
17 .. The 'changelog_towncrier_draft' tag is included by our 'tox -e docs',
18 but not on readthedocs.
19
20 .. include:: _changelog_towncrier_draft.rst
21
22 .. towncrier release notes start
23
24 pluggy 1.5.0 (2024-04-19)
25 =========================
26
27 Features
28 --------
29
30 - `#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.
31
32 See :ref:`warn_on_impl` for details.
33
34
35
36 Bug Fixes
37 ---------
38
39 - `#481 <https://github.com/pytest-dev/pluggy/issues/481>`_: ``PluginManager.get_plugins()`` no longer returns ``None`` for blocked plugins.
40
41
42 pluggy 1.4.0 (2024-01-24)
43 =========================
44
45 Features
46 --------
47
48 - `#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.
49 See the warning documentation for more details.
50
51 - `#471 <https://github.com/pytest-dev/pluggy/issues/471>`_: Add :func:`PluginManager.unblock <pluggy.PluginManager.unblock>` method to unblock a plugin by plugin name.
52
53 Bug Fixes
54 ---------
55
56 - `#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.
57
58 - `#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.
59
60
61 pluggy 1.3.0 (2023-08-26)
62 =========================
63
64 Deprecations and Removals
65 -------------------------
66
67 - `#426 <https://github.com/pytest-dev/pluggy/issues/426>`_: Python 3.7 is no longer supported.
68
69
70
71 Features
72 --------
73
74 - `#428 <https://github.com/pytest-dev/pluggy/issues/428>`_: Pluggy now exposes its typings to static type checkers.
75
76 As part of this, the following changes are made:
77
78 - Renamed ``_Result`` to ``Result``, and exported as :class:`pluggy.Result`.
79 - Renamed ``_HookRelay`` to ``HookRelay``, and exported as :class:`pluggy.HookRelay`.
80 - Renamed ``_HookCaller`` to ``HookCaller``, and exported as :class:`pluggy.HookCaller`.
81 - Exported ``HookImpl`` as :class:`pluggy.HookImpl`.
82 - Renamed ``_HookImplOpts`` to ``HookimplOpts``, and exported as :class:`pluggy.HookimplOpts`.
83 - Renamed ``_HookSpecOpts`` to ``HookspecOpts``, and exported as :class:`pluggy.HookspecOpts`.
84 - Some fields and classes are marked ``Final`` and ``@final``.
85 - The :ref:`api-reference` is updated to clearly delineate pluggy's public API.
86
87 Compatibility aliases are put in place for the renamed types.
88 We do not plan to remove the aliases, but we strongly recommend to only import from ``pluggy.*`` to ensure future compatibility.
89
90 Please note that pluggy is currently unable to provide strong typing for hook calls, e.g. ``pm.hook.my_hook(...)``,
91 nor to statically check that a hook implementation matches the hook specification's type.
92
93
94 pluggy 1.2.0 (2023-06-21)
95 =========================
96
97 Features
98 --------
99
100 - `#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.
101
102
103 pluggy 1.1.0 (YANKED)
104 =====================
105
106 .. note::
107
108 This release was yanked because unfortunately the implicit new-style hook wrappers broke some downstream projects.
109 See `#403 <https://github.com/pytest-dev/pluggy/issues/403>`__ for more information.
110 This was rectified in the 1.2.0 release.
111
112 Deprecations and Removals
113 -------------------------
114
115 - `#364 <https://github.com/pytest-dev/pluggy/issues/364>`_: Python 3.6 is no longer supported.
116
117
118
119 Features
120 --------
121
122 - `#260 <https://github.com/pytest-dev/pluggy/issues/260>`_: Added "new-style" hook wrappers, a simpler but equally powerful alternative to the existing ``hookwrapper=True`` wrappers.
123
124 New-style wrappers are generator functions, similarly to ``hookwrapper``, but do away with the :class:`result <pluggy.Result>` object.
125 Instead, the return value is sent directly to the ``yield`` statement, or, if inner calls raised an exception, it is raised from the ``yield``.
126 The wrapper is expected to return a value or raise an exception, which will become the result of the hook call.
127
128 New-style wrappers are fully interoperable with old-style wrappers.
129 We encourage users to use the new style, however we do not intend to deprecate the old style any time soon.
130
131 See :ref:`hookwrappers` for the full documentation.
132
133
134 - `#364 <https://github.com/pytest-dev/pluggy/issues/364>`_: Python 3.11 and 3.12 are now officially supported.
135
136
137 - `#394 <https://github.com/pytest-dev/pluggy/issues/394>`_: Added the :meth:`~pluggy.Result.force_exception` method to ``_Result``.
138
139 ``force_exception`` allows (old-style) hookwrappers to force an exception or override/adjust an existing exception of a hook invocation,
140 in a properly behaving manner. Using ``force_exception`` is preferred over raising an exception from the hookwrapper,
141 because raising an exception causes other hookwrappers to be skipped.
142
143
144 pluggy 1.0.0 (2021-08-25)
145 =========================
146
147 Deprecations and Removals
148 -------------------------
149
150 - `#116 <https://github.com/pytest-dev/pluggy/issues/116>`_: Remove deprecated ``implprefix`` support.
151 Decorate hook implementations using an instance of HookimplMarker instead.
152 The deprecation was announced in release ``0.7.0``.
153
154
155 - `#120 <https://github.com/pytest-dev/pluggy/issues/120>`_: Remove the deprecated ``proc`` argument to ``call_historic``.
156 Use ``result_callback`` instead, which has the same behavior.
157 The deprecation was announced in release ``0.7.0``.
158
159
160 - `#265 <https://github.com/pytest-dev/pluggy/issues/265>`_: Remove the ``_Result.result`` property. Use ``_Result.get_result()`` instead.
161 Note that unlike ``result``, ``get_result()`` raises the exception if the hook raised.
162 The deprecation was announced in release ``0.6.0``.
163
164
165 - `#267 <https://github.com/pytest-dev/pluggy/issues/267>`_: Remove official support for Python 3.4.
166
167
168 - `#272 <https://github.com/pytest-dev/pluggy/issues/272>`_: Dropped support for Python 2.
169 Continue to use pluggy 0.13.x for Python 2 support.
170
171
172 - `#308 <https://github.com/pytest-dev/pluggy/issues/308>`_: Remove official support for Python 3.5.
173
174
175 - `#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``).
176 Only API exported by the top-level ``pluggy`` module is considered public.
177
178
179 - `#59 <https://github.com/pytest-dev/pluggy/issues/59>`_: Remove legacy ``__multicall__`` recursive hook calling system.
180 The deprecation was announced in release ``0.5.0``.
181
182
183
184 Features
185 --------
186
187 - `#282 <https://github.com/pytest-dev/pluggy/issues/282>`_: When registering a hookimpl which is declared as ``hookwrapper=True`` but whose
188 function is not a generator function, a :class:`~pluggy.PluginValidationError` exception is
189 now raised.
190
191 Previously this problem would cause an error only later, when calling the hook.
192
193 In the unlikely case that you have a hookwrapper that *returns* a generator
194 instead of yielding directly, for example:
195
196 .. code-block:: python
197
198 def my_hook_implementation(arg):
199 print("before")
200 yield
201 print("after")
202
203
204 @hookimpl(hookwrapper=True)
205 def my_hook(arg):
206 return my_hook_implementation(arg)
207
208 change it to use ``yield from`` instead:
209
210 .. code-block:: python
211
212 @hookimpl(hookwrapper=True)
213 def my_hook(arg):
214 yield from my_hook_implementation(arg)
215
216
217 - `#309 <https://github.com/pytest-dev/pluggy/issues/309>`_: Add official support for Python 3.9.
218
219 - `#251 <https://github.com/pytest-dev/pluggy/issues/251>`_: Add ``specname`` option to ``@hookimpl``. If ``specname`` is provided, it will be used
220 instead of the function name when matching this hook implementation to a hook specification during registration (allowing a plugin to register
221 a hook implementation that was not named the same thing as the corresponding ``@hookspec``).
222
223
224 pluggy 0.13.1 (2019-11-21)
225 ==========================
226
227 Trivial/Internal Changes
228 ------------------------
229
230 - `#236 <https://github.com/pytest-dev/pluggy/pull/236>`_: Improved documentation, especially with regard to references.
231
232
233 pluggy 0.13.0 (2019-09-10)
234 ==========================
235
236 Trivial/Internal Changes
237 ------------------------
238
239 - `#222 <https://github.com/pytest-dev/pluggy/issues/222>`_: Replace ``importlib_metadata`` backport with ``importlib.metadata`` from the
240 standard library on Python 3.8+.
241
242
243 pluggy 0.12.0 (2019-05-27)
244 ==========================
245
246 Features
247 --------
248
249 - `#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.
250
251
252 pluggy 0.11.0 (2019-05-07)
253 ==========================
254
255 Bug Fixes
256 ---------
257
258 - `#205 <https://github.com/pytest-dev/pluggy/issues/205>`_: Revert changes made in 0.10.0 release breaking ``.egg`` installs.
259
260
261 pluggy 0.10.0 (2019-05-07)
262 ==========================
263
264 Features
265 --------
266
267 - `#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.
268
269
270 pluggy 0.9.0 (2019-02-21)
271 =========================
272
273 Features
274 --------
275
276 - `#189 <https://github.com/pytest-dev/pluggy/issues/189>`_: ``PluginManager.load_setuptools_entrypoints`` now accepts a ``name`` parameter that when given will
277 load only entry points with that name.
278
279 ``PluginManager.load_setuptools_entrypoints`` also now returns the number of plugins loaded by the
280 call, as opposed to the number of all plugins loaded by all calls to this method.
281
282
283
284 Bug Fixes
285 ---------
286
287 - `#187 <https://github.com/pytest-dev/pluggy/issues/187>`_: Fix internal ``varnames`` function for PyPy3.
288
289
290 pluggy 0.8.1 (2018-11-09)
291 =========================
292
293 Trivial/Internal Changes
294 ------------------------
295
296 - `#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.
297
298
299 pluggy 0.8.0 (2018-10-15)
300 =========================
301
302 Features
303 --------
304
305 - `#177 <https://github.com/pytest-dev/pluggy/issues/177>`_: Add ``get_hookimpls()`` method to hook callers.
306
307
308
309 Trivial/Internal Changes
310 ------------------------
311
312 - `#165 <https://github.com/pytest-dev/pluggy/issues/165>`_: Add changelog in long package description and documentation.
313
314
315 - `#172 <https://github.com/pytest-dev/pluggy/issues/172>`_: Add a test exemplifying the opt-in nature of spec defined args.
316
317
318 - `#57 <https://github.com/pytest-dev/pluggy/issues/57>`_: Encapsulate hook specifications in a type for easier introspection.
319
320
321 pluggy 0.7.1 (2018-07-28)
322 =========================
323
324 Deprecations and Removals
325 -------------------------
326
327 - `#116 <https://github.com/pytest-dev/pluggy/issues/116>`_: Deprecate the ``implprefix`` kwarg to ``PluginManager`` and instead
328 expect users to start using explicit ``HookimplMarker`` everywhere.
329
330
331
332 Features
333 --------
334
335 - `#122 <https://github.com/pytest-dev/pluggy/issues/122>`_: Add ``.plugin`` member to ``PluginValidationError`` to access failing plugin during post-mortem.
336
337
338 - `#138 <https://github.com/pytest-dev/pluggy/issues/138>`_: Add per implementation warnings support for hookspecs allowing for both
339 deprecation and future warnings of legacy and (future) experimental hooks
340 respectively.
341
342
343
344 Bug Fixes
345 ---------
346
347 - `#110 <https://github.com/pytest-dev/pluggy/issues/110>`_: Fix a bug where ``_HookCaller.call_historic()`` would call the ``proc``
348 arg even when the default is ``None`` resulting in a ``TypeError``.
349
350 - `#160 <https://github.com/pytest-dev/pluggy/issues/160>`_: Fix problem when handling ``VersionConflict`` errors when loading setuptools plugins.
351
352
353
354 Improved Documentation
355 ----------------------
356
357 - `#123 <https://github.com/pytest-dev/pluggy/issues/123>`_: Document how exceptions are handled and how the hook call loop
358 terminates immediately on the first error which is then delivered
359 to any surrounding wrappers.
360
361
362 - `#136 <https://github.com/pytest-dev/pluggy/issues/136>`_: Docs rework including a much better introduction and comprehensive example
363 set for new users. A big thanks goes out to @obestwalter for the great work!
364
365
366
367 Trivial/Internal Changes
368 ------------------------
369
370 - `#117 <https://github.com/pytest-dev/pluggy/issues/117>`_: Break up the main monolithic package modules into separate modules by concern
371
372
373 - `#131 <https://github.com/pytest-dev/pluggy/issues/131>`_: Automate ``setuptools`` wheels building and PyPi upload using TravisCI.
374
375
376 - `#153 <https://github.com/pytest-dev/pluggy/issues/153>`_: Reorganize tests more appropriately by modules relating to each
377 internal component/feature. This is in an effort to avoid (future)
378 duplication and better separation of concerns in the test set.
379
380
381 - `#156 <https://github.com/pytest-dev/pluggy/issues/156>`_: Add ``HookImpl.__repr__()`` for better debugging.
382
383
384 - `#66 <https://github.com/pytest-dev/pluggy/issues/66>`_: Start using ``towncrier`` and a custom ``tox`` environment to prepare releases!
385
386
387 pluggy 0.7.0 (Unreleased)
388 =========================
389
390 * `#160 <https://github.com/pytest-dev/pluggy/issues/160>`_: We discovered a deployment issue so this version was never released to PyPI, only the tag exists.
391
392 pluggy 0.6.0 (2017-11-24)
393 =========================
394
395 - Add CI testing for the features, release, and master
396 branches of ``pytest`` (PR `#79`_).
397 - Document public API for ``_Result`` objects passed to wrappers
398 (PR `#85`_).
399 - Document and test hook LIFO ordering (PR `#85`_).
400 - Turn warnings into errors in test suite (PR `#89`_).
401 - Deprecate ``_Result.result`` (PR `#88`_).
402 - Convert ``_Multicall`` to a simple function distinguishing it from
403 the legacy version (PR `#90`_).
404 - Resolve E741 errors (PR `#96`_).
405 - Test and bug fix for unmarked hook collection (PRs `#97`_ and
406 `#102`_).
407 - Drop support for EOL Python 2.6 and 3.3 (PR `#103`_).
408 - Fix ``inspect`` based arg introspection on py3.6 (PR `#94`_).
409
410 .. _#79: https://github.com/pytest-dev/pluggy/pull/79
411 .. _#85: https://github.com/pytest-dev/pluggy/pull/85
412 .. _#88: https://github.com/pytest-dev/pluggy/pull/88
413 .. _#89: https://github.com/pytest-dev/pluggy/pull/89
414 .. _#90: https://github.com/pytest-dev/pluggy/pull/90
415 .. _#94: https://github.com/pytest-dev/pluggy/pull/94
416 .. _#96: https://github.com/pytest-dev/pluggy/pull/96
417 .. _#97: https://github.com/pytest-dev/pluggy/pull/97
418 .. _#102: https://github.com/pytest-dev/pluggy/pull/102
419 .. _#103: https://github.com/pytest-dev/pluggy/pull/103
420
421
422 pluggy 0.5.2 (2017-09-06)
423 =========================
424
425 - fix bug where ``firstresult`` wrappers were being sent an incorrectly configured
426 ``_Result`` (a list was set instead of a single value). Add tests to check for
427 this as well as ``_Result.force_result()`` behaviour. Thanks to `@tgoodlet`_
428 for the PR `#72`_.
429
430 - fix incorrect ``getattr`` of ``DeprecationWarning`` from the ``warnings``
431 module. Thanks to `@nicoddemus`_ for the PR `#77`_.
432
433 - hide ``pytest`` tracebacks in certain core routines. Thanks to
434 `@nicoddemus`_ for the PR `#80`_.
435
436 .. _#72: https://github.com/pytest-dev/pluggy/pull/72
437 .. _#77: https://github.com/pytest-dev/pluggy/pull/77
438 .. _#80: https://github.com/pytest-dev/pluggy/pull/80
439
440
441 pluggy 0.5.1 (2017-08-29)
442 =========================
443
444 - fix a bug and add tests for case where ``firstresult`` hooks return
445 ``None`` results. Thanks to `@RonnyPfannschmidt`_ and `@tgoodlet`_
446 for the issue (`#68`_) and PR (`#69`_) respectively.
447
448 .. _#69: https://github.com/pytest-dev/pluggy/pull/69
449 .. _#68: https://github.com/pytest-dev/pluggy/issues/68
450
451
452 pluggy 0.5.0 (2017-08-28)
453 =========================
454
455 - fix bug where callbacks for historic hooks would not be called for
456 already registered plugins. Thanks `@vodik`_ for the PR
457 and `@hpk42`_ for further fixes.
458
459 - fix `#17`_ by considering only actual functions for hooks
460 this removes the ability to register arbitrary callable objects
461 which at first glance is a reasonable simplification,
462 thanks `@RonnyPfannschmidt`_ for report and pr.
463
464 - fix `#19`_: allow registering hookspecs from instances. The PR from
465 `@tgoodlet`_ also modernized the varnames implementation.
466
467 - resolve `#32`_: split up the test set into multiple modules.
468 Thanks to `@RonnyPfannschmidt`_ for the PR and `@tgoodlet`_ for
469 the initial request.
470
471 - resolve `#14`_: add full sphinx docs. Thanks to `@tgoodlet`_ for
472 PR `#39`_.
473
474 - add hook call mismatch warnings. Thanks to `@tgoodlet`_ for the
475 PR `#42`_.
476
477 - resolve `#44`_: move to new-style classes. Thanks to `@MichalTHEDUDE`_
478 for PR `#46`_.
479
480 - add baseline benchmarking/speed tests using ``pytest-benchmark``
481 in PR `#54`_. Thanks to `@tgoodlet`_.
482
483 - update the README to showcase the API. Thanks to `@tgoodlet`_ for the
484 issue and PR `#55`_.
485
486 - deprecate ``__multicall__`` and add a faster call loop implementation.
487 Thanks to `@tgoodlet`_ for PR `#58`_.
488
489 - raise a comprehensible error when a ``hookimpl`` is called with positional
490 args. Thanks to `@RonnyPfannschmidt`_ for the issue and `@tgoodlet`_ for
491 PR `#60`_.
492
493 - fix the ``firstresult`` test making it more complete
494 and remove a duplicate of that test. Thanks to `@tgoodlet`_
495 for PR `#62`_.
496
497 .. _#62: https://github.com/pytest-dev/pluggy/pull/62
498 .. _#60: https://github.com/pytest-dev/pluggy/pull/60
499 .. _#58: https://github.com/pytest-dev/pluggy/pull/58
500 .. _#55: https://github.com/pytest-dev/pluggy/pull/55
501 .. _#54: https://github.com/pytest-dev/pluggy/pull/54
502 .. _#46: https://github.com/pytest-dev/pluggy/pull/46
503 .. _#44: https://github.com/pytest-dev/pluggy/issues/44
504 .. _#42: https://github.com/pytest-dev/pluggy/pull/42
505 .. _#39: https://github.com/pytest-dev/pluggy/pull/39
506 .. _#32: https://github.com/pytest-dev/pluggy/pull/32
507 .. _#19: https://github.com/pytest-dev/pluggy/issues/19
508 .. _#17: https://github.com/pytest-dev/pluggy/issues/17
509 .. _#14: https://github.com/pytest-dev/pluggy/issues/14
510
511
512 pluggy 0.4.0 (2016-09-25)
513 =========================
514
515 - add ``has_plugin(name)`` method to pluginmanager. thanks `@nicoddemus`_.
516
517 - fix `#11`_: make plugin parsing more resilient against exceptions
518 from ``__getattr__`` functions. Thanks `@nicoddemus`_.
519
520 - fix issue `#4`_: specific ``HookCallError`` exception for when a hook call
521 provides not enough arguments.
522
523 - better error message when loading setuptools entrypoints fails
524 due to a ``VersionConflict``. Thanks `@blueyed`_.
525
526 .. _#11: https://github.com/pytest-dev/pluggy/issues/11
527 .. _#4: https://github.com/pytest-dev/pluggy/issues/4
528
529
530 pluggy 0.3.1 (2015-09-17)
531 =========================
532
533 - avoid using deprecated-in-python3.5 getargspec method. Thanks
534 `@mdboom`_.
535
536
537 pluggy 0.3.0 (2015-05-07)
538 =========================
539
540 initial release
541
542 .. contributors
543 .. _@hpk42: https://github.com/hpk42
544 .. _@tgoodlet: https://github.com/goodboy
545 .. _@MichalTHEDUDE: https://github.com/MichalTHEDUDE
546 .. _@vodik: https://github.com/vodik
547 .. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
548 .. _@blueyed: https://github.com/blueyed
549 .. _@nicoddemus: https://github.com/nicoddemus
550 .. _@mdboom: https://github.com/mdboom