From 7667d1aeac02375e909f71299e3f90250ce55957 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 11 2021 08:25:41 +0000 Subject: Import python-trio-0.18.0-1.el9 in CloudSIG xena --- diff --git a/.python-trio.metadata b/.python-trio.metadata new file mode 100644 index 0000000..0348e27 --- /dev/null +++ b/.python-trio.metadata @@ -0,0 +1 @@ +c55a35cb2fa744824d1186a4b911a1aac3a5ad78 SOURCES/trio-0.18.0.tar.gz diff --git a/SOURCES/0001-Skip-tests-failing-with-pytest-6.2.2.patch b/SOURCES/0001-Skip-tests-failing-with-pytest-6.2.2.patch new file mode 100644 index 0000000..2a1f28c --- /dev/null +++ b/SOURCES/0001-Skip-tests-failing-with-pytest-6.2.2.patch @@ -0,0 +1,54 @@ +From ba649e4f98e8644275c114f4b85866b57e692bb7 Mon Sep 17 00:00:00 2001 +From: Joel Capitao +Date: Wed, 10 Feb 2021 10:42:27 +0100 +Subject: [PATCH] Skip tests failing with pytest=6.2.2 + +Those tests are currently failing in upstream CI [1] +while bumping pytest from 6.1.2 to 6.2.2. +In Fedora we only provides 6.2.2 for pytest 6.x.x. +With pytest options "-p no:unraisableexception -p no:threadexception", +it doesn't seem to work either, so we ignore them until upstream fix +it. + +[1] https://github.com/python-trio/trio/pull/1878 +--- + trio/_core/tests/test_asyncgen.py | 2 +- + trio/_core/tests/test_run.py | 2 ++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/trio/_core/tests/test_asyncgen.py b/trio/_core/tests/test_asyncgen.py +index 1f886e11..619b41e2 100644 +--- a/trio/_core/tests/test_asyncgen.py ++++ b/trio/_core/tests/test_asyncgen.py +@@ -251,7 +251,7 @@ async def step_outside_async_context(aiter): + await _core.wait_all_tasks_blocked() + nursery.cancel_scope.deadline = _core.current_time() + +- ++@pytest.mark.skip(reason="Fails with pytest=6.2.2") + @pytest.mark.skipif(buggy_pypy_asyncgens, reason="pypy 7.2.0 is buggy") + async def test_fallback_when_no_hook_claims_it(capsys): + async def well_behaved(): +diff --git a/trio/_core/tests/test_run.py b/trio/_core/tests/test_run.py +index 4c4e12b5..e808c325 100644 +--- a/trio/_core/tests/test_run.py ++++ b/trio/_core/tests/test_run.py +@@ -2198,6 +2198,7 @@ async def test_cancel_scope_deadline_duplicates(): + await sleep(0.01) + + ++@pytest.mark.skip(reason="Fails with pytest=6.2.2") + @pytest.mark.skipif( + sys.implementation.name != "cpython", reason="Only makes sense with refcounting GC" + ) +@@ -2228,6 +2229,7 @@ async def test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage(): + gc.garbage.clear() + + ++@pytest.mark.skip(reason="Fails with pytest=6.2.2") + @pytest.mark.skipif( + sys.implementation.name != "cpython", reason="Only makes sense with refcounting GC" + ) +-- +2.26.2 + diff --git a/SPECS/python-trio.spec b/SPECS/python-trio.spec new file mode 100644 index 0000000..8d913e1 --- /dev/null +++ b/SPECS/python-trio.spec @@ -0,0 +1,120 @@ +# what it's called on pypi +%global srcname trio +# what it's imported as +%global libname %{srcname} +# name of egg info directory +%global eggname %{srcname} +# package name fragment +%global pkgname %{srcname} + +%global common_description %{expand: +The Trio project's goal is to produce a production-quality, permissively +licensed, async/await-native I/O library for Python. Like all async libraries, +its main purpose is to help you write programs that do multiple things at the +same time with parallelized I/O. A web spider that wants to fetch lots of +pages in parallel, a web server that needs to juggle lots of downloads and +websocket connections at the same time, a process supervisor monitoring +multiple subprocesses... that sort of thing. Compared to other libraries, Trio +attempts to distinguish itself with an obsessive focus on usability and +correctness. Concurrency is complicated; we try to make it easy to get things +right.} + +%bcond_without tests + + +Name: python-%{pkgname} +Version: 0.18.0 +Release: 1%{?dist} +Summary: A friendly Python library for async concurrency and I/O +License: MIT or ASL 2.0 +URL: https://github.com/python-trio/trio +Source0: %pypi_source +Patch0001: 0001-Skip-tests-failing-with-pytest-6.2.2.patch +BuildArch: noarch + + +%description %{common_description} + + +%package -n python3-%{pkgname} +Summary: %{summary} +BuildRequires: python3-devel +BuildRequires: %{py3_dist setuptools} +%if %{with tests} +BuildRequires: %{py3_dist pytest pyopenssl trustme} +BuildRequires: %{py3_dist attrs sortedcontainers async-generator idna outcome sniffio} +%endif +%{?python_provide:%python_provide python3-%{pkgname}} + + +%description -n python3-%{pkgname} %{common_description} + + +%prep +%autosetup -n %{srcname}-%{version} -p1 +rm -rf %{eggname}.egg-info + + +%build +%py3_build + + +%install +%py3_install + + +%if %{with tests} +%check +%pytest --verbose trio/_core/tests +%endif + + +%files -n python3-%{pkgname} +%license LICENSE LICENSE.MIT LICENSE.APACHE2 +%doc README.rst +%{python3_sitelib}/%{libname} +%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info + + +%changelog +* Tue Feb 09 2021 Joel Capitao - 0.18.0-1 +- Latest upstream rhbz#1879061 + +* Wed Jan 27 2021 Fedora Release Engineering - 0.16.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sun Sep 06 2020 Carl George - 0.16.0-1 +- Latest upstream + +* Wed Jul 29 2020 Fedora Release Engineering - 0.15.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jun 04 2020 Carl George - 0.15.1-1 +- Latest upstream rhbz#1828266 + +* Tue May 26 2020 Miro Hrončok - 0.13.0-3 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.13.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jan 02 2020 Carl George - 0.13.0-1 +- Latest upstream rhbz#1742425 + +* Thu Oct 03 2019 Miro Hrončok - 0.11.0-4 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.11.0-3 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.11.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Feb 28 2019 Carl George - 0.11.0-1 +- Latest upstream + +* Sat Feb 02 2019 Fedora Release Engineering - 0.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Sep 20 2018 Carl George - 0.7.0-1 +- Initial package