Bug in CPython 2.2.1? - resend

Fernando Perez fperez528 at yahoo.com
Wed May 14 17:26:48 EDT 2003


Hi all,

I'm resending this b/c I got zero responses, and it feels like a bug to me (the
fact that internal asserts are being triggered by such simple code doesn't
smell right).

--------- original follows

Hi all,

I'm wondering if the following is a bug in Python.  I'm using the 2.2.1
interpreter supplied with RedHat 8.0:

Python 2.2.1 (#1, Aug 30 2002, 12:15:30)
[GCC 3.2 20020822 (Red Hat Linux Rawhide 3.2-4)] on linux2

Here's how to reproduce the problem:

[~]> cat test.py
import readline
readline.get_completer_delims()

[~]> echo 'execfile("test.py");print 10' | python
python: Objects/stringobject.c:111: PyString_FromString: Assertion `str !=
((void *)0)' failed.
Abort

If I comment out the readline call, all is ok:

[~]> cat test.py
import readline
#readline.get_completer_delims()
[~]> echo 'execfile("test.py");print 10' | python
10

I've been bitten by this problem in trying to add support for standard input to
IPython, until I tracked the problem to this readline call.  If this is a real
bug, I can always file a report about it.  But the problem is easy enough to
test for those who have more current codebases that I figured I'd post about it
here first.

Cheers,

f.




More information about the Python-list mailing list