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

gh-89653: PEP 670: Limited API doesn't cast arguments #92654

Merged
merged 1 commit into from
May 11, 2022
Merged

gh-89653: PEP 670: Limited API doesn't cast arguments #92654

merged 1 commit into from
May 11, 2022

Conversation

vstinner
Copy link
Member

The limited API version 3.12 no longer casts arguments to expected
types of functions of functions:

  • PyList_GET_SIZE(), PyList_SET_ITEM()
  • PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
  • PyWeakref_GET_OBJECT()

@vstinner
Copy link
Member Author

@erlend-aasland: This change missed Python 3.11 feature freeze. Do you consider that it's a bugfix of the PEP 670 implementation and that we should backport the change and target the limited API version 3.11 instead? Or do you prefer to only change the limited API version 3.12?

See also #92653 : but for PyCell, I prefer to only change Python 3.12. It's ok to keep its API as macros in Python 3.11.

The limited API version 3.11 no longer casts arguments to expected
types of functions of functions:

* PyList_GET_SIZE(), PyList_SET_ITEM()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
* PyWeakref_GET_OBJECT()
@vstinner vstinner added the needs backport to 3.11 only security fixes label May 11, 2022
@vstinner
Copy link
Member Author

I changed my mind and decided to target Python 3.11. IMO it's a bugfix of the PEP 670 implementation and so should part of Python 3.11.

@vstinner vstinner merged commit 7d3b469 into python:main May 11, 2022
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@vstinner vstinner deleted the limited_api312_nocast branch May 11, 2022 22:01
@bedevere-bot
Copy link

GH-92693 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 11, 2022
…-92654)

The limited API version 3.11 no longer casts arguments to expected
types of functions of functions:

* PyList_GET_SIZE(), PyList_SET_ITEM()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
* PyWeakref_GET_OBJECT()
(cherry picked from commit 7d3b469)

Co-authored-by: Victor Stinner <vstinner@python.org>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 11, 2022
miss-islington added a commit that referenced this pull request May 11, 2022
The limited API version 3.11 no longer casts arguments to expected
types of functions of functions:

* PyList_GET_SIZE(), PyList_SET_ITEM()
* PyTuple_GET_SIZE(), PyTuple_SET_ITEM()
* PyWeakref_GET_OBJECT()
(cherry picked from commit 7d3b469)

Co-authored-by: Victor Stinner <vstinner@python.org>
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.

3 participants