mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Update to sagemath 8.7.
- Drop upstreamed -giac patch. - Add -sagetex patch to fix a python indentation error. - Add -rubiks patch to fix compilation of the rubiks library. - Add -random patch to fix a non-random random bit generator. - Drop pip3 workaround; the binary is now named just pip again.
This commit is contained in:
parent
b6408b9313
commit
05337076b6
21 changed files with 898 additions and 442 deletions
32
sagemath-random.patch
Normal file
32
sagemath-random.patch
Normal file
|
@ -0,0 +1,32 @@
|
|||
diff -up src/sage/misc/binary_tree.pyx.orig src/sage/misc/binary_tree.pyx
|
||||
--- src/sage/misc/binary_tree.pyx.orig 2019-03-23 16:20:41.000000000 -0600
|
||||
+++ src/sage/misc/binary_tree.pyx 2019-04-09 13:55:17.152716497 -0600
|
||||
@@ -13,6 +13,8 @@ from cysignals.memory cimport sig_malloc
|
||||
|
||||
from cpython.ref cimport PyObject, Py_INCREF, Py_XDECREF
|
||||
|
||||
+from sage.misc.prandom import randint
|
||||
+
|
||||
cdef binary_tree_node *BinaryTreeNode(int key, object value):
|
||||
cdef binary_tree_node *t
|
||||
t = <binary_tree_node *>sig_malloc(sizeof(binary_tree_node))
|
||||
@@ -122,10 +124,7 @@ cdef binary_tree_node *binary_tree_right
|
||||
cdef binary_tree_node *binary_tree_head_excise(binary_tree_node *self):
|
||||
cdef binary_tree_node *cur
|
||||
cdef int right
|
||||
- # We have a pointer we're about to free. Chances are, we'll never
|
||||
- # see this pointer again. Thus, its least significant bit is
|
||||
- # "random" enough to resist bias.
|
||||
- right = (<int>self)&1
|
||||
+ right = randint(0, 1)
|
||||
if self.right == NULL:
|
||||
return self.left
|
||||
if self.left == NULL:
|
||||
@@ -502,7 +501,6 @@ class Test:
|
||||
|
||||
sage: sage.misc.binary_tree.Test().random()
|
||||
"""
|
||||
- from sage.misc.prandom import randint
|
||||
t = BinaryTree()
|
||||
for i in xrange(cycles):
|
||||
r = randint(0,8)
|
Loading…
Add table
Add a link
Reference in a new issue