Hello community, here is the log from the commit of package python-pytest-cov for openSUSE:Factory checked in at 2020-06-30 21:54:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest-cov (Old) and /work/SRC/openSUSE:Factory/.python-pytest-cov.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-cov" Tue Jun 30 21:54:11 2020 rev:17 rq:817668 version:2.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest-cov/python-pytest-cov.changes 2020-06-11 14:46:00.673611343 +0200 +++ /work/SRC/openSUSE:Factory/.python-pytest-cov.new.3060/python-pytest-cov.changes 2020-06-30 21:54:14.762346848 +0200 @@ -1,0 +2,7 @@ +Mon Jun 29 09:21:38 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com> + +- Update to 2.10.0 + * Improved the --no-cov warning. Now it's only shown if --no-cov is present before --cov. + * Removed legacy pytest support. Changed setup.py so that pytest>=4.6 is required. + +------------------------------------------------------------------- Old: ---- pytest-cov-2.9.0.tar.gz New: ---- pytest-cov-2.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-cov.spec ++++++ --- /var/tmp/diff_new_pack.xvdBT2/_old 2020-06-30 21:54:15.586349398 +0200 +++ /var/tmp/diff_new_pack.xvdBT2/_new 2020-06-30 21:54:15.586349398 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pytest-cov -Version: 2.9.0 +Version: 2.10.0 Release: 0 Summary: Pytest plugin for coverage reporting License: MIT @@ -27,15 +27,15 @@ BuildRequires: %{python_module coverage >= 4.4} BuildRequires: %{python_module fields} BuildRequires: %{python_module process-tests} -BuildRequires: %{python_module pytest-xdist} -BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest >= 4.6.0} +BuildRequires: %{python_module pytest-xdist >= 1.32.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: %{python_module virtualenv} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-coverage >= 4.4 -Requires: python-pytest +Requires: python-pytest >= 4.6.0 BuildArch: noarch %python_subpackages @@ -59,11 +59,10 @@ %check # test_dist_missing_data - needs internet access -# test_*_collocated gh#pytest-dev/pytest-cov#358 # test_central_subprocess_change_cwd_with_pythonpath - needs pytest cov in venv which is not doable in OBS build export PYTHONDONTWRITEBYTECODE=1 echo "import site;site.addsitedir(\"$(pwd)/src\")" > tests/sitecustomize.py -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:$PWD/tests py.test-%{$python_bin_suffix} -v -k 'not (test_dist_missing_data or test_central_subprocess_change_cwd_with_pythonpath or test_dist_not_collocated or test_dist_subprocess_not_collocated)' +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib}:$PWD/tests py.test-%{$python_bin_suffix} -v -k 'not (test_dist_missing_data or test_central_subprocess_change_cwd_with_pythonpath)' %files %{python_files} %license LICENSE ++++++ pytest-cov-2.9.0.tar.gz -> pytest-cov-2.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/.bumpversion.cfg new/pytest-cov-2.10.0/.bumpversion.cfg --- old/pytest-cov-2.9.0/.bumpversion.cfg 2020-05-22 19:12:42.000000000 +0200 +++ new/pytest-cov-2.10.0/.bumpversion.cfg 2020-06-12 15:46:01.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.9.0 +current_version = 2.10.0 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/CHANGELOG.rst new/pytest-cov-2.10.0/CHANGELOG.rst --- old/pytest-cov-2.9.0/CHANGELOG.rst 2020-05-22 19:11:15.000000000 +0200 +++ new/pytest-cov-2.10.0/CHANGELOG.rst 2020-06-12 15:45:20.000000000 +0200 @@ -1,6 +1,12 @@ Changelog ========= +2.10.0 (2020-06-12) +------------------- + +* Improved the ``--no-cov`` warning. Now it's only shown if ``--no-cov`` is present before ``--cov``. +* Removed legacy pytest support. Changed ``setup.py`` so that ``pytest>=4.6`` is required. + 2.9.0 (2020-05-22) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/PKG-INFO new/pytest-cov-2.10.0/PKG-INFO --- old/pytest-cov-2.9.0/PKG-INFO 2020-05-22 19:12:47.456804500 +0200 +++ new/pytest-cov-2.10.0/PKG-INFO 2020-06-12 15:46:10.620056400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pytest-cov -Version: 2.9.0 +Version: 2.10.0 Summary: Pytest plugin for measuring coverage. Home-page: https://github.com/pytest-dev/pytest-cov Author: Marc Schlaich @@ -46,9 +46,9 @@ .. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg :target: https://anaconda.org/conda-forge/pytest-cov - .. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.9.0.svg + .. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.10.0.svg :alt: Commits since latest release - :target: https://github.com/pytest-dev/pytest-cov/compare/v2.9.0...master + :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.0...master .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel @@ -177,6 +177,12 @@ Changelog ========= + 2.10.0 (2020-06-12) + ------------------- + + * Improved the ``--no-cov`` warning. Now it's only shown if ``--no-cov`` is present before ``--cov``. + * Removed legacy pytest support. Changed ``setup.py`` so that ``pytest>=4.6`` is required. + 2.9.0 (2020-05-22) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/README.rst new/pytest-cov-2.10.0/README.rst --- old/pytest-cov-2.9.0/README.rst 2020-05-22 19:12:42.000000000 +0200 +++ new/pytest-cov-2.10.0/README.rst 2020-06-12 15:46:01.000000000 +0200 @@ -38,9 +38,9 @@ .. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg :target: https://anaconda.org/conda-forge/pytest-cov -.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.9.0.svg +.. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.10.0.svg :alt: Commits since latest release - :target: https://github.com/pytest-dev/pytest-cov/compare/v2.9.0...master + :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.0...master .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/docs/conf.py new/pytest-cov-2.10.0/docs/conf.py --- old/pytest-cov-2.9.0/docs/conf.py 2020-05-22 19:12:42.000000000 +0200 +++ new/pytest-cov-2.10.0/docs/conf.py 2020-06-12 15:46:01.000000000 +0200 @@ -25,7 +25,7 @@ year = '2016' author = 'pytest-cov contributors' copyright = '{}, {}'.format(year, author) -version = release = '2.9.0' +version = release = '2.10.0' pygments_style = 'trac' templates_path = ['.'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/setup.py new/pytest-cov-2.10.0/setup.py --- old/pytest-cov-2.9.0/setup.py 2020-05-22 19:12:42.000000000 +0200 +++ new/pytest-cov-2.10.0/setup.py 2020-06-12 15:46:01.000000000 +0200 @@ -84,7 +84,7 @@ setup( name='pytest-cov', - version='2.9.0', + version='2.10.0', license='MIT', description='Pytest plugin for measuring coverage.', long_description='%s\n%s' % (read('README.rst'), re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', read('CHANGELOG.rst'))), @@ -122,7 +122,7 @@ 'cover', 'coverage', 'pytest', 'py.test', 'distributed', 'parallel', ], install_requires=[ - 'pytest>=3.6', + 'pytest>=4.6', 'coverage>=4.4' ], python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/src/pytest_cov/__init__.py new/pytest-cov-2.10.0/src/pytest_cov/__init__.py --- old/pytest-cov-2.9.0/src/pytest_cov/__init__.py 2020-05-22 19:12:42.000000000 +0200 +++ new/pytest-cov-2.10.0/src/pytest_cov/__init__.py 2020-06-12 15:46:01.000000000 +0200 @@ -1,2 +1,2 @@ """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" -__version__ = "2.9.0" +__version__ = "2.10.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/src/pytest_cov/plugin.py new/pytest-cov-2.10.0/src/pytest_cov/plugin.py --- old/pytest-cov-2.9.0/src/pytest_cov/plugin.py 2020-05-22 19:11:28.000000000 +0200 +++ new/pytest-cov-2.10.0/src/pytest_cov/plugin.py 2020-06-12 15:42:05.000000000 +0200 @@ -9,8 +9,6 @@ from . import compat from . import embed -PYTEST_VERSION = tuple(map(int, pytest.__version__.split('.')[:3])) - class CoverageError(Exception): """Indicates that our coverage is too low""" @@ -114,8 +112,17 @@ @pytest.mark.tryfirst def pytest_load_initial_conftests(early_config, parser, args): + options = early_config.known_args_namespace + no_cov = options.no_cov_should_warn = False + for arg in args: + if arg == '--no-cov': + no_cov = True + elif arg.startswith('--cov') and no_cov: + options.no_cov_should_warn = True + break + if early_config.known_args_namespace.cov_source: - plugin = CovPlugin(early_config.known_args_namespace, early_config.pluginmanager) + plugin = CovPlugin(options, early_config.pluginmanager) early_config.pluginmanager.register(plugin, '_cov') @@ -127,7 +134,7 @@ distributed worker. """ - def __init__(self, options, pluginmanager, start=True): + def __init__(self, options, pluginmanager, start=True, no_cov_should_warn=False): """Creates a coverage pytest plugin. We read the rc file that coverage uses to get the data file @@ -275,10 +282,7 @@ message = 'Failed to generate report: %s\n' % exc session.config.pluginmanager.getplugin("terminalreporter").write( 'WARNING: %s\n' % message, red=True, bold=True) - if PYTEST_VERSION >= (3, 8): - warnings.warn(pytest.PytestWarning(message)) - else: - session.config.warn(code='COV-2', message=message) + warnings.warn(pytest.PytestWarning(message)) self.cov_total = 0 assert self.cov_total is not None, 'Test coverage should never be `None`' if self._failed_cov_total(): @@ -287,12 +291,10 @@ def pytest_terminal_summary(self, terminalreporter): if self._disabled: - message = 'Coverage disabled via --no-cov switch!' - terminalreporter.write('WARNING: %s\n' % message, red=True, bold=True) - if PYTEST_VERSION >= (3, 8): + if self.options.no_cov_should_warn: + message = 'Coverage disabled via --no-cov switch!' + terminalreporter.write('WARNING: %s\n' % message, red=True, bold=True) warnings.warn(pytest.PytestWarning(message)) - else: - terminalreporter.config.warn(code='COV-1', message=message) return if self.cov_controller is None: return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/src/pytest_cov.egg-info/PKG-INFO new/pytest-cov-2.10.0/src/pytest_cov.egg-info/PKG-INFO --- old/pytest-cov-2.9.0/src/pytest_cov.egg-info/PKG-INFO 2020-05-22 19:12:47.000000000 +0200 +++ new/pytest-cov-2.10.0/src/pytest_cov.egg-info/PKG-INFO 2020-06-12 15:46:10.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pytest-cov -Version: 2.9.0 +Version: 2.10.0 Summary: Pytest plugin for measuring coverage. Home-page: https://github.com/pytest-dev/pytest-cov Author: Marc Schlaich @@ -46,9 +46,9 @@ .. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg :target: https://anaconda.org/conda-forge/pytest-cov - .. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.9.0.svg + .. |commits-since| image:: https://img.shields.io/github/commits-since/pytest-dev/pytest-cov/v2.10.0.svg :alt: Commits since latest release - :target: https://github.com/pytest-dev/pytest-cov/compare/v2.9.0...master + :target: https://github.com/pytest-dev/pytest-cov/compare/v2.10.0...master .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel @@ -177,6 +177,12 @@ Changelog ========= + 2.10.0 (2020-06-12) + ------------------- + + * Improved the ``--no-cov`` warning. Now it's only shown if ``--no-cov`` is present before ``--cov``. + * Removed legacy pytest support. Changed ``setup.py`` so that ``pytest>=4.6`` is required. + 2.9.0 (2020-05-22) ------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/src/pytest_cov.egg-info/requires.txt new/pytest-cov-2.10.0/src/pytest_cov.egg-info/requires.txt --- old/pytest-cov-2.9.0/src/pytest_cov.egg-info/requires.txt 2020-05-22 19:12:47.000000000 +0200 +++ new/pytest-cov-2.10.0/src/pytest_cov.egg-info/requires.txt 2020-06-12 15:46:10.000000000 +0200 @@ -1,4 +1,4 @@ -pytest>=3.6 +pytest>=4.6 coverage>=4.4 [testing] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-cov-2.9.0/tests/test_pytest_cov.py new/pytest-cov-2.10.0/tests/test_pytest_cov.py --- old/pytest-cov-2.9.0/tests/test_pytest_cov.py 2020-05-22 19:11:28.000000000 +0200 +++ new/pytest-cov-2.10.0/tests/test_pytest_cov.py 2020-06-12 15:42:05.000000000 +0200 @@ -666,13 +666,15 @@ result.stdout.fnmatch_lines(['*1 failed*']) -def test_no_cov(testdir): +def test_no_cov(testdir, monkeypatch): script = testdir.makepyfile(SCRIPT) - + testdir.makeini(""" + [pytest] + addopts=--no-cov + """) result = testdir.runpytest('-vvv', '--cov=%s' % script.dirpath(), '--cov-report=term-missing', - '--no-cov', '-rw', script) result.stdout.fnmatch_lines_random([ @@ -2009,8 +2011,10 @@ result = testdir.runpytest('-v', '--cov', '--no-cov', '-n', '1', + '-s', script) - + assert 'Coverage disabled via --no-cov switch!' not in result.stdout.str() + assert 'Coverage disabled via --no-cov switch!' not in result.stderr.str() assert result.ret == 0