[packages/python3-sphinxcontrib-asyncio] - extension fix for Sphinx 6+ changes, docs fix for python 3.10+; release 8
qboosh
qboosh at pld-linux.org
Sun Jun 29 18:23:15 CEST 2025
commit 3883db57e6ce33bc98aaad5574598191248514df
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jun 29 18:24:39 2025 +0200
- extension fix for Sphinx 6+ changes, docs fix for python 3.10+; release 8
python3-sphinxcontrib-asyncio.spec | 11 ++++++++---
sphinxcontrib-asyncio-python3.10.patch | 21 ++++++++++++++++++++
sphinxcontrib-asyncio-sphinx6.patch | 36 ++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 3 deletions(-)
---
diff --git a/python3-sphinxcontrib-asyncio.spec b/python3-sphinxcontrib-asyncio.spec
index f4ac2bd..6fbac14 100644
--- a/python3-sphinxcontrib-asyncio.spec
+++ b/python3-sphinxcontrib-asyncio.spec
@@ -7,12 +7,14 @@ Summary: Sphinx extension to support coroutines in markup
Summary(pl.UTF-8): Rozszerzenie Sphinksa do obsługi korutyn w znacznikach
Name: python3-sphinxcontrib-asyncio
Version: 0.3.0
-Release: 7
+Release: 8
License: Apache v2
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/sphinxcontrib-asyncio/
Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-asyncio/sphinxcontrib-asyncio-%{version}.tar.gz
# Source0-md5: 5445823a927f3368dd81b9061bec0055
+Patch0: sphinxcontrib-asyncio-sphinx6.patch
+Patch1: sphinxcontrib-asyncio-python3.10.patch
URL: https://pypi.org/project/sphinxcontrib-asyncio/
BuildRequires: python3-modules >= 1:3.5
BuildRequires: python3-setuptools
@@ -51,6 +53,8 @@ Dokumentacja API modułu Pythona sphinxcontrib-asyncio.
%prep
%setup -q -n sphinxcontrib-asyncio-%{version}
+%patch -P0 -p1
+%patch -P1 -p1
%build
%py3_build
@@ -62,7 +66,8 @@ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
%if %{with doc}
PYTHONPATH=$(pwd) \
-%{__make} -C docs html
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-3
%endif
%install
@@ -70,7 +75,7 @@ rm -rf $RPM_BUILD_ROOT
%py3_install
-# provides by python3-sphinxcontrib in PLD
+# provided by python3-sphinxcontrib in PLD
%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__init__.py \
$RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinxcontrib/__pycache__/__init__.*.py*
diff --git a/sphinxcontrib-asyncio-python3.10.patch b/sphinxcontrib-asyncio-python3.10.patch
new file mode 100644
index 0000000..82d07cc
--- /dev/null
+++ b/sphinxcontrib-asyncio-python3.10.patch
@@ -0,0 +1,21 @@
+--- sphinxcontrib-asyncio-0.3.0/docs/autodoc_example.py.orig 2020-08-19 11:44:24.000000000 +0200
++++ sphinxcontrib-asyncio-0.3.0/docs/autodoc_example.py 2025-06-29 18:22:37.117535770 +0200
+@@ -1,16 +1,11 @@
+-import asyncio
+-
+-
+ class MyClass:
+
+ def my_func(self):
+ """ Normal function """
+
+- @asyncio.coroutine
+- def my_coro(self):
++ async def my_coro(self):
+ """ This is my coroutine """
+
+
+- at asyncio.coroutine
+-def coro(param):
++async def coro(param):
+ """ Module level async function """
diff --git a/sphinxcontrib-asyncio-sphinx6.patch b/sphinxcontrib-asyncio-sphinx6.patch
new file mode 100644
index 0000000..b70b50c
--- /dev/null
+++ b/sphinxcontrib-asyncio-sphinx6.patch
@@ -0,0 +1,36 @@
+--- sphinxcontrib-asyncio-0.3.0/sphinxcontrib/asyncio.py.orig 2020-08-19 11:44:24.000000000 +0200
++++ sphinxcontrib-asyncio-0.3.0/sphinxcontrib/asyncio.py 2025-06-29 18:08:33.805437717 +0200
+@@ -1,3 +1,4 @@
++from docutils import nodes
+ from docutils.parsers.rst import directives
+ from sphinx.domains.python import PyFunction, PyMethod
+ from sphinx.ext.autodoc import FunctionDocumenter, MethodDocumenter, \
+@@ -26,22 +27,22 @@ class PyCoroutineMixin(object):
+ 'async-for': directives.flag}
+
+ def get_signature_prefix(self, sig):
+- ret = ''
++ ret = []
+ if 'staticmethod' in self.options:
+- ret += 'staticmethod '
++ ret.append(nodes.Text('staticmethod'))
+ if 'classmethod' in self.options:
+- ret += 'classmethod '
++ ret.append(nodes.Text('classmethod'))
+ if 'coroutine' in self.options:
+ coroutine = True
+ else:
+ coroutine = ('async-with' not in self.options and
+ 'async-for' not in self.options)
+ if coroutine:
+- ret += 'coroutine '
++ ret.append(nodes.Text('coroutine'))
+ if 'async-with' in self.options:
+- ret += 'async-with '
++ ret.append(nodes.Text('async-with'))
+ if 'async-for' in self.options:
+- ret += 'async-for '
++ ret.append(nodes.Text('async-for'))
+ return ret
+
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-sphinxcontrib-asyncio.git/commitdiff/3883db57e6ce33bc98aaad5574598191248514df
More information about the pld-cvs-commit
mailing list