bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT by vstinner · Pull Request #17231 · 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

Conversation7 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 }})

vstinner

pablogsal

Choose a reason for hiding this comment

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

LGTM I also double-checked that after this PR there are no usages of the macro left.

One question and a minor code suggestion for the NEWS file:

Do you want to left the empty macro in Include/pyfpe.h?

pablogsal

pablogsal

@pablogsal

We don't provide any contract regarding these macros and I don't see a way a user can override them easily so I don't think we should be concerned with that.

@vstinner

Do you want to left the empty macro in Include/pyfpe.h?

If someone wants to remove them, I would suggest to first deprecate them, and wait at least one Python release before removing them. And do that in a separated issue: https://bugs.python.org/issue38835 title is "pyfpe.h: Exclude PyFPE_START_PROTECT and PyFPE_END_PROTECT from the Py_LIMITED_API", it's not directly related :-)

@vstinner

The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d), so stop using them.

@vstinner

I updated the NEWS entry.

I rebased the PR to be able to modify the commit message (copy of the NEWS entry).

@vstinner

We don't provide any contract regarding these macros and I don't see a way a user can override them easily so I don't think we should be concerned with that.

I think the only way to get non-empty macros is to modify pyfpe.h. I doubt anyone does that.

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request

Dec 5, 2019

@vstinner

…nGH-17231)

The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d), so stop using them.

shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request

Jan 31, 2020

@vstinner @shihai1991

…nGH-17231)

The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d), so stop using them.