#16624: upgrade sympy to version 0.7.5
-------------------------------------+-------------------------------------
       Reporter:  rws                |        Owner:
           Type:  enhancement        |       Status:  new
       Priority:  major              |    Milestone:  sage-6.4
      Component:  packages:          |   Resolution:
  standard                           |    Merged in:
       Keywords:                     |    Reviewers:
        Authors:  Ralf Stephan       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  c280b72b302616eef2d5e0b94848fe8a02af091b
  u/rws/upgrade_sympy_to_version_0_7_5|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by rws):

 I tried this patch but the results are the same:
 {{{
 diff --git a/build/pkgs/sympy/patches/import-extmain.patch
 b/build/pkgs/sympy/patches/import-extmain.patch
 new file mode 100644
 index 0000000..af222c1
 --- /dev/null
 +++ b/build/pkgs/sympy/patches/import-extmain.patch
 @@ -0,0 +1,15 @@
 +--- sympy/mpmath/ctx_mp.py~   2014-02-22 20:13:32.000000000 +0100
 ++++ sympy/mpmath/ctx_mp.py    2014-09-11 18:09:11.877599866 +0200
 +@@ -44,9 +44,9 @@
 +
 r'(?P<im>[\+\-]?\d*\.?\d*(e[\+\-]?\d+)?j)?\)?$')
 +
 + if BACKEND == 'sage':
 +-    from sage.libs.mpmath.ext_main import Context as BaseMPContext
 +     # pickle hack
 +-    import sage.libs.mpmath.ext_main as _mpf_module
 ++    from sage.libs.mpmath import ext_main as _mpf_module
 ++    from sage.libs.mpmath.ext_main import Context as BaseMPContext
 + else:
 +     from .ctx_mp_python import PythonMPContext as BaseMPContext
 +     from . import ctx_mp_python as _mpf_module
 +
 }}}
 To be specific, at the moment it's not possible to import anything from
 sympy. What happens is that at the first attempt the following is raised:
 {{{
 ----> 1 from sympy import sympify

 /home/ralf/sage/local/lib/python2.7/site-packages/sympy/__init__.py in
 <module>()
      33 from .logic import *
      34 from .assumptions import *
 ---> 35 from .polys import *
      36 from .series import *
      37 from .functions import *

 /home/ralf/sage/local/lib/python2.7/site-packages/sympy/polys/__init__.py
 in <module>()
       3 __all__ = []
       4
 ----> 5 from . import polytools
       6 __all__.extend(polytools.__all__)
       7 from .polytools import *

 /home/ralf/sage/local/lib/python2.7/site-packages/sympy/polys/polytools.py
 in <module>()
      50 import sympy.mpmath
      51
 ---> 52 from sympy.polys.domains import FF, QQ
      53 from sympy.polys.constructor import construct_domain
      54

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/polys/domains/__init__.py in <module>()
      76 QQ_gmpy = GMPYRationalField
      77
 ---> 78 RR = RealField()
      79 CC = ComplexField()
      80

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/polys/domains/realfield.py in __init__(self, prec, dps,
 tol)
      52
      53         self.dtype = context.mpf
 ---> 54         self.zero = self.dtype(0)
      55         self.one = self.dtype(1)
      56

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/mpmath/ctx_mp_python.py in __new__(cls, val, **kwargs)
      75         else:
      76             v = new(cls)
 ---> 77             v._mpf_ = mpf_pos(cls.mpf_convert_arg(val, prec,
 rounding), prec, rounding)
      78             return v
      79

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/polys/domains/mpelements.py in _set_mpf(self, val)
      23         tol = self.context.tol
      24
 ---> 25         if mpf_lt(mpf_abs(val, prec, rounding), tol):
      26             self.__mpf__ = fzero
      27         else:

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/mpmath/libmp/libmpf.py in mpf_abs(s, prec, rnd)
     662             return (0, man, exp, bc)
     663         return s
 --> 664     return normalize1(0, man, exp, bc, prec, rnd)
     665
     666 def mpf_sign(s):

 TypeError: Argument 'man' has incorrect type (expected
 sage.rings.integer.Integer, got long)
 }}}
 and at any further attempt this one:
 {{{
 ----> 1 from sympy.solvers.diophantine import *

 /home/ralf/sage/local/lib/python2.7/site-packages/sympy/__init__.py in
 <module>()
      33 from .logic import *
      34 from .assumptions import *
 ---> 35 from .polys import *
      36 from .series import *
      37 from .functions import *

 /home/ralf/sage/local/lib/python2.7/site-packages/sympy/polys/__init__.py
 in <module>()
       3 __all__ = []
       4
 ----> 5 from . import polytools
       6 __all__.extend(polytools.__all__)
       7 from .polytools import *

 /home/ralf/sage/local/lib/python2.7/site-packages/sympy/polys/polytools.py
 in <module>()
      50 import sympy.mpmath
      51
 ---> 52 from sympy.polys.domains import FF, QQ
      53 from sympy.polys.constructor import construct_domain
      54

 /home/ralf/sage/local/lib/python2.7/site-
 packages/sympy/polys/domains/__init__.py in <module>()
       3 __all__ = []
       4
 ----> 5 from . import domain
       6 __all__.extend(domain.__all__)
       7 from .domain import *

 ImportError: cannot import name domain
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16624#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to