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-46656: Remove Py_NO_NAN macro #31160

Merged
merged 1 commit into from
Feb 25, 2022
Merged

bpo-46656: Remove Py_NO_NAN macro #31160

merged 1 commit into from
Feb 25, 2022

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Feb 6, 2022

Building Python now requires support for floating point Not-a-Number
(NaN): remove the Py_NO_NAN macro.

https://bugs.python.org/issue46656

@vstinner
Copy link
Member Author

vstinner commented Feb 6, 2022

Windows (x86) (pull_request) Failing after 14m — Windows (x86)

That's the urllib failure. I rebased my PR on the main branch to get the urllib test fix.

@mdickinson
Copy link
Member

@vstinner This is a big change: historically, CPython has been relunctant to commit to requiring IEEE 754 floating-point. While requiring NaNs isn't exactly the same as requiring IEEE 754 floating-point, it's pretty close. I think this change should be discussed more widely before any change is made to the source.

@vstinner vstinner marked this pull request as draft February 6, 2022 21:51
@vstinner
Copy link
Member Author

vstinner commented Feb 6, 2022

@vstinner This is a big change: historically, CPython has been relunctant to commit to requiring IEEE 754 floating-point. While requiring NaNs isn't exactly the same as requiring IEEE 754 floating-point, it's pretty close. I think this change should be discussed more widely before any change is made to the source.

Ok. I convert my PR to a draft to not merge it by mistake :-D

@vstinner
Copy link
Member Author

vstinner commented Feb 8, 2022

Requiring IEEE 754 support is being discussed on python-dev: https://mail.python.org/archives/list/python-dev@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/

@vstinner
Copy link
Member Author

Following the python-dev discussion, I proposed a PR for PEP 7 to support C99 in the Python C API (and use a subset of C11 in Python internals): python/peps#2309

Building Python now requires support for floating point Not-a-Number
(NaN): remove the Py_NO_NAN macro.
@vstinner vstinner marked this pull request as ready for review February 24, 2022 23:48
@vstinner
Copy link
Member Author

Requiring IEEE 754 support is being discussed on python-dev: https://mail.python.org/archives/list/python-dev@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/

The consensus is to require NAN and IEEE 754 to build Python 3.11. Moreover, Python 3.11 now requires a C11 compiler: #31557

@vstinner vstinner merged commit 1b2611e into python:main Feb 25, 2022
@vstinner vstinner deleted the remove_py_no_nan branch February 25, 2022 00:33
asvetlov pushed a commit that referenced this pull request Feb 26, 2022
Building Python now requires support for floating point Not-a-Number
(NaN): remove the Py_NO_NAN macro.
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