This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2022-03-03.22:39:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646347183.1.0.816750157745.issue46917@roundup.psfhosted.org>
In-reply-to
Content
See "[Python-Dev] Should we require IEEE 754 floating-point for CPython?" thread:
https://mail.python.org/archives/list/python-dev@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/

I propose to require IEEE 754 floating-point to build Python 3.11. I propose the following build:

* Mention the new build requirement in What's New in Python 3.11.
* Modify configure script to make it fail if the IEEE 754 support is missing.
* Remove code handling missing NAN and infinity: float("nan"), float("inf"), math.nan and math.inf are always available.
* Remove @requires_IEEE_754 decorator of test.support and tests.
* Remove "unknown_format" code path of pack/unpack functions like _PyFloat_Pack8() (see bpo-46906 which proposes to make these functions public).


The _PY_SHORT_FLOAT_REPR==0 code path is kept. For now, platforms with float larger than 64-bit but without HAVE_PY_SET_53BIT_PRECISION are still supported (but don't get "short float repr"). See GH-31592 for details.


I prepared this requirement with these two changes:

commit 1b2611eb0283055835e5df632a7a735db8c894b8
Author: Victor Stinner <vstinner@python.org>
Date:   Fri Feb 25 01:32:57 2022 +0100

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

commit 5ab745fc51e159ead28b523414e52f0bcc1ef353
Author: Victor Stinner <vstinner@python.org>
Date:   Sat Feb 26 00:53:27 2022 +0100

    bpo-46852: Remove the float.__set_format__() method (GH-31585)
    
    Remove the undocumented private float.__set_format__() method,
    previously known as float.__set_format__() in Python 3.7. Its
    docstring said: "You probably don't want to use this function. It
    exists mainly to be used in Python's test suite."


By the way, building Python 3.11 now requires a C11 compiler.
History
Date User Action Args
2022-03-03 22:39:43vstinnersetrecipients: + vstinner
2022-03-03 22:39:43vstinnersetmessageid: <1646347183.1.0.816750157745.issue46917@roundup.psfhosted.org>
2022-03-03 22:39:43vstinnerlinkissue46917 messages
2022-03-03 22:39:42vstinnercreate