Bug 13142 - Python3 curses module isn't complete
Summary: Python3 curses module isn't complete
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.6.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.7 M3
Assignee: Alexander Kanavin
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-01-16 12:33 UTC by Ross Burton
Modified: 2019-01-22 11:28 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2019-01-16 12:33:05 UTC
python-native:

$ ./python3
Python 3.5.6 (default, Mar  9 2018, 12:34:56)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
>>> curses.unget_wch()
AttributeError: module 'curses' has no attribute 'unget_wch'

https://docs.python.org/3/library/curses.html#curses.unget_wch

My host python3 on Debian works:

>>> curses.unget_wch()
_curses.error: must call initscr() first

https://github.com/python/cpython/blob/master/Modules/_cursesmodule.c#L1320 shows that this is dependent on finding libncursesw, but libncursesw.so.5.9 is in the sysroot.

So, something in either upstream configure scripts or our numerous patches to Python, is breaking it.  Or maybe Debian have a patch we need?
Comment 1 Alexander Kanavin 2019-01-16 15:14:09 UTC
I can look into it, but I was also just about to start the python-sanity project... :)
Comment 2 Richard Purdie 2019-01-17 15:37:25 UTC
A test case which tests this would be great as this keeps getting broken.
Comment 3 Alexander Kanavin 2019-01-18 11:24:50 UTC
This was actually broken from the start, as one of the recipe patches forces python to build with ncurses (not the wide-char version ncursesw). Should be a simple one-liner fix:

http://lists.openembedded.org/pipermail/openembedded-core/2019-January/278183.html