Comment #28 on issue 1233 by [email protected]: fix the rest of jython bugs
http://code.google.com/p/sympy/issues/detail?id=1233
There has been some discussion about this at
https://groups.google.com/d/topic/sympy/GEoeibRr4ao/discussion. Summary:
My commit that fixed things above was
8abc1caf5eba6273e6b802aa73acd68284960a08. These days, importing sympy in
Jython gives
Traceback (most recent call last):
File "bin/isympy", line 345, in <module>
main()
File "bin/isympy", line 338, in main
from sympy.utilities.exceptions import SymPyDeprecationWarning
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/__init__.py",
line 50, in <module>
from sympy.core import *
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/__init__.py",
line 8, in <module>
from expr import Expr, AtomicExpr
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/expr.py",
line 2899, in <module>
class AtomicExpr(Atom, Expr):
TypeError: Error when calling the metaclass bases
multiple bases have instance lay-out conflict
This was bisected to
commit 9a11265af013bff83f469aa62407267c6d148457
Author: Ronan Lamy <[email protected]>
Date: Mon Mar 19 03:42:16 2012 +0000
Remove AssumeMixin.
This allows us to get rid of some tricky magic in
ManagedProperties.
Recall that AssumeMixin was the original class that we conditionally didn't
define __slots__ in Jython with.
If you remove Basic.__slots__, it imports in Jython 2.5, but in the latest
version of Jython (2.7a2, and also a build from Mercurial), it gives
Traceback (most recent call last):
File "bin/isympy", line 345, in <module>
main()
File "bin/isympy", line 338, in main
from sympy.utilities.exceptions import SymPyDeprecationWarning
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/__init__.py",
line 50, in <module>
from sympy.core import *
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/__init__.py",
line 25, in <module>
from sets import (Set, Interval, Union, EmptySet, FiniteSet, ProductSet,
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/sets.py",
line 10, in <module>
from sympy.assumptions import ask
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/assumptions/__init__.py",
line 2, in <module>
from ask import Q, ask, register_handler, remove_handler
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/assumptions/ask.py",
line 275, in <module>
known_facts = And(
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/logic/boolalg.py",
line 18, in __and__
return And(self, other)
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/operations.py",
line 429, in __new__
obj = super(AssocOp, cls).__new__(cls, _args)
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/cache.py",
line 92, in wrapper
func_cache_it_cache[k] = r = func(*args, **kw_args)
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/function.py",
line 122, in __new__
args = map(sympify, args)
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/sympify.py",
line 218, in sympify
return sympify(coerce(a))
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/sympify.py",
line 218, in sympify
return sympify(coerce(a))
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/basic.py",
line 447, in __repr__
from sympy.printing import sstr
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/printing/__init__.py",
line 3, in <module>
from pretty import pager_print, pretty, pretty_print, pprint, \
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/printing/pretty/__init__.py",
line 3, in <module>
from pretty import (pretty, pretty_print, pprint, pprint_use_unicode,
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/printing/pretty/pretty.py",
line 7, in <module>
from sympy.printing.printer import Printer
File "/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/printing/printer.py",
line 70, in <module>
from sympy import Basic, Add
ImportError: cannot import name Basic
The latest Jython does work however at
8abc1caf5eba6273e6b802aa73acd68284960a08.
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.