• [Python-announce] mpdecimal-4.0.0 released

    From Stefan Krah@stefan@bytereef.org to comp.lang.python.announce on Thu Jan 25 18:00:45 2024
    From Newsgroup: comp.lang.python.announce


    Hi,

    mpdecimal-4.0.0 has been released:

    https://www.bytereef.org/mpdecimal/changelog.html https://www.bytereef.org/mpdecimal/download.html


    The release has been tested on a compile farm for five months on the
    following platforms:

    x86_64, i386, aarch64, ppc64, ppc64le, chrp, sparc64, sparc32,
    mips64, mips32, risc-v, Wasm

    Tested compilers:

    gcc, clang, icc, icx, xlc, ibm-clang, cl.exe, clang-cl, mingw-gcc,
    CompCert, emscripten


    Distributors of CPython are strongly encouraged to build CPython --with-system-libmpdec (as most of them already do).


    Additionally, distributors of Python-11 and Python-12 are advised to revert
    the implementation of the z-format specifier in _decimal.c. It contains a memory leak for large decimals and does not support the "EG" types.

    mpdecimal-4.0.0 automatically supports the z-format specifier without patches to _decimal.c.

    The following patch cleanly reverts b0b836b20cb56c225874a4a39ef895f89ab2970f and applies to both Python-11 and Python-12:

    https://www.bytereef.org/contrib/0001-py12-revert-z-format-specifier.patch



    For the main branch, the following patches are advised:

    # As above:
    https://www.bytereef.org/contrib/0001-main-revert-z-format-specifier.patch

    # Implement a catch-all fallback for _all_ future format specifiers that
    # are _temporarily_ unsupported in mpdecimal. The fallback is clean and
    # is zero-cost for the general common case:
    https://www.bytereef.org/contrib/0002-main-fallback-to-pydecimal-format.patch

    # Fix a deprecation warning that is incorrectly triggered for a fill
    # character that contains 'N':
    https://www.bytereef.org/contrib/0003-main-fix-deprecation-warning.patch


    All patches are "BSD-2-clause, Copyright (c) Stefan Krah", same as mpdecimal and Modules/_decimal/*.


    Finally, due to the nature of multiphase initialization, its current implementation in the main branch slows down the pi benchmark compared
    to 3.9 by:

    --enable-gil: 31%

    --disable-gil: 47%



    Stefan Krah


    --- Synchronet 3.20a-Linux NewsLink 1.114