Skip to content

Clarify docs for error case of PyDict_GetItemRef#149506

Merged
kumaraditya303 merged 3 commits into
python:mainfrom
ngoldbaum:fix-dict-getitemref-error-docs
May 8, 2026
Merged

Clarify docs for error case of PyDict_GetItemRef#149506
kumaraditya303 merged 3 commits into
python:mainfrom
ngoldbaum:fix-dict-getitemref-error-docs

Conversation

@ngoldbaum
Copy link
Copy Markdown
Contributor

@ngoldbaum ngoldbaum commented May 7, 2026

I manually inspected and asked Claude to inspect the implementation, and I think all error paths set *result to NULL.

See numpy/numpy#31256 (comment) for where this came up for me today.

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 7, 2026

Documentation build overview

📚 cpython-previews | 🛠️ Build #32601967 | 📁 Comparing 8326596 against main (310fe88)

  🔍 Preview build  

3 files changed
± c-api/dict.html
± whatsnew/3.16.html
± whatsnew/changelog.html

@ngoldbaum ngoldbaum force-pushed the fix-dict-getitemref-error-docs branch from de69c83 to 2abbc1e Compare May 7, 2026 20:42
Comment thread Doc/c-api/dict.rst Outdated
@kumaraditya303 kumaraditya303 added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 8, 2026
@kumaraditya303 kumaraditya303 enabled auto-merge (squash) May 8, 2026 10:44
@kumaraditya303 kumaraditya303 merged commit 3565d31 into python:main May 8, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 8, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @ngoldbaum for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149546 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 8, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149547 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 8, 2026
@kumaraditya303 kumaraditya303 added the needs backport to 3.13 bugs and security fixes label May 8, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @ngoldbaum for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 8, 2026

GH-149548 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 8, 2026
kumaraditya303 pushed a commit that referenced this pull request May 8, 2026
…49506) (#149548)

docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
kumaraditya303 pushed a commit that referenced this pull request May 8, 2026
…49506) (#149546)

docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
kumaraditya303 pushed a commit that referenced this pull request May 8, 2026
…49506) (#149547)

docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
@vstinner
Copy link
Copy Markdown
Member

It wasn't documented to leave it as an implementation detail. But if you consider that it's useful, yeah, why not documenting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants