@@ -111,10 +111,22 @@ curses
111111 and the module functions :func: `curses.erasewchar `, :func: `curses.killwchar `
112112 and :func: `curses.wunctrl `, the wide-character counterparts of
113113 :func: `curses.erasechar `, :func: `curses.killchar ` and :func: `curses.unctrl `.
114- These features are only available when built against the wide-character
115- ncursesw library.
114+ On a narrow (non-ncursesw) build the character cell holds a single character
115+ without combining marks, representable as one byte in the window's encoding,
116+ and :meth: `~curses.window.in_wstr ` returns its decoded text.
116117 (Contributed by Serhiy Storchaka in :gh: `151757 `.)
117118
119+ * The wide-character :mod: `curses ` functions and methods
120+ :meth: `~curses.window.get_wch `, :meth: `~curses.window.get_wstr `,
121+ :func: `curses.unget_wch `, :func: `curses.erasewchar `,
122+ :func: `curses.killwchar ` and :func: `curses.wunctrl ` now also work when Python
123+ is not built against a wide-character-aware curses library, on an 8-bit
124+ locale, where each character is a single byte in the relevant encoding.
125+ :func: `curses.ungetch ` now also accepts a one-character string, like
126+ :func: `curses.unget_wch `; on a wide-character build it can be any character
127+ (previously a multibyte character raised :exc: `OverflowError `).
128+ (Contributed by Serhiy Storchaka in :gh: `152470 `.)
129+
118130* Add :func: `curses.nofilter `, which undoes the effect of :func: `curses.filter `.
119131 (Contributed by Serhiy Storchaka in :gh: `151744 `.)
120132
@@ -139,21 +151,26 @@ curses
139151 (Contributed by Serhiy Storchaka in :gh: `152219 `.)
140152
141153* Add the :class: `curses.complexchar ` type, representing a styled
142- wide- character cell (its text, attributes and color pair), and the window
154+ character cell (its text, attributes and color pair), and the window
143155 methods :meth: `~curses.window.in_wch ` and :meth: `~curses.window.getbkgrnd `
144- that return one --- the wide-character counterparts of
156+ that return one --- the counterparts of
145157 :meth: `~curses.window.inch ` and :meth: `~curses.window.getbkgd `. The
146158 character-cell methods, such as :meth: `~curses.window.addch ` and
147159 :meth: `~curses.window.border `, now also accept a
148- :class: `~curses.complexchar `.
160+ :class: `~curses.complexchar `. These work whether or not Python was built
161+ against a wide-character-aware curses library; on a narrow build a cell holds a
162+ single character representable as one byte in the window's encoding (so only
163+ 8-bit locales are supported).
149164 (Contributed by Serhiy Storchaka in :gh: `152233 `.)
150165
151166* Add the :class: `curses.complexstr ` type, an immutable run of styled cells
152167 (the string counterpart of :class: `~curses.complexchar `), and the window
153168 method :meth: `~curses.window.in_wchstr ` that returns one. The string-cell
154169 methods :meth: `~curses.window.addstr `, :meth: `~curses.window.addnstr `,
155170 :meth: `~curses.window.insstr ` and :meth: `~curses.window.insnstr ` now also
156- accept a :class: `~curses.complexstr `.
171+ accept a :class: `~curses.complexstr `. Like :class: `~curses.complexchar `, it
172+ works whether or not Python was built against a wide-character-aware curses
173+ library.
157174 (Contributed by Serhiy Storchaka in :gh: `152233 `.)
158175
159176* Add the :mod: `curses ` window method :meth: `~curses.window.dupwin `, which
@@ -165,11 +182,26 @@ curses
165182 :func: `~curses.scr_set `, which dump the whole screen to a file and restore it.
166183 (Contributed by Serhiy Storchaka in :gh: `152260 `.)
167184
185+ * Add the :func: `curses.term_attrs ` function, which returns the supported
186+ video attributes as :ref: `WA_* <curses-wa-constants >` values, the
187+ counterpart of :func: `curses.termattrs `.
188+ (Contributed by Serhiy Storchaka in :gh: `152332 `.)
189+
168190* Add the :mod: `curses ` key-management functions :func: `~curses.define_key `,
169191 :func: `~curses.key_defined ` and :func: `~curses.keyok `, available when built
170192 against an ncurses with ``NCURSES_EXT_FUNCS ``.
171193 (Contributed by Serhiy Storchaka in :gh: `152334 `.)
172194
195+ * Add the :func: `curses.has_mouse ` function and the
196+ :meth: `curses.window.mouse_trafo ` method, completing the :mod: `curses `
197+ mouse interface.
198+ (Contributed by Serhiy Storchaka in :gh: `152325 `.)
199+
200+ * :class: `curses.textpad.Textbox ` now supports entering and reading back the
201+ full Unicode range, including combining characters, when curses is built with
202+ wide-character support.
203+ (Contributed by Serhiy Storchaka in :gh: `133031 `.)
204+
173205gzip
174206----
175207
0 commit comments