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-02-25.00:07:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645747677.37.0.919337626983.issue46852@roundup.psfhosted.org>
In-reply-to
Content
It has been decided to require IEEE 754 to build Python 3.11:
https://mail.python.org/archives/list/python-dev@python.org/thread/J5FSP6J4EITPY5C2UJI7HSL2GQCTCUWN/

At Python startup, _PyFloat_InitState() checks the IEEE 754 format at runtime. It can be changed using float.__get_format__() and  float.__set_format__() methods.

These methods docstrings say that they only exist to test Python itself:

"You probably don't want to use this function. It exists mainly to be used in Python's test suite."

These methods are private and not documented.

I propose to remove them.

Once they will be removed, it will become possible to move the detection of the IEEE 754 format in the build step (./configure script) rather than doing the detection at runtime (slower). It would remove an "if" in _PyFloat_Pack4() and _PyFloat_Pack8(), and allow to specialize these functions for the detected format at build time. These functions are used by serialization formats: marshal, pickle and struct.
History
Date User Action Args
2022-02-25 00:07:57vstinnersetrecipients: + vstinner
2022-02-25 00:07:57vstinnersetmessageid: <1645747677.37.0.919337626983.issue46852@roundup.psfhosted.org>
2022-02-25 00:07:57vstinnerlinkissue46852 messages
2022-02-25 00:07:57vstinnercreate