This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Incorrect error handling in curses.update_lines_cols()
Type: Stage: resolved
Components: Extension Modules Versions: Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2019-04-10 19:03 by ZackerySpytz, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12766 merged ZackerySpytz, 2019-04-10 19:09
PR 24023 merged serhiy.storchaka, 2020-12-31 12:42
Messages (4)
msg339881 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-04-10 19:03
update_lines_cols() returns 0 if an error occurs, but the generated AC code checks for a return value of -1.
msg356747 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-11-16 10:12
Historically the update_lines_cols() helper returned 0 on error, and I think that it is better to keep it so.

The bug is in the Python function update_lines_cols() added in 3.5 (see issue4254). Its implementation should return NULL if the helper returns 0, and None otherwise. There is no reason to return an integer.
msg356819 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2019-11-17 17:10
New changeset 2bc343417a4de83fa6998ff91303877734ecd366 by Serhiy Storchaka (Zackery Spytz) in branch 'master':
bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766)
msg384189 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-01-01 17:40
New changeset 187785e2fa2050156a6eda93fb2da31db13f07a6 by Serhiy Storchaka in branch '3.8':
[3.8] bpo-36589: Fix the error handling in curses.update_lines_cols(). (GH-12766) (GH-24023)
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80770
2021-01-01 17:40:41serhiy.storchakasetmessages: + msg384189
2020-12-31 12:42:32serhiy.storchakasetpull_requests: + pull_request22863
2019-12-15 13:34:33cheryl.sabellasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-11-17 17:10:16serhiy.storchakasetmessages: + msg356819
2019-11-16 10:12:34serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg356747
2019-04-10 19:09:25ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request12694
2019-04-10 19:03:55ZackerySpytzcreate