Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jul 22, 2023

Move private _PyGen API to internal C API:

  • _PyAsyncGenAThrow_Type
  • _PyAsyncGenWrappedValue_Type
  • _PyCoroWrapper_Type
  • _PyGen_FetchStopIterationValue()
  • _PyGen_Finalize()
  • _PyGen_SetStopIterationValue()

No longer these symbols, except of the ones by the _asyncio shared extensions.

Move private _PyGen API to internal C API: * _PyAsyncGenAThrow_Type * _PyAsyncGenWrappedValue_Type * _PyCoroWrapper_Type * _PyGen_FetchStopIterationValue() * _PyGen_Finalize() * _PyGen_SetStopIterationValue() No longer these symbols, except of the ones by the _asyncio shared extensions.
@rdb
Copy link

rdb commented Aug 4, 2023

If _PyGen_FetchStopIterationValue is no longer public, what is the supported replacement we should use in our project?

rdb added a commit to panda3d/panda3d that referenced this pull request Aug 5, 2023
@vstinner
Copy link
Member Author

@rdb:

If _PyGen_FetchStopIterationValue is no longer public, what is the supported replacement we should use in our project?

Would you mind to open a new issue to request a public replacement function? Please explain how you use this function, and how existing API is not enough.

@rdb
Copy link

rdb commented Aug 26, 2023

@vstinner We've switched to using PyErr_GetRaisedException() and extracting the value from there (see this commit), so as long as the structure of PyStopIterationObject remains part of the public ABI, I think we're good.

@vstinner
Copy link
Member Author

When can add a public function. Just open an issue to ask for it, so we can discuss the issue and decide if it's worth it

@rdb
Copy link

rdb commented Aug 26, 2023

It's not necessary, unless you're telling me that PyStopIterationObject is going to become opaque in the future.

lachbr pushed a commit to toontownretro/panda that referenced this pull request Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants