METADATA 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. Metadata-Version: 2.1
  2. Name: pluggy
  3. Version: 0.12.0
  4. Summary: plugin and hook calling mechanisms for python
  5. Home-page: https://github.com/pytest-dev/pluggy
  6. Author: Holger Krekel
  7. Author-email: holger@merlinux.eu
  8. License: MIT license
  9. Platform: unix
  10. Platform: linux
  11. Platform: osx
  12. Platform: win32
  13. Classifier: Development Status :: 4 - Beta
  14. Classifier: Intended Audience :: Developers
  15. Classifier: License :: OSI Approved :: MIT License
  16. Classifier: Operating System :: POSIX
  17. Classifier: Operating System :: Microsoft :: Windows
  18. Classifier: Operating System :: MacOS :: MacOS X
  19. Classifier: Topic :: Software Development :: Testing
  20. Classifier: Topic :: Software Development :: Libraries
  21. Classifier: Topic :: Utilities
  22. Classifier: Programming Language :: Python :: Implementation :: CPython
  23. Classifier: Programming Language :: Python :: Implementation :: PyPy
  24. Classifier: Programming Language :: Python :: 2
  25. Classifier: Programming Language :: Python :: 2.7
  26. Classifier: Programming Language :: Python :: 3
  27. Classifier: Programming Language :: Python :: 3.4
  28. Classifier: Programming Language :: Python :: 3.5
  29. Classifier: Programming Language :: Python :: 3.6
  30. Classifier: Programming Language :: Python :: 3.7
  31. Classifier: Programming Language :: Python :: 3.8
  32. Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
  33. Requires-Dist: importlib-metadata (>=0.12)
  34. Provides-Extra: dev
  35. Requires-Dist: pre-commit ; extra == 'dev'
  36. Requires-Dist: tox ; extra == 'dev'
  37. ====================================================
  38. pluggy - A minimalist production ready plugin system
  39. ====================================================
  40. |pypi| |conda-forge| |versions| |travis| |appveyor| |gitter| |black| |codecov|
  41. This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.
  42. Please `read the docs`_ to learn more!
  43. A definitive example
  44. ====================
  45. .. code-block:: python
  46. import pluggy
  47. hookspec = pluggy.HookspecMarker("myproject")
  48. hookimpl = pluggy.HookimplMarker("myproject")
  49. class MySpec(object):
  50. """A hook specification namespace.
  51. """
  52. @hookspec
  53. def myhook(self, arg1, arg2):
  54. """My special little hook that you can customize.
  55. """
  56. class Plugin_1(object):
  57. """A hook implementation namespace.
  58. """
  59. @hookimpl
  60. def myhook(self, arg1, arg2):
  61. print("inside Plugin_1.myhook()")
  62. return arg1 + arg2
  63. class Plugin_2(object):
  64. """A 2nd hook implementation namespace.
  65. """
  66. @hookimpl
  67. def myhook(self, arg1, arg2):
  68. print("inside Plugin_2.myhook()")
  69. return arg1 - arg2
  70. # create a manager and add the spec
  71. pm = pluggy.PluginManager("myproject")
  72. pm.add_hookspecs(MySpec)
  73. # register plugins
  74. pm.register(Plugin_1())
  75. pm.register(Plugin_2())
  76. # call our ``myhook`` hook
  77. results = pm.hook.myhook(arg1=1, arg2=2)
  78. print(results)
  79. .. badges
  80. .. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg
  81. :target: https://pypi.org/pypi/pluggy
  82. .. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg
  83. :target: https://pypi.org/pypi/pluggy
  84. .. |travis| image:: https://img.shields.io/travis/pytest-dev/pluggy/master.svg
  85. :target: https://travis-ci.org/pytest-dev/pluggy
  86. .. |appveyor| image:: https://img.shields.io/appveyor/ci/pytestbot/pluggy/master.svg
  87. :target: https://ci.appveyor.com/project/pytestbot/pluggy
  88. .. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg
  89. :target: https://anaconda.org/conda-forge/pytest
  90. .. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg
  91. :alt: Join the chat at https://gitter.im/pytest-dev/pluggy
  92. :target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
  93. .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
  94. :target: https://github.com/ambv/black
  95. .. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg
  96. :target: https://codecov.io/gh/pytest-dev/pluggy
  97. :alt: Code coverage Status
  98. .. links
  99. .. _pytest:
  100. http://pytest.org
  101. .. _tox:
  102. https://tox.readthedocs.org
  103. .. _devpi:
  104. http://doc.devpi.net
  105. .. _read the docs:
  106. https://pluggy.readthedocs.io/en/latest/
  107. =========
  108. Changelog
  109. =========
  110. .. towncrier release notes start
  111. pluggy 0.12.0 (2019-05-27)
  112. ==========================
  113. Features
  114. --------
  115. - `#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.
  116. pluggy 0.11.0 (2019-05-07)
  117. ==========================
  118. Bug Fixes
  119. ---------
  120. - `#205 <https://github.com/pytest-dev/pluggy/issues/205>`_: Revert changes made in 0.10.0 release breaking ``.egg`` installs.
  121. pluggy 0.10.0 (2019-05-07)
  122. ==========================
  123. Features
  124. --------
  125. - `#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.
  126. pluggy 0.9.0 (2019-02-21)
  127. =========================
  128. Features
  129. --------
  130. - `#189 <https://github.com/pytest-dev/pluggy/issues/189>`_: ``PluginManager.load_setuptools_entrypoints`` now accepts a ``name`` parameter that when given will
  131. load only entry points with that name.
  132. ``PluginManager.load_setuptools_entrypoints`` also now returns the number of plugins loaded by the
  133. call, as opposed to the number of all plugins loaded by all calls to this method.
  134. Bug Fixes
  135. ---------
  136. - `#187 <https://github.com/pytest-dev/pluggy/issues/187>`_: Fix internal ``varnames`` function for PyPy3.
  137. pluggy 0.8.1 (2018-11-09)
  138. =========================
  139. Trivial/Internal Changes
  140. ------------------------
  141. - `#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.
  142. pluggy 0.8.0 (2018-10-15)
  143. =========================
  144. Features
  145. --------
  146. - `#177 <https://github.com/pytest-dev/pluggy/issues/177>`_: Add ``get_hookimpls()`` method to hook callers.
  147. Trivial/Internal Changes
  148. ------------------------
  149. - `#165 <https://github.com/pytest-dev/pluggy/issues/165>`_: Add changelog in long package description and documentation.
  150. - `#172 <https://github.com/pytest-dev/pluggy/issues/172>`_: Add a test exemplifying the opt-in nature of spec defined args.
  151. - `#57 <https://github.com/pytest-dev/pluggy/issues/57>`_: Encapsulate hook specifications in a type for easier introspection.
  152. pluggy 0.7.1 (2018-07-28)
  153. =========================
  154. Deprecations and Removals
  155. -------------------------
  156. - `#116 <https://github.com/pytest-dev/pluggy/issues/116>`_: Deprecate the ``implprefix`` kwarg to ``PluginManager`` and instead
  157. expect users to start using explicit ``HookimplMarker`` everywhere.
  158. Features
  159. --------
  160. - `#122 <https://github.com/pytest-dev/pluggy/issues/122>`_: Add ``.plugin`` member to ``PluginValidationError`` to access failing plugin during post-mortem.
  161. - `#138 <https://github.com/pytest-dev/pluggy/issues/138>`_: Add per implementation warnings support for hookspecs allowing for both
  162. deprecation and future warnings of legacy and (future) experimental hooks
  163. respectively.
  164. Bug Fixes
  165. ---------
  166. - `#110 <https://github.com/pytest-dev/pluggy/issues/110>`_: Fix a bug where ``_HookCaller.call_historic()`` would call the ``proc``
  167. arg even when the default is ``None`` resulting in a ``TypeError``.
  168. - `#160 <https://github.com/pytest-dev/pluggy/issues/160>`_: Fix problem when handling ``VersionConflict`` errors when loading setuptools plugins.
  169. Improved Documentation
  170. ----------------------
  171. - `#123 <https://github.com/pytest-dev/pluggy/issues/123>`_: Document how exceptions are handled and how the hook call loop
  172. terminates immediately on the first error which is then delivered
  173. to any surrounding wrappers.
  174. - `#136 <https://github.com/pytest-dev/pluggy/issues/136>`_: Docs rework including a much better introduction and comprehensive example
  175. set for new users. A big thanks goes out to @obestwalter for the great work!
  176. Trivial/Internal Changes
  177. ------------------------
  178. - `#117 <https://github.com/pytest-dev/pluggy/issues/117>`_: Break up the main monolithic package modules into separate modules by concern
  179. - `#131 <https://github.com/pytest-dev/pluggy/issues/131>`_: Automate ``setuptools`` wheels building and PyPi upload using TravisCI.
  180. - `#153 <https://github.com/pytest-dev/pluggy/issues/153>`_: Reorganize tests more appropriately by modules relating to each
  181. internal component/feature. This is in an effort to avoid (future)
  182. duplication and better separation of concerns in the test set.
  183. - `#156 <https://github.com/pytest-dev/pluggy/issues/156>`_: Add ``HookImpl.__repr__()`` for better debugging.
  184. - `#66 <https://github.com/pytest-dev/pluggy/issues/66>`_: Start using ``towncrier`` and a custom ``tox`` environment to prepare releases!
  185. pluggy 0.7.0 (Unreleased)
  186. =========================
  187. * `#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.
  188. pluggy 0.6.0 (2017-11-24)
  189. =========================
  190. - Add CI testing for the features, release, and master
  191. branches of ``pytest`` (PR `#79`_).
  192. - Document public API for ``_Result`` objects passed to wrappers
  193. (PR `#85`_).
  194. - Document and test hook LIFO ordering (PR `#85`_).
  195. - Turn warnings into errors in test suite (PR `#89`_).
  196. - Deprecate ``_Result.result`` (PR `#88`_).
  197. - Convert ``_Multicall`` to a simple function distinguishing it from
  198. the legacy version (PR `#90`_).
  199. - Resolve E741 errors (PR `#96`_).
  200. - Test and bug fix for unmarked hook collection (PRs `#97`_ and
  201. `#102`_).
  202. - Drop support for EOL Python 2.6 and 3.3 (PR `#103`_).
  203. - Fix ``inspect`` based arg introspection on py3.6 (PR `#94`_).
  204. .. _#79: https://github.com/pytest-dev/pluggy/pull/79
  205. .. _#85: https://github.com/pytest-dev/pluggy/pull/85
  206. .. _#88: https://github.com/pytest-dev/pluggy/pull/88
  207. .. _#89: https://github.com/pytest-dev/pluggy/pull/89
  208. .. _#90: https://github.com/pytest-dev/pluggy/pull/90
  209. .. _#94: https://github.com/pytest-dev/pluggy/pull/94
  210. .. _#96: https://github.com/pytest-dev/pluggy/pull/96
  211. .. _#97: https://github.com/pytest-dev/pluggy/pull/97
  212. .. _#102: https://github.com/pytest-dev/pluggy/pull/102
  213. .. _#103: https://github.com/pytest-dev/pluggy/pull/103
  214. pluggy 0.5.2 (2017-09-06)
  215. =========================
  216. - fix bug where ``firstresult`` wrappers were being sent an incorrectly configured
  217. ``_Result`` (a list was set instead of a single value). Add tests to check for
  218. this as well as ``_Result.force_result()`` behaviour. Thanks to `@tgoodlet`_
  219. for the PR `#72`_.
  220. - fix incorrect ``getattr`` of ``DeprecationWarning`` from the ``warnings``
  221. module. Thanks to `@nicoddemus`_ for the PR `#77`_.
  222. - hide ``pytest`` tracebacks in certain core routines. Thanks to
  223. `@nicoddemus`_ for the PR `#80`_.
  224. .. _#72: https://github.com/pytest-dev/pluggy/pull/72
  225. .. _#77: https://github.com/pytest-dev/pluggy/pull/77
  226. .. _#80: https://github.com/pytest-dev/pluggy/pull/80
  227. pluggy 0.5.1 (2017-08-29)
  228. =========================
  229. - fix a bug and add tests for case where ``firstresult`` hooks return
  230. ``None`` results. Thanks to `@RonnyPfannschmidt`_ and `@tgoodlet`_
  231. for the issue (`#68`_) and PR (`#69`_) respectively.
  232. .. _#69: https://github.com/pytest-dev/pluggy/pull/69
  233. .. _#68: https://github.com/pytest-dev/pluggy/issues/68
  234. pluggy 0.5.0 (2017-08-28)
  235. =========================
  236. - fix bug where callbacks for historic hooks would not be called for
  237. already registered plugins. Thanks `@vodik`_ for the PR
  238. and `@hpk42`_ for further fixes.
  239. - fix `#17`_ by considering only actual functions for hooks
  240. this removes the ability to register arbitrary callable objects
  241. which at first glance is a reasonable simplification,
  242. thanks `@RonnyPfannschmidt`_ for report and pr.
  243. - fix `#19`_: allow registering hookspecs from instances. The PR from
  244. `@tgoodlet`_ also modernized the varnames implementation.
  245. - resolve `#32`_: split up the test set into multiple modules.
  246. Thanks to `@RonnyPfannschmidt`_ for the PR and `@tgoodlet`_ for
  247. the initial request.
  248. - resolve `#14`_: add full sphinx docs. Thanks to `@tgoodlet`_ for
  249. PR `#39`_.
  250. - add hook call mismatch warnings. Thanks to `@tgoodlet`_ for the
  251. PR `#42`_.
  252. - resolve `#44`_: move to new-style classes. Thanks to `@MichalTHEDUDE`_
  253. for PR `#46`_.
  254. - add baseline benchmarking/speed tests using ``pytest-benchmark``
  255. in PR `#54`_. Thanks to `@tgoodlet`_.
  256. - update the README to showcase the API. Thanks to `@tgoodlet`_ for the
  257. issue and PR `#55`_.
  258. - deprecate ``__multicall__`` and add a faster call loop implementation.
  259. Thanks to `@tgoodlet`_ for PR `#58`_.
  260. - raise a comprehensible error when a ``hookimpl`` is called with positional
  261. args. Thanks to `@RonnyPfannschmidt`_ for the issue and `@tgoodlet`_ for
  262. PR `#60`_.
  263. - fix the ``firstresult`` test making it more complete
  264. and remove a duplicate of that test. Thanks to `@tgoodlet`_
  265. for PR `#62`_.
  266. .. _#62: https://github.com/pytest-dev/pluggy/pull/62
  267. .. _#60: https://github.com/pytest-dev/pluggy/pull/60
  268. .. _#58: https://github.com/pytest-dev/pluggy/pull/58
  269. .. _#55: https://github.com/pytest-dev/pluggy/pull/55
  270. .. _#54: https://github.com/pytest-dev/pluggy/pull/54
  271. .. _#46: https://github.com/pytest-dev/pluggy/pull/46
  272. .. _#44: https://github.com/pytest-dev/pluggy/issues/44
  273. .. _#42: https://github.com/pytest-dev/pluggy/pull/42
  274. .. _#39: https://github.com/pytest-dev/pluggy/pull/39
  275. .. _#32: https://github.com/pytest-dev/pluggy/pull/32
  276. .. _#19: https://github.com/pytest-dev/pluggy/issues/19
  277. .. _#17: https://github.com/pytest-dev/pluggy/issues/17
  278. .. _#14: https://github.com/pytest-dev/pluggy/issues/14
  279. pluggy 0.4.0 (2016-09-25)
  280. =========================
  281. - add ``has_plugin(name)`` method to pluginmanager. thanks `@nicoddemus`_.
  282. - fix `#11`_: make plugin parsing more resilient against exceptions
  283. from ``__getattr__`` functions. Thanks `@nicoddemus`_.
  284. - fix issue `#4`_: specific ``HookCallError`` exception for when a hook call
  285. provides not enough arguments.
  286. - better error message when loading setuptools entrypoints fails
  287. due to a ``VersionConflict``. Thanks `@blueyed`_.
  288. .. _#11: https://github.com/pytest-dev/pluggy/issues/11
  289. .. _#4: https://github.com/pytest-dev/pluggy/issues/4
  290. pluggy 0.3.1 (2015-09-17)
  291. =========================
  292. - avoid using deprecated-in-python3.5 getargspec method. Thanks
  293. `@mdboom`_.
  294. pluggy 0.3.0 (2015-05-07)
  295. =========================
  296. initial release
  297. .. contributors
  298. .. _@hpk42: https://github.com/hpk42
  299. .. _@tgoodlet: https://github.com/tgoodlet
  300. .. _@MichalTHEDUDE: https://github.com/MichalTHEDUDE
  301. .. _@vodik: https://github.com/vodik
  302. .. _@RonnyPfannschmidt: https://github.com/RonnyPfannschmidt
  303. .. _@blueyed: https://github.com/blueyed
  304. .. _@nicoddemus: https://github.com/nicoddemus
  305. .. _@mdboom: https://github.com/mdboom