[packages/python3-trio] - updated to 0.30.0
qboosh
qboosh at pld-linux.org
Sat Jul 5 13:35:56 CEST 2025
commit 89c159859f5802f962f3dffac708b3575918f796
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jul 5 13:37:25 2025 +0200
- updated to 0.30.0
python3-trio.spec | 53 ++++++++++++++++++++++++++++++++++----------------
trio-intersphinx.patch | 31 +++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 17 deletions(-)
---
diff --git a/python3-trio.spec b/python3-trio.spec
index 5358aa6..bd08023 100644
--- a/python3-trio.spec
+++ b/python3-trio.spec
@@ -6,38 +6,52 @@
Summary: A friendly Python library for async concurrency and I/O
Summary(pl.UTF-8): Przyjazna biblioteka do współbieżności asynchronicznej i we/wy
Name: python3-trio
-Version: 0.29.0
+Version: 0.30.0
Release: 1
License: MIT or Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/trio/
Source0: https://files.pythonhosted.org/packages/source/t/trio/trio-%{version}.tar.gz
-# Source0-md5: 409b86355e6f43fd62cbe5e39303ff6f
+# Source0-md5: 533d80e111a7edb6fab6fd2f81112dfb
+Patch0: trio-intersphinx.patch
URL: https://pypi.org/project/trio/
-BuildRequires: python3-modules >= 1:3.7
BuildRequires: python3-build
BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.9
+BuildRequires: python3-setuptools >= 1:77
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with tests} || %{with doc}
+BuildRequires: python3-attrs >= 23.2.0
+%if "%{py3_ver}" == "3.9"
+BuildRequires: python3-exceptiongroup >= 1.2.1
+%endif
+BuildRequires: python3-idna
+BuildRequires: python3-outcome
+BuildRequires: python3-pyOpenSSL >= 22.0.0
+BuildRequires: python3-sniffio >= 1.3.0
+BuildRequires: python3-sortedcontainers
+%endif
%if %{with tests}
BuildRequires: python3-astor
+# TODO (not to disable test_gen)
+#BuildRequires: python3-black
BuildRequires: python3-async_generator >= 1.9
-BuildRequires: python3-attrs >= 19.2.0
-BuildRequires: python3-idna
BuildRequires: python3-jedi
-BuildRequires: python3-outcome
BuildRequires: python3-pylint
-BuildRequires: python3-pytest
-BuildRequires: python3-sniffio
-BuildRequires: python3-sortedcontainers
+#BuildRequires: python3-pyright
+#BuildRequires: python3-ruff
+BuildRequires: python3-pytest >= 5.0
BuildRequires: python3-trustme
%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
-BuildRequires: python3-sphinx_rtd_theme
+BuildRequires: python3-sphinx_rtd_theme >= 3
+BuildRequires: python3-sphinx_codeautolink
+BuildRequires: python3-sphinxcontrib-jquery
BuildRequires: python3-sphinxcontrib-trio
-BuildRequires: sphinx-pdg-3
+BuildRequires: sphinx-pdg-3 >= 6.0
%endif
-Requires: python3-modules >= 1:3.7
+Requires: python3-modules >= 1:3.9
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -67,17 +81,22 @@ Dokumentacja API modułu Pythona trio.
%prep
%setup -q -n trio-%{version}
+%patch -P0 -p1
%build
%py3_build_pyproject
%if %{with tests}
+# test_gen_exports requires black and ruff
+# test_dtls fails almost all the cases
+# the rest uses (localhost?) networking
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python3} -m pytest trio/_core/tests trio/tests
+PYTHONPATH=$(pwd)/src \
+%{__python3} -m pytest src/trio/_core/_tests src/trio/_tests tests -k 'not test_gen_exports and not test_dtls and not test_highlevel_open_tcp_stream and not test_highlevel_socket and not test_highlevel_open_tcp_listeners and not test_highlevel_ssl_helpers and not test_socket and not test_ssl and not test_open_stream_to_socket_listener and not test_run_in_worker_thread_limiter'
%endif
-
%if %{with doc}
-PYTHONPATH=$(pwd) \
+LC_ALL=C.UTF-8 \
+PYTHONPATH=$(pwd)/src \
%{__make} -C docs html \
SPHINXBUILD=sphinx-build-3
%endif
diff --git a/trio-intersphinx.patch b/trio-intersphinx.patch
new file mode 100644
index 0000000..a41fa3f
--- /dev/null
+++ b/trio-intersphinx.patch
@@ -0,0 +1,31 @@
+Deal with intersphinx references not generated due to network isolation
+--- trio-0.30.0/docs/source/conf.py.orig 2025-04-21 02:47:33.000000000 +0200
++++ trio-0.30.0/docs/source/conf.py 2025-07-05 07:14:42.522891315 +0200
+@@ -280,6 +280,8 @@ def add_intersphinx(app: Sphinx) -> None
+ assert isinstance(inventory, dict)
+ inventory = cast("Inventory", inventory)
+
++ if f"py:{reftype}" not in inventory:
++ inventory[f"py:{reftype}"] = {}
+ inventory[f"py:{reftype}"][f"{target}"] = _InventoryItem(
+ project_name="Python",
+ project_version=version,
+--- trio-0.30.0/docs/source/typevars.py.orig 2025-07-05 13:21:58.390179443 +0200
++++ trio-0.30.0/docs/source/typevars.py 2025-07-05 13:25:34.135677315 +0200
+@@ -10,6 +10,7 @@ import sys
+ from pathlib import Path
+ from typing import TYPE_CHECKING
+
++import docutils
+ import trio
+ from sphinx.errors import NoUri
+
+@@ -93,6 +94,8 @@ def lookup_reference(
+ contnode,
+ allowed_exceptions=(NoUri,),
+ )
++ if not isinstance(new_node, docutils.nodes.Element) or "reftitle" not in new_node:
++ return new_node
+ reftitle = new_node["reftitle"]
+ # Is normally "(in Python 3.XX)", make it say typevar/paramspec/etc
+ paren = "(" if reftitle.startswith("(") else ""
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-trio.git/commitdiff/89c159859f5802f962f3dffac708b3575918f796
More information about the pld-cvs-commit
mailing list