pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-test py-test: updated to 6.1.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6d8611d64a83
branches:  trunk
changeset: 440954:6d8611d64a83
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Oct 22 09:45:20 2020 +0000

description:
py-test: updated to 6.1.1

pytest 6.1.1 (2020-10-03)
=========================

Bug Fixes
---------
- Fixed regression in pytest 6.1.0 causing incorrect rootdir to be determined in some non-trivial cases where parent directories have config files as well.
- Fixed crash in header reporting when :confval:`testpaths` is used and contains absolute paths (regression in 6.1.0).


pytest 6.1.0 (2020-09-26)
=========================

Breaking Changes
----------------

- As per our policy, the following features which have been deprecated in the 5.X series are now
  removed:
  * The ``funcargnames`` read-only property of ``FixtureRequest``, ``Metafunc``, and ``Function`` classes. Use ``fixturenames`` attribute.
  * ``@pytest.fixture`` no longer supports positional arguments, pass all arguments by keyword instead.
  * Direct construction of ``Node`` subclasses now raise an error, use ``from_parent`` instead.
  * The default value for ``junit_family`` has changed to ``xunit2``. If you require the old format, add ``junit_family=xunit1`` to your configuration file.
  * The ``TerminalReporter`` no longer has a ``writer`` attribute. Plugin authors may use the public functions of the ``TerminalReporter`` instead of accessing the ``TerminalWriter`` object directly.
  * The ``--result-log`` option has been removed. Users are recommended to use the `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin instead.

  For more information consult
  `Deprecations and Removals <https://docs.pytest.org/en/stable/deprecations.html>`__ in the docs.


Deprecations
------------
- The ``pytest.collect`` module is deprecated: all its names can be imported from ``pytest`` directly.
- The ``pytest._fillfuncargs`` function is deprecated. This function was kept
  for backward compatibility with an older plugin.

  It's functionality is not meant to be used directly, but if you must replace
  it, use `function._request._fillfixtures()` instead, though note this is not
  a public API and may break in the future.

- The special ``-k '-expr'`` syntax to ``-k`` is deprecated. Use ``-k 'not expr'``
  instead.

  The special ``-k 'expr:'`` syntax to ``-k`` is deprecated. Please open an issue
  if you use this and want a replacement.

- The :func:`pytest_warning_captured <_pytest.hookspec.pytest_warning_captured>` hook is deprecated in favor
  of :func:`pytest_warning_recorded <_pytest.hookspec.pytest_warning_recorded>`, and will be removed in a future version.
- The ``gethookproxy()`` and ``isinitpath()`` methods of ``FSCollector`` and ``Package`` are deprecated;
  use ``self.session.gethookproxy()`` and ``self.session.isinitpath()`` instead.
  This should work on all pytest versions.


Features
--------
- New ``--durations-min`` command-line flag controls the minimal duration for inclusion in the slowest list of tests shown by ``--durations``. Previously this was hard-coded to ``0.005s``.


Improvements
------------
- Internal pytest warnings issued during the early stages of initialization are now properly handled and can filtered through :confval:`filterwarnings` or ``--pythonwarnings/-W``.
- When a plugin listed in ``required_plugins`` is missing or an unknown config key is used with ``--strict-config``, a simple error message is now shown instead of a stacktrace.
-  Added two new attributes :attr:`rootpath <_pytest.config.Config.rootpath>` and :attr:`inipath <_pytest.config.Config.inipath>` to :class:`Config <_pytest.config.Config>`.
  These attributes are :class:`pathlib.Path` versions of the existing :attr:`rootdir <_pytest.config.Config.rootdir>` and :attr:`inifile <_pytest.config.Config.inifile>` attributes,
  and should be preferred over them when possible.

- Public classes which are not designed to be inherited from are now marked `@final <https://docs.python.org/3/library/typing.html#typing.final>`_.
  Code which inherits from these classes will trigger a type-checking (e.g. mypy) error, but will still work in runtime.
  Currently the ``final`` designation does not appear in the API Reference but hopefully will in the future.


Bug Fixes
---------
- Fixed error when overwriting a parametrized fixture, while also reusing the super fixture value.

  .. code-block:: python

      # conftest.py
      import pytest


      @pytest.fixture(params=[1, 2])
      def foo(request):
          return request.param


      # test_foo.py
      import pytest


      @pytest.fixture
      def foo(foo):
          return foo * 2


- Fixed an internal error crash with ``IndexError: list index out of range`` when
  collecting a module which starts with a decorated function, the decorator
  raises, and assertion rewriting is enabled.
- pylint shouldn't complain anymore about unimplemented abstract methods when inheriting from :ref:`File <non-python tests>`.
- Fixed test collection when a full path without a drive letter was passed to pytest on Windows (for example ``\projects\tests\test.py`` instead of ``c:\projects\tests\pytest.py``).
- Fix handling of command-line options that appear as paths but trigger an OS-level syntax error on Windows, such as the options used internally by ``pytest-xdist``.
- Fixed INTERNALERROR when accessing locals / globals with faulty ``exec``.


Improved Documentation
----------------------
- Removed faq.rst and its reference in contents.rst.


Trivial/Internal Changes
------------------------
- The internal ``junitxml`` plugin has rewritten to use ``xml.etree.ElementTree``.
  The order of attributes in XML elements might differ. Some unneeded escaping is
  no longer performed.
- The dependency on the ``more-itertools`` package has been removed.
- The result type of :meth:`capfd.readouterr() <_pytest.capture.CaptureFixture.readouterr>` (and similar) is no longer a namedtuple,
  but should behave like one in all respects. This was done for technical reasons.
- When collecting tests, pytest finds test classes and functions by examining the
  attributes of python objects (modules, classes and instances). To speed up this
  process, pytest now ignores builtin attributes (like ``__class__``,
  ``__delattr__`` and ``__new__``) without consulting the :confval:`python_classes` and
  :confval:`python_functions` configuration options and without passing them to plugins
  using the :func:`pytest_pycollect_makeitem <_pytest.hookspec.pytest_pycollect_makeitem>` hook.

diffstat:

 devel/py-test/Makefile |   5 ++---
 devel/py-test/PLIST    |   5 +----
 devel/py-test/distinfo |  10 +++++-----
 3 files changed, 8 insertions(+), 12 deletions(-)

diffs (54 lines):

diff -r 3855d05abc54 -r 6d8611d64a83 devel/py-test/Makefile
--- a/devel/py-test/Makefile    Thu Oct 22 09:41:18 2020 +0000
+++ b/devel/py-test/Makefile    Thu Oct 22 09:45:20 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.95 2020/09/14 19:54:26 adam Exp $
+# $NetBSD: Makefile,v 1.96 2020/10/22 09:45:20 adam Exp $
 
-DISTNAME=      pytest-6.0.2
+DISTNAME=      pytest-6.1.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/py//}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pytest/}
@@ -13,7 +13,6 @@
 DEPENDS+=      ${PYPKGPREFIX}-attrs>=17.4.0:../../devel/py-attrs
 DEPENDS+=      ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
 DEPENDS+=      ${PYPKGPREFIX}-iniconfig-[0-9]*:../../devel/py-iniconfig
-DEPENDS+=      ${PYPKGPREFIX}-more-itertools>=4.0.0:../../devel/py-more-itertools
 DEPENDS+=      ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
 DEPENDS+=      ${PYPKGPREFIX}-pluggy>=0.12:../../devel/py-pluggy
 DEPENDS+=      ${PYPKGPREFIX}-py>=1.8.2:../../devel/py-py
diff -r 3855d05abc54 -r 6d8611d64a83 devel/py-test/PLIST
--- a/devel/py-test/PLIST       Thu Oct 22 09:41:18 2020 +0000
+++ b/devel/py-test/PLIST       Thu Oct 22 09:45:20 2020 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.18 2020/08/05 14:09:30 adam Exp $
+@comment $NetBSD: PLIST,v 1.19 2020/10/22 09:45:20 adam Exp $
 bin/py.test-${PYVERSSUFFIX}
 bin/pytest-${PYVERSSUFFIX}
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
@@ -147,9 +147,6 @@
 ${PYSITELIB}/_pytest/reports.py
 ${PYSITELIB}/_pytest/reports.pyc
 ${PYSITELIB}/_pytest/reports.pyo
-${PYSITELIB}/_pytest/resultlog.py
-${PYSITELIB}/_pytest/resultlog.pyc
-${PYSITELIB}/_pytest/resultlog.pyo
 ${PYSITELIB}/_pytest/runner.py
 ${PYSITELIB}/_pytest/runner.pyc
 ${PYSITELIB}/_pytest/runner.pyo
diff -r 3855d05abc54 -r 6d8611d64a83 devel/py-test/distinfo
--- a/devel/py-test/distinfo    Thu Oct 22 09:41:18 2020 +0000
+++ b/devel/py-test/distinfo    Thu Oct 22 09:45:20 2020 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.82 2020/09/14 19:54:26 adam Exp $
+$NetBSD: distinfo,v 1.83 2020/10/22 09:45:20 adam Exp $
 
-SHA1 (pytest-6.0.2.tar.gz) = bc14d7c0f9c0a8299ffdc5a7c0bec1563b4052ac
-RMD160 (pytest-6.0.2.tar.gz) = 09c1eb3e9a71f26ba949b15032d06038781f1801
-SHA512 (pytest-6.0.2.tar.gz) = 478d28c30f4f990dcdd98edcd074051e32d9ab25941c21bdc9c4cc47b726da79b5b3a01572ff97f608598ef6bb9df075ebba49abb2f1420947e0c6d4fe0be9c8
-Size (pytest-6.0.2.tar.gz) = 1070533 bytes
+SHA1 (pytest-6.1.1.tar.gz) = 0a758b320a1f9f6d017c9da530acd4e61460b1bb
+RMD160 (pytest-6.1.1.tar.gz) = 62bcbfd179efa5de06c827dfcc5f059bbecab5c1
+SHA512 (pytest-6.1.1.tar.gz) = fc61028a01187f6161061a0c2fc392dd719586780a49eec037a72878de00bc33a81c1bc0e2be01be52b30c7eeea2c590d1a4ec08cb14a955bc624478118889b0
+Size (pytest-6.1.1.tar.gz) = 1084076 bytes



Home | Main Index | Thread Index | Old Index