From 79caac352baf1e2cdfa71aee71364902c0b0f851 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Wed, 2 Jul 2025 12:20:00 +0300 Subject: [PATCH 1/2] [3.13] gh-115119: Defer removal of bundled libmpdec to 3.16 (GH-133997) Rename libmpdecimal -> libmpdec see https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html (cherry picked from commit b19c9da401b9e81078103861f55e0762b93453f0) Co-authored-by: Sergey B Kirpichev --- Doc/deprecations/c-api-pending-removal-in-3.15.rst | 1 - Doc/deprecations/c-api-pending-removal-in-3.16.rst | 4 ++++ Doc/whatsnew/3.12.rst | 2 ++ Doc/whatsnew/3.13.rst | 6 +++++- configure | 8 ++++---- configure.ac | 6 +++--- 6 files changed, 18 insertions(+), 9 deletions(-) create mode 100644 Doc/deprecations/c-api-pending-removal-in-3.16.rst diff --git a/Doc/deprecations/c-api-pending-removal-in-3.15.rst b/Doc/deprecations/c-api-pending-removal-in-3.15.rst index fcb703e66fe9eb..7d46d57dd2f5e6 100644 --- a/Doc/deprecations/c-api-pending-removal-in-3.15.rst +++ b/Doc/deprecations/c-api-pending-removal-in-3.15.rst @@ -1,7 +1,6 @@ Pending Removal in Python 3.15 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -* The bundled copy of ``libmpdecimal``. * The :c:func:`PyImport_ImportModuleNoBlock`: Use :c:func:`PyImport_ImportModule` instead. * :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`: diff --git a/Doc/deprecations/c-api-pending-removal-in-3.16.rst b/Doc/deprecations/c-api-pending-removal-in-3.16.rst new file mode 100644 index 00000000000000..9453f83799c43d --- /dev/null +++ b/Doc/deprecations/c-api-pending-removal-in-3.16.rst @@ -0,0 +1,4 @@ +Pending removal in Python 3.16 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* The bundled copy of ``libmpdec``. diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst index 52b193a0676451..b9ce76c64cb715 100644 --- a/Doc/whatsnew/3.12.rst +++ b/Doc/whatsnew/3.12.rst @@ -2231,6 +2231,8 @@ Deprecated .. include:: ../deprecations/c-api-pending-removal-in-3.15.rst +.. include:: ../deprecations/c-api-pending-removal-in-3.16.rst + .. include:: ../deprecations/c-api-pending-removal-in-future.rst Removed diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 1b969b3fd2ec54..d3a0b6a3138200 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -2554,6 +2554,10 @@ Deprecated C APIs .. include:: ../deprecations/c-api-pending-removal-in-3.15.rst +.. include:: ../deprecations/c-api-pending-removal-in-3.16.rst + +.. include:: ../deprecations/c-api-pending-removal-in-3.18.rst + .. include:: ../deprecations/c-api-pending-removal-in-future.rst .. _pythoncapi-compat project: https://github.com/python/pythoncapi-compat/ @@ -2598,7 +2602,7 @@ Build Changes * The :file:`configure` option :option:`--with-system-libmpdec` now defaults to ``yes``. - The bundled copy of ``libmpdecimal`` will be removed in Python 3.15. + The bundled copy of ``libmpdec`` will be removed in Python 3.16. * Python built with :file:`configure` :option:`--with-trace-refs` (tracing references) is now ABI compatible with the Python release build diff --git a/configure b/configure index a0da75f9bec61b..bd0a5316305388 100755 --- a/configure +++ b/configure @@ -14837,14 +14837,14 @@ LIBS=$save_LIBS else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library." >&5 -printf "%s\n" "$as_me: WARNING: the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; consider using a system installed mpdecimal library." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: the bundled copy of libmpdec is scheduled for removal in Python 3.16; consider using a system installed mpdecimal library." >&5 +printf "%s\n" "$as_me: WARNING: the bundled copy of libmpdec is scheduled for removal in Python 3.16; consider using a system installed mpdecimal library." >&2;} fi if test "$with_system_libmpdec" = "yes" && test "$have_mpdec" = "no" then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)" >&5 -printf "%s\n" "$as_me: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no system libmpdec found; falling back to bundled libmpdec (deprecated and scheduled for removal in Python 3.16)" >&5 +printf "%s\n" "$as_me: WARNING: no system libmpdec found; falling back to bundled libmpdec (deprecated and scheduled for removal in Python 3.16)" >&2;} LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec" LIBMPDEC_LIBS="-lm \$(LIBMPDEC_A)" LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)" diff --git a/configure.ac b/configure.ac index 9c67dab2b46e73..51235fe8d70d65 100644 --- a/configure.ac +++ b/configure.ac @@ -4086,13 +4086,13 @@ AS_VAR_IF([with_system_libmpdec], [yes], [have_mpdec=no]) ])], [AC_MSG_WARN([m4_normalize([ - the bundled copy of libmpdecimal is scheduled for removal in Python 3.15; + the bundled copy of libmpdec is scheduled for removal in Python 3.16; consider using a system installed mpdecimal library.])])]) AS_IF([test "$with_system_libmpdec" = "yes" && test "$have_mpdec" = "no"], [AC_MSG_WARN([m4_normalize([ - no system libmpdecimal found; falling back to bundled libmpdecimal - (deprecated and scheduled for removal in Python 3.15)])]) + no system libmpdec found; falling back to bundled libmpdec + (deprecated and scheduled for removal in Python 3.16)])]) USE_BUNDLED_LIBMPDEC()]) # Disable forced inlining in debug builds, see GH-94847 From 29f14791dcd75d3814b3c42f2c7fc529680f879c Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Wed, 2 Jul 2025 14:05:12 +0300 Subject: [PATCH 2/2] +1 --- Doc/whatsnew/3.13.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index d3a0b6a3138200..c7a31853426b54 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -2556,8 +2556,6 @@ Deprecated C APIs .. include:: ../deprecations/c-api-pending-removal-in-3.16.rst -.. include:: ../deprecations/c-api-pending-removal-in-3.18.rst - .. include:: ../deprecations/c-api-pending-removal-in-future.rst .. _pythoncapi-compat project: https://github.com/python/pythoncapi-compat/