Accepting request 900835 from devel:languages:python:Factory

- Add bpo44426-complex-keyword-sphinx.patch allowing generating
  documentation with Sphinx 4 (bpo#44426).

OBS-URL: https://build.opensuse.org/request/show/900835
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python39?expand=0&rev=18
This commit is contained in:
Dominique Leuenberger 2021-06-23 15:38:06 +00:00 committed by Git OBS Bridge
commit 25e135318f
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From 29b463879b71a3ade67541c34daafb2929269fc4 Mon Sep 17 00:00:00 2001
From: Mark Dickinson <mdickinson@enthought.com>
Date: Wed, 16 Jun 2021 18:43:49 +0100
Subject: [PATCH] bpo-44426: Use of 'complex' as a C variable name confuses
Sphinx; change it to 'num'. (GH-26744) (cherry picked from commit
7247f6f433846c6e37308a550e8e5eb6be379856)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
---
Doc/c-api/complex.rst | 4 ++--
Doc/c-api/object.rst | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--- a/Doc/c-api/complex.rst
+++ b/Doc/c-api/complex.rst
@@ -46,9 +46,9 @@ pointers. This is consistent throughout
:c:type:`Py_complex` representation.
-.. c:function:: Py_complex _Py_c_neg(Py_complex complex)
+.. c:function:: Py_complex _Py_c_neg(Py_complex num)
- Return the negation of the complex number *complex*, using the C
+ Return the negation of the complex number *num*, using the C
:c:type:`Py_complex` representation.
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -483,12 +483,12 @@ Object Protocol
returned. This is the equivalent to the Python expression ``len(o)``.
-.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t default)
+.. c:function:: Py_ssize_t PyObject_LengthHint(PyObject *o, Py_ssize_t def_size)
Return an estimated length for the object *o*. First try to return its
actual length, then an estimate using :meth:`~object.__length_hint__`, and
finally return the default value. On error return ``-1``. This is the
- equivalent to the Python expression ``operator.length_hint(o, default)``.
+ equivalent to the Python expression ``operator.length_hint(o, def_size)``.
.. versionadded:: 3.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sat Jun 19 00:12:04 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Add bpo44426-complex-keyword-sphinx.patch allowing generating
documentation with Sphinx 4 (bpo#44426).
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jun 5 21:21:38 UTC 2021 - Matej Cepl <mcepl@suse.com> Sat Jun 5 21:21:38 UTC 2021 - Matej Cepl <mcepl@suse.com>

View File

@ -145,6 +145,10 @@ Patch33: no-skipif-doctests.patch
# PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com # PATCH-FIX-SLE skip-test_pyobject_freed_is_freed.patch mcepl@suse.com
# skip a test failing on SLE-15 # skip a test failing on SLE-15
Patch34: skip-test_pyobject_freed_is_freed.patch Patch34: skip-test_pyobject_freed_is_freed.patch
# PATCH-FIX-UPSTREAM bpo44426-complex-keyword-sphinx.patch bpo#44426 mcepl@suse.com
# Use of 'complex' as a C variable name confuses Sphinx; change it to 'num'
# The same goes for 'default', which I had to change to 'def_size'
Patch35: bpo44426-complex-keyword-sphinx.patch
BuildRequires: autoconf-archive BuildRequires: autoconf-archive
BuildRequires: automake BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
@ -391,6 +395,7 @@ other applications.
%if 0%{?sle_version} && 0%{?sle_version} <= 150300 %if 0%{?sle_version} && 0%{?sle_version} <= 150300
%patch34 -p1 %patch34 -p1
%endif %endif
%patch35 -p1
# drop Autoconf version requirement # drop Autoconf version requirement
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac