Hello community, here is the log from the commit of package python-pytest for openSUSE:Factory checked in at 2020-11-02 09:38:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest (Old) and /work/SRC/openSUSE:Factory/.python-pytest.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest" Mon Nov 2 09:38:56 2020 rev:60 rq:844820 version:6.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest/python-pytest.changes 2020-10-29 09:47:02.292096755 +0100 +++ /work/SRC/openSUSE:Factory/.python-pytest.new.3463/python-pytest.changes 2020-11-02 09:39:16.961545978 +0100 @@ -1,0 +2,24 @@ +Thu Oct 29 09:12:41 UTC 2020 - Benjamin Greiner <c...@bnavigator.de> + +- Update to 6.1.2 + * #7758: Fixed an issue where some files in packages are + getting lost from --lf even though they contain + tests that failed. Regressed in pytest 5.4.0. + * #7911: Directories created by tmpdir are now considered + stale after 3 days without modification (previous value + was 3 hours) to avoid deleting directories still in use + in long running test suites. + * #7815: Improve deprecation warning message for + pytest._fillfuncargs(). +- remove old py.test2 and py.test3 entry points + +------------------------------------------------------------------- +Wed Oct 28 00:12:14 UTC 2020 - Benjamin Greiner <c...@bnavigator.de> + +- Fix py.test3 conflict for python3 flavors by alternatives + * gh#openSUSE/python-rpm-macros#66 + * Make pytest the main alternative as py.test is the deprecated + name +- Fix gh#pytest-dev/pytest#7891 : require toml for build + +------------------------------------------------------------------- Old: ---- pytest-6.1.1.tar.gz New: ---- pytest-6.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest.spec ++++++ --- /var/tmp/diff_new_pack.1izlMg/_old 2020-11-02 09:39:17.645546634 +0100 +++ /var/tmp/diff_new_pack.1izlMg/_new 2020-11-02 09:39:17.649546638 +0100 @@ -27,14 +27,15 @@ %endif %define skip_python2 1 Name: python-pytest%{psuffix} -Version: 6.1.1 +Version: 6.1.2 Release: 0 -Summary: Python testing tool with autodiscovery and detailed asserts +Summary: Simple powerful testing with Python License: MIT URL: https://github.com/pytest-dev/pytest Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz BuildRequires: %{python_module setuptools >= 40.0} BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module toml} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-attrs >= 17.4.0 @@ -69,7 +70,6 @@ BuildRequires: %{python_module pytest-forked} BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module requests} -BuildRequires: %{python_module toml} BuildRequires: %{python_module xmlschema} BuildRequires: lsof %endif @@ -79,17 +79,8 @@ %python_subpackages %description -pytest is a cross-project Python testing tool. It provides: - -* auto-discovery of test modules and functions, -* detailed info on failing assert statements (no need to remember - self.assert* names), -* modular fixtures for managing small or parametrized long-lived test resources. -* multi-paradigm support: you can use py.test to run test suites based on - unittest (or trial), nose, -* single-source compatibility to Python2.4 all the way up to Python3.3, - PyPy-1.9 and Jython-2.5.1, and -* many external plugins. +The pytest framework makes it easy to write small tests, yet scales to support +complex functional testing for applications and libraries. %prep %setup -q -n pytest-%{version} @@ -100,16 +91,8 @@ %install %if ! %{with test} %python_install -%python_clone -a %{buildroot}%{_bindir}/py.test %python_clone -a %{buildroot}%{_bindir}/pytest - -if [ -x %{buildroot}%{_bindir}/py.test-%{python2_bin_suffix} ]; then - ln -s py.test-%{python2_bin_suffix} %{buildroot}%{_bindir}/py.test2 -fi -if [ -x %{buildroot}%{_bindir}/py.test-%{python3_bin_suffix} ]; then - ln -s py.test-%{python3_bin_suffix} %{buildroot}%{_bindir}/py.test3 -fi - +%python_clone -a %{buildroot}%{_bindir}/py.test %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif @@ -120,20 +103,19 @@ %if ! %{with test} %post -%{python_install_alternative py.test} \ - --slave %{_bindir}/pytest pytest %{_bindir}/pytest-%{python_version} +%python_install_alternative pytest py.test %postun -%python_uninstall_alternative py.test +%python_uninstall_alternative pytest %files %{python_files} %doc AUTHORS CHANGELOG.rst README.rst %license LICENSE -%python_alternative %{_bindir}/py.test %python_alternative %{_bindir}/pytest -%python2_only %{_bindir}/py.test2 -%python3_only %{_bindir}/py.test3 -%{python_sitelib}/* +%python_alternative %{_bindir}/py.test +%{python_sitelib}/_pytest +%{python_sitelib}/pytest +%{python_sitelib}/pytest-%{version}*-info %endif %changelog ++++++ pytest-6.1.1.tar.gz -> pytest-6.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/.github/workflows/main.yml new/pytest-6.1.2/.github/workflows/main.yml --- old/pytest-6.1.1/.github/workflows/main.yml 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/.github/workflows/main.yml 2020-10-28 18:20:40.000000000 +0100 @@ -16,6 +16,7 @@ jobs: build: runs-on: ${{ matrix.os }} + timeout-minutes: 30 strategy: fail-fast: false @@ -187,6 +188,7 @@ if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest' runs-on: ubuntu-latest + timeout-minutes: 30 needs: [build] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/PKG-INFO new/pytest-6.1.2/PKG-INFO --- old/pytest-6.1.1/PKG-INFO 2020-10-03 21:36:03.000000000 +0200 +++ new/pytest-6.1.2/PKG-INFO 2020-10-28 18:20:47.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pytest -Version: 6.1.1 +Version: 6.1.2 Summary: pytest: simple powerful testing with Python Home-page: https://docs.pytest.org/en/latest/ Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/doc/en/announce/index.rst new/pytest-6.1.2/doc/en/announce/index.rst --- old/pytest-6.1.1/doc/en/announce/index.rst 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/doc/en/announce/index.rst 2020-10-28 18:20:40.000000000 +0100 @@ -6,6 +6,7 @@ :maxdepth: 2 + release-6.1.2 release-6.1.1 release-6.1.0 release-6.0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/doc/en/announce/release-6.1.2.rst new/pytest-6.1.2/doc/en/announce/release-6.1.2.rst --- old/pytest-6.1.1/doc/en/announce/release-6.1.2.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pytest-6.1.2/doc/en/announce/release-6.1.2.rst 2020-10-28 18:20:40.000000000 +0100 @@ -0,0 +1,22 @@ +pytest-6.1.2 +======================================= + +pytest 6.1.2 has just been released to PyPI. + +This is a bug-fix release, being a drop-in replacement. To upgrade:: + + pip install --upgrade pytest + +The full changelog is available at https://docs.pytest.org/en/stable/changelog.html. + +Thanks to all of the contributors to this release: + +* Bruno Oliveira +* Manuel MariƱez +* Ran Benita +* Vasilis Gerakaris +* William Jamir Silva + + +Happy testing, +The pytest Development Team diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/doc/en/changelog.rst new/pytest-6.1.2/doc/en/changelog.rst --- old/pytest-6.1.1/doc/en/changelog.rst 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/doc/en/changelog.rst 2020-10-28 18:20:40.000000000 +0100 @@ -28,6 +28,25 @@ .. towncrier release notes start +pytest 6.1.2 (2020-10-28) +========================= + +Bug Fixes +--------- + +- `#7758 <https://github.com/pytest-dev/pytest/issues/7758>`_: Fixed an issue where some files in packages are getting lost from ``--lf`` even though they contain tests that failed. Regressed in pytest 5.4.0. + + +- `#7911 <https://github.com/pytest-dev/pytest/issues/7911>`_: Directories created by `tmpdir` are now considered stale after 3 days without modification (previous value was 3 hours) to avoid deleting directories still in use in long running test suites. + + + +Improved Documentation +---------------------- + +- `#7815 <https://github.com/pytest-dev/pytest/issues/7815>`_: Improve deprecation warning message for ``pytest._fillfuncargs()``. + + pytest 6.1.1 (2020-10-03) ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/doc/en/getting-started.rst new/pytest-6.1.2/doc/en/getting-started.rst --- old/pytest-6.1.1/doc/en/getting-started.rst 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/doc/en/getting-started.rst 2020-10-28 18:20:40.000000000 +0100 @@ -28,7 +28,7 @@ .. code-block:: bash $ pytest --version - pytest 6.1.1 + pytest 6.1.2 .. _`simpletest`: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/doc/en/reference.rst new/pytest-6.1.2/doc/en/reference.rst --- old/pytest-6.1.1/doc/en/reference.rst 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/doc/en/reference.rst 2020-10-28 18:20:40.000000000 +0100 @@ -1236,12 +1236,13 @@ .. confval:: junit_family .. versionadded:: 4.2 + .. versionchanged:: 6.1 + Default changed to ``xunit2``. Configures the format of the generated JUnit XML file. The possible options are: - * ``xunit1`` (or ``legacy``): produces old style output, compatible with the xunit 1.0 format. **This is the default**. - * ``xunit2``: produces `xunit 2.0 style output <https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.2/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd>`__, - which should be more compatible with latest Jenkins versions. + * ``xunit1`` (or ``legacy``): produces old style output, compatible with the xunit 1.0 format. + * ``xunit2``: produces `xunit 2.0 style output <https://github.com/jenkinsci/xunit-plugin/blob/xunit-2.3.2/src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd>`__, which should be more compatible with latest Jenkins versions. **This is the default**. .. code-block:: ini diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/_pytest/_version.py new/pytest-6.1.2/src/_pytest/_version.py --- old/pytest-6.1.1/src/_pytest/_version.py 2020-10-03 21:36:03.000000000 +0200 +++ new/pytest-6.1.2/src/_pytest/_version.py 2020-10-28 18:20:47.000000000 +0100 @@ -1,4 +1,4 @@ # coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control -version = '6.1.1' +version = '6.1.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/_pytest/cacheprovider.py new/pytest-6.1.2/src/_pytest/cacheprovider.py --- old/pytest-6.1.1/src/_pytest/cacheprovider.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/src/_pytest/cacheprovider.py 2020-10-28 18:20:40.000000000 +0100 @@ -29,6 +29,7 @@ from _pytest.fixtures import FixtureRequest from _pytest.main import Session from _pytest.python import Module +from _pytest.python import Package from _pytest.reports import TestReport @@ -233,7 +234,10 @@ def pytest_make_collect_report( self, collector: nodes.Collector ) -> Optional[CollectReport]: - if isinstance(collector, Module): + # Packages are Modules, but _last_failed_paths only contains + # test-bearing paths and doesn't try to include the paths of their + # packages, so don't filter them. + if isinstance(collector, Module) and not isinstance(collector, Package): if Path(str(collector.fspath)) not in self.lfplugin._last_failed_paths: self.lfplugin._skipped_files += 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/_pytest/deprecated.py new/pytest-6.1.2/src/_pytest/deprecated.py --- old/pytest-6.1.1/src/_pytest/deprecated.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/src/_pytest/deprecated.py 2020-10-28 18:20:40.000000000 +0100 @@ -20,9 +20,10 @@ } -FILLFUNCARGS = PytestDeprecationWarning( - "The `_fillfuncargs` function is deprecated, use " - "function._request._fillfixtures() instead if you cannot avoid reaching into internals." +FILLFUNCARGS = UnformattedWarning( + PytestDeprecationWarning, + "{name} is deprecated, use " + "function._request._fillfixtures() instead if you cannot avoid reaching into internals.", ) PYTEST_COLLECT_MODULE = UnformattedWarning( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/_pytest/fixtures.py new/pytest-6.1.2/src/_pytest/fixtures.py --- old/pytest-6.1.1/src/_pytest/fixtures.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/src/_pytest/fixtures.py 2020-10-28 18:20:40.000000000 +0100 @@ -339,9 +339,22 @@ return items_done +def _fillfuncargs(function: "Function") -> None: + """Fill missing fixtures for a test function, old public API (deprecated).""" + warnings.warn(FILLFUNCARGS.format(name="pytest._fillfuncargs()"), stacklevel=2) + _fill_fixtures_impl(function) + + def fillfixtures(function: "Function") -> None: - """Fill missing funcargs for a test function.""" - warnings.warn(FILLFUNCARGS, stacklevel=2) + """Fill missing fixtures for a test function (deprecated).""" + warnings.warn( + FILLFUNCARGS.format(name="_pytest.fixtures.fillfixtures()"), stacklevel=2 + ) + _fill_fixtures_impl(function) + + +def _fill_fixtures_impl(function: "Function") -> None: + """Internal implementation to fill fixtures on the given function object.""" try: request = function._request except AttributeError: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/_pytest/pathlib.py new/pytest-6.1.2/src/_pytest/pathlib.py --- old/pytest-6.1.1/src/_pytest/pathlib.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/src/_pytest/pathlib.py 2020-10-28 18:20:40.000000000 +0100 @@ -38,7 +38,7 @@ __all__ = ["Path", "PurePath"] -LOCK_TIMEOUT = 60 * 60 * 3 +LOCK_TIMEOUT = 60 * 60 * 24 * 3 _AnyPurePath = TypeVar("_AnyPurePath", bound=PurePath) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/pytest/__init__.py new/pytest-6.1.2/src/pytest/__init__.py --- old/pytest-6.1.1/src/pytest/__init__.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/src/pytest/__init__.py 2020-10-28 18:20:40.000000000 +0100 @@ -11,7 +11,7 @@ from _pytest.config import main from _pytest.config import UsageError from _pytest.debugging import pytestPDB as __pytestPDB -from _pytest.fixtures import fillfixtures as _fillfuncargs +from _pytest.fixtures import _fillfuncargs from _pytest.fixtures import fixture from _pytest.fixtures import FixtureLookupError from _pytest.fixtures import yield_fixture diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/pytest.egg-info/PKG-INFO new/pytest-6.1.2/src/pytest.egg-info/PKG-INFO --- old/pytest-6.1.1/src/pytest.egg-info/PKG-INFO 2020-10-03 21:36:03.000000000 +0200 +++ new/pytest-6.1.2/src/pytest.egg-info/PKG-INFO 2020-10-28 18:20:47.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pytest -Version: 6.1.1 +Version: 6.1.2 Summary: pytest: simple powerful testing with Python Home-page: https://docs.pytest.org/en/latest/ Author: Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/src/pytest.egg-info/SOURCES.txt new/pytest-6.1.2/src/pytest.egg-info/SOURCES.txt --- old/pytest-6.1.1/src/pytest.egg-info/SOURCES.txt 2020-10-03 21:36:03.000000000 +0200 +++ new/pytest-6.1.2/src/pytest.egg-info/SOURCES.txt 2020-10-28 18:20:47.000000000 +0100 @@ -231,6 +231,7 @@ doc/en/announce/release-6.0.2.rst doc/en/announce/release-6.1.0.rst doc/en/announce/release-6.1.1.rst +doc/en/announce/release-6.1.2.rst doc/en/announce/sprint2016.rst doc/en/example/attic.rst doc/en/example/conftest.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/testing/deprecated_test.py new/pytest-6.1.2/testing/deprecated_test.py --- old/pytest-6.1.1/testing/deprecated_test.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/testing/deprecated_test.py 2020-10-28 18:20:40.000000000 +0100 @@ -1,3 +1,4 @@ +import re import warnings from unittest import mock @@ -26,11 +27,27 @@ def test_fillfuncargs_is_deprecated() -> None: with pytest.warns( pytest.PytestDeprecationWarning, - match="The `_fillfuncargs` function is deprecated", + match=re.escape( + "pytest._fillfuncargs() is deprecated, use " + "function._request._fillfixtures() instead if you cannot avoid reaching into internals." + ), ): pytest._fillfuncargs(mock.Mock()) +def test_fillfixtures_is_deprecated() -> None: + import _pytest.fixtures + + with pytest.warns( + pytest.PytestDeprecationWarning, + match=re.escape( + "_pytest.fixtures.fillfixtures() is deprecated, use " + "function._request._fillfixtures() instead if you cannot avoid reaching into internals." + ), + ): + _pytest.fixtures.fillfixtures(mock.Mock()) + + def test_minus_k_dash_is_deprecated(testdir) -> None: threepass = testdir.makepyfile( test_threepass=""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/testing/python/fixtures.py new/pytest-6.1.2/testing/python/fixtures.py --- old/pytest-6.1.1/testing/python/fixtures.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/testing/python/fixtures.py 2020-10-28 18:20:40.000000000 +0100 @@ -87,7 +87,7 @@ class TestFillFixtures: def test_fillfuncargs_exposed(self): # used by oejskit, kept for compatibility - assert pytest._fillfuncargs == fixtures.fillfixtures + assert pytest._fillfuncargs == fixtures._fillfuncargs def test_funcarg_lookupfails(self, testdir): testdir.copy_example() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-6.1.1/testing/test_cacheprovider.py new/pytest-6.1.2/testing/test_cacheprovider.py --- old/pytest-6.1.1/testing/test_cacheprovider.py 2020-10-03 21:35:57.000000000 +0200 +++ new/pytest-6.1.2/testing/test_cacheprovider.py 2020-10-28 18:20:40.000000000 +0100 @@ -984,6 +984,36 @@ ) assert result.ret == 0 + def test_packages(self, testdir: Testdir) -> None: + """Regression test for #7758. + + The particular issue here was that Package nodes were included in the + filtering, being themselves Modules for the __init__.py, even if they + had failed Modules in them. + + The tests includes a test in an __init__.py file just to make sure the + fix doesn't somehow regress that, it is not critical for the issue. + """ + testdir.makepyfile( + **{ + "__init__.py": "", + "a/__init__.py": "def test_a_init(): assert False", + "a/test_one.py": "def test_1(): assert False", + "b/__init__.py": "", + "b/test_two.py": "def test_2(): assert False", + }, + ) + testdir.makeini( + """ + [pytest] + python_files = *.py + """ + ) + result = testdir.runpytest() + result.assert_outcomes(failed=3) + result = testdir.runpytest("--lf") + result.assert_outcomes(failed=3) + class TestNewFirst: def test_newfirst_usecase(self, testdir):