new weave tar balls -- multiple fixes

Hey group, There are new weave tar balls available. http://www.scipy.org/site_content/weave The CVS version is also up to date. I think we have cleaned up *most* outstanding issues. Please try the tar-balls (preferred over CVS to find any packaging mistakes) as soon as possible. I'll likely announce to c.l.p by noon if no major problems are found. Several major fixes/changes are in the code: * setup_weave.py not found error shouldn't be happening on any platform now. Installation with setup.py should work as expected. * Most errors occuring on other platforms had to do with bugs in dumbdbm in the Python 2.1.x distribution. weave now ships with its own version of dumbdbm and a shelve file that uses it. Hopefully this will get rid of most cross-platform issues. * A change to how exceptions are handled in inline ( no one is likely to notice this one, but it does make a few places in the tutorial out of date. Other things to note: * Testing takes maybe 75 MB of disk space, so if you have a low quota, some tests will fail. * there is no cross platform way to cleanup after the tests, so most of the 75 MB of test files will remain on your harddrive. The main problem here is that windows does not allow you to delete a DLL that is currently loaded into memory. Versions of Unix may have the same problem. Platforms Reports: * W2K, MSVC, gcc-2.95.2 (mingw32) (passed 185 tests) * RH 7.1, gcc-2.96 (passed 185 tests) * Solaris gcc-2.95.1 (3 failures out of 185 tests -- should work for inline and blitz) * Debian (something like 5 failures out of 185 tests -- should work) ( Thanks to Prahbu) thanks, eric

"eric" == eric <eric@scipy.org> writes:
eric> Hey group, There are new weave tar balls available. eric> http://www.scipy.org/site_content/weave eric> The CVS version is also up to date. I think we have cleaned eric> up *most* outstanding issues. Please try the tar-balls eric> (preferred over CVS to find any packaging mistakes) as soon eric> as possible. I'll likely announce to c.l.p by noon if no eric> major problems are found. Sorry, I didnt get the tarball but am testing this off CVS. Here is what I get. cd cvs/scipy; python $ python Python 2.1.1 (#1, Nov 12 2001, 19:01:44) [GCC 2.95.4 20011006 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information.
import weave weave.test() [snip] Run: (1000, 1000) D 1st run(Numeric,compiled,speed up): 1.8170, 0.7485, 2.4274 2nd run(Numeric,compiled,speed up): 1.8238, 0.7478, 2.4388 .................................................a:2 .............................../home/prabhu/.python21_compiled/sc_9a25bc84add18fe6c75501f6b01bd84e1.cpp: In function `struct PyObject * compiled_func(PyObject *, PyObject *)': /home/prabhu/.python21_compiled/sc_9a25bc84add18fe6c75501f6b01bd84e1.cpp:456: no match for `Py::String & < int' /skratch/prabhu/scipy/cvs/scipy/weave/CXX/Objects.hxx:390: candidates are: bool Py::Object::operator <(const Py::Object &) const /skratch/prabhu/scipy/cvs/scipy/weave/CXX/Objects.hxx:1433: bool Py::operator <(const Py::SeqBase<Py::Object>::const_iterator &, const Py::SeqBase<Py::Object>::const_iterator &) /skratch/prabhu/scipy/cvs/scipy/weave/CXX/Objects.hxx:1426: bool Py::operator <(const Py::SeqBase<Py::Object>::iterator &, const Py::SeqBase<Py::Object>::iterator &) .warning: specified build_dir '_bad_path_' does not exist or is or is not writable. Trying default locations ....warning: specified build_dir '_bad_path_' does not exist or is or is not writable. Trying default locations ..................................................................................................
Ran 185 tests in 643.650s OK <unittest.TextTestRunner instance at 0x821882c>
Here is the code segment in sc_9a25bc84add18fe6c75501f6b01bd84e1.cpp 446 if(!PyArg_ParseTuple(args,"OO:compiled_func",&py__locals,&py__globa 446 ls)) 447 return NULL; 448 try 449 { 450 PyObject* raw_locals = py_to_raw_dict(py__locals,"_locals"); 451 PyObject* raw_globals = py_to_raw_dict(py__globals,"_globals"); 452 /* argument conversion code */ 453 Py::String a = convert_to_string(get_variable("a",raw_locals,ra 453 w_globals),"a"); 454 /* inline code */ 455 456 if (a < 2) 457 Py::ValueError("the variable 'a' should not 457 be less than 2"); 458 return_val = Py::new_reference_to(Py::Int(a+1)); 459 /*I would like to fill in changed locals and globals here... 459 */ 460 461 } I guess the third test a = 'string' is failing (as expected). I think this test comes from test_inline.py::test_inline.check_exceptions. (line 34). The test doesnt seem to have failed either. Also maybe you can use self.assertRaises(except_type, func, args) for the exception tests? Otherwise everything else seems to run just fine! All those wierd catalog errors are gone! prabhu

Hey Prabhu,
import weave weave.test() [snip]
Ran 185 tests in 643.650s
OK <unittest.TextTestRunner instance at 0x821882c>
Very good.
The test doesnt seem to have failed either. Also maybe you can use
self.assertRaises(except_type, func, args)
for the exception tests?
We could -- is there a particular benefit? I haven't look at this at all, and am unlikely to run through all the tests to make the changes now. :) But maybe for future tests.
Otherwise everything else seems to run just fine! All those wierd catalog errors are gone!
good deal. I'll try to incorporate your tutorial thing and then announce to c.l.p within an hour or so. eric

"eric" == eric <eric@scipy.org> writes:
>> The test doesnt seem to have failed either. Also maybe you can >> use >> >> self.assertRaises(except_type, func, args) >> >> for the exception tests? eric> We could -- is there a particular benefit? I haven't look Smaller code. Its easier writing something like this self.assertRaises(AssertionError, func, arg1, arg2) instead of: try: func(arg1, arg2) except AssertionError: pass else: raise AssertionError, \ "Test should have raised an exception." # or something You could look at the em_viz tests or the gui_thread tests (there is only one of these in gui_thread though) for concrete examples. eric> at this at all, and am unlikely to run through all the tests eric> to make the changes now. :) But maybe for future tests. Sure, I was just suggesting. And this is useful only when you want to make sure that something raises an error. prabhu
participants (2)
-
eric
-
Prabhu Ramachandran