Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
20774: Merge with 7.3 beta4.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsjorgenson committed Jun 13, 2016
2 parents e6f1a93 + 0c1f89f commit 1f0d7ab
Show file tree
Hide file tree
Showing 141 changed files with 2,361 additions and 907 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 7.3.beta3, Release Date: 2016-06-05
SageMath version 7.3.beta4, Release Date: 2016-06-12
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=87b2826081f2dbd43560c478f017c9eb46314ae1
md5=748641c8f4698a3d980805c5ef3664fc
cksum=1934851303
sha1=81654f7fa4e739cfc152390e84f49b6c06a13208
md5=a2f51bacac19ffe7a36dc64e68087674
cksum=3868511547
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
168
169
2 changes: 1 addition & 1 deletion build/pkgs/pari/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8-2341-g61b65cc.p0
2.8-2341-g61b65cc.p1
2 changes: 2 additions & 0 deletions build/pkgs/pari/patches/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ Patches to configuration files:
the flag unconditionally.

C files:
* do_QXQ_eval.patch (Peter Bruin, #20749): avoid unnecessary
computations in do_QXQ_eval, relevant for nf_nfzk (PARI bug 1822).
* stackwarn.patch (Jeroen Demeyer, #19883): do not display warnings
regarding the stack size (unless DEBUGMEM is set).
20 changes: 20 additions & 0 deletions build/pkgs/pari/patches/do_QXQ_eval.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/src/basemath/RgX.c
+++ b/src/basemath/RgX.c
@@ -2307,9 +2307,15 @@
static GEN
do_QXQ_eval(GEN v, long imin, GEN a, GEN T)
{
- long l, i, m = degpol(T);
- GEN dz, z = Q_remove_denom(QXQ_powers(a, m-1, T), &dz);
+ long l, i, m = 0;
+ GEN dz, z;
GEN V = cgetg_copy(v, &l);
+ for (i = imin; i < l; i++)
+ {
+ GEN c = gel(v, i);
+ if (typ(c) == t_POL) m = maxss(m, degpol(c));
+ }
+ z = Q_remove_denom(QXQ_powers(a, m, T), &dz);
for (i = 1; i < imin; i++) V[i] = v[i];
for (i = imin; i < l; i++)
{
2 changes: 1 addition & 1 deletion build/pkgs/sphinx/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.1.p0
1.4.1.p1
15 changes: 15 additions & 0 deletions build/pkgs/sphinx/patches/remove_memory_addresses.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
See https://github.com/sphinx-doc/sphinx/pull/2534

diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 5dc2008..dbd578e 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -20,7 +20,7 @@ from sphinx.util import force_decode
# relatively import this module
inspect = __import__('inspect')

-memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>$)')
+memory_address_re = re.compile(r' at 0x[0-9a-f]{8,16}(?=>)')


if PY3:
2 changes: 1 addition & 1 deletion src/bin/sage-banner
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 7.3.beta3, Release Date: 2016-06-05
│ SageMath version 7.3.beta4, Release Date: 2016-06-12
│ Type "notebook()" for the browser-based notebook interface. │
│ Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
Expand Down
4 changes: 2 additions & 2 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sage version information for shell scripts
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='7.3.beta3'
SAGE_RELEASE_DATE='2016-06-05'
SAGE_VERSION='7.3.beta4'
SAGE_RELEASE_DATE='2016-06-12'
4 changes: 3 additions & 1 deletion src/doc/en/developer/git_trac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ is not already private.
If there is no SSH key listed then you haven't uploaded your SSH
public key to the trac server. You should do that now following the
instructions to :ref:`section-trac-ssh-key`, if you want to upload
any changes.
any changes. You may have to add your private key to your authentication agent::

[user@localhost sage]$ ssh-add

.. note::

Expand Down
8 changes: 4 additions & 4 deletions src/doc/en/developer/walk_through.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,15 @@ to the develop branch (latest development release)::
[user@localhost sage]$ git checkout develop

You will then need to `compile Sage
<http://www.sagemath.org/doc/installation/source.html>`_ in order to use it (if
<http://www.sagemath.org/doc/installation/source.html>`_ in order to use it. If
you cloned, you will need to remain on the internet for it to download various
packages of Sage).
packages of Sage::

[user@localhost sage]$ make

(For the experts, note that the repository at
For the experts, note that the repository at
`git.sagemath.org <http://git.sagemath.org>`_ is where development
actually takes place .)
actually takes place.


.. _section-walkthrough-branch:
Expand Down
8 changes: 8 additions & 0 deletions src/doc/en/reference/coding/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,12 @@ Canonical forms
sage/coding/codecan/codecan
sage/coding/codecan/autgroup_can_label

Other tools
-----------

.. toctree::
:maxdepth: 1

sage/coding/relative_finite_field_extension

.. include:: ../footer.txt
6 changes: 4 additions & 2 deletions src/doc/en/thematic_tutorials/tutorial-programming-python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -837,13 +837,15 @@ Using Sage types: The srange command
**Example:** Construct a `3 \times 3` matrix whose `(i,j)` entry is
the rational number `\frac{i}{j}`. The integers generated by
:func:`range` are Python :class:`int`'s. As a consequence, dividing
them does euclidean division::
them does euclidean division (in Python2)::

sage: matrix([[ i/j for j in range(1,4)] for i in range(1,4)])
sage: matrix([[i/j for j in range(1,4)] for i in range(1,4)]) # not tested
[1 0 0]
[2 1 0]
[3 1 1]

In Python3, the division of Python integers returns a float instead.

Whereas dividing a Sage :class:`Integer` by a Sage :class:`Integer`
produces a rational number::

Expand Down
10 changes: 5 additions & 5 deletions src/doc/en/tutorial/afterword.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ behaves differently from Python in several ways.
10

- **Integer division:** The Python expression ``2/3`` does not
behave the way mathematicians might expect. In Python, if ``m`` and
behave the way mathematicians might expect. In Python2, if ``m`` and
``n`` are ints, then ``m/n`` is also an int, namely the quotient of ``m``
divided by ``n``. Therefore ``2/3=0``. There has been talk in the
Python community about changing Python so ``2/3`` returns the
floating point number ``0.6666...``, and making ``2//3`` return ``0``.
divided by ``n``. Therefore ``2/3=0``. In Python3, ``2/3`` returns the
floating point number ``0.6666...``. In both Python2 and Python3, ``//``
is the Euclidean division and ``2//3`` returns ``0``.

We deal with this in the Sage interpreter, by wrapping integer
literals in ``Integer( )`` and making division a constructor for rational
Expand All @@ -125,7 +125,7 @@ behaves differently from Python in several ways.
Rational Field
sage: 2//3
0
sage: int(2)/int(3)
sage: int(2)/int(3) # not tested, python2
0

- **Long integers:** Python has native support for arbitrary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
cdef FreeAlgebra_letterplace P = A
if check:
if not x.is_homogeneous():
raise ValueError, "Free algebras based on Letterplace can currently only work with weighted homogeneous elements"
raise ValueError("Free algebras based on Letterplace can currently only work with weighted homogeneous elements")
P.set_degbound(x.degree())
x = P._current_ring(x)
AlgebraElement.__init__(self,P)
Expand Down Expand Up @@ -432,7 +432,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
"""
if self._parent is not p._parent:
raise TypeError, "The two arguments must be elements in the same free algebra."
raise TypeError("The two arguments must be elements in the same free algebra.")
cdef FreeAlgebra_letterplace A = self._parent
P = A._current_ring
p_poly = p._poly = P(p._poly)
Expand Down Expand Up @@ -510,7 +510,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
return other
cdef FreeAlgebraElement_letterplace right = other
if right._poly.degree()!=self._poly.degree():
raise ArithmeticError, "Can only add elements of the same weighted degree"
raise ArithmeticError("Can only add elements of the same weighted degree")
# update the polynomials
cdef FreeAlgebra_letterplace A = self._parent
self._poly = A._current_ring(self._poly)
Expand Down Expand Up @@ -549,7 +549,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
return -other
cdef FreeAlgebraElement_letterplace right = other
if right._poly.degree()!=self._poly.degree():
raise ArithmeticError, "Can only subtract elements of the same degree"
raise ArithmeticError("Can only subtract elements of the same degree")
# update the polynomials
cdef FreeAlgebra_letterplace A = self._parent
self._poly = A._current_ring(self._poly)
Expand Down Expand Up @@ -617,7 +617,7 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
"""
cdef FreeAlgebra_letterplace A = self._parent
if n<0:
raise ValueError, "Negative exponents are not allowed"
raise ValueError("Negative exponents are not allowed")
if n==0:
return FreeAlgebraElement_letterplace(A, A._current_ring(1),
check=False)
Expand Down Expand Up @@ -761,6 +761,6 @@ cdef class FreeAlgebraElement_letterplace(AlgebraElement):
"""
if self._parent != I.ring():
raise ValueError, "Can not compute normal form wrt an ideal that does not belong to %s"%self._parent
raise ValueError("Can not compute normal form wrt an ideal that does not belong to %s" % self._parent)
sdeg = self._poly.degree()
return self.reduce(self._parent._reductor_(I.groebner_basis(degbound=sdeg).gens(), sdeg))
10 changes: 5 additions & 5 deletions src/sage/algebras/letterplace/free_algebra_letterplace.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
"""
if not isinstance(R,MPolynomialRing_libsingular):
raise TypeError, "A letterplace algebra must be provided by a polynomial ring of type %s"%MPolynomialRing_libsingular
raise TypeError("A letterplace algebra must be provided by a polynomial ring of type %s" % MPolynomialRing_libsingular)
self.__ngens = R.ngens()
if degrees is None:
varnames = R.variable_names()
Expand All @@ -286,7 +286,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
self._degrees = tuple([int(1)]*self.__ngens)
else:
if (not isinstance(degrees,(tuple,list))) or len(degrees)!=self.__ngens-1 or any([i<=0 for i in degrees]):
raise TypeError, "The generator degrees must be given by a list or tuple of %d positive integers"%(self.__ngens-1)
raise TypeError("The generator degrees must be given by a list or tuple of %d positive integers" % (self.__ngens-1))
self._degrees = tuple([int(i) for i in degrees])
self.set_degbound(max(self._degrees))
self._populate_coercion_lists_(coerce_list=[base_ring])
Expand Down Expand Up @@ -339,7 +339,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
"""
if i>=self.__ngens-self._nb_slackvars:
raise ValueError, "This free algebra only has %d generators"%(self.__ngens-self._nb_slackvars)
raise ValueError("This free algebra only has %d generators" % (self.__ngens-self._nb_slackvars))
if self._gens is not None:
return self._gens[i]
deg = self._degrees[i]
Expand Down Expand Up @@ -618,7 +618,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
continue
var_ind, exp = tmp[0]
if len(tmp)>1 or exp>1:
raise NotImplementedError, "\n Apparently you tried to view the letterplace algebra with\n shift-multiplication as the free algebra over a finitely\n generated free abelian monoid.\n In principle, this is correct, but it is not implemented, yet."
raise NotImplementedError("\n Apparently you tried to view the letterplace algebra with\n shift-multiplication as the free algebra over a finitely\n generated free abelian monoid.\n In principle, this is correct, but it is not implemented, yet.")

out.append(self._names[var_ind])
i += (self._degrees[var_ind]-1)
Expand Down Expand Up @@ -656,7 +656,7 @@ cdef class FreeAlgebra_letterplace(Algebra):
continue
var_ind, exp = tmp[0]
if len(tmp)>1 or exp>1:
raise NotImplementedError, "\n Apparently you tried to view the letterplace algebra with\n shift-multiplication as the free algebra over a finitely\n generated free abelian monoid.\n In principle, this is correct, but it is not implemented, yet."
raise NotImplementedError("\n Apparently you tried to view the letterplace algebra with\n shift-multiplication as the free algebra over a finitely\n generated free abelian monoid.\n In principle, this is correct, but it is not implemented, yet.")

out.append(names[var_ind])
i += (self._degrees[var_ind]-1)
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/letterplace/letterplace_ideal.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ class LetterplaceIdeal(Ideal_nc):
if self.__uptodeg >= degbound:
return self.__GB
if not A.base().is_field():
raise TypeError, "Currently, we can only compute Groebner bases if the ring of coefficients is a field"
raise TypeError("Currently, we can only compute Groebner bases if the ring of coefficients is a field")
if self.side()!='twosided':
raise TypeError, "This ideal is not two-sided. We can only compute two-sided Groebner bases"
raise TypeError("This ideal is not two-sided. We can only compute two-sided Groebner bases")
if degbound == Infinity:
while self.__uptodeg<Infinity:
test_bound = 2*max([x._poly.degree() for x in self.__GB.gens()])
Expand Down
8 changes: 4 additions & 4 deletions src/sage/algebras/quatalg/quaternion_algebra_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ cdef class QuaternionAlgebraElement_abstract(AlgebraElement):
elif action == 'left':
v = [(self*a).coefficient_tuple() for a in self._parent.basis()]
else:
raise ValueError, "action must be either 'left' or 'right'"
raise ValueError("action must be either 'left' or 'right'")
return matrix(self.base_ring(), 4, v)

def coefficient_tuple(self):
Expand Down Expand Up @@ -707,7 +707,7 @@ cdef class QuaternionAlgebraElement_generic(QuaternionAlgebraElement_abstract):
elif i == 3:
return self.w
else:
raise IndexError, "quaternion element index out of range"
raise IndexError("quaternion element index out of range")

def __reduce__(self):
"""
Expand Down Expand Up @@ -1053,7 +1053,7 @@ cdef class QuaternionAlgebraElement_rational_field(QuaternionAlgebraElement_abst
elif i == 3:
mpq_set_num(r.value, self.w)
else:
raise IndexError, "quaternion element index out of range"
raise IndexError("quaternion element index out of range")
mpq_set_den(r.value, self.d)
mpq_canonicalize(r.value)
return r
Expand Down Expand Up @@ -1716,7 +1716,7 @@ cdef class QuaternionAlgebraElement_number_field(QuaternionAlgebraElement_abstra
elif i == 3:
fmpz_poly_get_ZZX(item.__numerator, self.w)
else:
raise IndexError, "quaternion element index out of range"
raise IndexError("quaternion element index out of range")

mpz_to_ZZ(&item.__denominator, self.d)

Expand Down
24 changes: 12 additions & 12 deletions src/sage/algebras/steenrod/steenrod_algebra_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
in terms of one of these. The bases are described in the
documentation for the function
:func:`steenrod_algebra_basis`; also see the papers by
Monks [M] and Wood [W] for more information about them. For
commutator bases, see the preprint by Palmieri and Zhang [PZ].
Monks [M1998]_ and Wood [W1998]_ for more information about them. For
commutator bases, see the preprint by Palmieri and Zhang [PZ2008]_.
- 'milnor': Milnor basis.
Expand Down Expand Up @@ -107,15 +107,15 @@
REFERENCES:
- [M] K. G. Monks, "Change of basis, monomial relations, and
`P^s_t` bases for the Steenrod algebra," J. Pure Appl.
Algebra 125 (1998), no. 1-3, 235-260.
.. [M1998] \K. G. Monks, "Change of basis, monomial relations, and
`P^s_t` bases for the Steenrod algebra," J. Pure Appl.
Algebra 125 (1998), no. 1-3, 235-260.
- [PZ] J. H. Palmieri and J. J. Zhang, "Commutators in the Steenrod
algebra," preprint (2008)
.. [PZ2008] \J. H. Palmieri and J. J. Zhang, "Commutators in the Steenrod
algebra," preprint (2008)
- [W] R. M. W. Wood, "Problems in the Steenrod algebra," Bull. London
Math. Soc. 30 (1998), no. 5, 449-517.
.. [W1998] \R. M. W. Wood, "Problems in the Steenrod algebra," Bull. London
Math. Soc. 30 (1998), no. 5, 449-517.
"""

#*****************************************************************************
Expand Down Expand Up @@ -1153,10 +1153,10 @@ def steenrod_basis_error_check(dim, p, **kwds):
milnor_dim = len(steenrod_algebra_basis.f(i,'milnor',p=p,generic=generic))
for B in bases:
if milnor_dim != len(steenrod_algebra_basis.f(i,B,p,generic=generic)):
print "problem with milnor/" + B + " in dimension ", i
print("problem with milnor/{} in dimension {}".format(B, i))
mat = convert_to_milnor_matrix.f(i,B,p,generic=generic)
if mat.nrows() != 0 and not mat.is_invertible():
print "%s invertibility problem in dim %s at p=%s" % (B, i, p)
print("%s invertibility problem in dim %s at p=%s" % (B, i, p))

misc.verbose("done checking, no profiles")

Expand All @@ -1173,6 +1173,6 @@ def steenrod_basis_error_check(dim, p, **kwds):
milnor_dim = len(steenrod_algebra_basis.f(i,'milnor',p=p,profile=pro,generic=generic))
for B in bases:
if milnor_dim != len(steenrod_algebra_basis.f(i,B,p,profile=pro,generic=generic)):
print "problem with milnor/%s in dimension %s with profile %s"%(B, i, pro)
print("problem with milnor/%s in dimension %s with profile %s" % (B, i, pro))

misc.verbose("done checking with profiles")

0 comments on commit 1f0d7ab

Please sign in to comment.