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

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

Repository navigation

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

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

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

Conversation

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

Copy link
Copy Markdown
Member

Backport of GH-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.

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 12:47
… 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>
serhiy-storchaka enabled auto-merge (squash) July 26, 2026 12:03
serhiy-storchaka merged commit aa3d583 into python:3.14 Jul 26, 2026
52 checks passed
serhiy-storchaka deleted the backport-154703-3.14 branch August 27, 2026 12:34
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