]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 2 Jul 2026 14:19:42 +0000 (17:19 +0300)
committerGitHub <noreply@github.com>
Thu, 2 Jul 2026 14:19:42 +0000 (17:19 +0300)
commite471712958515b65b737ac742b294acf7de9220c
treee601294f378c9eb6505a5f2a7dc633a9b1fcf4c0
parent3428959a3c67138ab56b181953f429b7e1a4ab8b
gh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624)

The curses library keeps a single current terminal: calling initscr()
or newterm() after setupterm() abandons the terminal that setupterm()
allocated without freeing it.  This cannot be fixed safely in code
(freeing the terminal would break the capsule API and pending terminfo
queries), so document the behavior, with a cross-reference from
initscr() and newterm().

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/curses.rst