[sagemath] 03/06: Update patches (part 1).
Tobias Hansen
thansen at moszumanska.debian.org
Thu Jan 19 00:32:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch experimental
in repository sagemath.
commit e5abd346607dbf451107b62dfcb9403881e1809d
Author: Tobias Hansen <thansen at debian.org>
Date: Wed Jan 18 23:39:56 2017 +0000
Update patches (part 1).
---
debian/changelog | 12 +
debian/patches/series | 7 -
debian/patches/u0-pip-nowarn.patch | 5 +-
debian/patches/u0-version-pari-2.9.patch | 621 ++++-----------------
debian/patches/u1-fix-proper-scipy-rtol.patch | 6 +-
.../u1-version-pbori-boost1.62-hashes.patch | 6 +-
debian/patches/u2-allow-override-sage-local.patch | 11 -
7 files changed, 116 insertions(+), 552 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 67152fd..081a71e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,18 @@
sagemath (7.5.1-1) UNRELEASED; urgency=medium
* New upstream version.
+ * Remove patches (applied upstream):
+ - u0-version-cython-0.25.patch
+ - u0-version-glpk-4.60.patch
+ - u0-version-pari-2.9-trac-21765.patch
+ - u0-version-singular-4.patch
+ - u0-distutils-fixes.patch
+ - u0-timeit-python-2.7.11.patch
+ - u1-version-pkgconfig.patch
+ * Patches with non-trivial modifications:
+ - u0-pip-nowarn.patch
+ - u0-version-pari-2.9.patch
+ - u2-allow-override-sage-local.patch
-- Tobias Hansen <thansen at debian.org> Wed, 18 Jan 2017 22:58:31 +0000
diff --git a/debian/patches/series b/debian/patches/series
index 0c5374a..67fbbd9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,13 +1,7 @@
# Patches already applied upstream or committed in a side branch
# Or nearly-finished patches that they'll very probably merge.
-u0-version-cython-0.25.patch
-u0-version-glpk-4.60.patch
-u0-version-pari-2.9-trac-21765.patch
u0-version-pari-2.9.patch
-u0-version-singular-4.patch
-u0-distutils-fixes.patch
u0-pip-nowarn.patch
-u0-timeit-python-2.7.11.patch
# Uncontroversial fixes to Sage's code
# We should forward these upstream, and they would probably accept
@@ -15,7 +9,6 @@ u1-version-planarity-3.patch
u1-version-pbori-boost1.62-hashes.patch
u1-version-ecm-7.patch
u1-version-cddlib-094h.patch
-u1-version-pkgconfig.patch
u1-fix-libgap-systemwide.patch
u1-fix-use-lexists-not-exists.patch
u1-fix-proper-scipy-rtol.patch
diff --git a/debian/patches/u0-pip-nowarn.patch b/debian/patches/u0-pip-nowarn.patch
index 66c51d9..d6f0de6 100644
--- a/debian/patches/u0-pip-nowarn.patch
+++ b/debian/patches/u0-pip-nowarn.patch
@@ -1,7 +1,4 @@
Description: Don't output pip warnings, otherwise some doctests fail
- This removes two types of warnings. "--no-index" suppresses messages from
- pip advertising a new pip version. This was applied to sage in
- https://trac.sagemath.org/ticket/21812
"--format=legacy" suppresses a warning that the default format will
change from legacy to columns. This is being discussed in
https://trac.sagemath.org/ticket/21835
@@ -15,7 +12,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
sage: d['beautifulsoup'] # optional - beautifulsoup
'...'
"""
-- proc = subprocess.Popen(["pip", "list"], stdout=subprocess.PIPE)
+- proc = subprocess.Popen(["pip", "list", "--no-index"], stdout=subprocess.PIPE)
+ proc = subprocess.Popen(["pip", "list", "--no-index", "--format=legacy"], stdout=subprocess.PIPE)
stdout = str(proc.communicate()[0])
return dict((name.lower(), version) for name,version in PIP_VERSION.findall(stdout))
diff --git a/debian/patches/u0-version-pari-2.9.patch b/debian/patches/u0-version-pari-2.9.patch
index 36bba5a..522ce68 100644
--- a/debian/patches/u0-version-pari-2.9.patch
+++ b/debian/patches/u0-version-pari-2.9.patch
@@ -1,506 +1,48 @@
-Description: Upgrade to PARI 2.9.0
-Author: Jeroen Demeyer <jdemeyer at cage.ugent.be>
-Date: Fri, 04 Nov 2016 12:43:13 +0100
+From b1c66bd445cceb05caa589afb7aab9d9efdf5e94 Mon Sep 17 00:00:00 2001
+From: Jeroen Demeyer <jdemeyer at cage.ugent.be>
+Date: Mon, 24 Oct 2016 14:05:01 +0200
+Subject: Upgrade to PARI 2.9.1
Bug: https://trac.sagemath.org/ticket/21756
-Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
+Applied-Upstream: 7.6
---
- src/sage/libs/pari/pari_instance.pxd | 1 -
- src/sage/libs/pari/pari_instance.pyx | 353 ++++++++++++++++++++++-------------
- 2 files changed, 225 insertions(+), 129 deletions(-)
+ build/pkgs/pari/checksums.ini | 6 +-
+ build/pkgs/pari/package-version.txt | 2 +-
+ build/pkgs/pari/patches/README.txt | 5 --
+ build/pkgs/pari/patches/fix_constants.patch | 51 ----------------
+ build/pkgs/pari/patches/perl_inc.patch | 45 --------------
+ build/pkgs/pari/patches/stackwarn.patch | 37 ++++++------
+ src/sage/interfaces/gp.py | 3 +
+ src/sage/libs/pari/tests.py | 6 +-
+ src/sage/modular/cusps_nf.py | 18 +++---
+ src/sage/rings/number_field/bdd_height.py | 2 +-
+ src/sage/rings/number_field/class_group.py | 2 +-
+ src/sage/rings/number_field/number_field.py | 61 +++++++++----------
+ .../rings/number_field/number_field_element.pyx | 2 +-
+ .../rings/number_field/number_field_ideal_rel.py | 10 ++--
+ src/sage/rings/number_field/number_field_rel.py | 2 +-
+ src/sage/rings/number_field/unit_group.py | 37 +++++++++---
+ .../rings/polynomial/polynomial_quotient_ring.py | 70 +++++++++++++++++-----
+ .../schemes/elliptic_curves/ell_number_field.py | 28 +++++----
+ .../schemes/elliptic_curves/ell_rational_field.py | 4 +-
+ src/sage/schemes/elliptic_curves/gp_simon.py | 2 +-
+ src/sage/schemes/elliptic_curves/period_lattice.py | 4 +-
+ 21 files changed, 181 insertions(+), 216 deletions(-)
+ delete mode 100644 build/pkgs/pari/patches/fix_constants.patch
+ delete mode 100644 build/pkgs/pari/patches/perl_inc.patch
---- a/sage/src/sage/libs/pari/pari_instance.pxd
-+++ b/sage/src/sage/libs/pari/pari_instance.pxd
-@@ -14,7 +14,6 @@
-
- @cython.final
- cdef class PariInstance(PariInstance_auto):
-- cdef long _real_precision
- cdef readonly gen PARI_ZERO, PARI_ONE, PARI_TWO
- cpdef gen zero(self)
- cpdef gen one(self)
---- a/sage/src/sage/libs/pari/pari_instance.pyx
-+++ b/sage/src/sage/libs/pari/pari_instance.pyx
-@@ -49,85 +49,61 @@
- sage: type(1 + pari(1))
- <type 'sage.libs.pari.gen.gen'>
-
--GUIDE TO REAL PRECISION AND THE PARI LIBRARY
-+Guide to real precision in the PARI interface
-+=============================================
-
--The default real precision in communicating with the PARI library
--is the same as the default Sage real precision, which is 53 bits.
--Inexact Pari objects are therefore printed by default to 15 decimal
--digits (even if they are actually more precise).
--
--Default precision example (53 bits, 15 significant decimals)::
--
-- sage: a = pari(1.23); a
-- 1.23000000000000
-- sage: a.sin()
-- 0.942488801931698
--
--Example with custom precision of 200 bits (60 significant
--decimals)::
--
-- sage: R = RealField(200)
-- sage: a = pari(R(1.23)); a # only 15 significant digits printed
-- 1.23000000000000
-- sage: R(a) # but the number is known to precision of 200 bits
-- 1.2300000000000000000000000000000000000000000000000000000000
-- sage: a.sin() # only 15 significant digits printed
-- 0.942488801931698
-- sage: R(a.sin()) # but the number is known to precision of 200 bits
-- 0.94248880193169751002382356538924454146128740562765030213504
--
--It is possible to change the number of printed decimals::
--
-- sage: R = RealField(200) # 200 bits of precision in computations
-- sage: old_prec = pari.set_real_precision(60) # 60 decimals printed
-- sage: a = pari(R(1.23)); a
-- 1.23000000000000000000000000000000000000000000000000000000000
-- sage: a.sin()
-- 0.942488801931697510023823565389244541461287405627650302135038
-- sage: pari.set_real_precision(old_prec) # restore the default printing behavior
-- 60
--
--Unless otherwise indicated in the docstring, most Pari functions
--that return inexact objects use the precision of their arguments to
--decide the precision of the computation. However, if some of these
--arguments happen to be exact numbers (integers, rationals, etc.),
--an optional parameter indicates the precision (in bits) to which
--these arguments should be converted before the computation. If this
--precision parameter is missing, the default precision of 53 bits is
--used. The following first converts 2 into a real with 53-bit
--precision::
--
-- sage: R = RealField()
-- sage: R(pari(2).sin())
-- 0.909297426825682
--
--We can ask for a better precision using the optional parameter::
--
-- sage: R = RealField(150)
-- sage: R(pari(2).sin(precision=150))
-- 0.90929742682568169539601986591174484270225497
--
--Warning regarding conversions Sage - Pari - Sage: Some care must be
--taken when juggling inexact types back and forth between Sage and
--Pari. In theory, calling p=pari(s) creates a Pari object p with the
--same precision as s; in practice, the Pari library's precision is
--word-based, so it will go up to the next word. For example, a
--default 53-bit Sage real s will be bumped up to 64 bits by adding
--bogus 11 bits. The function p.python() returns a Sage object with
--exactly the same precision as the Pari object p. So
--pari(s).python() is definitely not equal to s, since it has 64 bits
--of precision, including the bogus 11 bits. The correct way of
--avoiding this is to convert pari(s).python() back into a domain with
--the right precision. This has to be done by the user (or by Sage
--functions that use Pari library functions in gen.pyx). For
--instance, if we want to use the Pari library to compute sqrt(pi)
--with a precision of 100 bits::
-+In the PARI interface, "real precision" refers to the precision of real
-+numbers, so it is the floating-point precision. This is a non-trivial
-+issue, since there are various interfaces for different things.
-+
-+Internal representation and conversion between Sage and PARI
-+------------------------------------------------------------
-+
-+Real numbers in PARI have a precision associated to them, which is
-+always a multiple of the CPU wordsize. So, it is a multiple of 32
-+of 64 bits. When converting from Sage to PARI, the precision is rounded
-+up to the nearest multiple of the wordsize::
-+
-+ sage: x = 1.0
-+ sage: x.precision()
-+ 53
-+ sage: pari(x)
-+ 1.00000000000000
-+ sage: pari(x).bitprecision()
-+ 64
-+
-+With a higher precision::
-+
-+ sage: x = RealField(100).pi()
-+ sage: x.precision()
-+ 100
-+ sage: pari(x).bitprecision()
-+ 128
-+
-+When converting back to Sage, the precision from PARI is taken::
-+
-+ sage: x = RealField(100).pi()
-+ sage: y = pari(x).sage()
-+ sage: y
-+ 3.1415926535897932384626433832793333156
-+ sage: parent(y)
-+ Real Field with 128 bits of precision
-+
-+So ``pari(x).sage()`` is definitely not equal to ``x`` since it has
-+28 bogus bits.
-+
-+Therefore, some care must be taken when juggling reals back and forth
-+between Sage and PARI. The correct way of avoiding this is to convert
-+``pari(x).sage()`` back into a domain with the right precision. This has
-+to be done by the user (or by Sage functions that use PARI library
-+functions). For instance, if we want to use the PARI library to compute
-+``sqrt(pi)`` with a precision of 100 bits::
-
- sage: R = RealField(100)
- sage: s = R(pi); s
- 3.1415926535897932384626433833
- sage: p = pari(s).sqrt()
-- sage: x = p.python(); x # wow, more digits than I expected!
-+ sage: x = p.sage(); x # wow, more digits than I expected!
- 1.7724538509055160272981674833410973484
- sage: x.prec() # has precision 'improved' from 100 to 128?
- 128
-@@ -138,8 +114,99 @@
- sage: R(x) == s.sqrt()
- True
-
--Elliptic curves and precision: If you are working with elliptic
--curves, you should set the precision for each method::
-+Output precision for printing
-+-----------------------------
-+
-+Even though PARI reals have a precision, not all significant bits are
-+printed by default. The maximum number of digits when printing a PARI
-+real can be set using the methods
-+:meth:`PariInstance.set_real_precision_bits` or
-+:meth:`PariInstance.set_real_precision`.
-+
-+We create a very precise approximation of pi and see how it is printed
-+in PARI::
-+
-+ sage: pi = pari(RealField(1000).pi())
-+
-+The default precision is 15 digits::
-+
-+ sage: pi
-+ 3.14159265358979
-+
-+With a different precision::
-+
-+ sage: _ = pari.set_real_precision(50)
-+ sage: pi
-+ 3.1415926535897932384626433832795028841971693993751
-+
-+Back to the default::
-+
-+ sage: _ = pari.set_real_precision(15)
-+ sage: pi
-+ 3.14159265358979
-+
-+Input precision for function calls
-+----------------------------------
-+
-+When we talk about precision for PARI functions, we need to distinguish
-+three kinds of calls:
-+
-+1. Using the string interface, for example ``pari("sin(1)")``.
-+
-+2. Using the library interface with exact inputs, for example
-+ ``pari(1).sin()``.
-+
-+3. Using the library interface with inexact inputs, for example
-+ ``pari(1.0).sin()``.
-+
-+In the first case, the relevant precision is the one set by the methods
-+:meth:`PariInstance.set_real_precision_bits` or
-+:meth:`PariInstance.set_real_precision`::
-+
-+ sage: pari.set_real_precision_bits(150)
-+ sage: pari("sin(1)")
-+ 0.841470984807896506652502321630298999622563061
-+ sage: pari.set_real_precision_bits(53)
-+ sage: pari("sin(1)")
-+ 0.841470984807897
-+
-+In the second case, the precision can be given as the argument
-+``precision`` in the function call, with a default of 53 bits.
-+The real precision set by
-+:meth:`PariInstance.set_real_precision_bits` or
-+:meth:`PariInstance.set_real_precision` is irrelevant.
-+
-+In these examples, we convert to Sage to ensure that PARI's real
-+precision is not used when printing the numbers. As explained before,
-+this artificically increases the precision to a multiple of the
-+wordsize. ::
-+
-+ sage: s = pari(1).sin(precision=180).sage(); print(s); print(parent(s))
-+ 0.841470984807896506652502321630298999622563060798371065673
-+ Real Field with 192 bits of precision
-+ sage: s = pari(1).sin(precision=40).sage(); print(s); print(parent(s))
-+ 0.841470984807896507
-+ Real Field with 64 bits of precision
-+ sage: s = pari(1).sin().sage(); print(s); print(parent(s))
-+ 0.841470984807896507
-+ Real Field with 64 bits of precision
-+
-+In the third case, the precision is determined only by the inexact
-+inputs and the ``precision`` argument is ignored::
-+
-+ sage: pari(1.0).sin(precision=180).sage()
-+ 0.841470984807896507
-+ sage: pari(1.0).sin(precision=40).sage()
-+ 0.841470984807896507
-+ sage: pari(RealField(100).one()).sin().sage()
-+ 0.84147098480789650665250232163029899962
-+
-+Elliptic curve functions
-+------------------------
-+
-+An elliptic curve given with exact `a`-invariants is considered an
-+exact object. Therefore, you should set the precision for each method
-+call individually::
-
- sage: e = pari([0,0,0,-82,0]).ellinit()
- sage: eta1 = e.elleta(precision=100)[0]
-@@ -149,8 +216,6 @@
- sage: eta1.sage()
- 3.60546360143265208591582056420772677481026899659802474544
-
--Number fields and precision: TODO
--
- TESTS:
-
- Check that output from PARI's print command is actually seen by
-@@ -215,33 +280,15 @@
- from sage.misc.superseded import deprecation, deprecated_function_alias
- from sage.env import CYGWIN_VERSION
-
--# real precision in decimal digits: see documentation for
--# get_real_precision() and set_real_precision(). This variable is used
--# in gp to set the precision of input quantities (e.g. sqrt(2)), and for
--# determining the number of digits to be printed. It is *not* used as
--# a "default precision" for internal computations, which always use
--# the actual precision of arguments together (where relevant) with a
--# "prec" parameter. In ALL cases (for real computations) the prec
--# parameter is a WORD precision and NOT decimal precision. Pari reals
--# with word precision w have bit precision (of the mantissa) equal to
--# 32*(w-2) or 64*(w-2).
--#
--# Hence the only relevance of this parameter in Sage is (1) for the
--# output format of components of objects of type
--# 'sage.libs.pari.gen.gen'; (2) for setting the precision of pari
--# variables created from strings (e.g. via sage: pari('1.2')).
--#
--# WARNING: Many pari library functions take a last parameter "prec"
--# which should be a words precision. In many cases this is redundant
--# and is simply ignored. In our wrapping of these functions we use
--# the variable prec here for convenience only.
--cdef long prec
-+# Default precision (in PARI words) for the PARI library interface,
-+# when no explicit precision is given and the inputs are exact.
-+cdef long prec = prec_bits_to_words(53)
-
- #################################################################
- # conversions between various real precision models
- #################################################################
-
--def prec_bits_to_dec(unsigned long prec_in_bits):
-+def prec_bits_to_dec(long prec_in_bits):
- r"""
- Convert from precision expressed in bits to precision expressed in
- decimal.
-@@ -261,10 +308,9 @@
- (224, 67),
- (256, 77)]
- """
-- cdef double log_2 = 0.301029995663981
-- return int(prec_in_bits*log_2)
-+ return nbits2ndec(prec_in_bits)
-
--def prec_dec_to_bits(unsigned long prec_in_dec):
-+def prec_dec_to_bits(long prec_in_dec):
- r"""
- Convert from precision expressed in decimal to precision expressed
- in bits.
-@@ -273,20 +319,20 @@
-
- sage: from sage.libs.pari.pari_instance import prec_dec_to_bits
- sage: prec_dec_to_bits(15)
-- 49
-+ 50
- sage: [(n, prec_dec_to_bits(n)) for n in range(10, 100, 10)]
-- [(10, 33),
-- (20, 66),
-- (30, 99),
-- (40, 132),
-- (50, 166),
-- (60, 199),
-- (70, 232),
-- (80, 265),
-- (90, 298)]
-+ [(10, 34),
-+ (20, 67),
-+ (30, 100),
-+ (40, 133),
-+ (50, 167),
-+ (60, 200),
-+ (70, 233),
-+ (80, 266),
-+ (90, 299)]
- """
- cdef double log_10 = 3.32192809488736
-- return int(prec_in_dec*log_10)
-+ return int(prec_in_dec*log_10 + 1.0) # Add one to round up
-
- cpdef long prec_bits_to_words(unsigned long prec_in_bits):
- r"""
-@@ -392,6 +438,7 @@
- pari = pari_instance
-
-
-+
- # Callbacks from PARI to print stuff using sys.stdout.write() instead
- # of C library functions like puts().
- cdef PariOUT sage_pariOut
-@@ -430,6 +477,8 @@
- - ``maxprime`` -- unsigned long, upper limit on a
- precomputed prime number table (default: 500000)
-
-+ For more information about how precision works in the PARI
-+ interface, see :mod:`sage.libs.pari.pari_instance`.
-
- .. note::
-
-@@ -440,9 +489,7 @@
- Python/PARI object is computed, it it copied to its own
- space in the Python heap, and the memory it occupied on the
- PARI stack is freed. Thus it is not necessary to make the
-- stack very large. Also, unlike in PARI, if the stack does
-- overflow, in most cases the PARI stack is automatically
-- increased and the relevant step of the computation rerun.
-+ stack very large.
-
- This design obviously involves some performance penalties
- over the way PARI works, but it scales much better and is
-@@ -508,12 +555,8 @@
- pariOut.puts = sage_puts
- pariOut.flush = sage_flush
-
-- # Use 15 decimal digits as default precision
-- self.set_real_precision(15)
--
-- # Init global prec variable with the precision in words
-- global prec
-- prec = prec_bits_to_words(64)
-+ # Use 53 bits as default precision
-+ self.set_real_precision_bits(53)
-
- # Disable pretty-printing
- GP_DATA.fmt.prettyp = 0
-@@ -596,6 +639,59 @@
- """
- return int(self.default('debug'))
-
-+ def set_real_precision_bits(self, n):
-+ """
-+ Sets the PARI default real precision in bits.
-+
-+ This is used both for creation of new objects from strings and
-+ for printing. It determines the number of digits in which real
-+ numbers numbers are printed. It also determines the precision
-+ of objects created by parsing strings (e.g. pari('1.2')), which
-+ is *not* the normal way of creating new pari objects in Sage.
-+ It has *no* effect on the precision of computations within the
-+ PARI library.
-+
-+ .. seealso:: :meth:`set_real_precision` to set the
-+ precision in decimal digits.
-+
-+ EXAMPLES::
-+
-+ sage: pari.set_real_precision_bits(200)
-+ sage: pari('1.2')
-+ 1.20000000000000000000000000000000000000000000000000000000000
-+ sage: pari.set_real_precision_bits(53)
-+ """
-+ cdef bytes strn = str(n).encode("ascii")
-+ sig_on()
-+ sd_realbitprecision(strn, d_SILENT)
-+ sig_off()
-+
-+ def get_real_precision_bits(self):
-+ """
-+ Return the current PARI default real precision in bits.
-+
-+ This is used both for creation of new objects from strings and
-+ for printing. It determines the number of digits in which real
-+ numbers numbers are printed. It also determines the precision
-+ of objects created by parsing strings (e.g. pari('1.2')), which
-+ is *not* the normal way of creating new pari objects in Sage.
-+ It has *no* effect on the precision of computations within the
-+ PARI library.
-+
-+ .. seealso:: :meth:`get_real_precision` to get the
-+ precision in decimal digits.
-+
-+ EXAMPLES::
-+
-+ sage: pari.get_real_precision_bits()
-+ 53
-+ """
-+ cdef long r
-+ sig_on()
-+ r = itos(sd_realbitprecision(NULL, d_RETURN))
-+ sig_off()
-+ return r
-+
- def set_real_precision(self, long n):
- """
- Sets the PARI default real precision in decimal digits.
-@@ -609,6 +705,9 @@
-
- Returns the previous PARI real precision.
-
-+ .. seealso:: :meth:`set_real_precision_bits` to set the
-+ precision in bits.
-+
- EXAMPLES::
-
- sage: pari.set_real_precision(60)
-@@ -618,13 +717,9 @@
- sage: pari.set_real_precision(15)
- 60
- """
-- prev = self._real_precision
-- cdef bytes strn = str(n)
-- sig_on()
-- sd_realprecision(strn, d_SILENT)
-- sig_off()
-- self._real_precision = n
-- return prev
-+ old = self.get_real_precision()
-+ self.set_real_precision_bits(prec_dec_to_bits(n))
-+ return old
-
- def get_real_precision(self):
- """
-@@ -637,12 +732,19 @@
- normal way of creating new pari objects in Sage. It has *no*
- effect on the precision of computations within the pari library.
-
-+ .. seealso:: :meth:`get_real_precision_bits` to get the
-+ precision in bits.
-+
- EXAMPLES::
-
- sage: pari.get_real_precision()
- 15
- """
-- return self._real_precision
-+ cdef long r
-+ sig_on()
-+ r = itos(sd_realprecision(NULL, d_RETURN))
-+ sig_off()
-+ return r
-
- def set_series_precision(self, long n):
- global precdl
+--- a/sage/src/sage/interfaces/gp.py
++++ b/sage/src/sage/interfaces/gp.py
+@@ -239,6 +239,9 @@
+
+ def _start(self, alt_message=None, block_during_init=True):
+ Expect._start(self, alt_message, block_during_init)
++ # disable memory debugging: those warnings can only confuse our
++ # interface
++ self._eval_line('default(debugmem,0);')
+ # disable timer
+ self._eval_line('default(timer,0);')
+ # disable the break loop, otherwise gp will seem to hang on errors
--- a/sage/src/sage/libs/pari/tests.py
+++ b/sage/src/sage/libs/pari/tests.py
@@ -1457,7 +1457,7 @@
@@ -572,7 +114,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
True
--- a/sage/src/sage/rings/number_field/bdd_height.py
+++ b/sage/src/sage/rings/number_field/bdd_height.py
-@@ -71,7 +71,7 @@
+@@ -72,7 +72,7 @@
sage: bdd_pr_ideals[4]
[2]
sage: bdd_pr_ideals[5]
@@ -594,16 +136,18 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
return self.element_class(self, None, self._number_field.ideal(args[0].ideal()))
--- a/sage/src/sage/rings/number_field/number_field.py
+++ b/sage/src/sage/rings/number_field/number_field.py
-@@ -3868,7 +3868,7 @@
+@@ -3868,8 +3868,8 @@
+ sage: K.<a> = QuadraticField(-3)
sage: K.unit_group()
Unit group with structure C6 of Number Field in a with defining polynomial x^2 + 3
- sage: K.S_units([])
+- sage: K.S_units([])
- [-1/2*a + 1/2]
++ sage: K.S_units([]) # random
+ [1/2*a + 1/2]
sage: K.S_units([])[0].multiplicative_order()
6
-@@ -3939,14 +3939,13 @@
+@@ -3940,14 +3940,13 @@
sage: K.<a> = NumberField(x^3 - 381 * x + 127)
sage: K._S_class_group_and_units(tuple(K.primes_above(13)))
@@ -623,7 +167,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
Number fields defined by non-monic and non-integral
polynomials are supported (:trac:`252`)::
-@@ -4065,13 +4064,13 @@
+@@ -4066,13 +4065,13 @@
sage: K.selmer_group([P2], 2)
[2, -1]
sage: K.selmer_group((P2,P3), 4)
@@ -640,7 +184,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
sage: K.selmer_group([P2, P3, K.ideal(a)], 3) # random signs
[2, a + 1, a]
-@@ -4092,14 +4091,21 @@
+@@ -4093,14 +4092,21 @@
sage: P3 = K.ideal(3, a+1)
sage: P5 = K.ideal(a)
sage: S = K.selmer_group([P2, P3, P5], 3)
@@ -664,7 +208,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
Verify that :trac:`16708` is fixed::
-@@ -4181,7 +4187,7 @@
+@@ -4182,7 +4188,7 @@
sage: list(K.selmer_group_iterator([K.ideal(2, -a+1)], 2))
[1, -1, 2, -2]
sage: list(K.selmer_group_iterator([K.ideal(2, -a+1), K.ideal(3, a+1)], 2))
@@ -673,7 +217,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
Examples over `\QQ` (as a number field)::
-@@ -4709,7 +4715,7 @@
+@@ -4710,7 +4716,7 @@
sage: K.elements_of_norm(3)
[]
sage: K.elements_of_norm(50)
@@ -682,7 +226,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
TESTS:
-@@ -5890,7 +5896,7 @@
+@@ -5891,7 +5897,7 @@
sage: A = x^4 - 10*x^3 + 20*5*x^2 - 15*5^2*x + 11*5^3
sage: K = NumberField(A, 'a')
sage: K.units()
@@ -691,40 +235,69 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
For big number fields, provably computing the unit group can
take a very long time. In this case, one can ask for the
-@@ -5976,7 +5982,7 @@
+@@ -5976,8 +5982,8 @@
+ Unit group with structure C10 x Z of Number Field in a with defining polynomial x^4 - 10*x^3 + 100*x^2 - 375*x + 1375
sage: U.gens()
(u0, u1)
- sage: U.gens_values()
+- sage: U.gens_values()
- [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 7/275*a^3 - 1/11*a^2 + 9/11*a + 2]
++ sage: U.gens_values() # random
+ [-1/275*a^3 + 7/55*a^2 - 6/11*a + 4, 1/275*a^3 + 4/55*a^2 - 5/11*a + 3]
sage: U.invariants()
(10, 0)
sage: [u.multiplicative_order() for u in U.gens()]
-@@ -6046,7 +6052,7 @@
+@@ -6046,8 +6052,8 @@
+ S-unit group with structure C10 x Z x Z x Z of Number Field in a with defining polynomial x^4 - 10*x^3 + 100*x^2 - 375*x + 1375 with S = (Fractional ideal (5, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5), Fractional ideal (11, 1/275*a^3 + 4/55*a^2 - 5/11*a + 9))
sage: U.gens()
(u0, u1, u2, u3)
- sage: U.gens_values()
+- sage: U.gens_values()
- [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 7/275*a^3 - 1/11*a^2 + 9/11*a + 2, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5, -14/275*a^3 + 21/55*a^2 - 29/11*a + 6]
++ sage: U.gens_values() # random
+ [-1/275*a^3 + 7/55*a^2 - 6/11*a + 4, 1/275*a^3 + 4/55*a^2 - 5/11*a + 3, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5, -14/275*a^3 + 21/55*a^2 - 29/11*a + 6]
sage: U.invariants()
(10, 0, 0, 0)
sage: [u.multiplicative_order() for u in U.gens()]
-@@ -6345,10 +6351,10 @@
+@@ -6291,19 +6297,14 @@
+
+ OUTPUT: a primitive root of unity. No guarantee is made about
+ which primitive root of unity this returns, not even for
+- cyclotomic fields.
++ cyclotomic fields. Repeated calls of this function may return
++ a different value.
+
+ .. note::
+
+ We do not create the full unit group since that can be
+ expensive, but we do use it if it is already known.
+
+- ALGORITHM:
+-
+- We use the PARI function :pari:`nfrootsof1` in all cases. This is
+- required (even for cyclotomic fields) in order to be consistent
+- with the full unit group, which is also computed by PARI.
+-
+ EXAMPLES::
+
+ sage: K.<i> = NumberField(x^2+1)
+@@ -6344,12 +6345,12 @@
+
+ Check for :trac:`15027`. We use a new variable name::
- sage: K.<f> = QuadraticField(-3)
+- sage: K.<f> = QuadraticField(-3)
++ sage: K.<f> = NumberField(x^2 + x + 1)
sage: K.primitive_root_of_unity()
- -1/2*f + 1/2
-+ 1/2*f + 1/2
++ f + 1
sage: UK = K.unit_group()
sage: K.primitive_root_of_unity()
- -1/2*f + 1/2
-+ 1/2*f + 1/2
++ f + 1
Number fields defined by non-monic and non-integral
polynomials are supported (:trac:`252`)::
--- a/sage/src/sage/rings/number_field/number_field_element.pyx
+++ b/sage/src/sage/rings/number_field/number_field_element.pyx
-@@ -1610,7 +1610,7 @@
+@@ -1607,7 +1607,7 @@
sage: t[0].norm(K)
-a
sage: t = K(3)._rnfisnorm(L); t
@@ -854,7 +427,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
sage: UK = K.unit_group(); UK
--- a/sage/src/sage/rings/polynomial/polynomial_quotient_ring.py
+++ b/sage/src/sage/rings/polynomial/polynomial_quotient_ring.py
-@@ -1080,7 +1080,21 @@
+@@ -1082,7 +1082,21 @@
sage: R.<x> = K[]
sage: S.<xbar> = R.quotient((x^2 + 23)*(x^2 + 31))
sage: S.S_class_group([])
@@ -877,7 +450,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
By using the ideal `(a)`, we cut the part of the class group coming from
`x^2 + 31` from 12 to 2, i.e. we lose a generator of order 6 (this was
-@@ -1199,7 +1213,21 @@
+@@ -1201,7 +1215,21 @@
sage: R.<x> = K[]
sage: S.<xbar> = R.quotient((x^2 + 23)*(x^2 + 31))
sage: S.class_group()
@@ -900,7 +473,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
Note that all the returned values live where we expect them to::
-@@ -1237,13 +1265,13 @@
+@@ -1239,13 +1267,13 @@
Unit group with structure C6 of Number Field in a with defining polynomial x^2 + 3
sage: K.<a> = QQ['x'].quotient(x^2 + 3)
sage: u,o = K.S_units([])[0]; u, o
@@ -916,7 +489,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
::
-@@ -1252,11 +1280,21 @@
+@@ -1254,11 +1282,21 @@
sage: L.<b> = K['y'].quotient(y^3 + 5); L
Univariate Quotient Polynomial Ring in b over Number Field in a with defining polynomial x^2 + 3 with modulus y^3 + 5
sage: L.S_units([])
@@ -941,7 +514,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
Note that all the returned values live where we expect them to::
-@@ -1314,13 +1352,13 @@
+@@ -1316,13 +1354,13 @@
Unit group with structure C6 of Number Field in a with defining polynomial x^2 + 3
sage: K.<a> = QQ['x'].quotient(x^2 + 3)
sage: u = K.units()[0][0]; u
@@ -957,7 +530,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
sage: K.<a> = QQ['x'].quotient(x^2 + 5)
sage: K.units(())
[(-1, 2)]
-@@ -1332,14 +1370,16 @@
+@@ -1334,14 +1372,16 @@
sage: L.<b> = K['y'].quotient(y^3 + 5); L
Univariate Quotient Polynomial Ring in b over Number Field in a with defining polynomial x^2 + 3 with modulus y^3 + 5
sage: L.units()
@@ -976,7 +549,7 @@ Applied-Upstream: 7.5, commit:920252a6c8fe46490410c84ca508381e7f08393a
Note that all the returned values live where we expect them to::
-@@ -1386,15 +1426,15 @@
+@@ -1388,15 +1428,15 @@
sage: D.selmer_group([K.ideal(2, -a+1)], 2)
[2, -1]
sage: D.selmer_group([K.ideal(2, -a+1), K.ideal(3, a+1)], 2)
diff --git a/debian/patches/u1-fix-proper-scipy-rtol.patch b/debian/patches/u1-fix-proper-scipy-rtol.patch
index b6b854e..9a2d5d9 100644
--- a/debian/patches/u1-fix-proper-scipy-rtol.patch
+++ b/debian/patches/u1-fix-proper-scipy-rtol.patch
@@ -23,7 +23,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
(or `[b,a]`) if possible, where ``f`` is a function in the one variable.
--- a/sage/src/sage/symbolic/expression.pyx
+++ b/sage/src/sage/symbolic/expression.pyx
-@@ -10969,7 +10969,7 @@
+@@ -11012,7 +11012,7 @@
ret = ret[0]
return ret
@@ -32,7 +32,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
"""
Numerically find a root of self on the closed interval [a,b] (or
[b,a]) if possible, where self is a function in the one variable.
-@@ -11085,7 +11085,7 @@
+@@ -11128,7 +11128,7 @@
"""
if is_a_relational(self._gobj) and self.operator() is not operator.eq:
raise ValueError("Symbolic equation must be an equality.")
@@ -41,7 +41,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
if self.number_of_arguments() == 0:
if bool(self == 0):
return a
-@@ -11094,7 +11094,7 @@
+@@ -11137,7 +11137,7 @@
elif self.number_of_arguments() == 1:
f = self._fast_float_(self.default_variable())
return find_root(f, a=a, b=b, xtol=xtol,
diff --git a/debian/patches/u1-version-pbori-boost1.62-hashes.patch b/debian/patches/u1-version-pbori-boost1.62-hashes.patch
index bfdf1e1..b3cbdbb 100644
--- a/debian/patches/u1-version-pbori-boost1.62-hashes.patch
+++ b/debian/patches/u1-version-pbori-boost1.62-hashes.patch
@@ -19,7 +19,7 @@ Author: Tobias Hansen <thansen at debian.org>
+ -813410365 # 32-bit
+ -3935177168673893893 # 64-bit
- .. note::
+ .. NOTE::
@@ -4648,8 +4648,8 @@
@@ -30,7 +30,7 @@ Author: Tobias Hansen <thansen at debian.org>
+ -813410365 # 32-bit
+ -3935177168673893893 # 64-bit
- .. note::
+ .. NOTE::
@@ -5732,8 +5732,8 @@
sage: B.<x,y> = BooleanPolynomialRing()
@@ -41,5 +41,5 @@ Author: Tobias Hansen <thansen at debian.org>
+ -813410365 # 32-bit
+ -3935177168673893893 # 64-bit
- .. note::
+ .. NOTE::
diff --git a/debian/patches/u2-allow-override-sage-local.patch b/debian/patches/u2-allow-override-sage-local.patch
index 207fb73..d2ded99 100644
--- a/debian/patches/u2-allow-override-sage-local.patch
+++ b/debian/patches/u2-allow-override-sage-local.patch
@@ -101,17 +101,6 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
#---------------------------------------------------------
AX_CHECK_ROOT([AC_MSG_ERROR([You cannot build Sage as root, switch to an unpriviledged user])], [])
---- a/sage/src/setup.py
-+++ b/sage/src/setup.py
-@@ -625,7 +625,7 @@
- python_packages, python_modules = find_python_sources(
- SAGE_SRC, ['sage', 'sage_setup'])
- python_data_files = find_extra_files(python_packages,
-- ".", SAGE_CYTHONIZED, SAGE_LIB, ["ntlwrap.cpp"])
-+ ".", SAGE_CYTHONIZED, os.path.relpath(SAGE_LIB, SAGE_LOCAL), ["ntlwrap.cpp"])
-
- log.info('python_packages = {0}'.format(python_packages))
- log.info('python_modules = {0}'.format(python_modules))
--- a/sage/src/sage/repl/ipython_kernel/install.py
+++ b/sage/src/sage/repl/ipython_kernel/install.py
@@ -94,7 +94,7 @@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list