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-37493: use _PyObject_CallNoArg in more places #14575

Merged
merged 1 commit into from
Jul 4, 2019

Conversation

jdemeyer
Copy link
Contributor

@jdemeyer jdemeyer commented Jul 3, 2019

skrah
skrah previously requested changes Jul 3, 2019
Copy link
Contributor

@skrah skrah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit surprised --- we discussed on bpo to use fewer places, but you add more.

So please take out the decimal changes. I'll add new functions as I see fit.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be poked with soft cushions!

@jdemeyer
Copy link
Contributor Author

jdemeyer commented Jul 3, 2019

we discussed on bpo to use fewer places, but you add more.

I'm not sure what you mean. The only thing that we discussed (on bpo-37483 which relates to a different PR) is that maybe we should not use private functions in _decimal.c. However, in this case I'm using a documented public function, belonging to the limited API PyObject_CallNoArgs.

So please let me know whether the changes to _decimal.c should be reverted anyway.

@skrah
Copy link
Contributor

skrah commented Jul 3, 2019

The PR title mentions _PyObject_CallNoArg(). I see now that there are other functions in the _decimal.c diff, but again not in speed sensitive locations.

So perhaps there are too many new functions. I'll decide later if to use any of these, so yes, please take them out.

@jdemeyer
Copy link
Contributor Author

jdemeyer commented Jul 3, 2019

not in speed sensitive locations.

Even if it's not speed sensitive, I see no reason to prefer PyObject_CallObject(func, NULL) over PyObject_CallNoArgs(func).

@jdemeyer
Copy link
Contributor Author

jdemeyer commented Jul 4, 2019

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@skrah: please review the changes made to this pull request.

@skrah skrah self-requested a review July 4, 2019 09:52
Copy link
Contributor

@skrah skrah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes.

@skrah skrah dismissed their stale review July 4, 2019 09:56

Changes have been made.

@methane methane merged commit 7f41c8e into python:master Jul 4, 2019
@jdemeyer jdemeyer deleted the call_no_args branch July 4, 2019 10:46
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
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.

5 participants