| Issue 1262: | fix sympy to work in python3.0 | |
| 4 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
The 2to3 code converts sympy just fine, but then one needs to apply this patch:
----------------------------- sympy/core/logic.py -----------------------------
index d3ae4ec..293f947 100644
@@ -66,6 +66,16 @@ def __ne__(a, b):
else:
return a.args != b.args
+ def __lt__(cls, other):
+ if cls.__cmp__(other)==-1:
+ return True
+ return False
+
+ def __gt__(cls, other):
+ if cls.__cmp__(other)==1:
+ return True
+ return False
+
def __cmp__(a, b):
if type(a) is not type(b):
and then fix the imports in sympy/core. Then it could start working.
The way to fix the imports is to just use regular "import something"
syntax, but do not inject things into other modules, because python3.0 is
more strict and this doesn't work.
|
||||||||||
,
Jan 11, 2009
(No comment was entered for this change.)
Labels: -Priority-Medium Priority-High
|
|||||||||||
,
Jan 23, 2009
I think this is important, raising to milestone 0.6.4
Labels: Milestone-Release0.6.4
|
|||||||||||
,
Jan 31, 2009
running with python2.6's -3 flag output's some useful warnings. |
|||||||||||
,
Feb 08, 2009
(No comment was entered for this change.)
Labels: -Milestone-Release0.6.4 Milestone-Release0.6.5
|
|||||||||||
,
Jul 05, 2009
See this thread for latest updates: http://groups.google.com/group/sympy/browse_thread/thread/9b730436cf602a64 |
|||||||||||
,
Jul 13, 2009
(No comment was entered for this change.)
Labels: Milestone-Release0.6.6
|
|||||||||||
,
Aug 18, 2009
see also Issue 1605 . |
|||||||||||
,
Sep 06, 2009
Another thing that will have to change is that Python 3 does not support cmp functions for sorting anymore. You have to use a key function. I know at least Basic._compare_pretty() and compare_ode_sol() in ode.py are cmp functions, but I am sure there are others. |
|||||||||||
,
Nov 01, 2009
Issue 1605 has been merged into this issue. |
|||||||||||
,
Nov 29, 2009
Using the -3 switch (e.g. "python -3 bin/test") is a good way to check what has to be done. The real problems are sorting with a cmp instead of a key, and overriding __eq__ or __cmp__ without overriding __hash__. |
|||||||||||
,
Dec 01, 2009
(No comment was entered for this change.)
Labels: -Milestone-Release0.6.6 Milestone-Release0.7.0
|
|||||||||||
|
|
|||||||||||