import python-pytest-trio-0.8.0-10.el10

i10ce changed/i10ce/python-pytest-trio-0.8.0-10.el10
ebasov 1 day ago
commit 12cbba169c
Signed by: ebasov
GPG Key ID: 23356EDA24E5499D

1
.gitignore vendored

@ -0,0 +1 @@
SOURCES/pytest-trio-0.8.0.tar.gz

@ -0,0 +1 @@
8f1a7022d7816a3d2843f51a2349fb63f53b1c22 SOURCES/pytest-trio-0.8.0.tar.gz

@ -0,0 +1,51 @@
From 9cda20bbb966fe1e4ae51921d566c668654ee5e1 Mon Sep 17 00:00:00 2001
From: Vincent Vanlaer <vincent.vanlaer@skynet.be>
Date: Sun, 3 Sep 2023 00:00:54 +0200
Subject: [PATCH] Remove trio.tests import causing warnings
It is deprecated and the replacement is made private as trio._tests.
While we could be using that, this commit copies over the one relevant
function that is actually necessary. The other two imports just repeat
tests that are already in trio and do not need repeating here.
---
.../_tests/test_hypothesis_interaction.py | 21 ++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/pytest_trio/_tests/test_hypothesis_interaction.py b/pytest_trio/_tests/test_hypothesis_interaction.py
index 75aa9f7..cb95a96 100644
--- a/pytest_trio/_tests/test_hypothesis_interaction.py
+++ b/pytest_trio/_tests/test_hypothesis_interaction.py
@@ -1,10 +1,5 @@
import pytest
import trio
-from trio.tests.test_scheduler_determinism import (
- scheduler_trace,
- test_the_trio_scheduler_is_not_deterministic,
- test_the_trio_scheduler_is_deterministic_if_seeded,
-)
from hypothesis import given, settings, strategies as st
from pytest_trio.plugin import _trio_test_runner_factory
@@ -38,6 +33,22 @@ async def test_mark_and_parametrize(x, y):
assert y in (1, 2)
+async def scheduler_trace():
+ """Returns a scheduler-dependent value we can use to check determinism."""
+ trace = []
+
+ async def tracer(name):
+ for i in range(10):
+ trace.append((name, i))
+ await trio.sleep(0)
+
+ async with trio.open_nursery() as nursery:
+ for i in range(5):
+ nursery.start_soon(tracer, i)
+
+ return tuple(trace)
+
+
def test_the_trio_scheduler_is_deterministic_under_hypothesis():
traces = []

@ -0,0 +1,145 @@
%global pypi_name pytest-trio
Name: python-%{pypi_name}
Version: 0.8.0
Release: 10%{?dist}
Summary: Pytest plugin for trio
License: MIT or ASL 2.0
URL: https://github.com/python-trio/pytest-trio
Source0: https://github.com/python-trio/pytest-trio/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
# Remove trio.tests import causing warnings
# https://github.com/python-trio/pytest-trio/pull/135
# We only backport the fix, not the additional formatting changes.
Patch: https://github.com/python-trio/pytest-trio/pull/135/commits/9cda20bbb966fe1e4ae51921d566c668654ee5e1.patch
BuildArch: noarch
%description
This is a pytest plugin to help you test projects that use Trio, a friendly
library for concurrency and async I/O in Python.
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-pytest
BuildRequires: python3-hypothesis
BuildRequires: python3-setuptools
BuildRequires: python3-trio
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name}
This is a pytest plugin to help you test projects that use Trio, a friendly
library for concurrency and async I/O in Python.
%package -n python-%{pypi_name}-doc
Summary: pytest-trio documentation
#BuildRequires: python3-sphinx
#BuildRequires: python3-sphinxcontrib-trio
#BuildRequires: python3-sphinx_rtd_theme
%description -n python-%{pypi_name}-doc
Documentation for %{name}.
%prep
%autosetup -n %{pypi_name}-%{version} -p1
rm -rf %{pypi_name}.egg-info
sed -i /RemovedInPytest4Warning/d pytest_trio/_tests/conftest.py
sed -i s/--cov// pytest.ini
%build
%py3_build
# An error happened in rendering the page history.
# Reason: UndefinedError("'logo' is undefined")
# PYTHONPATH=${PWD} sphinx-build-3 docs/source html
# rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
# https://github.com/python-trio/pytest-trio/issues/84
%check
%pytest -v -W "ignore::trio.TrioDeprecationWarning"
%files -n python3-%{pypi_name}
%license LICENSE.MIT LICENSE LICENSE.APACHE2
%doc README.rst
%{python3_sitelib}/pytest_trio/
%{python3_sitelib}/pytest_trio-%{version}-py%{python3_version}.egg-info
#%%files -n python-%%{pypi_name}-doc
#%%doc html
#%%license LICENSE.MIT LICENSE LICENSE.APACHE2
%changelog
* Mon Feb 10 2025 Eduard Basov <ebasov@msvsphere-os.ru> - 0.8.0-10
- Rebuilt for MSVSphere 10
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Jul 07 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 0.8.0-9
- Remove trio.tests imports (removed from trio 0.24+)
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.8.0-8
- Rebuilt for Python 3.13
* Mon Apr 08 2024 Fabian Affolter <mail@fabian-affolter.ch> - 0.8.0-7
- Ignore trio.TrioDeprecationWarning (closes rhbz#2261596)
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jul 01 2023 Python Maint <python-maint@redhat.com> - 0.8.0-3
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Nov 11 2022 Lumír Balhar <lbalhar@redhat.com> - 0.8.0-1
- Update to 0.8.0 (#2142072)
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.7.0-6
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.7.0-3
- Rebuilt for Python 3.10
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jan 07 2021 Joel Capitao <jcapitao@redhat.com> - 0.7.0-1
- Update to latest upstream release 0.7.0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jun 04 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.6.0-1
- Update to latest upstream release 0.6.0
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.5.2-3
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 01 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.5.2-1
- Initial package for Fedora
Loading…
Cancel
Save