Skip to content

gh-155499: Fix curses window.border() and window.box() with 0 - #155871

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:curses-border-box-zero
Aug 21, 2026
Merged

gh-155499: Fix curses window.border() and window.box() with 0#155871
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:curses-border-box-zero

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 15, 2026

Copy link
Copy Markdown
Member

The integer 0 asks for the default character, but it was rejected when passed together with a string character.

Now the drawing function is chosen by what the arguments need: only a complexchar cannot be drawn as a byte character, and a string character is narrowed when one is needed.

The defaults are also documented as 0 rather than as the ACS_* codes, which are not defined before initscr().

The integer 0 asks for the default character, but it was rejected when
passed together with a string character.  Choose the drawing function by
what the arguments need: only a complexchar cannot be drawn as a byte
character, and a string character is narrowed when one is needed.

Document the defaults as 0 rather than as the ACS_* codes, which are not
defined before initscr().
@read-the-docs-community

read-the-docs-community Bot commented Aug 15, 2026

Copy link
Copy Markdown

The regression is not in any release: wide characters in border() and box()
are new in 3.16.
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 21, 2026 06:47
@serhiy-storchaka
serhiy-storchaka merged commit b9d9c3f into python:main Aug 21, 2026
54 checks passed
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