[New-bugs-announce] [issue46917] Require IEEE 754 floating point to build Python 3.11

STINNER Victor report at bugs.python.org
Thu Mar 3 17:39:43 EST 2022


New submission from STINNER Victor <vstinner at python.org>:

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 at 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 at 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.

----------
components: Build
messages: 414485
nosy: vstinner
priority: normal
severity: normal
status: open
title: Require IEEE 754 floating point to build Python 3.11
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46917>
_______________________________________


More information about the New-bugs-announce mailing list