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

SourceForge.net noreply at sourceforge.net
Mon Oct 18 11:03:22 CEST 2004


Bugs item #1044382, was opened at 2004-10-11 09:22
Message generated for change (Comment added) made by sonnenburg
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: Frank Sonnenburg (sonnenburg)
Date: 2004-10-18 11:03

Message:
Logged In: YES 
user_id=459347

Still the same for 2.4b1 on SuSE 9.0: 
frank at theta:/backup/users/frank/div/download/python/2.4b1/
theta-SuSE9.0> ./python -W error 
Python 2.4b1 (#1, Oct 18 2004, 10:45:40) 
[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 
 
To etrepum: 
I really don't expect a segfault, because Python2.1 is built on my 
machine as well as Python2.3 resp. Python2.4b1 is.  I do would expect 
a program termination, iff there were unsatisfied symbols calling new 
or renamed Python C-API functions. 
 

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

Comment By: Terry J. Reedy (tjreedy)
Date: 2004-10-16 00:49

Message:
Logged In: YES 
user_id=593130

Do you get same 2.4? (b1 should be out within a day.)

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

Comment By: Michael Hudson (mwh)
Date: 2004-10-15 15:49

Message:
Logged In: YES 
user_id=6656

Well, maybe but this still looks like a bug to me.

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

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-15 15: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