mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
bpo-46417: _curses uses PyStructSequence_NewType() (GH-30736)
The _curses module now creates its ncurses_version type as a heap type using PyStructSequence_NewType(), rather than using a static type. * Move _PyStructSequence_FiniType() definition to pycore_structseq.h. * test.pythoninfo: log curses.ncurses_version.
This commit is contained in:
parent
17f268a4ae
commit
1781d55eb3
10 changed files with 40 additions and 19 deletions
|
@ -434,6 +434,15 @@ def collect_time(info_add):
|
|||
info_add('time.get_clock_info(%s)' % clock, clock_info)
|
||||
|
||||
|
||||
def collect_curses(info_add):
|
||||
try:
|
||||
import curses
|
||||
except ImportError:
|
||||
return
|
||||
|
||||
copy_attr(info_add, 'curses.ncurses_version', curses, 'ncurses_version')
|
||||
|
||||
|
||||
def collect_datetime(info_add):
|
||||
try:
|
||||
import datetime
|
||||
|
@ -752,6 +761,7 @@ def collect_info(info):
|
|||
|
||||
collect_builtins,
|
||||
collect_cc,
|
||||
collect_curses,
|
||||
collect_datetime,
|
||||
collect_decimal,
|
||||
collect_expat,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue