Skip to content

Conversation

@ilevkivskyi
Copy link
Member

This idea is quite simple: each time we change how an object is cached in the buffer we bump this version (even if we don't change the ABI version). Notes:

  • This is not the same as ABI version, if the ABI version is different, the capsule import will fail and you can't even use this version of librt. We can however use buffer cache layout version to abandon cache files that would result in reading garbage data.
  • I can't actually start using this in cache metas in the same PR, to avoid breaking self-check in CI. If there are no comments objections, I will merge this soon. Then release a new librt version, and make second PR that actually uses this feature.

While I am at it I fix a bug in the float deserialization (magic value was not handled).

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi ilevkivskyi merged commit 49e9a9b into python:master Oct 30, 2025
20 checks passed
@ilevkivskyi ilevkivskyi deleted the cache-version branch October 30, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants