[C++-sig] boost::python + python3.1.2 throw

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Oct 20 23:51:58 CEST 2010


I'm not sure how much Boost.Python is used with Python 3.
Haoyu and Troy have done all the fundamental work in the
2009 GSOC project, but the Python 3 support isn't routinely
exercised as far as I know.
We need a volunteer to establish and maintain routine Python 3
testing, and possibly fix bugs like you are observing.
(I still don't have any interest in Python 3 myself since my primary
project depends on a myriad of tools that don't support Python 3.)
Ralf


----- Original Message ----

> From: Neal Becker <ndbecker2 at gmail.com>
> To: cplusplus-sig at python.org
> Sent: Wed, October 20, 2010 2:17:46 PM
> Subject: Re: [C++-sig] boost::python + python3.1.2 throw
> 
> Neal Becker wrote:
> 
> > Neal Becker wrote:
> > 
> >> Has  behavior of c++ exception changed with boost::python + python3?
> >> 
> >> I used to simply use throw from c++.  Now I get:
> >>  SystemError: initialization of ldpc_45 raised unreported exception
> >> 
> >> I believe this exception was really:
> >>   if  (!fp)
> >>     throw std::runtime_error ((boost::format ("fopen  %1% failed") %
> >> name).str());
> >> 
> >> which would  have produced a good error message under python2.6.
> > 
> > I think  this difference in behavior is for an exception thrown
> > during module  initialization?
> > 
> > A c++ exception thrown after initialization  seems to behave as before.
> 
> Just confirmed, under python2.6 I get my nice  error message:
> Traceback (most recent call last):
>   File  "test_btr_equal_coded.py", line 570, in <module>
>     run  (sys.argv[1:])
>   File "test_btr_equal_coded.py", line 148, in  run
>     from ldpc_45 import encoder, decoder, N, K
> RuntimeError:  fopen H23_64800_7-50_3-50_3.dat failed
> 
> But on python3.1.2 I just  get
> SystemError: initialization of ldpc_45 raised unreported  exception
> 
> _______________________________________________
> Cplusplus-sig  mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
> 


More information about the Cplusplus-sig mailing list