From ec7e2c262958717a1bc5e02ea181e6b7a8ba733a Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 6 Dec 2021 22:23:11 +0100 Subject: [PATCH 1/3] bpo-46000: improve NetBSD curses compatibility --- Modules/_cursesmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 3770a032e977dc..7ebad692c2381d 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1230,8 +1230,8 @@ PyCursesWindow_ChgAt(PyCursesWindowObject *self, PyObject *args) return NULL; } - color = (short)((attr >> 8) & 0xff); - attr = attr - (color << 8); + color = (short) PAIR_NUMBER(attr); + attr = attr & A_ATTRIBUTES; if (use_xy) { rtn = mvwchgat(self->win,y,x,num,attr,color,NULL); From 128b5b617d2c2dac854fe8be2ff0f5d8e95bb8a9 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Tue, 7 Dec 2021 11:42:45 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst b/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst new file mode 100644 index 00000000000000..bf1cf68bc35578 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst @@ -0,0 +1 @@ +curses module: improve compatibility with NetBSD curses \ No newline at end of file From 594a9f45a650952b76700fc98eb496d05c7c5b64 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Tue, 7 Dec 2021 14:06:18 +0200 Subject: [PATCH 3/3] Update 2021-12-07-11-42-44.bpo-46000.v_ru3k.rst --- .../Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst b/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst index bf1cf68bc35578..68e4bfa9e77b15 100644 --- a/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst +++ b/Misc/NEWS.d/next/Core and Builtins/2021-12-07-11-42-44.bpo-46000.v_ru3k.rst @@ -1 +1 @@ -curses module: improve compatibility with NetBSD curses \ No newline at end of file +Improve compatibility of the :mod:`curses` module with NetBSD curses.