Boost logo

Boost :

From: rwgk_at_[hidden]
Date: 2001-07-18 19:38:00


I am testing Boost.Python with Python 2.2a1.

Despite the pessimistic warnings at the end of
    http://www.python.org/2.2/descrintro.html
Boost.Python compiles without a warning (Linux gcc 2.95.2).

Some trivial fixes of the doctest tests were necessary.
These can be found in the boost_python_richcmp CVS branch.
When running the patched version of comprehensive.py,
one problem remains:

*****************************************************************
Failure in example:
class MISubclass2(RealPythonClass, Bar):
   def new_method(self):
       print 'MISubclass2.new_method()'
   bound_function = RealPythonClass().other_first
from line #157 of comprehensive
Exception raised:
Traceback (most recent call last):
  File "/net/cci/rwgk/boost/libs/python/test/doctest.py", line 490,
in _run_exam
ples_inner
    exec compile(source, "<string>", "single") in globs
  File "<string>", line 1, in ?
TypeError: PyClass_New: base must be a class
*****************************************************************

When applying this additional patch...

diff -r1.8.2.1 comprehensive.py
158c158
< >>> class MISubclass2(RealPythonClass, Bar):

---
>     >>> class MISubclass2(Bar, RealPythonClass):
comprehensive.py runs without a problem.
From comprehensive.py:
> We can even mulitply inherit from built-in Python classes,
> even if they are first in the list of bases
This does not seem to be the case with Python 2.2a1.
Is this an important problem?
Ralf

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk