-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-125234: Make PyInitConfig_Free(NULL) a no-op #125266
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
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This implementation looks fine, but the point of the original issue was to simplify things. Should that be done with this PR as well? (My approval was for the implementation, but Serhiy probably wants to deal with the use of it internally.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a public C API change, it should be documented. Add a versionchanged
directive and the What's New entry.
I am going also to get an approve of the C API Workgroup.
This is already in "What's New" under PEP 741, I think. |
Ah, it is new in 3.14. Then nothing of this is needed. |
Yeah. In fact, do we even need a NEWS entry for changes to unreleased features? |
A NEWS entry is not needed. |
Maybe I can remove it. |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Maybe, I have made the corresponding changes (I hope). |
This comment was marked as off-topic.
This comment was marked as off-topic.
You didn't trigger the bot. I think saying |
Oh, This is really interesting! Hope this works🙂 |
(You have to say it, the bot ignores comments from people other than the author.) |
I didn't expect the Spanish Inquisition |
Nobody expects the Spanish Inquisition! @erlend-aasland, @kumaraditya303: please review the changes made to this pull request. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@rruuaanng: every time you make a comment on an issue or a PR, all subscribed parties receives a notification, or even an email. Please be respectful of others time and don't use GitHub as a forum. We have Discourse for that functionality. |
NULL
check in PyInitConfig_Free()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update the docs. Look to PyMem_Free
and PyMem_RawFree
for inspiration.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Yeah, I was a little guilty of this too in this case, sorry :( In general, what's the procedure for walking someone through the PR process if they're having difficulties? |
No worries, you're both fine. If I notice such a pattern on a PR, I explicitly make a remark and remind the participants of this effect. Using reactions, like thumbs-up, is often sufficient. Also, thinking twice about how often we demand the attention of others may be helpful. |
Modified
PyInitConfig_Free
, to release the memory occupied when the config argument isn't NULL.(I hope my understanding is correct).