This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: buildbot: test_curses failure, getmouse() returned ERR
Type: behavior Stage: needs patch
Components: Versions: Python 3.1, Python 3.2, Python 2.7, Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: akuchling, barry, benjamin.peterson, flox, georg.brandl, mark.dickinson, skrah, vstinner
Priority: release blocker Keywords: buildbot, patch

Created on 2010-04-17 17:26 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue8433.patch skrah, 2010-07-20 11:07
test_curses_getmouse.patch mark.dickinson, 2010-08-07 12:30
Messages (13)
msg103411 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-17 17:26
http://www.python.org/dev/buildbot/builders/sparc Debian 3.x/builds/62/steps/test/logs/stdio

test_curses
[?1049h(B[?7h[?5h[?5l[?12l[?25habc[?1000h[?1000l(B[?1049l
[?1l>test test_curses crashed -- <class '_curses.error'>: getmouse() returned ERR

Re-running test test_curses in verbose mode
[?1049h[?12l[?25h(B[?7h[?1000h[?5h[?5labc[?1000h[?1000l(B[?1049l
[?1l>test test_curses crashed -- <class '_curses.error'>: getmouse() returned ERR
Traceback (most recent call last):
  File "./Lib/test/regrtest.py", line 905, in runtest_inner
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_curses.py", line 291, in test_main
    main(stdscr)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_curses.py", line 275, in main
    module_funcs(stdscr)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_curses.py", line 228, in module_funcs
    m = curses.getmouse()
_curses.error: getmouse() returned ERR
msg103415 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2010-04-17 17:50
Other example: http://www.python.org/dev/buildbot/builders/alpha Debian 3.x/builds/63/steps/test/logs/stdio

test_curses
[?1049h(B[?7h[?5h[?5l[?12l[?25habc[?1000h[?1000l(B[?1049l
[?1l>test test_curses crashed -- <class '_curses.error'>: getmouse() returned ERR
Re-running test test_curses in verbose mode
[?1049h[?12l[?25h(B[?7h[?1000h[?5h[?5labc[?1000h[?1000l(B[?1049l
[?1l>test test_curses crashed -- <class '_curses.error'>: getmouse() returned ERR
Traceback (most recent call last):
  File "./Lib/test/regrtest.py", line 905, in runtest_inner
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_curses.py", line 291, in test_main
    main(stdscr)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_curses.py", line 275, in main
    module_funcs(stdscr)
  File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_curses.py", line 228, in module_funcs
    m = curses.getmouse()
_curses.error: getmouse() returned ERR
msg110885 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2010-07-20 11:07
How about skipping the tests until someone can figure out what's going
on? The patch is tested on:

http://www.python.org/dev/buildbot/builders/i386 Ubuntu 3.x/builds/1643
msg112679 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-08-03 20:59
This also affects 2.6 but I've only been able to verify it on Debian squeeze and Ubuntu maverick, both of which are unreleased.  On Ubuntu lucid (stable), this error does not occur.  I'm testing Debian stable now...
msg112689 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-08-03 21:28
Confirmed on Ubuntu:

Lucid, libncurses5 5.7+20090803-2ubuntu3 passes
Maverick, libncurses5 5.7+20100626-0ubuntu1 fails
msg112709 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-08-03 22:23
Confirmed on Debian

squeeze, ncurses 5.7+20100313-2 failed
lenny, ncurses 5.7+20081213-1 succeeds

So clearly something about the curses module is not compatible with the newer versions of ncurses.
msg113167 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-08-07 11:23
I'm a bit surprised that the test *passes* at all, anywhere.  The man page for getmouse says:

"""This function will  return OK if a mouse event is actually visible in the given window, ERR otherwise."""

So if no mouse event occurs (which is presumably the usual case when test_curses is running) then I'd *expect* getmouse to return ERR.

+1 on just disabling these tests for now.
msg113168 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-08-07 11:42
[Barry]
> So clearly something about the curses module is not compatible with the newer versions of ncurses.

Yep. Here's a NEWS entry from the Ubuntu ncurses source:

20100102
        + minor improvement to tic's checking of similar SGR's to allow for the
          most common case of SGR 0.
        + modify getmouse() to act as its documentation implied, returning on
          each call the preceding event until none are left.  When no more
          events remain, it will return ERR.
msg113171 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-08-07 12:30
Here's a patch that simply reverses the getmouse and ungetmouse calls in the test, ensuring that getmouse actually has something to get.  This fixes the test_curses failure for me on Ubuntu 10.10, and doesn't seem to introduce new failures where test_curses was previously working (on OS X 10.6.4, for example).

Barry, do you want me to apply this to 2.6.6, to give us another green buildbot or two?  Or is it not worth it?
msg113172 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-08-07 12:34
Patch applied to py3k in r83780.  I'll watch the py3k buildbots to see how they do.
msg113706 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-08-12 21:17
I'm putting this one in the same category as bug 7467.  I think these two, plus the patches which were applied to release26-maint after rc1 (without approval ;) will require an rc2.  If that can be worked out schedule-wise, I'll allow these patches to be applied.  Stay tuned.
msg113716 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2010-08-12 22:50
Since the patch only changes a test, and it looks innocent enough (i.e. no possibility of regression), and it only changes a test that is run with -u all, I will allow this for 2.6.6.

Mark, please apply your test_curses_getmouse.patch.  You can then close this issue and/or reduce the priority.  Don't forget to add a NEWS file entry.
msg113749 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-08-13 08:00
Fixed in 2.6 in r83970 (3.1 and 2.7 were fixed in revisions r83781, r83782).
History
Date User Action Args
2022-04-11 14:57:00adminsetnosy: + benjamin.peterson, georg.brandl
github: 52680
2010-08-13 08:00:31mark.dickinsonsetstatus: open -> closed

messages: + msg113749
2010-08-12 22:50:25barrysetresolution: accepted
messages: + msg113716
2010-08-12 21:17:39barrysetmessages: + msg113706
2010-08-07 12:34:44mark.dickinsonsetmessages: + msg113172
versions: + Python 3.1, Python 2.7
2010-08-07 12:30:26mark.dickinsonsetpriority: normal -> release blocker
files: + test_curses_getmouse.patch
messages: + msg113171
2010-08-07 11:42:23mark.dickinsonsetmessages: + msg113168
2010-08-07 11:23:21mark.dickinsonsetnosy: + akuchling, mark.dickinson
messages: + msg113167
2010-08-03 22:23:03barrysetmessages: + msg112709
2010-08-03 21:28:18barrysetmessages: + msg112689
2010-08-03 21:02:11barrysetversions: + Python 2.6
2010-08-03 20:59:49barrysetnosy: + barry
messages: + msg112679
2010-07-31 10:07:20floxsetnosy: + flox

type: behavior
stage: needs patch
2010-07-20 11:07:10skrahsetfiles: + issue8433.patch

nosy: + skrah
messages: + msg110885

keywords: + patch
2010-04-17 17:50:39vstinnersetmessages: + msg103415
2010-04-17 17:27:57vstinnersettitle: buildbot: test_curses failure -> buildbot: test_curses failure, getmouse() returned ERR
2010-04-17 17:26:23vstinnercreate