]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-118164: str(10**10000) hangs if the C _decimal module is missing (GH-118503...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 5 May 2024 06:34:43 +0000 (08:34 +0200)
committerGitHub <noreply@github.com>
Sun, 5 May 2024 06:34:43 +0000 (09:34 +0300)
commit0c605244a8f91b96b87eb5000bfe9e64428b8084
tree492e6f9fd3cd903e1752d4d5f57da3e7388e890d
parent53e8bdd1e6434a06ac67ae0dd250d1abf7d2dc4c
[3.12] gh-118164: str(10**10000) hangs if the C _decimal module is missing (GH-118503) (GH-118584)

Serhiy and I independently concluded that exact powers of 10
aren't possible in these contexts, so just checking the
string length is sufficient.

(cherry picked from commit 999f0c512281995fb61a0d9eda075fd846e8c505)

Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/_pydecimal.py
Lib/test/test_decimal.py
Misc/NEWS.d/next/Library/2024-05-04-20-22-59.gh-issue-118164.9D02MQ.rst [new file with mode: 0644]