Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
numpy
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
numpy
Commits
16fbb0ca
Commit
16fbb0ca
authored
9 months ago
by
Timo Röhling
Browse files
Options
Downloads
Patches
Plain Diff
Remove hack to override _add_newdocs_scalars
Closes: #1076899
parent
83733753
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/0012-Remove-hack-to-override-_add_newdocs_scalars.patch
+35
-0
35 additions, 0 deletions
...s/0012-Remove-hack-to-override-_add_newdocs_scalars.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
36 additions
and
0 deletions
debian/patches/0012-Remove-hack-to-override-_add_newdocs_scalars.patch
0 → 100644
+
35
−
0
View file @
16fbb0ca
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()
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
16fbb0ca
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment