Skip to content

gh-155499: Allow zero defaults with wide curses borders - #155523

Closed
ahmedtaha100 wants to merge 1 commit into
python:mainfrom
ahmedtaha100:fix/curses-border-zero-defaults
Closed

gh-155499: Allow zero defaults with wide curses borders#155523
ahmedtaha100 wants to merge 1 commit into
python:mainfrom
ahmedtaha100:fix/curses-border-zero-defaults

Conversation

@ahmedtaha100

@ahmedtaha100 ahmedtaha100 commented Aug 10, 2026

Copy link
Copy Markdown

@fedonman

Fixes #155499.

border() and box() document 0 as the request for the default character. The wide-character path treated it as a narrow character, so mixing it with a string raised TypeError.

Treat zero like an omitted argument when calling wborder_set(), while continuing to reject nonzero integer or byte characters mixed with wide characters. The tests cover the reported border() call and both box() argument orders.

Tests:

  • ./python -m test -v -u curses test_curses (168 passed)
  • make patchcheck
  • git diff --check

@python-cla-bot

python-cla-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Aug 10, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@ahmedtaha100
ahmedtaha100 force-pushed the fix/curses-border-zero-defaults branch from f31c46f to cd478d4 Compare August 10, 2026 21:03
@picnixz

picnixz commented Aug 10, 2026

Copy link
Copy Markdown
Member

Sorry but #155521 was opened first.

@picnixz picnixz closed this Aug 10, 2026
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.

curses border() and box() no longer accept 0 with a str

2 participants