Comment #4 on issue 3605 by [email protected]: Fix warnings when installing
http://code.google.com/p/sympy/issues/detail?id=3605
I just installed sympy via pip using Python 2.7 and the only remaining
error was
SyntaxError: ('invalid syntax',
('/tmp/pipsympy/lib/python2.7/site-packages/sympy/mpmath/libmp/exec_py3.py',
1, 12, 'exec_ = exec\n'))
That file contains one line:
exec_ = exec
exec was converted from a statement to a function for py3k. replacing that
line with the following removes the error syntax error in Python 2.7:
import builtins
exec_ = getattr(builtins, "exec")
This is the method that six.py uses. I have confirmed that it still runs
fine in py3k (all tests pass and i can import exec_ from exec_py3 and it is
equal to the built-in function exec). Python 2 doesn't import this module,
so I did not bother testing it.
While this fixes the problem, it is a modification to mpmath and I don't
know where we stand on those. It looks like as of 1 year ago, mpmath is
using six.py for compatibility, so this patch will not be accepted
upstream. Then again, by *not* using six.py, clearly sympy has diverged
from (or not stayed current with) mpmath. I think this is an easy fix that
should be applied, but obviously it's not my call.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.