Accepting request 479281 from devel:languages:python:singlespec

- update for singlespec
- update to 4.3.4:
  - Using the --skip-covered option on an HTML report with 100% coverage would
    cause a “No data to report” error, as reported in issue 549. This is now
    fixed; thanks, Loïc Dachary.
  - If-statements can be optimized away during compilation, for example, if 0:
    or if __debug__:. Coverage.py had problems properly understanding these
    statements which existed in the source, but not in the compiled bytecode.
    This problem, reported in issue 522, is now fixed.
  - If you specified --source as a directory, then coverage.py would look for
    importable Python files in that directory, and could identify ones that had
    never been executed at all. But if you specified it as a package name, that
    detection wasn’t performed. Now it is, closing issue 426. Thanks to Loïc
    Dachary for the fix.
  - If you started and stopped coverage measurement thousands of times in your
    process, you could crash Python with a “Fatal Python error: deallocating
    None” error. This is now fixed. Thanks to Alex Groce for the bug report.
  - On PyPy, measuring coverage in subprocesses could produce a warning: “Trace
    function changed, measurement is likely wrong: None”. This was spurious,
    and has been suppressed.
  - Previously, coverage.py couldn’t start on Jython, due to that
    implementation missing the multiprocessing module (issue 551). This problem
    has now been fixed. Also, issue 322 about not being able to invoke coverage
    conveniently, seems much better: jython -m coverage run myprog.py works
    properly.
  - Let’s say you ran the HTML report over and over again in the same output
    directory, with --skip-covered. And imagine due to your heroic test-writing
    efforts, a file just acheived the goal of 100% coverage. With coverage.py
    4.3, the old HTML file with the less-than-100% coverage would be left
    behind. This file is now properly deleted.

OBS-URL: https://build.opensuse.org/request/show/479281
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-coverage?expand=0&rev=54
This commit is contained in:
Jan Matejek 2017-03-14 15:42:09 +00:00 committed by Git OBS Bridge
parent 53d560aee6
commit 4d12a83671
4 changed files with 59 additions and 32 deletions

View File

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

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

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

View File

@ -1,3 +1,38 @@
-------------------------------------------------------------------
Mon Mar 13 17:18:44 UTC 2017 - jmatejek@suse.com
- update for singlespec
- update to 4.3.4:
- Using the --skip-covered option on an HTML report with 100% coverage would
cause a “No data to report” error, as reported in issue 549. This is now
fixed; thanks, Loïc Dachary.
- If-statements can be optimized away during compilation, for example, if 0:
or if __debug__:. Coverage.py had problems properly understanding these
statements which existed in the source, but not in the compiled bytecode.
This problem, reported in issue 522, is now fixed.
- If you specified --source as a directory, then coverage.py would look for
importable Python files in that directory, and could identify ones that had
never been executed at all. But if you specified it as a package name, that
detection wasnt performed. Now it is, closing issue 426. Thanks to Loïc
Dachary for the fix.
- If you started and stopped coverage measurement thousands of times in your
process, you could crash Python with a “Fatal Python error: deallocating
None” error. This is now fixed. Thanks to Alex Groce for the bug report.
- On PyPy, measuring coverage in subprocesses could produce a warning: “Trace
function changed, measurement is likely wrong: None”. This was spurious,
and has been suppressed.
- Previously, coverage.py couldnt start on Jython, due to that
implementation missing the multiprocessing module (issue 551). This problem
has now been fixed. Also, issue 322 about not being able to invoke coverage
conveniently, seems much better: jython -m coverage run myprog.py works
properly.
- Lets say you ran the HTML report over and over again in the same output
directory, with --skip-covered. And imagine due to your heroic test-writing
efforts, a file just acheived the goal of 100% coverage. With coverage.py
4.3, the old HTML file with the less-than-100% coverage would be left
behind. This file is now properly deleted.
-------------------------------------------------------------------
Sat Jan 14 19:28:37 UTC 2017 - hpj@urpla.net

View File

@ -16,17 +16,19 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-coverage
Version: 4.3.1
Version: 4.3.4
Release: 0
Url: http://nedbatchelder.com/code/coverage/%{version}
Summary: Code coverage measurement for Python
License: Apache-2.0
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/88/3c/b4d4774e8254bd327e5303542109497d1304670c2a3e8b8f1cd8beb3de93/coverage-4.3.1.tar.gz
Source: https://files.pythonhosted.org/packages/source/c/coverage/coverage-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# Test requirements:
#BuildRequires: python-mock
#BuildRequires: python-nose
@ -34,10 +36,9 @@ Requires: python-setuptools
Requires: python-xml
Requires(pre): coreutils
Requires(post): /usr/sbin/update-alternatives
Requires(postun): /usr/sbin/update-alternatives
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
Requires(preun): /usr/sbin/update-alternatives
%python_subpackages
%description
Coverage.py measures code coverage, typically during test execution. It uses
@ -48,18 +49,13 @@ library to determine which lines are executable, and which have been executed.
%setup -q -n coverage-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for p in coverage ; do
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
# create a dummy target for /etc/alternatives/$p
touch %{buildroot}%{_sysconfdir}/alternatives/$p
done
%python_install
%python_clone -a %{buildroot}%{_bindir}/coverage
ln -sf coverage-%{python2_version} %{buildroot}%{_bindir}/coverage2
ln -sf coverage-%{python3_version} %{buildroot}%{_bindir}/coverage3
#NOTE(saschpe): The following seems to mess with the install dir, which is odd:
#%%check
@ -71,22 +67,18 @@ done
#python igor.py test_with_tracer c
%post
update-alternatives \
--install %{_bindir}/coverage coverage %{_bindir}/coverage-%{py_ver} 30
%python_install_alternative coverage
%preun
if [ $1 -eq 0 ] ; then
update-alternatives --remove coverage %{_bindir}/coverage-%{py_ver}
fi
%python_uninstall_alternative coverage
%files
%files %python_files
%defattr(-,root,root,-)
%doc CHANGES.rst CONTRIBUTORS.txt README.rst LICENSE.txt TODO.txt howto.txt
%{_bindir}/coverage
%{_bindir}/coverage2
%{_bindir}/coverage-%{py_ver}
%ghost %{_sysconfdir}/alternatives/coverage
%python_alternative %{_bindir}/coverage
%python2_only %{_bindir}/coverage2
%python3_only %{_bindir}/coverage3
%{python_sitearch}/coverage/
%{python_sitearch}/coverage-%{version}-py%{py_ver}.egg-info
%{python_sitearch}/coverage-%{version}-py%{python_version}.egg-info
%changelog