mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
bpo-31680: Add curses.ncurses_version. (GH-4217)
Use curses.ncurses_version for conditionally skipping a test.
This commit is contained in:
parent
3e429dcc24
commit
b232df9197
5 changed files with 119 additions and 3 deletions
|
|
@ -1291,6 +1291,19 @@ The :mod:`curses` module defines the following data members:
|
|||
A bytes object representing the current version of the module. Also available as
|
||||
:const:`__version__`.
|
||||
|
||||
|
||||
.. data:: ncurses_version
|
||||
|
||||
A named tuple containing the three components of the ncurses library
|
||||
version: *major*, *minor*, and *patch*. All values are integers. The
|
||||
components can also be accessed by name, so ``curses.ncurses_version[0]``
|
||||
is equivalent to ``curses.ncurses_version.major`` and so on.
|
||||
|
||||
Availability: if the ncurses library is used.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
|
||||
Some constants are available to specify character cell attributes.
|
||||
The exact constants available are system dependent.
|
||||
|
||||
|
|
|
|||
|
|
@ -152,6 +152,15 @@ now return ``False`` instead of raising :exc:`ValueError` or its subclasses
|
|||
characters or bytes unrepresentable at the OS level.
|
||||
(Contributed by Serhiy Storchaka in :issue:`33721`.)
|
||||
|
||||
|
||||
ncurses
|
||||
-------
|
||||
|
||||
Added a new variable holding structured version information for the
|
||||
underlying ncurses library: :data:`~curses.ncurses_version`.
|
||||
(Contributed by Serhiy Storchaka in :issue:`31680`.)
|
||||
|
||||
|
||||
pathlib
|
||||
-------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue