Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Feb 12, 2024

Conversation

belm0
Copy link
Contributor

@belm0 belm0 commented Feb 12, 2024

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>
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

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)
@serhiy-storchaka serhiy-storchaka merged commit 09c98e4 into python:3.12 Feb 12, 2024
26 checks passed
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.11 only security fixes label Feb 12, 2024
@miss-islington-app
Copy link

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

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
Copy link

bedevere-app bot commented Feb 13, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants