https://github.com/python/cpython/commit/9324f84b0f5722d165456b5858a683a2c82eefd2
commit: 9324f84b0f5722d165456b5858a683a2c82eefd2
branch: main
author: Petr Viktorin <[email protected]>
committer: encukou <[email protected]>
date: 2026-07-10T10:35:35+02:00
summary:
gh-145633: Allow PyFloat_Pack8 & PyFloat_UnPack* to fail in future CPython
versions (GH-153440)
files:
A Misc/NEWS.d/next/C_API/2026-07-09-16-46-30.gh-issue-145633.jyNwAs.rst
M Doc/c-api/float.rst
diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst
index a12ad11abb107d0..c484b3e5bdb5132 100644
--- a/Doc/c-api/float.rst
+++ b/Doc/c-api/float.rst
@@ -233,9 +233,6 @@ most likely :exc:`OverflowError`).
Pack a C double as the IEEE 754 binary64 double precision format.
- .. impl-detail::
- This function always succeeds in CPython.
-
Unpack functions
^^^^^^^^^^^^^^^^
@@ -251,9 +248,6 @@ Return value: The unpacked double. On error, this is
``-1.0`` and
:c:func:`PyErr_Occurred` is true (and an exception is set, most likely
:exc:`OverflowError`).
-.. impl-detail::
- These functions always succeed in CPython.
-
.. c:function:: double PyFloat_Unpack2(const char *p, int le)
Unpack the IEEE 754 binary16 half-precision format as a C double.
diff --git
a/Misc/NEWS.d/next/C_API/2026-07-09-16-46-30.gh-issue-145633.jyNwAs.rst
b/Misc/NEWS.d/next/C_API/2026-07-09-16-46-30.gh-issue-145633.jyNwAs.rst
new file mode 100644
index 000000000000000..cdb68372b6ba7d9
--- /dev/null
+++ b/Misc/NEWS.d/next/C_API/2026-07-09-16-46-30.gh-issue-145633.jyNwAs.rst
@@ -0,0 +1,2 @@
+:c:func:`PyFloat_Pack8` and ``PyFloat_Unpack*`` functions are no longer
+guaranteed to always succeed on CPython.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]