Accepting request 1045546 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1045546
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-coverage?expand=0&rev=50
This commit is contained in:
Dominique Leuenberger 2022-12-29 12:08:48 +00:00 committed by Git OBS Bridge
commit 75e9f980fc
4 changed files with 99 additions and 24 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84
size 775224

3
coverage-7.0.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a4a574a19eeb67575a5328a5760bbbb737faa685616586a9f9da4281f940109c
size 781226

View File

@ -1,3 +1,81 @@
-------------------------------------------------------------------
Mon Dec 26 12:21:27 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 7.0.1
* When checking if a file mapping resolved to a file that exists,
we werent considering files in .whl files. This is now fixed,
closing issue 1511.
* File pattern rules were too strict, forbidding plus signs and
curly braces in directory and file names. This is now fixed,
closing issue 1513.
* Unusual Unicode or control characters in source files could
prevent reporting. This is now fixed, closing issue 1512.
* The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing
issue 1510.
- Release 7.0.0
* Changes to file pattern matching, which might require updating
your configuration:
- Previously, * would incorrectly match directory separators,
making precise matching difficult. This is now fixed, closing
issue 1407.
- Now ** matches any number of nested directories, including
none.
* Improvements to combining data files when using the [run]
relative_files setting, which might require updating your
configuration:
- During coverage combine, relative file paths are implicitly
combined without needing a [paths] configuration setting.
This also fixed issue 991.
- A [paths] setting like */foo will now match foo/bar.py so
that relative file paths can be combined more easily.
- The [run] relative_files setting is properly interpreted in
more places, fixing issue 1280.
* When remapping file paths with [paths], a path will be remapped
only if the resulting path exists. The documentation has long
said the prefix had to exist, but it was never enforced. This
fixes issue 608, improves issue 649, and closes issue 757.
* Reporting operations now implicitly use the [paths] setting to
remap file paths within a single data file. Combining multiple
files still requires the coverage combine step, but this
simplifies some single-file situations. Closes issue 1212 and
issue 713.
* The coverage report command now has a --format= option. The
original style is now --format=text, and is the default.
- Using --format=markdown will write the table in Markdown
format, thanks to Steve Oswald, closing issue 1418.
- Using --format=total will write a single total number to the
output. This can be useful for making badges or writing
status updates.
* Combining data files with coverage combine now hashes the data
files to skip files that add no new information. This can
reduce the time needed. Many details affect the speed-up, but
for coverage.pys own test suite, combining is about 40%
faster. Closes issue 1483.
* When searching for completely un-executed files, coverage.py
uses the presence of __init__.py files to determine which
directories have source that could have been imported. However,
implicit namespace packages dont require __init__.py. A new
setting [report] include_namespace_packages tells coverage.py
to consider these directories during reporting. Thanks to Felix
Horvat for the contribution. Closes issue 1383 and issue 1024.
* Fixed environment variable expansion in pyproject.toml files.
It was overly broad, causing errors outside of coverage.py
settings, as described in issue 1481 and issue 1345. This is
now fixed, but in rare cases will require changing your
pyproject.toml to quote non-string values that use environment
substitution.
* An empty file has a coverage total of 100%, but used to fail
with --fail-under. This has been fixed, closing issue 1470.
* The text report table no longer writes out two separator lines
if there are no files listed in the table. One is plenty.
* Fixed a mis-measurement of a strange use of wildcard
alternatives in match/case statements, closing issue 1421.
* Fixed internal logic that prevented coverage.py from running on
implementations other than CPython or PyPy (issue 1474).
* The deprecated [run] note setting has been completely removed.
- Make fit for devel:languages:python:backports
* Explicit usage of python3 in specfile
-------------------------------------------------------------------
Mon Oct 3 15:48:41 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -16,30 +16,29 @@
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-coverage
Version: 6.5.0
Version: 7.0.1
Release: 0
Summary: Code coverage measurement for Python
License: Apache-2.0
URL: https://github.com/nedbat/coveragepy
Source: https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module devel >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python
Requires: python-base >= 3.7
Requires(post): update-alternatives
Requires(postun):update-alternatives
# coverage[toml]
Recommends: python-tomli
# SECTION test requirements
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module hypothesis >= 4.57}
BuildRequires: %{python_module pytest >= 4.6}
BuildRequires: %{python_module hypothesis >= 6}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module tomli}
# for database (sqlite3) support
BuildRequires: %{pythons}
@ -58,36 +57,34 @@ library to determine which lines are executable, and which have been executed.
sed -i -e '/addopts/d' setup.cfg
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
rm -vf %{buildroot}%{_bindir}/coverage{2,3}
%python_clone -a %{buildroot}%{_bindir}/coverage
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
export LANG=en_US.UTF8
%{python_expand # Link executables to flavor specific build areas, to be used for testing. build/ is shuffled around by python_expand
mkdir build/bin
for filepath in %{buildroot}%{_bindir}/coverage*-%{$python_bin_suffix}; do
filename=$(basename $filepath)
unsuffixed=${filename/-%{$python_bin_suffix}/}
ln -s $filepath build/bin/$unsuffixed
done
# indicate a writeable .pth directory for tests
%python_flavored_alternatives
%{python_expand # indicate a writeable .pth directory for tests
mkdir -p build/mysite
cp %{python_sitearch}/zzzz-import-failed-hooks.pth build/mysite/
}
# the tests need the empty leading part for importing local test projects"
export PYTHONPATH=":$PWD/build/mysite"
export PATH="$(pwd)/build/bin:$PATH"
%python_exec -mcoverage debug sys
# d:l:p:backports 15.4_py39 does not have python3
if [ ! -x "$(which python3)" ]; then
mypython=$(find %{_bindir} -name 'python3.*[0-9]' -executable -print -quit)
else
mypython=python3
fi
# installs some test modules into tests/ (flavor agnostic)
python3 igor.py zip_mods
$mypython igor.py zip_mods
# test_version - checks for non-compiled variant, we ship only compiled one
donttest="test_version"
@ -116,6 +113,6 @@ donttest+=" or test_plugins"
%doc CHANGES.rst CONTRIBUTORS.txt README.rst howto.txt
%python_alternative %{_bindir}/coverage
%{python_sitearch}/coverage/
%{python_sitearch}/coverage-%{version}-py%{python_version}.egg-info
%{python_sitearch}/coverage-%{version}.dist-info
%changelog