Skip to content

bpo-36589: Fix the error handling in curses.update_lines_cols()#12766

Merged
serhiy-storchaka merged 3 commits into
python:masterfrom
ZackerySpytz:bpo-36589-curses-update_lines_cols
Nov 17, 2019
Merged

bpo-36589: Fix the error handling in curses.update_lines_cols()#12766
serhiy-storchaka merged 3 commits into
python:masterfrom
ZackerySpytz:bpo-36589-curses-update_lines_cols

Conversation

@ZackerySpytz
Copy link
Copy Markdown
Contributor

@ZackerySpytz ZackerySpytz commented Apr 10, 2019

Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to keep the C function returning 0 on error, and make _curses.update_lines_cols returning None instead of 1 in normal case.

@serhiy-storchaka
Copy link
Copy Markdown
Member

Please add also a NEWS entry.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.7 type-bug An unexpected behavior, bug, or error labels Nov 17, 2019
@serhiy-storchaka serhiy-storchaka merged commit 2bc3434 into python:master Nov 17, 2019
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Copy Markdown
Contributor

Sorry, @ZackerySpytz and @serhiy-storchaka, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 2bc343417a4de83fa6998ff91303877734ecd366 3.8

@miss-islington
Copy link
Copy Markdown
Contributor

Sorry @ZackerySpytz and @serhiy-storchaka, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 2bc343417a4de83fa6998ff91303877734ecd366 3.7

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Dec 31, 2020
pythonGH-12766)

Return None instead of 1..
(cherry picked from commit 2bc3434)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@bedevere-bot
Copy link
Copy Markdown

GH-24023 is a backport of this pull request to the 3.8 branch.

serhiy-storchaka added a commit that referenced this pull request Jan 1, 2021
GH-12766) (GH-24023)

Return None instead of 1.
(cherry picked from commit 2bc3434)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@serhiy-storchaka serhiy-storchaka removed their assignment Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants