Skip to content

[3.12] gh-114563: C decimal falls back to pydecimal for unsupported format strings (GH-114879) - #115353

Merged
serhiy-storchaka merged 3 commits into
python:3.12from
belm0:backport-72340d1-3.12
Feb 12, 2024
Merged

serhiy-storchaka merged 3 commits into
python:3.12from
belm0:backport-72340d1-3.12

Conversation

@belm0

@belm0 belm0 commented Feb 12, 2024 •

Copy link
Copy Markdown
Contributor

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 72340d1)

…rted format strings (pythonGH-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 'GH-' format support

Suggested and prototyped by Stefan Krah.

Fixes pythongh-114563, pythongh-91060

(cherry picked from commit 72340d1)

Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: Stefan Krah <skrah@bytereef.org>

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

(it's in the backport only, main branch doesn't use a global)
@belm0
belm0 force-pushed the backport-72340d1-3.12 branch from 0b72825 to 95ef956 Compare February 12, 2024 19:04
@serhiy-storchaka
serhiy-storchaka merged commit 09c98e4 into python:3.12 Feb 12, 2024
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.11 only security fixes label Feb 12, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @belm0 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @belm0 and @serhiy-storchaka, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 09c98e4633848ce05df8621f41eb09954b55217a 3.11
@belm0
belm0 deleted the backport-72340d1-3.12 branch February 13, 2024 01:06
belm0 added a commit to belm0/cpython that referenced this pull request Feb 13, 2024
…unsupported format strings (pythonGH-114879) (pythonGH-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 'GH-' format support

Suggested and prototyped by Stefan Krah.

Fixes pythongh-114563, pythongh-91060

(cherry picked from commit 72340d1)

(cherry picked from commit 09c98e4)

Co-authored-by: John Belmonte <john@neggie.net>
Co-authored-by: Stefan Krah <skrah@bytereef.org>
@bedevere-app

bedevere-app Bot commented Feb 13, 2024

Copy link
Copy Markdown

GH-115384 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Feb 13, 2024
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants