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.6] bpo-35560: Remove assertion from format(float, "n") (GH-11288) #23231

Merged
merged 1 commit into from Nov 10, 2020

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 10, 2020

Fix an assertion error in format() in debug build for floating point
formatting with "n" format, zero padding and small width. Release build is
not impacted. Patch by Karthikeyan Singaravelan.
(cherry picked from commit 3f7983a)

Co-authored-by: Xtreak tir.karthi@gmail.com

https://bugs.python.org/issue35560

Fix an assertion error in format() in debug build for floating point
formatting with "n" format, zero padding and small width. Release build is
not impacted. Patch by Karthikeyan Singaravelan.
(cherry picked from commit 3f7983a)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Nov 10, 2020

@tirkarthi and @vstinner: Status check is done, and it's a success .

@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Nov 10, 2020

@tirkarthi and @vstinner: Status check is done, and it's a success .

1 similar comment
@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Nov 10, 2020

@tirkarthi and @vstinner: Status check is done, and it's a success .

@gpshead
Copy link
Member

@gpshead gpshead commented Nov 10, 2020

This fix of a bug introduced in 3.6 by fc4a44b#diff-34c966e7876d6f8bf801dd51896327e4f68bba02cddb95fbf3963f0b2e39c38a who's fix was never backported to 3.6.

Something as simple as '{:03.2f}'.format(-1) will crash an interpreter compiled with assertions enabled.

We run interpreters with assertions enabled during normal development. This causes perfectly valid Python code to crash the interpreter.

Whether this is merged into 3.6 or not isn't up to me, but it does fix a assertion-enabled build bug that was introduced in 3.6.8.

I'm creating the PR for reference and patching our own tree as appropriate.

@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Nov 10, 2020

@tirkarthi and @vstinner: Status check is done, and it's a success .

@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Nov 10, 2020

Sorry, I can't merge this PR. Reason: You're not authorized to push to this branch. Visit https://docs.github.com/articles/about-protected-branches/ for more information..

@ned-deily ned-deily merged commit dae5d72 into python:3.6 Nov 10, 2020
5 checks passed
@miss-islington miss-islington deleted the backport-3f7983a-3.6 branch Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed type-bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants