]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-114563: C decimal falls back to pydecimal for unsupported format strings...
authorJohn Belmonte <john@neggie.net>
Tue, 13 Feb 2024 08:38:06 +0000 (17:38 +0900)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2024 08:38:06 +0000 (10:38 +0200)
commitb86fdf2222a4701bb25c0799a68876d17b1782d0
tree94c92a401f474bc37fbeffb923b87811b2748f7b
parentd87a02223c8528891a9da6a69aefdc22b149ae21
[3.11] gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879) (GH-115384)

Immediate merits:
* eliminate complex workarounds for 'z' format support
  (NOTE: mpdecimal recently added 'z' support, so this becomes
  efficient in the long term.)
* fix 'z' format memory leak
* fix 'z' format applied to 'F'
* fix missing 'GH-' format support

Suggested and prototyped by Stefan Krah.

Fixes gh-114563, gh-91060

(cherry picked from commit 72340d15cdfdfa4796fdd7c702094c852c2b32d2)
(cherry picked from commit 09c98e4633848ce05df8621f41eb09954b55217a)

Co-authored-by: Stefan Krah <skrah@bytereef.org>
Lib/test/test_decimal.py
Misc/NEWS.d/next/Library/2024-02-11-20-23-36.gh-issue-114563.RzxNYT.rst [new file with mode: 0644]
Modules/_decimal/_decimal.c
Tools/c-analyzer/cpython/globals-to-fix.tsv