-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In complicated systems, it is often the case that fixing your bug causes a new bug for others. The latest CPython bugfix releases have introduced a breaking change in conversions between large integers and strings. So far, no alternate API has been provided except for changing global settings (which is not appropriate for libraries).
There are at least 3 places in this library affected by this change.
Line 74 in 5791d9c
| self._raw = _RawPolynomial(str(value)) |
python -c 'import donuts; donuts.Polynomial(10**4300)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/donuts/poly.py", line 74, in __init__
self._raw = _RawPolynomial(str(value))
ValueError: Exceeds the limit (4300) for integer string conversion
Line 266 in 5791d9c
| return int(str(self)) |
python -c 'import donuts; (donuts.Polynomial(10)**4300).as_integer'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/donuts/poly.py", line 266, in as_integer
return int(str(self))
ValueError: Exceeds the limit (4300) for integer string conversion: value has 4301 digits
Line 64 in 5791d9c
| self._raw = _RawRationalFunction(str(numerator)) |
python -c 'import donuts; donuts.RationalFunction(10**4300)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/site-packages/donuts/rat.py", line 64, in __init__
self._raw = _RawRationalFunction(str(numerator))
ValueError: Exceeds the limit (4300) for integer string conversion
Metadata
Metadata
Assignees
Labels
No labels