pkgsrc/devel/py-pluggy/Makefile
adam 464b14e019 py-pluggy: updated to 1.0.0
pluggy 1.0.0 (2021-08-25)
=========================

Deprecations and Removals
-------------------------

- Remove deprecated ``implprefix`` support.
  Decorate hook implementations using an instance of HookimplMarker instead.
  The deprecation was announced in release ``0.7.0``.

- 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``.

- 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``.

- Remove official support for Python 3.4.

- Dropped support for Python 2.
  Continue to use pluggy 0.13.x for Python 2 support.

- Remove official support for Python 3.5.

- 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.

- Remove legacy ``__multicall__`` recursive hook calling system.
  The deprecation was announced in release ``0.5.0``.


Features
--------

- When registering a hookimpl which is declared as ``hookwrapper=True`` but whose
  function is not a generator function, a ``PluggyValidationError`` 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_real_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)

- Add official support for Python 3.9.
2022-10-11 13:14:15 +00:00

30 lines
935 B
Makefile

# $NetBSD: Makefile,v 1.20 2022/10/11 13:14:15 adam Exp $
DISTNAME= pluggy-1.0.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/pluggy/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/pytest-dev/pluggy
COMMENT= Plugin and hook calling mechanisms for python
LICENSE= mit
BUILD_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
TEST_DEPENDS+= ${PYPKGPREFIX}-test-benchmark-[0-9]*:../../devel/py-test-benchmark
USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27
.include "../../lang/python/pyversion.mk"
.if ${_PYTHON_VERSION} < 38
DEPENDS+= ${PYPKGPREFIX}-importlib-metadata>=0.12:../../devel/py-importlib-metadata
.endif
do-test:
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} testing
.include "../../lang/python/egg.mk"
.include "../../mk/bsd.pkg.mk"