'?' and '??' fail under Sun OS

Bug #434669 reported by psismurf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Undecided
Unassigned

Bug Description

Any attempt to get object information using the '?' or '??' operators causes the session to lock up and become unresponsive to any keystrokes (including Ctrl-C and -Z). The help(obj) command however works as advertised. This occurs under both sparc and x86 installations running the same python builds and ipython versions.

Python 2.6.2 (r262:71600, May 27 2009, 13:06:14) [C]
IPython 0.10 -- An enhanced Interactive Python.
SunOS 5.10 Generic_138888-08 sun4u sparc SUNW,Sun-Fire-280R
and also under
SunOS 5.10 Generic_127112-03 i86pc i386 i86pc

Related branches

Revision history for this message
Fernando Perez (fdo.perez) wrote : Re: [Bug 434669] [NEW] '?' and '??' fail under Sun OS

Hi,

On Tue, Sep 22, 2009 at 7:25 AM, psismurf <email address hidden> wrote:
> Public bug reported:
>
> Any attempt to get object information using the '?' or '??' operators
> causes the session to lock up and become unresponsive to any keystrokes
> (including Ctrl-C and -Z). The help(obj) command however works as
> advertised. This occurs under both sparc and x86 installations running
> the same python builds and ipython versions.

I have a strong suspicion this is due to a bug in solaris curses.
Could you run this in a normal python session and see if it locks up
also?

import termios, curses, sys

if 1:
            term_flags = termios.tcgetattr(sys.stdout)
            scr = curses.initscr()
            screen_lines_real,screen_cols = scr.getmaxyx()
            curses.endwin()
            # Restore terminal state in case endwin() didn't.
            termios.tcsetattr(sys.stdout,termios.TCSANOW,term_flags)

If so, can you let us know what os.name and sys.platform return on
your machine? We may have to avoid that code altogether in solaris...

Cheers,

f

Revision history for this message
psismurf (simon-murphy-nz) wrote :

Running the above code in a normal python session (Python 2.6.2 (r262:71600, May 27 2009, 13:06:14) [C] on sunos5) reproduces the problem.

>>> os.name
'posix'
>>> sys.platform
'sunos5'

Revision history for this message
Fernando Perez (fdo.perez) wrote : Re: [Bug 434669] Re: '?' and '??' fail under Sun OS

On Tue, Sep 22, 2009 at 10:18 PM, psismurf <email address hidden> wrote:
> Running the above code in a normal python session (Python 2.6.2
> (r262:71600, May 27 2009, 13:06:14) [C] on sunos5) reproduces the
> problem.

OK, thanks. You may want to report this as a python bug then, since
there's nothing ipython can do about it.

>>>> os.name
> 'posix'
>>>> sys.platform
> 'sunos5'

Thanks. With this info, we can avoid this codepath on solaris.

I'll put together a fix for this problem, thanks for the report.

Cheers,

f

Revision history for this message
psismurf (simon-murphy-nz) wrote :

Thanks Fernando, will do.

Cheers,
   Simon

Revision history for this message
Fernando Perez (fdo.perez) wrote :

Workaround committed to trunk and 0.10.1 branch. Thanks!

Changed in ipython:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.