FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-153862: Fix spurious color pair in curses window.inch() on a wide build (GH-154703) by serhiy-storchaka · Pull Request #154720 · python/cpython · GitHub

Repository navigation

[3.15] gh-153862: Fix spurious color pair in curses window.inch() on a wide build (GH-154703) - #154720

Merged
serhiy-storchaka merged 2 commits into
python:3.15from
serhiy-storchaka:backport-154703-3.15
Jul 26, 2026
Merged

serhiy-storchaka merged 2 commits into
python:3.15from
serhiy-storchaka:backport-154703-3.15

Conversation

serhiy-storchaka commented Jul 26, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Backport of GH-154703 to 3.15.

winch() returns the whole code point, so inch() replacing only its low 8 bits left the high bits in the color field. Rebuild from getcchar()'s attributes and color pair.

Also documents that on a wide-character build inch() returns 0 for a character that does not fit in a single byte, and suggests instr() to read such characters.

serhiy-storchaka and others added 2 commits July 26, 2026 11:13
… wide build (pythonGH-154703)

winch() returns the whole code point, so inch() replacing only its low
8 bits left the high bits in the color field.  Rebuild from
getcchar()'s attributes and color pair.

(cherry picked from commit b618874)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… inch()

A character that does not fit in a single byte has a character byte of 0
in the value returned by inch(); document reading such characters with
instr().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown

serhiy-storchaka added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Jul 26, 2026
serhiy-storchaka merged commit 5be0125 into python:3.15 Jul 26, 2026
61 checks passed

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 5be012561c7e36acd634a7abf726b52d54a4e408 3.14

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 5be012561c7e36acd634a7abf726b52d54a4e408 3.13

serhiy-storchaka removed their assignment Jul 26, 2026
serhiy-storchaka removed needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Jul 26, 2026
serhiy-storchaka deleted the backport-154703-3.15 branch July 26, 2026 12:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL