-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathfix-cypari2-warning.patch
More file actions
30 lines (29 loc) · 1.49 KB
/
fix-cypari2-warning.patch
File metadata and controls
30 lines (29 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/src/sage/rings/factorint_pari.pyx b/src/sage/rings/factorint_pari.pyx
index 1774cbf0886..be0a500c2b6 100644
--- a/src/sage/rings/factorint_pari.pyx
+++ b/src/sage/rings/factorint_pari.pyx
@@ -53,8 +53,6 @@ def factor_using_pari(n, int_=False, debug_level=0, proof=None):
sage: from sage.doctest.util import ensure_interruptible_after
sage: with ensure_interruptible_after(0.5): factor(2^1000 - 1, verbose=5)
...
- doctest:warning...
- RuntimeWarning: cypari2 leaked ... bytes on the PARI stack
sage: pari.get_debug_level()
0
"""
diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx
index 358aac0339c..dc4dcc4866e 100644
--- a/src/sage/rings/integer.pyx
+++ b/src/sage/rings/integer.pyx
@@ -7305,10 +7305,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
check for reliable interrupting, see :issue:`18919`::
sage: from cysignals import AlarmInterrupt
+ sage: from warnings import filterwarnings
+ sage: filterwarnings("ignore", r"cypari2 leaked \d+ bytes on the PARI stack")
sage: for i in [1..10]: # long time (5s) # needs sage.libs.pari
....: with ensure_interruptible_after(i/11):
....: (2^100).binomial(2^22, algorithm='pari')
- doctest:...: RuntimeWarning: cypari2 leaked ... bytes on the PARI stack...
"""
cdef Integer x
cdef Integer mm