⚡ Sangsakala Proxy 🏠 Home
Skip to content

gh-161226: Fail if the hash is cached in _PyTuple_Resize() - #161293

Open
vstinner wants to merge 2 commits into
python:mainfrom
vstinner:tuple_resize_hash
Open

vstinner wants to merge 2 commits into
python:mainfrom
vstinner:tuple_resize_hash

Conversation

@vstinner

@vstinner vstinner commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

_PyTuple_Resize() now fails with SystemError if the hash value was already computed.

Add compute_hash optional parameter to _testcapi._tuple_resize().

_PyTuple_Resize() now fails with SystemError if the hash value was
already computed.

Add compute_hash optional parameter to _testcapi._tuple_resize().
@vstinner

vstinner commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

This change is backward incompatible on purpose, and so it should not be backported to stable branches.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35630941 | 📁 Comparing 4adeb75 against main (6d69297)

  🔍 Preview build  

2 files changed
± c-api/tuple.html
± whatsnew/changelog.html

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.

1 participant