pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/py-test



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Mar 21 08:27:17 UTC 2024

Modified Files:
        pkgsrc/devel/py-test: Makefile PLIST distinfo

Log Message:
py-test: updated to 8.1.1

pytest 8.1.1 (2024-03-08)
=========================

This release is not a usual bug fix release -- it contains features and improvements, being a follow up
to ``8.1.0``, which has been yanked from PyPI.

Features
--------

- Added the new :confval:`consider_namespace_packages` configuration option, defaulting to ``False``.

  If set to ``True``, pytest will attempt to identify modules that are part of `namespace packages <https://packaging.python.org/en/latest/guides/packaging-namespace-packages>`__ when importing 
modules.

- Added the new :confval:`verbosity_test_cases` configuration option for fine-grained control of test execution verbosity.
  See :ref:`Fine-grained verbosity <pytest.fine_grained_verbosity>` for more details.

Improvements
------------

- :func:`pytest.warns` now validates that :func:`warnings.warn` was called with a `str` or a `Warning`.
  Currently in Python it is possible to use other types, however this causes an exception when :func:`warnings.filterwarnings` is used to filter those warnings.
  While this can be considered a bug in CPython, we decided to put guards in pytest as the error message produced without this check in place is confusing.

- When using ``--override-ini`` for paths in invocations without a configuration file defined, the current working directory is used
  as the relative directory.

  Previoulsy this would raise an :class:`AssertionError`.

- :ref:`--import-mode=importlib <import-mode-importlib>` now tries to import modules using the standard import mechanism (but still without changing :py:data:`sys.path`), falling back to importing 
modules directly only if that fails.

  This means that installed packages will be imported under their canonical name if possible first, for example ``app.core.models``, instead of having the module name always be derived from their 
path (for example ``.env310.lib.site_packages.app.core.models``).

- Added the :func:`iter_parents() <_pytest.nodes.Node.iter_parents>` helper method on nodes.
  It is similar to :func:`listchain <_pytest.nodes.Node.listchain>`, but goes from bottom to top, and returns an iterator, not a list.

- Added support for :data:`sys.last_exc` for post-mortem debugging on Python>=3.12.

- In case no other suitable candidates for configuration file are found, a ``pyproject.toml`` (even without a ``[tool.pytest.ini_options]`` table) will be considered as the configuration file and 
define the ``rootdir``.

- Add ``--log-file-mode`` option to the logging plugin, enabling appending to log-files. This option accepts either ``"w"`` or ``"a"`` and defaults to ``"w"``.

  Previously, the mode was hard-coded to be ``"w"`` which truncates the file before logging.

- When multiple finalizers of a fixture raise an exception, now all exceptions are reported as an exception group.
  Previously, only the first exception was reported.

Bug Fixes
---------

- Fixed regression where ``--importmode=importlib`` would import non-test modules more than once.

- Fixed a regression in pytest 8.0.0 that would cause test collection to fail due to permission errors when using ``--pyargs``.

  This change improves the collection tree for tests specified using ``--pyargs``, see :pull:`12043` for a comparison with pytest 8.0 and <8.

- Fixed a regression in 8.0.1 whereby ``setup_module`` xunit-style fixtures are not executed when ``--doctest-modules`` is passed.

- Fix the ``stacklevel`` used when warning about marks used on fixtures.

- Fixed a regression in ``8.0.2`` where tests created using :fixture:`tmp_path` have been collected multiple times in CI under Windows.

Improved Documentation
----------------------

- Documented the retention of temporary directories created using the ``tmp_path`` fixture in more detail.

Trivial/Internal Changes
------------------------

- Some changes were made to private functions which may affect plugins which access them:

  - ``FixtureManager._getautousenames()`` now takes a ``Node`` itself instead of the nodeid.
  - ``FixtureManager.getfixturedefs()`` now takes the ``Node`` itself instead of the nodeid.
  - The ``_pytest.nodes.iterparentnodeids()`` function is removed without replacement.
    Prefer to traverse the node hierarchy itself instead.
    If you really need to, copy the function from the previous pytest release.

- Delayed the deprecation of the following features to ``9.0.0``:

  * :ref:`node-ctor-fspath-deprecation`.
  * :ref:`legacy-path-hooks-deprecated`.

  It was discovered after ``8.1.0`` was released that the warnings about the impeding removal were not being displayed, so the team decided to revert the removal.

  This is the reason for ``8.1.0`` being yanked.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 pkgsrc/devel/py-test/Makefile
cvs rdiff -u -r1.25 -r1.26 pkgsrc/devel/py-test/PLIST
cvs rdiff -u -r1.109 -r1.110 pkgsrc/devel/py-test/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-test/Makefile
diff -u pkgsrc/devel/py-test/Makefile:1.124 pkgsrc/devel/py-test/Makefile:1.125
--- pkgsrc/devel/py-test/Makefile:1.124 Sun Feb 25 22:40:02 2024
+++ pkgsrc/devel/py-test/Makefile       Thu Mar 21 08:27:17 2024
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.124 2024/02/25 22:40:02 adam Exp $
+# $NetBSD: Makefile,v 1.125 2024/03/21 08:27:17 adam Exp $
 
-DISTNAME=      pytest-8.0.2
+DISTNAME=      pytest-8.1.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/py//}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pytest/}
@@ -10,14 +10,14 @@ HOMEPAGE=   https://pytest.org/
 COMMENT=       Python testing tool
 LICENSE=       mit
 
-TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=45.0:../../devel/py-setuptools
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools>=61:../../devel/py-setuptools
 TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm>=6.2.3:../../devel/py-setuptools_scm
 TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
 DEPENDS+=      ${PYPKGPREFIX}-iniconfig-[0-9]*:../../devel/py-iniconfig
 DEPENDS+=      ${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
-DEPENDS+=      ${PYPKGPREFIX}-pluggy>=1.3.0:../../devel/py-pluggy
+DEPENDS+=      ${PYPKGPREFIX}-pluggy>=1.4:../../devel/py-pluggy
 TEST_DEPENDS+= ${PYPKGPREFIX}-argcomplete-[0-9]*:../../devel/py-argcomplete
-TEST_DEPENDS+= ${PYPKGPREFIX}-attrs>=19.2.0:../../devel/py-attrs
+TEST_DEPENDS+= ${PYPKGPREFIX}-attrs>=19.2:../../devel/py-attrs
 TEST_DEPENDS+= ${PYPKGPREFIX}-hypothesis>=3.56:../../devel/py-hypothesis
 TEST_DEPENDS+= ${PYPKGPREFIX}-mock-[0-9]*:../../devel/py-mock
 TEST_DEPENDS+= ${PYPKGPREFIX}-nose-[0-9]*:../../devel/py-nose

Index: pkgsrc/devel/py-test/PLIST
diff -u pkgsrc/devel/py-test/PLIST:1.25 pkgsrc/devel/py-test/PLIST:1.26
--- pkgsrc/devel/py-test/PLIST:1.25     Fri Feb  2 16:19:52 2024
+++ pkgsrc/devel/py-test/PLIST  Thu Mar 21 08:27:17 2024
@@ -1,6 +1,7 @@
-@comment $NetBSD: PLIST,v 1.25 2024/02/02 16:19:52 adam Exp $
+@comment $NetBSD: PLIST,v 1.26 2024/03/21 08:27:17 adam Exp $
 bin/py.test-${PYVERSSUFFIX}
 bin/pytest-${PYVERSSUFFIX}
+${PYSITELIB}/${WHEEL_INFODIR}/AUTHORS
 ${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
@@ -136,9 +137,6 @@ ${PYSITELIB}/_pytest/monkeypatch.pyo
 ${PYSITELIB}/_pytest/nodes.py
 ${PYSITELIB}/_pytest/nodes.pyc
 ${PYSITELIB}/_pytest/nodes.pyo
-${PYSITELIB}/_pytest/nose.py
-${PYSITELIB}/_pytest/nose.pyc
-${PYSITELIB}/_pytest/nose.pyo
 ${PYSITELIB}/_pytest/outcomes.py
 ${PYSITELIB}/_pytest/outcomes.pyc
 ${PYSITELIB}/_pytest/outcomes.pyo

Index: pkgsrc/devel/py-test/distinfo
diff -u pkgsrc/devel/py-test/distinfo:1.109 pkgsrc/devel/py-test/distinfo:1.110
--- pkgsrc/devel/py-test/distinfo:1.109 Sun Feb 25 22:40:02 2024
+++ pkgsrc/devel/py-test/distinfo       Thu Mar 21 08:27:17 2024
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.109 2024/02/25 22:40:02 adam Exp $
+$NetBSD: distinfo,v 1.110 2024/03/21 08:27:17 adam Exp $
 
-BLAKE2s (pytest-8.0.2.tar.gz) = 72711c525852beaf8fe0cf8d5c7c459501797b533b12ab8ac21b7f196db7a81e
-SHA512 (pytest-8.0.2.tar.gz) = c495943baad05e09b467d23c7afadb3edff7ae93ee96290d6db9e64739236888148b63dff7e8e25b331b11bd48c55fb0ca8901cf823d69b1a922e94915bab2f1
-Size (pytest-8.0.2.tar.gz) = 1396924 bytes
+BLAKE2s (pytest-8.1.1.tar.gz) = 631b7987c4a2e3d750abb55d45f9c6dcfc9c3f2311d52890e3e04bc3e6b8d135
+SHA512 (pytest-8.1.1.tar.gz) = f1a9f69cd4eca3ab36c36bc666bf70b099125ed6e17b89d13554c3f13b100d05abfd0b35516660d00ca4fb9eca81164ab02bc8f7a9a8d90fd4302bf399cd88c0
+Size (pytest-8.1.1.tar.gz) = 1409703 bytes



Home | Main Index | Thread Index | Old Index