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

Add Documentation for C-API Used by the _xxsubinterpreters Module #107784

Open
ericsnowcurrently opened this issue Aug 8, 2023 · 4 comments
Open
Assignees
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir topic-C-API topic-subinterpreters

Comments

@ericsnowcurrently
Copy link
Member

ericsnowcurrently commented Aug 8, 2023

(from #101524 (comment))

C-API exposed by gh-107359:

  • PyInterpreterID_Type
  • PyInterpreterID_New()
  • PyInterpreterID_LookUp()
  • PyInterpreterState_GetIDObject()
  • PyInterpreterState_RequireIDRef()
  • atexit_datacallbackfunc
  • PyUnstable_AtExit()
  • PyUnstable_InterpreterState_GetMainModule()

Add tests too.

Linked PRs

@ericsnowcurrently ericsnowcurrently added docs Documentation in the Doc dir topic-subinterpreters topic-C-API 3.12 bugs and security fixes 3.13 bugs and security fixes labels Aug 8, 2023
@ericsnowcurrently ericsnowcurrently self-assigned this Aug 8, 2023
@ericsnowcurrently
Copy link
Member Author

Also the _PyCrossInterpreterData API, though I expect PEP 554 will be addressing this for 3.13+.

(see #107068 (comment))

@tonybaloney
Copy link
Contributor

@ericsnowcurrently you can assign this to me if you want, I've spent enough time looking at this code to document it and add tests.

@tonybaloney
Copy link
Contributor

I've got the following two functions as well :

PyAPI_FUNC(int) _PyInterpreterState_RequiresIDRef(PyInterpreterState *);
PyAPI_FUNC(void) _PyInterpreterState_RequireIDRef(PyInterpreterState *, int);

You mentioned PyInterpreterState_RequireIDRef() but there isn't a public API function called that from what I can find (only the private one)

@tonybaloney
Copy link
Contributor

I think Py_NewInterpreterFromConfig is new as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes docs Documentation in the Doc dir topic-C-API topic-subinterpreters
Projects
Status: Todo
Development

No branches or pull requests

2 participants