- update to 7.7.1

* The Coverage object has a new method, .Coverage.branch_stats
    for getting simple branch information for a module.
  * The Coverage constructor<.Coverage> now has a plugins parameter
    for passing in plugin objects directly.
  * Many constant tests in if statements are now recognized as
    being optimized away.
  * The experimental sys.monitoring support now works for branch
    coverage if you are using Python 3.14.0 alpha 6 or newer.
  * A few small tweaks to the sys.monitoring support for Python 3.14.
    Please test!
- Add setuptools77.patch to fix tests with setuptools 77

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-coverage?expand=0&rev=139
This commit is contained in:
2025-03-28 15:05:41 +00:00
committed by Git OBS Bridge
commit 4c19dc7d40
10 changed files with 1604 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

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

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

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

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

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

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

BIN
coverage-7.6.4.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
coverage-7.7.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

1421
python-coverage.changes Normal file

File diff suppressed because it is too large Load Diff

123
python-coverage.spec Normal file
View File

@@ -0,0 +1,123 @@
#
# spec file for package python-coverage
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-coverage
Version: 7.7.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
# PATCH-FIX-UPSTREAM https://github.com/nedbat/coveragepy/commit/ba685fb8d06a2052c4916749539ef501b8080804 build: setuptools 77 doesn't like license classifiers.
Patch: setuptools77.patch
BuildRequires: %{python_module devel >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python
Requires(post): update-alternatives
Requires(postun): update-alternatives
# coverage[toml]
Recommends: python-tomli
# SECTION test requirements
BuildRequires: %{python_module flaky}
BuildRequires: %{python_module hypothesis >= 6}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module tomli}
# for database (sqlite3) support
BuildRequires: %{pythons}
# /SECTION
%python_subpackages
%description
Coverage.py measures code coverage, typically during test execution. It uses
the code analysis tools and tracing hooks provided in the Python standard
library to determine which lines are executable, and which have been executed.
%prep
%autosetup -p1 -n coverage-%{version}
# we define everything necessary ourselves below
sed -i -e '/addopts/d' setup.cfg
%build
%pyproject_wheel
%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_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 COVERAGE_CORE="pytrace"
%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)
$mypython igor.py zip_mods
# test_version - checks for non-compiled variant, we ship only compiled one
donttest="test_version"
# test_xdist_sys_path_nuttiness_is_fixed - xdist check that we actually fail on purpose
donttest+=" or test_xdist_sys_path_nuttiness_is_fixed"
# does not find a usable venv
donttest+=" or test_venv"
# writes in /usr/
donttest+=" or test_process"
# requires additional plugins
donttest+=" or test_plugins"
# asserts PYTHONPATH is empty, which it can't be
donttest+=" or test_report_wildcard or test_run_omit_vs_report_omit"
%pytest_arch -n auto --no-flaky-report -k "$donttest" -rp ||:
%pytest_arch -n auto --no-flaky-report -k "not ($donttest)"
%post
%python_install_alternative coverage
%postun
%python_uninstall_alternative coverage
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.rst CONTRIBUTORS.txt README.rst howto.txt
%python_alternative %{_bindir}/coverage
%{python_sitearch}/coverage/
%{python_sitearch}/coverage-%{version}.dist-info
%changelog

21
setuptools77.patch Normal file
View File

@@ -0,0 +1,21 @@
From ba685fb8d06a2052c4916749539ef501b8080804 Mon Sep 17 00:00:00 2001
From: Ned Batchelder <ned@nedbatchelder.com>
Date: Sat, 22 Mar 2025 08:59:45 -0400
Subject: [PATCH] build: setuptools 77 doesn't like license classifiers. #1939
---
setup.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/setup.py b/setup.py
index 9aa82bf91..8fcec5e2d 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,6 @@
classifiers = """\
Environment :: Console
Intended Audience :: Developers
-License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3