[ python-Bugs-1044382 ] Can't raise "C API version mismatch" warning

SourceForge.net noreply at sourceforge.net
Fri Oct 15 15:31:16 CEST 2004


Bugs item #1044382, was opened at 2004-10-11 03:22
Message generated for change (Comment added) made by etrepum
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1044382&group_id=5470

Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Frank Sonnenburg (sonnenburg)
Assigned to: Nobody/Anonymous (nobody)
Summary: Can't raise "C API version mismatch" warning

Initial Comment:
See following example (that's what we know): 
# Importing 2.1 module with Python 2.3 
frank at theta:~> python 
Python 2.3+ (#1, Jan  7 2004, 09:17:35) 
[GCC 3.3.1 (SuSE Linux)] on linux2 
Type "help", "copyright", "credits" or "license" for more 
information. 
>>> import sys 
>>> sys.path.insert(0, '/usr/lib/python2.1/lib-dynload') 
>>> import cmath 
__main__:1: RuntimeWarning: Python C API version mismatch 
for module cmath: This Python has API version 1012, module 
cmath has version 1010. 
>>> 
================================== 
Ignoring this warning works without problem, but raising an 
exception will lead to segmentation fault: 
# Starting python with warnings turned into exceptions 
frank at theta:~> python -W error 
Python 2.3+ (#1, Jan  7 2004, 09:17:35) 
[GCC 3.3.1 (SuSE Linux)] on linux2 
Type "help", "copyright", "credits" or "license" for more 
information. 
>>> import sys 
>>> sys.path.insert(0, '/usr/lib/python2.1/lib-dynload') 
>>> import cmath 
Speicherzugriffsfehler (seg fault) 

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-15 09:31

Message:
Logged In: YES 
user_id=139309

It's not valid to use extensions from one major version of Python with 
another, hence the C API Version Mismatch warning.  What do you 
expect?  You're lucky it doesn't segfault sooner :)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1044382&group_id=5470


More information about the Python-bugs-list mailing list