8000 DOC: __array_namespace__info__: set_module not __module__ by danielzgtg · Pull Request #30679 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@danielzgtg
Copy link
Contributor

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

@danielzgtg danielzgtg force-pushed the fix/docUnterminatedStringLiteral2 branch 2 times, most recently from bf68fa5 to 0e6ecda Compare January 20, 2026 09:16
@danielzgtg danielzgtg changed the title DOC: __array_namespace__info: set_module not __module__ DOC: __array_namespace__info__: set_module not __module__ Jan 20, 2026
@danielzgtg danielzgtg force-pushed the fix/docUnterminatedStringLiteral2 branch 2 times, most recently from 04b5636 to 705c675 Compare January 20, 2026 09:38
`inspect.getsource(np.__array_namespace__info)` should raise `OSError`
not `TokenError` for Sphinx. `set_module` correctly removes
`__firstlineno__`, while `__module__` doesn't. See numpy#28645.

Fixes: numpy#30674
@danielzgtg danielzgtg force-pushed the fix/docUnterminatedStringLiteral2 branch from 705c675 to 6e3ee96 Compare January 20, 2026 14:23
@ngoldbaum
Copy link
Member

I can confirm that this fixes the doc build warnings on Python 3.14. Thanks!

@ngoldbaum ngoldbaum merged commit 90f6cc1 into numpy:main Jan 20, 2026
75 checks passed
@ngoldbaum ngoldbaum added the 09 - Backport-Candidate PRs tagged should be backported label Jan 20, 2026
@ngoldbaum ngoldbaum mentioned this pull request Jan 20, 2026
5 tasks
charris pushed a commit to charris/numpy that referenced this pull request Jan 21, 2026
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jan 21, 2026
charris added a commit that referenced this pull request Jan 21, 2026
DOC: __array_namespace__info__: set_module not __module__ (#30679)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: Unterminated string literal error with __array_namespace_info__

3 participants

0