Skip to content
Snippets Groups Projects
Commit 16fbb0ca authored by Timo Röhling's avatar Timo Röhling
Browse files

Remove hack to override _add_newdocs_scalars

Closes: #1076899
parent 83733753
No related branches found
No related tags found
No related merge requests found
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Wed, 31 Jul 2024 00:18:32 +0200
Subject: Remove hack to override _add_newdocs_scalars
Origin: upstream, https://github.com/numpy/numpy/pull/26832
Bug: https://github.com/numpy/numpy/issues/26820
---
doc/source/conf.py | 7 -------
1 file changed, 7 deletions(-)
diff --git a/doc/source/conf.py b/doc/source/conf.py
index dd1a862..7647147 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -39,10 +39,6 @@ def replace_scalar_type_names():
('tp_name', ctypes.c_char_p),
]
- # prevent numpy attaching docstrings to the scalar types
- assert 'numpy.core._add_newdocs_scalars' not in sys.modules
- sys.modules['numpy.core._add_newdocs_scalars'] = object()
-
import numpy
# change the __name__ of the scalar types
@@ -56,9 +52,6 @@ def replace_scalar_type_names():
c_typ = PyTypeObject.from_address(id(typ))
c_typ.tp_name = _name_cache[typ] = b"numpy." + name.encode('utf8')
- # now generate the docstrings as usual
- del sys.modules['numpy.core._add_newdocs_scalars']
- import numpy.core._add_newdocs_scalars
replace_scalar_type_names()
......@@ -9,3 +9,4 @@
0009-Disable-version-and-theme-switchers-in-documentation.patch
0010-Prevent-random-object-file-names-in-debuginfo.patch
0011-Ignore-distutils-for-Python-3.12-and-later.patch
0012-Remove-hack-to-override-_add_newdocs_scalars.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment