Closed as not planned
Description
Bug report
Since the fix for #95778 was merged, conversions from large ints to Decimal instances fail, but only for the Python version of the decimal module. The C version is unaffected.
Here's the _pydecimal behaviour: conversion large-int -> Decimal raises; conversion from Decimal back to int does not:
mdickinson@lovelace cpython % ./python.exe
Python 3.12.0a0 (heads/main:a9d58feccf, Sep 5 2022, 17:17:03) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from _pydecimal import Decimal
>>> d = Decimal(10**10000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mdickinson/Repositories/python/cpython/Lib/_pydecimal.py", line 602, in __new__
self._int = str(abs(value))
^^^^^^^^^^^^^^^
ValueError: Exceeds the limit (4300) for integer string conversion
>>> n = int(Decimal(10)**10000) # works as expectedGiven that almost no CPython users should be using _pydecimal, this probably doesn't matter much, but it seemed worth recording.