Ticket #11868: trac_11868-remove_workarounds.patch

File trac_11868-remove_workarounds.patch, 3.0 KB (added by pbruin, 9 years ago)

remove workarounds for bug related to global GEN variables

  • sage/libs/pari/gen.pyx

    # HG changeset patch
    # User Peter Bruin <P.Bruin@warwick.ac.uk>
    # Date 1385329546 0
    # Node ID 47d71c5b0a4126bbe24905bc8785f4f112a352be
    # Parent  9a9096a3c9a32d1957a7c89ab04ebd8caba217c7
    Trac 11868: remove workarounds for bug related to global GEN variables
    
    diff --git a/sage/libs/pari/gen.pyx b/sage/libs/pari/gen.pyx
    a b  
    74747474
    74757475            sage: x = polygen(QQ)
    74767476            sage: K.<t> = NumberField(x^3 - x + 1)
    7477             sage: pari(K).nfhilbert(t, t+2)  # not tested, known bug #11868
     7477            sage: pari(K).nfhilbert(t, t + 2)
    74787478            -1
    74797479            sage: pari(K).nfhilbert(pari(t), pari(t+2))
    74807480            -1
    74817481            sage: P = K.ideal(t^2 + t - 2)   # Prime ideal above 5
     7482            sage: pari(K).nfhilbert(t, t + 2, P.pari_prime())
     7483            -1
    74827484            sage: pari(K).nfhilbert(pari(t), pari(t+2), P.pari_prime())
    74837485            -1
    74847486            sage: P = K.ideal(t^2 + 3*t - 1) # Prime ideal above 23, ramified
     7487            sage: pari(K).nfhilbert(t, t + 2, P.pari_prime())
     7488            1
    74857489            sage: pari(K).nfhilbert(pari(t), pari(t+2), P.pari_prime())
    74867490            1
    74877491        """
  • sage/rings/number_field/number_field.py

    diff --git a/sage/rings/number_field/number_field.py b/sage/rings/number_field/number_field.py
    a b  
    76997699        a = self(a)
    77007700        b = self(b)
    77017701        if P is None:
    7702             # We MUST convert a and b to pari before calling the function
    7703             # to work around Trac #11868 -- Jeroen Demeyer
    7704             return pari(self).nfhilbert(pari(a), pari(b))
     7702            return pari(self).nfhilbert(a, b)
    77057703
    77067704        from sage.rings.morphism import is_RingHomomorphism
    77077705        if is_RingHomomorphism(P):
     
    77287726            raise ValueError, "P (=%s) should be an ideal of self (=%s) in hilbert_symbol, not of %s" % (P, self, P.number_field())
    77297727        if not P.is_prime():
    77307728            raise ValueError, "Non-prime ideal P (=%s) in hilbert_symbol" % P
    7731         # We MUST convert a and b to pari before calling the function
    7732         # to work around Trac #11868 -- Jeroen Demeyer
    7733         return pari(self).nfhilbert(pari(a), pari(b), P.pari_prime())
     7729        return pari(self).nfhilbert(a, b, P.pari_prime())
    77347730       
    77357731    def hilbert_conductor(self,a,b):
    77367732        """
  • sage/schemes/elliptic_curves/ell_point.py

    diff --git a/sage/schemes/elliptic_curves/ell_point.py b/sage/schemes/elliptic_curves/ell_point.py
    a b  
    431431            sage: P._pari_()
    432432            [Mod(1, 11), Mod(2, 11)]
    433433
    434         We need to explicitly call ``pari()`` because of :trac:`11868`::
    435 
    436             sage: pari(E).elladd(pari(O), pari(P))
     434        We no longer need to explicitly call ``pari(O)`` and ``pari(P)``
     435        after :trac:`11868`::
     436
     437            sage: pari(E).elladd(O, P)
    437438            [Mod(1, 11), Mod(2, 11)]
    438439        """
    439440        if self[2]: