Skip to content

DOC: __array_namespace__info__: set_module not __module__ (#30679)#30701

Merged
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-30679
Jan 21, 2026
Merged

DOC: __array_namespace__info__: set_module not __module__ (#30679)#30701
charris merged 1 commit intonumpy:maintenance/2.4.xfrom
charris:backport-30679

Conversation

@charris
Copy link
Member

@charris charris commented Jan 21, 2026

Backport of #30679.

inspect.getsource(np.__array_namespace__info) should raise OSError not TokenError for Sphinx. set_module correctly removes __firstlineno__, while __module__ doesn't. See #28645.

Fixes: #30674

@charris charris added this to the 2.4.2 release milestone Jan 21, 2026
@charris charris added 04 - Documentation 08 - Backport Used to tag backport PRs labels Jan 21, 2026
@charris charris merged commit 1c326a8 into numpy:maintenance/2.4.x Jan 21, 2026
74 checks passed
@charris charris deleted the backport-30679 branch January 21, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

04 - Documentation 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants