]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-114563: C decimal falls back to pydecimal for unsupported format strings...
authorJohn Belmonte <john@neggie.net>
Mon, 12 Feb 2024 21:31:12 +0000 (06:31 +0900)
committerGitHub <noreply@github.com>
Mon, 12 Feb 2024 21:31:12 +0000 (23:31 +0200)
commit09c98e4633848ce05df8621f41eb09954b55217a
treeb722a0fad3a217ff606b84e736fbecbe33cf22c0
parent2ed47d8f8ba3dd8e2f992a333c4382d26ec2bf20
[3.12] gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879) (GH-115353)

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 '#' format support

Suggested and prototyped by Stefan Krah.

Fixes gh-114563, gh-91060

(cherry picked from commit 72340d15cdfdfa4796fdd7c702094c852c2b32d2)

Co-authored-by: John Belmonte <john@neggie.net>
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