Skip to content

gh-99485: Remove PyGen_New() function#100075

Closed
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:remove_gen_new
Closed

gh-99485: Remove PyGen_New() function#100075
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:remove_gen_new

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Dec 7, 2022

Remove untested functions which were used to create generators and coroutines:

  • PyAsyncGen_New()
  • PyCoro_New()
  • PyGen_New()
  • PyGen_NewWithQualName()

In Python 3.10, make_coro() of Python/ceval.c creates generators and coroutines from a frame object. In Python 3.11, the function became _Py_MakeCoro() in Python/genobject.c and it takes a function as argument instead of a frame.

Remove untested functions which were used to create generators and
coroutines:

* PyAsyncGen_New()
* PyCoro_New()
* PyGen_New()
* PyGen_NewWithQualName()

In Python 3.10, make_coro() of Python/ceval.c creates generators and
coroutines from a frame object. In Python 3.11, the function became
_Py_MakeCoro() in Python/genobject.c and it takes a function as
argument instead of a frame.
@vstinner vstinner requested a review from markshannon as a code owner December 7, 2022 14:17
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 7, 2022

Deploy Preview for python-cpython-preview ready!

Name Link
🔨 Latest commit f35f2c5
🔍 Latest deploy log https://app.netlify.com/sites/python-cpython-preview/deploys/6390a06a0be2c70009ff3914
😎 Deploy Preview https://deploy-preview-100075--python-cpython-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented Dec 7, 2022

@Yhg1s says that removing 4 functions require to request a SC exception, so I requested such exception: python/steering-council#156

I mark this PR as a draft in the meanwhile, to not merge it by mistake.

@vstinner vstinner closed this Dec 13, 2022
@vstinner vstinner deleted the remove_gen_new branch December 13, 2022 15:23
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.

2 participants