Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API exposes memory layout of some runtime objects #22

Open
steve-s opened this issue May 11, 2023 · 3 comments
Open

API exposes memory layout of some runtime objects #22

steve-s opened this issue May 11, 2023 · 3 comments

Comments

@steve-s
Copy link
Contributor

steve-s commented May 11, 2023

Cherry-picking one specific issue pointed out in #4.

Even the stable ABI still exposes few fields in the ABI, such as ob_refcnt. This is a problem:

  • For alternative implementations, because their representations of those runtime objects may be completely different.
  • For CPython, because it cannot change/optimize the memory layout.
  • For extension authors: if the "stable" ABI needs to change, because of memory layout change, they need to rebuild wheels
  • For users: they need to download new wheels, if extension authors don't build wheels for the new ABI, they need to do it themselves
@vstinner
Copy link
Contributor

This topic was covered by https://peps.python.org/pep-0620/ but this PEP scope was too broad and so it wasn't possible to implement it in a single Python versions or accept it since it is made of many non-trivial sub-issues.

@gvanrossum
Copy link

See also #45.

@encukou
Copy link
Contributor

encukou commented Oct 23, 2023

Issue for proposed guidelines: capi-workgroup/api-evolution#27

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

No branches or pull requests

5 participants