Hi all, Following an initial post by Paulo from mandriva I started to look at using sage with python-2.7 (2.7.1 in fact). The news is two fold: 1) sage seems to work ok. It starts. 2) a good deal of the test suite is shot.
As a consequence of 2 it is difficult to work out which parts need to be checked. The main issue is the migration to unittest2 back from python-3. In unittest2 the behavior of assertEqual as changed and by default doesn't know anything about derived type leading to a pile of stuff like this: sage -t -force_lib "devel/sage/sage/algebras/affine_nil_temperley_lieb.py" ^[[? 1034h********************************************************************** File "/Users/frb15/Desktop/Gentoo/usr/share/sage/devel/sage/sage/algebras/affine_nil_temperley_lieb.py", line 57: sage: TestSuite(A).run() Expected nothing Got: Failure in _test_an_element: Traceback (most recent call last): File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/site- packages/sage/misc/sage_unittest.py", line 275, in run test_method(tester = tester) File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/site- packages/sage/categories/sets_cat.py", line 388, in _test_an_element tester.assertEqual(self(an_element), an_element, "element construction is not idempotent") File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/unittest/case.py", line 493, in assertEqual assertion_func = self._getAssertEqualityFunc(first, second) File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/unittest/case.py", line 476, in _getAssertEqualityFunc asserter = self._type_equality_funcs.get(type(first)) AttributeError: 'InstanceTester' object has no attribute '_type_equality_funcs' ------------------------------------------------------------ Failure in _test_eq: Traceback (most recent call last): File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/site- packages/sage/misc/sage_unittest.py", line 275, in run test_method(tester = tester) File "element.pyx", line 533, in sage.structure.element.Element._test_eq (sage/structure/element.c:3896) File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/unittest/case.py", line 493, in assertEqual assertion_func = self._getAssertEqualityFunc(first, second) File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/unittest/case.py", line 476, in _getAssertEqualityFunc asserter = self._type_equality_funcs.get(type(first)) AttributeError: 'InstanceTester' object has no attribute '_type_equality_funcs' ------------------------------------------------------------ Failure in _test_pickling: Traceback (most recent call last): File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/site- packages/sage/misc/sage_unittest.py", line 275, in run test_method(tester = tester) File "sage_object.pyx", line 396, in sage.structure.sage_object.SageObject._test_pickling (sage/structure/sage_object.c:312$ File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/unittest/case.py", line 493, in assertEqual assertion_func = self._getAssertEqualityFunc(first, second) File "/Users/frb15/Desktop/Gentoo/usr/lib/python2.7/unittest/case.py", line 476, in _getAssertEqualityFunc asserter = self._type_equality_funcs.get(type(first)) AttributeError: 'InstanceTester' object has no attribute '_type_equality_funcs' There are a few issues of numerical and formatting noise here and there but because of the number of failures of assertEqual the signal to noise ratio is very high. So if we want to migrate to python-2.7 (or even 3) one day we need a strategy to fix these tests and document it so that current ongoing development doesn't lead to further problems. Bonus point if we can do that while preserving backward compatibility. Francois This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org