FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-87904: Report the public module name in curses types and exceptions by serhiy-storchaka · Pull Request #152341 · python/cpython · GitHub

Repository navigation

gh-87904: Report the public module name in curses types and exceptions - #152341

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-type-names
Jun 27, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-type-names

Conversation

Copy link
Copy Markdown
Member

The curses C types and exceptions now set their tp_name to the public module, so __module__, repr() and help() report curses.window, curses.complexchar, curses.complexstr, curses.screen, curses.error, curses.panel.panel and curses.panel.error instead of the underscore extension modules.

This matches the convention already used by decimal.Decimal, collections.deque and sqlite3.Error, and makes the documented public names usable in tracebacks and help(). The types are unchanged objects, still reachable through _curses and _curses_panel.

…eptions

The curses C types and exceptions now set their tp_name to the public
module, so __module__, repr() and help() report curses.window,
curses.complexchar, curses.complexstr, curses.screen, curses.error,
curses.panel.panel and curses.panel.error instead of the underscore
extension modules.  This matches the convention used by decimal.Decimal,
collections.deque and sqlite3.Error.  The types are unchanged objects,
still reachable through the _curses and _curses_panel modules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka merged commit fd63e21 into python:main Jun 27, 2026
56 checks passed
serhiy-storchaka deleted the curses-type-names branch June 27, 2026 07:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL