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

bpo-30459: Cast the result of PyCell_SET to void #23654

Merged
merged 1 commit into from
Dec 7, 2020
Merged

bpo-30459: Cast the result of PyCell_SET to void #23654

merged 1 commit into from
Dec 7, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Dec 5, 2020

@@ -611,6 +611,10 @@ Porting to Python 3.10
:ref:`Python Path Configuration. <init-path-config>`.
(Contributed by Victor Stinner in :issue:`42260`.)

* Cast the result of :c:func:`PyList_SET_ITEM`, :c:func:`PyTuple_SET_ITEM` and
Copy link
Member

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.

@vstinner
Copy link
Member Author

vstinner commented Dec 7, 2020

@serhiy-storchaka: I rewrote the NEWS entry/What's New entry. Is it better?

@vstinner
Copy link
Member Author

vstinner commented Dec 7, 2020

Thanks for the review @serhiy-storchaka!

@vstinner vstinner deleted the pycell_set branch December 7, 2020 10:56
@serhiy-storchaka
Copy link
Member

Thank you for catching the case of PyCell_SET. I missed it.

And this change was worth to be documented.

@vstinner
Copy link
Member Author

vstinner commented Dec 7, 2020

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 Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants