Comment #28 on issue 2482 by [email protected]: Stop bundling mpmath
http://code.google.com/p/sympy/issues/detail?id=2482

The 2to3 issue: as mpmath code is compatible with both py2 and py3 with the same code (no 2to3 involved) calling 2to3 on it produces bad code. One banal example is:

try:
    from itertools import izip
 except ImportError:
     izip = zip

Now, 2to3 will (rightly) remove the import as zip() in py3k behaves like izip used to. Unfortunately, this results in an empty try: statement and the code doesn't even compile. The issues go on...

Now, I asked if it's possible to tell 2to3 to skip a directory - it's not[1]. Now, we could theoretically monkeypatch it and call 2to3 on just specific directories, but, well.. no. I don't think it's feasible to do this. As asmeurer noted above, the Distribute/Setuptools/Distutils situation is complicated enough and I wouldn't feel comfortable monkeypatching it. At the very least, we will be losing out on future features if we start hacking it (like, for example, we don't have JUnitXML from py.test) IMHO, this is not a good path to take. eg. Distribute already adds a hack to have 2to3 convert doctests under Python 3.1 (which has a bug related to this) and hacking on top of that is not going to be nice.


In short, I don't see a practical way to support Python 3 without unbundling mpmath. (we could easily provide a sympy+mpmath tarball for those who want 'em together)


[1] http://mail.python.org/pipermail/distutils-sig/2011-June/017901.html

(BTW, mpmath is not so small: it's ~50k lines of code, compared to our total of ~270k)

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to