bpo-30459: Cast the result of PyCell_SET to void by vstinner · Pull Request #23654 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation5 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
@@ -611,6 +611,10 @@ Porting to Python 3.10 |
---|
:ref:`Python Path Configuration. `. |
(Contributed by Victor Stinner in :issue:`42260`.) |
* Cast the result of :c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that PyList_SET_ITEM etc are no longer rvalues and have type void. Or something like.
Casting to void is an implementation detail. What is important to the user that they can no longer write x = PyList_SET_ITEM(a, b, c)
or PyList_SET_ITEM(a, b, c) = x
.
Thank you for catching the case of PyCell_SET. I missed it.
And this change was worth to be documented.
And this change was worth to be documented.
My experience with rebuilding Fedora with a newer Python version is that every single minor change breaks at least one Python package, and it's a pain to find which change broke the package, and then find information about the change. IMO it's a good practice to document changes which are backward incompatible on purpose, even if the new behavior was the documented behavior.
adorilson pushed a commit to adorilson/cpython that referenced this pull request