Skip to content

Commit 7fc5a44

Browse files
committed
Undo Python's limit on string to int and int to string conversions
1 parent 5fb2a6e commit 7fc5a44

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sage/all.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,12 @@ def quit_sage(verbose=True):
285285
sage.misc.lazy_import.finish_startup()
286286

287287

288+
### Python broke large ints; see trac #34506
289+
290+
if hasattr(sys, "set_int_max_str_digits"):
291+
sys.set_int_max_str_digits(0)
292+
293+
288294
def sage_globals():
289295
r"""
290296
Return the Sage namespace.

0 commit comments

Comments
 (0)