Commit 7e3dd1e
gh-87904: Report the public module name in curses types and exceptions
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>1 parent bbf7786 commit 7e3dd1e
4 files changed
Lines changed: 32 additions & 9 deletions
File tree
- Lib/test
- Misc/NEWS.d/next/Library
- Modules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
| 446 | + | |
446 | 447 | | |
447 | 448 | | |
448 | 449 | | |
| |||
2187 | 2188 | | |
2188 | 2189 | | |
2189 | 2190 | | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
| 2204 | + | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
2190 | 2209 | | |
2191 | 2210 | | |
2192 | 2211 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
829 | | - | |
| 829 | + | |
830 | 830 | | |
831 | | - | |
| 831 | + | |
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4390 | 4390 | | |
4391 | 4391 | | |
4392 | 4392 | | |
4393 | | - | |
| 4393 | + | |
4394 | 4394 | | |
4395 | 4395 | | |
4396 | 4396 | | |
| |||
4415 | 4415 | | |
4416 | 4416 | | |
4417 | 4417 | | |
4418 | | - | |
| 4418 | + | |
4419 | 4419 | | |
4420 | 4420 | | |
4421 | 4421 | | |
| |||
4778 | 4778 | | |
4779 | 4779 | | |
4780 | 4780 | | |
4781 | | - | |
| 4781 | + | |
4782 | 4782 | | |
4783 | 4783 | | |
4784 | 4784 | | |
| |||
4954 | 4954 | | |
4955 | 4955 | | |
4956 | 4956 | | |
4957 | | - | |
| 4957 | + | |
4958 | 4958 | | |
4959 | 4959 | | |
4960 | 4960 | | |
| |||
8042 | 8042 | | |
8043 | 8043 | | |
8044 | 8044 | | |
8045 | | - | |
| 8045 | + | |
8046 | 8046 | | |
8047 | 8047 | | |
8048 | 8048 | | |
| |||
0 commit comments