From 88c4891afa4d73e329d3636b0d07f2df4c103e15 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 24 Oct 2025 01:10:29 +0300 Subject: [PATCH 1/7] Mark PEP 791 as Accepted --- peps/pep-0791.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index 573619bfb56..48d3c54114f 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -3,13 +3,14 @@ Title: math.integer --- submodule for integer-specific mathematics functions Author: Sergey B Kirpichev Sponsor: Victor Stinner Discussions-To: https://discuss.python.org/t/92548 -Status: Draft +Status: Accepted Type: Standards Track Created: 12-May-2025 Python-Version: 3.15 Post-History: `12-Jul-2018 `__, `09-May-2025 `__, `19-May-2025 `__, +Resolution: `23-Oct-2025 `__ Abstract From 9113788ade25e3066b80d7509235bef8d5d42676 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 24 Oct 2025 01:32:46 +0300 Subject: [PATCH 2/7] Fix imath reference in the isqrt() renaming section --- peps/pep-0791.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index 48d3c54114f..747a029616a 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -202,10 +202,11 @@ isqrt() renaming --------------------------------------------- There was a brief discussion about exposing :external+py3.14:func:`math.isqrt` -as ``imath.sqrt`` in the same way that :external+py3.14:func:`cmath.sqrt` is -the complex version of :external+py3.14:func:`math.sqrt`. However, ``isqrt`` -is ultimately a different function: it is the floor of the square root. It -would be confusing to give it the same name (under a different module). +as ``sqrt`` in the new namespace in the same way that +:external+py3.14:func:`cmath.sqrt` is the complex version of +:external+py3.14:func:`math.sqrt`. However, ``isqrt`` is ultimately a +different function: it is the floor of the square root. It would be confusing +to give it the same name (under a different submodule). Module name From 90fcb51c55b538138a5fb280c319d38e94a6e1c0 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 24 Oct 2025 01:33:29 +0300 Subject: [PATCH 3/7] Edit module name section --- peps/pep-0791.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index 747a029616a..02e70b0ca90 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -220,7 +220,7 @@ Other proposed names include ``ntheory`` (like SymPy's submodule), But the SC prefers a submodule rather than a new top-level module. Most popular variants of the :external+py3.14:mod:`math`'s submodule are: -``integer``, ``discrete`` or ``ntheory`` (author preference). +``integer``, ``discrete`` or ``ntheory``. Acknowledgements From 2a91c08febc3675f9fb6b880ec0bf78791798c3e Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 24 Oct 2025 01:43:08 +0300 Subject: [PATCH 4/7] Reorganize Acknowledgements a bit --- peps/pep-0791.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index 02e70b0ca90..ccd32441ceb 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -1,6 +1,9 @@ PEP: 791 Title: math.integer --- submodule for integer-specific mathematics functions -Author: Sergey B Kirpichev +Author: Neil Girdhar , + Sergey B Kirpichev , + Tim Peters , + Serhiy Storchaka Sponsor: Victor Stinner Discussions-To: https://discuss.python.org/t/92548 Status: Accepted @@ -226,9 +229,8 @@ popular variants of the :external+py3.14:mod:`math`'s submodule are: Acknowledgements ================ -Thanks to Tim Peters for reviving the idea of splitting the -:external+py3.14:mod:`math` module. Thanks to Neil Girdhar for substantial -improvements of the initial draft. +Thanks to everyone who participated in the discussions on discuss.python.org, +providing feedback, especially to Oscar Benjamin, Steve Dower and Paul Moore. Copyright From 5c96434cdaaa5c99ad802f4dd22156d1398dead0 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sat, 25 Oct 2025 08:20:39 +0300 Subject: [PATCH 5/7] +1 --- peps/pep-0791.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index ccd32441ceb..98f20940634 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -229,6 +229,7 @@ popular variants of the :external+py3.14:mod:`math`'s submodule are: Acknowledgements ================ +Thanks to Victor Stinner for sponsoring this PEP. Thanks to everyone who participated in the discussions on discuss.python.org, providing feedback, especially to Oscar Benjamin, Steve Dower and Paul Moore. From 57e7206463abd5074e7e25e5031aaafef9e2e2f3 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sun, 26 Oct 2025 01:44:59 +0300 Subject: [PATCH 6/7] Clarify note on intmath's PyPI package --- peps/pep-0791.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index 98f20940634..666f639b1c0 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -150,8 +150,8 @@ Module functions will accept integers and objects that implement the object to an integer number. Suitable functions must be computed exactly, given sufficient time and memory. -The :pypi:`intmath` package will provide new submodule content for older Python -versions. +The :pypi:`intmath` package, available on PyPI, will provide new submodule +content for older Python versions. Possible Extensions From 1a2a625781528ba35dac528e03ad3da2ab78116c Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Fri, 31 Oct 2025 10:12:48 +0300 Subject: [PATCH 7/7] address review: "for an indefinite time" -> "indefinitely" --- peps/pep-0791.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0791.rst b/peps/pep-0791.rst index 666f639b1c0..f172f404e59 100644 --- a/peps/pep-0791.rst +++ b/peps/pep-0791.rst @@ -173,8 +173,8 @@ compatible interface for the stdlib. Backwards Compatibility ======================= -As aliases in :external+py3.14:mod:`math` will be kept for an indefinite time -(their use would be discouraged), there are no anticipated code breaks. +As aliases in :external+py3.14:mod:`math` will be kept indefinitely (their use +would be discouraged), there are no anticipated code breaks. How to Teach This