]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879)
authorJohn Belmonte <john@neggie.net>
Mon, 12 Feb 2024 11:17:51 +0000 (20:17 +0900)
committerGitHub <noreply@github.com>
Mon, 12 Feb 2024 11:17:51 +0000 (13:17 +0200)
commit72340d15cdfdfa4796fdd7c702094c852c2b32d2
treee5236dae006b23712ec07ac39a416d08371dc8b8
parent235cacff81931a68e8c400bb3919ae6e55462fb5
gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879)

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

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