[3.6] bpo-35560: Remove assertion from format(float, "n") (GH-11288) by miss-islington · Pull Request #23231 · python/cpython (original) (raw)
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.