diff options
author | Victor Stinner <vstinner@python.org> | 2022-01-21 02:30:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 02:30:20 (GMT) |
commit | 1781d55eb34f94029e50970232635fc5082378cb (patch) | |
tree | 613d5c847480facfe411345b4a61ee3239950e53 /Lib/test/pythoninfo.py | |
parent | 17f268a4ae6190b2659c89c6f32ad2d006e0e3c8 (diff) | |
download | cpython-1781d55eb34f94029e50970232635fc5082378cb.zip cpython-1781d55eb34f94029e50970232635fc5082378cb.tar.gz cpython-1781d55eb34f94029e50970232635fc5082378cb.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/pythoninfo.py')
-rw-r--r-- | Lib/test/pythoninfo.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py index 39ee9e1..9d733c5 100644 --- a/Lib/test/pythoninfo.py +++ b/Lib/test/pythoninfo.py @@ -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, |